/** * Creates a new Guid-valued OData property with {@link EdmSimpleType#GUID} * * @param name the property name * @param value the property value * @return a new OData property instance */ public static OProperty<Guid> guid(String name, String value) { return guid(name, Guid.fromString(value)); }
/** * Creates a new Guid-valued OData property with {@link EdmSimpleType#GUID} * * @param name the property name * @param value the property value * @return a new OData property instance */ public static OProperty<Guid> guid(String name, String value) { return guid(name, Guid.fromString(value)); }
/** * Creates a new Guid-valued OData property with {@link EdmSimpleType#GUID} * * @param name the property name * @param value the property value * @return a new OData property instance */ public static OProperty<Guid> guid(String name, String value) { return guid(name, Guid.fromString(value)); }
return Expression.guid(Guid.fromString(value)); } else if (word.equals("decimal")) { return Expression.decimal(new BigDecimal(value));
return Expression.guid(Guid.fromString(value)); } else if (word.equals("decimal")) { return Expression.decimal(new BigDecimal(value));
return Expression.guid(Guid.fromString(value)); } else if (word.equals("decimal")) { return Expression.decimal(new BigDecimal(value));
return (OSimpleObject<V>) Impl.create(EdmSimpleType.GUID, Guid.fromString(value)); if (EdmSimpleType.BOOLEAN.equals(type)) return (OSimpleObject<V>) Impl.create(EdmSimpleType.BOOLEAN, Boole.fromString(value).toBoolean());
return (OSimpleObject<V>) Impl.create(EdmSimpleType.GUID, Guid.fromString(value)); if (EdmSimpleType.BOOLEAN.equals(type)) return (OSimpleObject<V>) Impl.create(EdmSimpleType.BOOLEAN, Boole.fromString(value).toBoolean());
return (OSimpleObject<V>) Impl.create(EdmSimpleType.GUID, Guid.fromString(value)); if (EdmSimpleType.BOOLEAN.equals(type)) return (OSimpleObject<V>) Impl.create(EdmSimpleType.BOOLEAN, Boole.fromString(value).toBoolean());
throw new JsonParseException("Illegal JSON string-value format"); else if (EdmSimpleType.GUID.equals(type)) return OProperties.guid(name, Guid.fromString(value)); else if (EdmSimpleType.BOOLEAN.equals(type)) if (tokenType == JsonTokenType.FALSE || tokenType == JsonTokenType.TRUE)
throw new JsonParseException("Illegal JSON string-value format"); else if (EdmSimpleType.GUID.equals(type)) return OProperties.guid(name, Guid.fromString(value)); else if (EdmSimpleType.BOOLEAN.equals(type)) if (tokenType == JsonTokenType.FALSE || tokenType == JsonTokenType.TRUE)
private void run(String[] args) { String uri = ODataEndpoints.NORTHWIND; ODataConsumer c = ODataConsumers.create("http://services.odata.org/validation/odatavalidator/"); Guid validationJobId = Guid.fromString("f4aa9495-ef40-469e-818c-29c4ec5fb2ed"); if (true) { OEntity newValidationJob = c.createEntity("ValidationJobs").properties(OProperties.string("Uri", uri), OProperties.string("Format", "atompub")).execute(); reportEntity("new job", newValidationJob); validationJobId = (Guid) newValidationJob.getEntityKey().asSingleValue(); } boolean complete = false; OEntity validationJob = null; while (!complete) { if (validationJob != null) InternalUtil.sleep(500); validationJob = c.getEntity("ValidationJobs", validationJobId).execute(); complete = validationJob.getProperty("Complete", Boolean.class).getValue(); } reportEntity("job", validationJob); for (OEntity testResult : c.getEntities(validationJob.getLink("TestResults", ORelatedEntitiesLink.class)).execute()) { reportEntity("result", testResult); } report("PayloadLines:"); for (OEntity payloadLine : c.getEntities(validationJob.getLink("PayloadLines", ORelatedEntitiesLink.class)).orderBy("LineNumber").execute()) report(payloadLine.getProperty("LineText", String.class).getValue()); }