@Override public <T, V> void setPropertyValue(final T data, final EdmProperty property, final V value) throws ODataException { final String methodName = getSetterMethodName(getGetterMethodName(property)); if (methodName != null) { setValue(data, methodName, value); } }
@Override public <T> Class<?> getPropertyType(final T data, final EdmProperty property) throws ODataException { return getType(data, getGetterMethodName(property)); }
@Override public <T> Object getPropertyValue(final T data, final EdmProperty property) throws ODataException { return getValue(data, getGetterMethodName(property)); }
@Override public <T, V> void setMappingValue(final T data, final EdmMapping mapping, final V value) throws ODataException { if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) { setValue(data, getSetterMethodName(mapping.getMediaResourceMimeTypeKey()), value); } }
private String getGetterMethodName(final EdmProperty property) throws EdmException { final String prefix = isBooleanProperty(property) ? "is" : "get"; final String defaultMethodName = prefix + property.getName(); return property.getMapping() == null || property.getMapping().getInternalName() == null ? defaultMethodName : property.getMapping().getInternalName(); }
@Override public <T> Object getMappingValue(final T data, final EdmMapping mapping) throws ODataException { if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) { return getValue(data, mapping.getMediaResourceMimeTypeKey()); } return null; }
@Override public <T, V> void setMappingValue(final T data, final EdmMapping mapping, final V value) throws ODataException { if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) { setValue(data, getSetterMethodName(mapping.getMediaResourceMimeTypeKey()), value); } }
private String getGetterMethodName(final EdmProperty property) throws EdmException { final String prefix = isBooleanProperty(property) ? "is" : "get"; final String defaultMethodName = prefix + property.getName(); return property.getMapping() == null || property.getMapping().getInternalName() == null ? defaultMethodName : property.getMapping().getInternalName(); }
@Override public <T> Object getMappingValue(final T data, final EdmMapping mapping) throws ODataException { if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) { return getValue(data, mapping.getMediaResourceMimeTypeKey()); } return null; }
@Override public <T, V> void setPropertyValue(final T data, final EdmProperty property, final V value) throws ODataException { final String methodName = getSetterMethodName(getGetterMethodName(property)); if (methodName != null) { setValue(data, methodName, value); } }
@Override public <T, V> void setMappingValue(final T data, final EdmMapping mapping, final V value) throws ODataException { if (mapping != null && mapping.getMimeType() != null) { setValue(data, getSetterMethodName(mapping.getMimeType()), value); } }
@Override public <T> Object getPropertyValue(final T data, final EdmProperty property) throws ODataException { return getValue(data, getGetterMethodName(property)); }
@Override public <T> Class<?> getPropertyType(final T data, final EdmProperty property) throws ODataException { return getType(data, getGetterMethodName(property)); }
private String getGetterMethodName(final EdmProperty property) throws EdmException { final String prefix = isBooleanProperty(property) ? "is" : "get"; final String defaultMethodName = prefix + property.getName(); return property.getMapping() == null || property.getMapping().getInternalName() == null ? defaultMethodName : property.getMapping().getInternalName(); }
@Override public <T> Object getMappingValue(final T data, final EdmMapping mapping) throws ODataException { if (mapping != null && mapping.getMimeType() != null) { return getValue(data, mapping.getMimeType()); } return null; }
@Override public <T, V> void setPropertyValue(final T data, final EdmProperty property, final V value) throws ODataException { final String methodName = getSetterMethodName(getGetterMethodName(property)); if (methodName != null) { setValue(data, methodName, value); } }
@Override public <T> Object getPropertyValue(final T data, final EdmProperty property) throws ODataException { return getValue(data, getGetterMethodName(property)); }
@Override public <T> Class<?> getPropertyType(final T data, final EdmProperty property) throws ODataException { return getType(data, getGetterMethodName(property)); }