org.kuali.rice.kns.web.struts.form.pojo
Class PojoPropertyUtilsBean

java.lang.Object
  extended by org.apache.commons.beanutils.PropertyUtilsBean
      extended by org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean

public class PojoPropertyUtilsBean
extends org.apache.commons.beanutils.PropertyUtilsBean

begin Kuali Foundation modification This class is used to access the properties of a Pojo bean. deleted author tag end Kuali Foundation modification


Nested Class Summary
static interface PojoPropertyUtilsBean.CollectionItemClassProvider
          Thin interface for determining the appropriate item class for a collection property
static class PojoPropertyUtilsBean.PersistenceStructureServiceProvider
          CollectionItemClassProvider backed by OJB metadata
 
Field Summary
protected static PojoPropertyUtilsBean.CollectionItemClassProvider collectionItemClassProvider
           
static org.apache.log4j.Logger LOG
           
 
Constructor Summary
PojoPropertyUtilsBean()
           
 
Method Summary
 Object fastGetNestedProperty(Object obj, String propertyName)
           
protected  Object generateIndexedProperty(Object nestedBean, String property, int index, IndexOutOfBoundsException ioobe)
           
 Object getIndexedProperty(Object bean, String name, int index)
          Customization of superclass getNestedProperty which transparently creates indexed property items
 Object getNestedProperty(Object arg0, String arg1)
          begin Kuali Foundation modification removed comments and @since javadoc attribute end Kuali Foundation modification
 Object getProperty(Object bean, String key)
           
 PropertyDescriptor getPropertyDescriptor(Object bean, String name)
           Retrieve the property descriptor for the specified property of the specified bean, or return null if there is no such descriptor.
 Class getPropertyType(Object bean, String name)
           
 boolean isWriteable(Object bean, String name)
           
 void setNestedProperty(Object bean, String name, Object value)
          begin Kuali Foundation modification Set the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.
 void setSimpleProperty(Object bean, String name, Object value)
          Set the value of the specified simple property of the specified bean, with no type conversions.
 
Methods inherited from class org.apache.commons.beanutils.PropertyUtilsBean
clearDescriptors, copyProperties, describe, getIndexedProperty, getInstance, getMappedProperty, getMappedProperty, getMappedPropertyDescriptors, getMappedPropertyDescriptors, getPropertyDescriptors, getPropertyDescriptors, getPropertyEditorClass, getPropertyOfMapBean, getReadMethod, getResolver, getSimpleProperty, getWriteMethod, isReadable, setIndexedProperty, setIndexedProperty, setMappedProperty, setMappedProperty, setProperty, setPropertyOfMapBean, setResolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.log4j.Logger LOG

collectionItemClassProvider

protected static PojoPropertyUtilsBean.CollectionItemClassProvider collectionItemClassProvider
Constructor Detail

PojoPropertyUtilsBean

public PojoPropertyUtilsBean()
Method Detail

getProperty

public Object getProperty(Object bean,
                          String key)
                   throws IllegalAccessException,
                          InvocationTargetException,
                          NoSuchMethodException
Overrides:
getProperty in class org.apache.commons.beanutils.PropertyUtilsBean
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException

fastGetNestedProperty

public Object fastGetNestedProperty(Object obj,
                                    String propertyName)
                             throws IntrospectionException,
                                    IllegalArgumentException,
                                    IllegalAccessException,
                                    InvocationTargetException
Throws:
IntrospectionException
IllegalArgumentException
IllegalAccessException
InvocationTargetException

isWriteable

public boolean isWriteable(Object bean,
                           String name)
Overrides:
isWriteable in class org.apache.commons.beanutils.PropertyUtilsBean

getNestedProperty

public Object getNestedProperty(Object arg0,
                                String arg1)
                         throws IllegalAccessException,
                                InvocationTargetException,
                                NoSuchMethodException
begin Kuali Foundation modification removed comments and @since javadoc attribute end Kuali Foundation modification

Overrides:
getNestedProperty in class org.apache.commons.beanutils.PropertyUtilsBean
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException
See Also:
PropertyUtilsBean.getNestedProperty(java.lang.Object, java.lang.String)

getIndexedProperty

public Object getIndexedProperty(Object bean,
                                 String name,
                                 int index)
                          throws IllegalAccessException,
                                 InvocationTargetException,
                                 NoSuchMethodException
Customization of superclass getNestedProperty which transparently creates indexed property items

Overrides:
getIndexedProperty in class org.apache.commons.beanutils.PropertyUtilsBean
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException

generateIndexedProperty

protected Object generateIndexedProperty(Object nestedBean,
                                         String property,
                                         int index,
                                         IndexOutOfBoundsException ioobe)
                                  throws IllegalAccessException,
                                         InvocationTargetException,
                                         NoSuchMethodException
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException

setNestedProperty

public void setNestedProperty(Object bean,
                              String name,
                              Object value)
                       throws IllegalAccessException,
                              InvocationTargetException,
                              NoSuchMethodException
begin Kuali Foundation modification Set the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.

Overrides:
setNestedProperty in class org.apache.commons.beanutils.PropertyUtilsBean
Parameters:
bean - Bean whose property is to be modified
name - Possibly nested name of the property to be modified
value - Value to which the property is to be set
Throws:
IllegalAccessException - if the caller does not have access to the property accessor method
IllegalArgumentException - if bean or name is null
IllegalArgumentException - if a nested reference to a property returns null
InvocationTargetException - if the property accessor method throws an exception
NoSuchMethodException - if an accessor method for this propety cannot be found end Kuali Foundation modification

getPropertyDescriptor

public PropertyDescriptor getPropertyDescriptor(Object bean,
                                                String name)
                                         throws IllegalAccessException,
                                                InvocationTargetException,
                                                NoSuchMethodException

Retrieve the property descriptor for the specified property of the specified bean, or return null if there is no such descriptor. This method resolves indexed and nested property references in the same manner as other methods in this class, except that if the last (or only) name element is indexed, the descriptor for the last resolved property itself is returned.

FIXME - Does not work with DynaBeans.

Overrides:
getPropertyDescriptor in class org.apache.commons.beanutils.PropertyUtilsBean
Parameters:
bean - Bean for which a property descriptor is requested
name - Possibly indexed and/or nested name of the property for which a property descriptor is requested
Throws:
IllegalAccessException - if the caller does not have access to the property accessor method
IllegalArgumentException - if bean or name is null
IllegalArgumentException - if a nested reference to a property returns null
InvocationTargetException - if the property accessor method throws an exception
NoSuchMethodException - if an accessor method for this propety cannot be found

setSimpleProperty

public void setSimpleProperty(Object bean,
                              String name,
                              Object value)
                       throws IllegalAccessException,
                              InvocationTargetException,
                              NoSuchMethodException
Set the value of the specified simple property of the specified bean, with no type conversions.

Overrides:
setSimpleProperty in class org.apache.commons.beanutils.PropertyUtilsBean
Parameters:
bean - Bean whose property is to be modified
name - Name of the property to be modified
value - Value to which the property should be set
Throws:
IllegalAccessException - if the caller does not have access to the property accessor method
IllegalArgumentException - if bean or name is null
IllegalArgumentException - if the property name is nested or indexed
InvocationTargetException - if the property accessor method throws an exception
NoSuchMethodException - if an accessor method for this propety cannot be found

getPropertyType

public Class getPropertyType(Object bean,
                             String name)
                      throws IllegalAccessException,
                             InvocationTargetException,
                             NoSuchMethodException
Overrides:
getPropertyType in class org.apache.commons.beanutils.PropertyUtilsBean
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.