@Test public void getPropertyValueNullData() throws ODataException { AnnotationValueAccess ava = new AnnotationValueAccess(); SimpleEntity data = null; EdmProperty property = mockProperty("Name"); Object value = ava.getPropertyValue(data, property); Assert.assertNull(value); }
@Override public <T> Object getPropertyValue(final T data, final EdmProperty property) throws ODataException { if (data == null) { return null; } else if (annotationHelper.isEdmAnnotated(data)) { return annotationHelper.getValueForProperty(data, property.getName()); } throw new ODataNotImplementedException(ODataNotImplementedException.COMMON); }
AnnotationValueAccess implements ValueAccess { @Override public <T> Object getPropertyValue(final T data, final EdmProperty property) throws ODataException { if (data == null) { return null; } else if (annotationHelper.isEdmAnnotated(data)) { return annotationHelper.getValueForProperty(data, property.getName()); } throw new ODataNotImplementedException(ODataNotImplementedException.COMMON); } }
AnnotationValueAccess implements ValueAccess { @Override public <T> Object getPropertyValue(final T data, final EdmProperty property) throws ODataException { if (data == null) { return null; } else if (annotationHelper.isEdmAnnotated(data)) { return annotationHelper.getValueForProperty(data, property.getName()); } throw new ODataNotImplementedException(ODataNotImplementedException.COMMON); }  }
AnnotationValueAccess implements ValueAccess { @Override public <T> Object getPropertyValue(final T data, final EdmProperty property) throws ODataException { if (data == null) { return null; } else if (annotationHelper.isEdmAnnotated(data)) { return annotationHelper.getValueForProperty(data, property.getName()); } throw new ODataNotImplementedException(ODataNotImplementedException.COMMON); }  @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); }
AnnotationValueAccess implements ValueAccess { @Override public <T> Object getPropertyValue(final T data, final EdmProperty property) throws ODataException { if (data == null) { return null; } else if (annotationHelper.isEdmAnnotated(data)) { return annotationHelper.getValueForProperty(data, property.getName()); } throw new ODataNotImplementedException(ODataNotImplementedException.COMMON); }  @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);  }