setType(ContentType.parse(format).equals(ContentType.TEXT_PLAIN) ? EdmPrimitiveTypeKind.String : EdmPrimitiveTypeKind.Stream). setValue(IOUtils.toString(src)) // TODO: set correct value .build())); } else if (XMLMetadata.class.isAssignableFrom(reference)) {
setType(ContentType.parse(format).equals(ContentType.TEXT_PLAIN) ? EdmPrimitiveTypeKind.String : EdmPrimitiveTypeKind.Stream). setValue(IOUtils.toString(src)) // TODO: set correct value .build())); } else if (XMLMetadata.class.isAssignableFrom(reference)) {
value = client.getObjectFactory().newEnumValue(type.getFullQualifiedName().toString(), ((Enum<?>) obj).name()); } else { value = client.getObjectFactory().newPrimitiveValueBuilder().setType(type.getPrimitiveTypeKind()).setValue(obj). build();
if (valuable.isGeospatial()) { value = client.getObjectFactory().newPrimitiveValueBuilder(). setValue(valuable.asGeospatial()). setType(type == null || EdmPrimitiveTypeKind.Geography.getFullQualifiedName().equals(type) setValue(valuable.asPrimitive()). setType(type == null || !EdmPrimitiveType.EDM_NAMESPACE.equals(type.getNamespace()) ? null
if (valuable.isGeospatial()) { value = client.getObjectFactory().newPrimitiveValueBuilder(). setValue(valuable.asGeospatial()). setType(type == null || EdmPrimitiveTypeKind.Geography.getFullQualifiedName().equals(type) setValue(valuable.asPrimitive()). setType(type == null || !EdmPrimitiveType.EDM_NAMESPACE.equals(type.getNamespace()) ? null
value = client.getObjectFactory().newEnumValue(type.getFullQualifiedName().toString(), ((Enum<?>) obj).name()); } else { value = client.getObjectFactory().newPrimitiveValueBuilder().setType(type.getPrimitiveTypeKind()).setValue(obj). build();
@Override public ClientPrimitiveValue getBody() { if (resValue == null) { final ContentType contentType = ContentType.parse(getAccept()); try { resValue = odataClient.getObjectFactory().newPrimitiveValueBuilder(). setType(contentType.isCompatible(ContentType.TEXT_PLAIN) ? EdmPrimitiveTypeKind.String : EdmPrimitiveTypeKind.Stream). setValue(getRawResponse()). build(); } catch (Exception e) { throw new HttpClientException(e); } finally { this.close(); } } return resValue; } }
@Override public ClientPrimitiveValue getBody() { if (value == null) { final ContentType contentType = ContentType.parse(getContentType()); try { value = odataClient.getObjectFactory().newPrimitiveValueBuilder(). setType(contentType.isCompatible(ContentType.TEXT_PLAIN) ? EdmPrimitiveTypeKind.String : EdmPrimitiveTypeKind.Stream). setValue(IOUtils.toString(getRawResponse())).build(); } catch (Exception e) { throw new HttpClientException(e); } finally { this.close(); } } return value; } }
@Override public ClientPrimitiveValue getBody() { if (resValue == null) { final ContentType contentType = ContentType.parse(getAccept()); try { resValue = odataClient.getObjectFactory().newPrimitiveValueBuilder(). setType(contentType.isCompatible(ContentType.TEXT_PLAIN) ? EdmPrimitiveTypeKind.String : EdmPrimitiveTypeKind.Stream). setValue(getRawResponse()). build(); } catch (Exception e) { throw new HttpClientException(e); } finally { this.close(); } } return resValue; } }
@Override public ClientPrimitiveValue getBody() { if (value == null) { final ContentType contentType = ContentType.parse(getContentType()); try { value = odataClient.getObjectFactory().newPrimitiveValueBuilder(). setType(contentType.isCompatible(ContentType.TEXT_PLAIN) ? EdmPrimitiveTypeKind.String : EdmPrimitiveTypeKind.Stream). setValue(IOUtils.toString(getRawResponse())).build(); } catch (Exception e) { throw new HttpClientException(e); } finally { this.close(); } } return value; } }