|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.taursys.model.PropertyAdapter
Sets the name of the property in the valueObject to use. This is the property that get/setObject and get/setText methods will access. The property name should follow JavaBean conventions.
Example: propertyName="color": then it expects getColor and setColor will be the method names in the valueObject.
NOTE: Setting the propertyName will only have effect BEFORE the setAccessorMethods process is invoked. Once the accessor methods have been set, subsequent changes to this property will have no effect.
Constructor Summary | |
PropertyAdapter(java.lang.Class valueObjectClass,
java.lang.String propertyName)
|
Method Summary | |
protected java.beans.PropertyDescriptor |
getProperty(java.lang.Class c,
java.lang.String propName)
Searches the given class for the given property name and returns the PropertyDescriptor. |
java.lang.String |
getPropertyName()
Returns the name of the property in the valueObject to use. |
java.lang.Object |
getPropertyValue(java.lang.Object valueObject)
Returns a property value from the valueObject based on the propertyName. |
protected java.lang.reflect.Method[] |
getReadMethods()
Returns the Methods used to get/read the target property. |
java.lang.String |
getText(java.lang.Object valueObject,
java.text.Format format)
Returns the accessed Object as a String value using Format if defined. |
protected java.lang.reflect.Method |
getWriteMethod()
Returns the Method used to get/read the target property. |
void |
setPropertyValue(java.lang.Object valueObject,
java.lang.Object value)
Sets a property of the valueObject to the given value based on the propertyName. |
void |
setText(java.lang.Object target,
java.lang.String value,
java.text.Format format)
Sets the accessed Object from the given String value to DataType using Format(if defined) to parse. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PropertyAdapter(java.lang.Class valueObjectClass, java.lang.String propertyName) throws java.beans.IntrospectionException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
Method Detail |
protected java.beans.PropertyDescriptor getProperty(java.lang.Class c, java.lang.String propName) throws java.beans.IntrospectionException
java.beans.IntrospectionException
public java.lang.String getText(java.lang.Object valueObject, java.text.Format format) throws java.beans.IntrospectionException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
java.beans.IntrospectionException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
public void setText(java.lang.Object target, java.lang.String value, java.text.Format format) throws java.beans.IntrospectionException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException, java.text.ParseException, UnsupportedDataTypeException, UnsupportedConversionException
java.beans.IntrospectionException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.text.ParseException
UnsupportedDataTypeException
UnsupportedConversionException
public java.lang.Object getPropertyValue(java.lang.Object valueObject) throws java.beans.IntrospectionException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
java.beans.IntrospectionException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
public void setPropertyValue(java.lang.Object valueObject, java.lang.Object value) throws java.beans.IntrospectionException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
java.beans.IntrospectionException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
public java.lang.String getPropertyName()
Example: propertyName="color": then it expects getColor and setColor will be the method names in the valueObject.
protected java.lang.reflect.Method[] getReadMethods()
protected java.lang.reflect.Method getWriteMethod()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |