@Test public void setMappingValue() throws Exception { SimpleEntity data = new SimpleEntity(); data.myMappedProperty = "mapped property value"; EdmMapping mapping = mockMapping("getMyMappedProperty"); Object value = "Changed mapped property value"; ava.setMappingValue(data, mapping, value); Assert.assertEquals("Changed mapped property value", data.myMappedProperty); }
@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); } }
BeanPropertyAccess implements ValueAccess { @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); } } }
BeanPropertyAccess implements ValueAccess { @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); } }  }
BeanPropertyAccess implements ValueAccess { @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); } }  @Override Object getPropertyValue(final T data, final EdmProperty property); @Override void setPropertyValue(final T data, final EdmProperty property, final V value); @Override Class<?> getPropertyType(final T data, final EdmProperty property); @Override Object getMappingValue(final T data, final EdmMapping mapping); @Override void setMappingValue(final T data, final EdmMapping mapping, final V value); }
BeanPropertyAccess implements ValueAccess { @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); } }  @Override Object getPropertyValue(final T data, final EdmProperty property); @Override void setPropertyValue(final T data, final EdmProperty property, final V value); @Override Class<?> getPropertyType(final T data, final EdmProperty property); @Override Object getMappingValue(final T data, final EdmMapping mapping); @Override void setMappingValue(final T data, final EdmMapping mapping, final V value);  }