@Override public Map<String, Object> asJavaMap() { final Map<String, Object> result = new LinkedHashMap<String, Object>(); for (Map.Entry<String, ClientProperty> entry : fields.entrySet()) { Object value = null; if (entry.getValue().hasPrimitiveValue()) { value = entry.getValue().getPrimitiveValue().toValue(); } else if (entry.getValue().hasComplexValue()) { value = entry.getValue().getComplexValue().asJavaMap(); } else if (entry.getValue().hasCollectionValue()) { value = entry.getValue().getCollectionValue().asJavaCollection(); } else if (entry.getValue().hasEnumValue()) { value = entry.getValue().getEnumValue().toString(); } result.put(entry.getKey(), value); } return result; }
@Override public Map<String, Object> asJavaMap() { final Map<String, Object> result = new LinkedHashMap<String, Object>(); for (Map.Entry<String, ClientProperty> entry : fields.entrySet()) { Object value = null; if (entry.getValue().hasPrimitiveValue()) { value = entry.getValue().getPrimitiveValue().toValue(); } else if (entry.getValue().hasComplexValue()) { value = entry.getValue().getComplexValue().asJavaMap(); } else if (entry.getValue().hasCollectionValue()) { value = entry.getValue().getCollectionValue().asJavaCollection(); } else if (entry.getValue().hasEnumValue()) { value = entry.getValue().getEnumValue().toString(); } result.put(entry.getKey(), value); } return result; }
@Override public ODataPropertyUpdateRequest getPropertyComplexValueUpdateRequest( final URI targetURI, final UpdateType type, final ClientProperty property) { if (!property.hasComplexValue()) { throw new IllegalArgumentException("A complex value is required"); } final ODataPropertyUpdateRequest req; if (client.getConfiguration().isUseXHTTPMethod()) { req = new ODataPropertyUpdateRequestImpl(client, HttpMethod.POST, targetURI, property); req.setXHTTPMethod(type.getMethod().name()); } else { req = new ODataPropertyUpdateRequestImpl(client, type.getMethod(), targetURI, property); } return req; }
@Override public ODataPropertyUpdateRequest getPropertyComplexValueUpdateRequest( final URI targetURI, final UpdateType type, final ClientProperty property) { if (!property.hasComplexValue()) { throw new IllegalArgumentException("A complex value is required"); } final ODataPropertyUpdateRequest req; if (client.getConfiguration().isUseXHTTPMethod()) { req = new ODataPropertyUpdateRequestImpl(client, HttpMethod.POST, targetURI, property); req.setXHTTPMethod(type.getMethod().name()); } else { req = new ODataPropertyUpdateRequestImpl(client, type.getMethod(), targetURI, property); } return req; }
setPropertyValue(bean, getter, primitiveValueToObject( property.getPrimitiveValue(), getPropertyClass(typeRef, property.getName()))); } else if (property.hasComplexValue()) { final Object complex = Proxy.newProxyInstance( Thread.currentThread().getContextClassLoader(),
setPropertyValue(bean, getter, primitiveValueToObject( property.getPrimitiveValue(), getPropertyClass(typeRef, property.getName()))); } else if (property.hasComplexValue()) { final Object complex = Proxy.newProxyInstance( Thread.currentThread().getContextClassLoader(),