Spring Data Core

org.springframework.data.util
Class DirectFieldAccessFallbackBeanWrapper

java.lang.Object
  extended by org.springframework.beans.PropertyEditorRegistrySupport
      extended by org.springframework.beans.TypeConverterSupport
          extended by org.springframework.beans.AbstractPropertyAccessor
              extended by org.springframework.beans.BeanWrapperImpl
                  extended by org.springframework.data.util.DirectFieldAccessFallbackBeanWrapper
All Implemented Interfaces:
BeanWrapper, ConfigurablePropertyAccessor, PropertyAccessor, PropertyEditorRegistry, TypeConverter

public class DirectFieldAccessFallbackBeanWrapper
extends BeanWrapperImpl

Custom extension of BeanWrapperImpl that falls back to direct field access in case the object or type being wrapped does not use accessor methods.

Author:
Oliver Gierke

Field Summary
 
Fields inherited from interface org.springframework.beans.PropertyAccessor
NESTED_PROPERTY_SEPARATOR, NESTED_PROPERTY_SEPARATOR_CHAR, PROPERTY_KEY_PREFIX, PROPERTY_KEY_PREFIX_CHAR, PROPERTY_KEY_SUFFIX, PROPERTY_KEY_SUFFIX_CHAR
 
Constructor Summary
DirectFieldAccessFallbackBeanWrapper(Class<?> type)
           
DirectFieldAccessFallbackBeanWrapper(Object entity)
           
 
Method Summary
 Object getPropertyValue(String propertyName)
           
 void setPropertyValue(String propertyName, Object value)
           
 
Methods inherited from class org.springframework.beans.BeanWrapperImpl
convertForProperty, getAutoGrowCollectionLimit, getBeanWrapperForPropertyPath, getNestedPath, getPropertyDescriptor, getPropertyDescriptorInternal, getPropertyDescriptors, getPropertyType, getPropertyTypeDescriptor, getRootClass, getRootInstance, getSecurityContext, getWrappedClass, getWrappedInstance, isAutoGrowNestedPaths, isReadableProperty, isWritableProperty, newNestedBeanWrapper, setAutoGrowCollectionLimit, setAutoGrowNestedPaths, setIntrospectionClass, setPropertyValue, setSecurityContext, setWrappedInstance, setWrappedInstance, toString
 
Methods inherited from class org.springframework.beans.AbstractPropertyAccessor
isExtractOldValueForEditor, setExtractOldValueForEditor, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues
 
Methods inherited from class org.springframework.beans.TypeConverterSupport
convertIfNecessary, convertIfNecessary, convertIfNecessary
 
Methods inherited from class org.springframework.beans.PropertyEditorRegistrySupport
copyCustomEditorsTo, copyDefaultEditorsTo, findCustomEditor, getConversionService, getDefaultEditor, guessPropertyTypeFromEditors, hasCustomEditorForElement, isSharedEditor, overrideDefaultEditor, registerCustomEditor, registerCustomEditor, registerDefaultEditors, registerSharedEditor, setConversionService, useConfigValueEditors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.beans.ConfigurablePropertyAccessor
getConversionService, isExtractOldValueForEditor, setConversionService, setExtractOldValueForEditor
 
Methods inherited from interface org.springframework.beans.PropertyAccessor
setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues
 
Methods inherited from interface org.springframework.beans.PropertyEditorRegistry
findCustomEditor, registerCustomEditor, registerCustomEditor
 
Methods inherited from interface org.springframework.beans.TypeConverter
convertIfNecessary, convertIfNecessary, convertIfNecessary
 

Constructor Detail

DirectFieldAccessFallbackBeanWrapper

public DirectFieldAccessFallbackBeanWrapper(Object entity)

DirectFieldAccessFallbackBeanWrapper

public DirectFieldAccessFallbackBeanWrapper(Class<?> type)
Method Detail

getPropertyValue

public Object getPropertyValue(String propertyName)
Specified by:
getPropertyValue in interface PropertyAccessor
Overrides:
getPropertyValue in class BeanWrapperImpl

setPropertyValue

public void setPropertyValue(String propertyName,
                             Object value)
Specified by:
setPropertyValue in interface PropertyAccessor
Overrides:
setPropertyValue in class BeanWrapperImpl

Spring Data Core

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.