Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » [javadoc | source]
org.springframework.beans
public interface: PropertyAccessor [javadoc | source]

All Known Implementing Classes:
    BeanWrapper, BeanWrapperImpl, AbstractPropertyAccessor, ConfigurablePropertyAccessor, DirectFieldAccessor

Common interface for classes that can access named properties (such as bean properties of an object or fields in an object) Serves as base interface for BeanWrapper .
Field Summary
 String NESTED_PROPERTY_SEPARATOR    Path separator for nested properties. Follows normal Java conventions: getFoo().getBar() would be "foo.bar". 
 char NESTED_PROPERTY_SEPARATOR_CHAR     
 String PROPERTY_KEY_PREFIX    Marker that indicates the start of a property key for an indexed or mapped property like "person.addresses[0]". 
 char PROPERTY_KEY_PREFIX_CHAR     
 String PROPERTY_KEY_SUFFIX    Marker that indicates the end of a property key for an indexed or mapped property like "person.addresses[0]". 
 char PROPERTY_KEY_SUFFIX_CHAR     
Method from org.springframework.beans.PropertyAccessor Summary:
getPropertyType,   getPropertyValue,   isReadableProperty,   isWritableProperty,   setPropertyValue,   setPropertyValue,   setPropertyValues,   setPropertyValues,   setPropertyValues,   setPropertyValues
Method from org.springframework.beans.PropertyAccessor Detail:
 public Class getPropertyType(String propertyName) throws BeansException
    Determine the property type for the specified property, either checking the property descriptor or checking the value in case of an indexed or mapped element.
 public Object getPropertyValue(String propertyName) throws BeansException
    Get the current value of the specified property.
 public boolean isReadableProperty(String propertyName)
    Determine whether the specified property is readable.

    Returns false if the property doesn't exist.

 public boolean isWritableProperty(String propertyName)
    Determine whether the specified property is writable.

    Returns false if the property doesn't exist.

 public  void setPropertyValue(PropertyValue pv) throws BeansException
    Set the specified value as current property value.
 public  void setPropertyValue(String propertyName,
    Object value) throws BeansException
    Set the specified value as current property value.
 public  void setPropertyValues(Map map) throws BeansException
    Perform a batch update from a Map.

    Bulk updates from PropertyValues are more powerful: This method is provided for convenience. Behavior will be identical to that of the #setPropertyValues(PropertyValues) method.

 public  void setPropertyValues(PropertyValues pvs) throws BeansException
    The preferred way to perform a batch update.

    Note that performing a batch update differs from performing a single update, in that an implementation of this class will continue to update properties if a recoverable error (such as a type mismatch, but not an invalid field name or the like) is encountered, throwing a PropertyBatchUpdateException containing all the individual errors. This exception can be examined later to see all binding errors. Properties that were successfully updated remain changed.

    Does not allow unknown fields or invalid fields.

 public  void setPropertyValues(PropertyValues pvs,
    boolean ignoreUnknown) throws BeansException
    Perform a batch update with more control over behavior.

    Note that performing a batch update differs from performing a single update, in that an implementation of this class will continue to update properties if a recoverable error (such as a type mismatch, but not an invalid field name or the like) is encountered, throwing a PropertyBatchUpdateException containing all the individual errors. This exception can be examined later to see all binding errors. Properties that were successfully updated remain changed.

 public  void setPropertyValues(PropertyValues pvs,
    boolean ignoreUnknown,
    boolean ignoreInvalid) throws BeansException
    Perform a batch update with full control over behavior.

    Note that performing a batch update differs from performing a single update, in that an implementation of this class will continue to update properties if a recoverable error (such as a type mismatch, but not an invalid field name or the like) is encountered, throwing a PropertyBatchUpdateException containing all the individual errors. This exception can be examined later to see all binding errors. Properties that were successfully updated remain changed.