public static void addProperties( final EdmEnabledODataClient client, final Map<String, Object> changes, final ClientComplexValue entity) { for (Map.Entry<String, Object> entry : changes.entrySet()) { entity.add(getODataComplexProperty( client, new FullQualifiedName(entity.getTypeName()), entry.getKey(), entry.getValue())); } }
public static void addProperties( final EdmEnabledODataClient client, final Map<String, Object> changes, final ClientComplexValue entity) { for (Map.Entry<String, Object> entry : changes.entrySet()) { entity.add(getODataComplexProperty( client, new FullQualifiedName(entity.getTypeName()), entry.getKey(), entry.getValue())); } }
private OperationInvocationHandler(final ComplexInvocationHandler complexHandler) { super(complexHandler.service); this.target = complexHandler; this.targetFQN = new FullQualifiedName(complexHandler.getComplex().getTypeName()); }
private OperationInvocationHandler(final ComplexInvocationHandler complexHandler) { super(complexHandler.service); this.target = complexHandler; this.targetFQN = new FullQualifiedName(complexHandler.getComplex().getTypeName()); }
protected Object getValue(final ClientValue value) { Object valueResource = null; if (value == null) { return null; } if (value.isEnum()) { valueResource = value.asEnum().getValue(); } else if (value.isPrimitive()) { valueResource = value.asPrimitive().toValue(); } else if (value.isComplex()) { List<Property> complexProperties = new ArrayList<Property>(); for (final ClientProperty propertyValue : value.asComplex()) { complexProperties.add(getProperty(propertyValue)); } final ComplexValue lcValueResource = new ComplexValue(); lcValueResource.getValue().addAll(complexProperties); annotations(value.asComplex(), lcValueResource); links(value.asComplex(), lcValueResource); lcValueResource.setTypeName(value.asComplex().getTypeName()); valueResource = lcValueResource; } else if (value.isCollection()) { final ClientCollectionValue<? extends ClientValue> _value = value.asCollection(); ArrayList<Object> lcValueResource = new ArrayList<Object>(); for (final ClientValue collectionValue : _value) { lcValueResource.add(getValue(collectionValue)); } valueResource = lcValueResource; } return valueResource; }
protected Object getValue(final ClientValue value) { Object valueResource = null; if (value == null) { return null; } if (value.isEnum()) { valueResource = value.asEnum().getValue(); } else if (value.isPrimitive()) { valueResource = value.asPrimitive().toValue(); } else if (value.isComplex()) { List<Property> complexProperties = new ArrayList<Property>(); for (final ClientProperty propertyValue : value.asComplex()) { complexProperties.add(getProperty(propertyValue)); } final ComplexValue lcValueResource = new ComplexValue(); lcValueResource.getValue().addAll(complexProperties); annotations(value.asComplex(), lcValueResource); links(value.asComplex(), lcValueResource); lcValueResource.setTypeName(value.asComplex().getTypeName()); valueResource = lcValueResource; } else if (value.isCollection()) { final ClientCollectionValue<? extends ClientValue> _value = value.asCollection(); ArrayList<Object> lcValueResource = new ArrayList<Object>(); for (final ClientValue collectionValue : _value) { lcValueResource.add(getValue(collectionValue)); } valueResource = lcValueResource; } return valueResource; }
propertyResource.setValue(ValueType.ENUM, propertyValue); } else if (odataValuable.hasComplexValue()) { propertyResource.setType(odataValuable.getComplexValue().getTypeName()); propertyResource.setValue(ValueType.COMPLEX, propertyValue); } else if (odataValuable.hasCollectionValue()) {
propertyResource.setValue(ValueType.ENUM, propertyValue); } else if (odataValuable.hasComplexValue()) { propertyResource.setType(odataValuable.getComplexValue().getTypeName()); propertyResource.setValue(ValueType.COMPLEX, propertyValue); } else if (odataValuable.hasCollectionValue()) {