|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.taursys.model.AbstractValueHolder com.taursys.model.ObjectValueHolder com.taursys.model.VOValueHolder
This is an implementation of ValueHolder which stores value in a ValueObject(JavaBean). This ValueHolder can be shared by multiple models and can access all/any properties of the ValueObject/JavaBean. For each property accessed, this object creates and uses a PropertyAccessor to manage the access process. For performance benefits, this class caches the PropertyAccessors after they have been created and reuses them for subsequent invocations.
Field Summary |
Fields inherited from class com.taursys.model.ObjectValueHolder |
obj |
Constructor Summary | |
VOValueHolder()
Constructs a new VOValueHolder. |
Method Summary | |
int |
getJavaDataType(java.lang.String propertyName)
Returns the java data type for the given property |
protected PropertyAccessor |
getPropertyAccessor(java.lang.String propertyName)
Returns existing PropertyAccessor for given propertyName else creates new one. |
protected java.util.Map |
getPropertyAccessors()
Returns the map of PropertyAccessors which have been created so far. |
java.lang.Object |
getPropertyValue(java.lang.String propertyName)
Returns the value of the given property in the obj. |
protected java.lang.Object |
getPropertyValue(java.lang.String propertyName,
java.lang.Object vo)
Get the value for the given property in the given obj. |
protected java.lang.Object[] |
getPropertyValues(java.lang.String[] propertyNames,
java.lang.Object vo)
Get the values for the given properties in the given obj. |
java.lang.Object |
getValueObject()
Get the internal object for this holder. |
java.lang.Class |
getValueObjectClass()
Returns the class of the value object. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
This method gets called when a bound property is changed. |
void |
setObject(java.lang.Object obj)
Set the internal object for this holder. |
void |
setObject(java.lang.Object obj,
javax.swing.event.ChangeEvent e)
Set the internal object for this holder. |
void |
setPropertyValue(java.lang.String propertyName,
java.lang.Object value)
Set the value for the given property in the obj. |
protected void |
setPropertyValues(java.lang.String[] propertyNames,
java.lang.Object[] values,
java.lang.Object vo)
Set the values for the given properties in the given obj. |
protected void |
setPropertyValues(java.lang.String propertyName,
java.lang.Object value,
java.lang.Object vo)
Set the values for the given properties in the given obj. |
void |
setValueObject(java.lang.Object obj)
Set the internal object for this holder. |
void |
setValueObject(java.lang.Object obj,
javax.swing.event.ChangeEvent e)
Set the internal object for this holder. |
void |
setValueObjectClass(java.lang.Class newValueObjectClass)
Sets the class of the value object. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class com.taursys.model.ObjectValueHolder |
addChangeListener, fireContentValueChanged, getObject, getParentPropertyName, getParentValueHolder, setParentPropertyName, setParentValueHolder, stateChanged |
Methods inherited from class com.taursys.model.AbstractValueHolder |
checkArrays, fireStateChanged, getAlias, getPropertyValues, isMultiplePropertiesChanging, removeChangeListener, setAlias, setMultiplePropertiesChanging, setPropertyValues |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public VOValueHolder()
Method Detail |
public java.lang.Object getPropertyValue(java.lang.String propertyName) throws ModelException
getPropertyValue
in interface ValueHolder
getPropertyValue
in class ObjectValueHolder
propertyName
- ignored
ModelException
public void setPropertyValue(java.lang.String propertyName, java.lang.Object value) throws ModelException
setPropertyValue
in interface ValueHolder
setPropertyValue
in class ObjectValueHolder
ModelException
public int getJavaDataType(java.lang.String propertyName) throws ModelException
getJavaDataType
in interface ValueHolder
getJavaDataType
in class ObjectValueHolder
ModelException
public void setObject(java.lang.Object obj)
setObject
in class ObjectValueHolder
obj
- the internal object for this holder.public void setObject(java.lang.Object obj, javax.swing.event.ChangeEvent e)
setObject
in class ObjectValueHolder
obj
- the internal object for this holder.e
- ChangeEvent to fire to all ChangeListeners (if not null)public void setValueObject(java.lang.Object obj)
obj
- the internal object for this holder.public void setValueObject(java.lang.Object obj, javax.swing.event.ChangeEvent e)
obj
- the internal object for this holder.e
- ChangeEvent to fire to all ChangeListeners (if not null)public java.lang.Object getValueObject()
public void setValueObjectClass(java.lang.Class newValueObjectClass)
public java.lang.Class getValueObjectClass()
protected java.lang.Object getPropertyValue(java.lang.String propertyName, java.lang.Object vo) throws ModelException
getPropertyValue
in class ObjectValueHolder
ModelException
protected java.lang.Object[] getPropertyValues(java.lang.String[] propertyNames, java.lang.Object vo) throws ModelException
getPropertyValues
in class ObjectValueHolder
ModelException
protected void setPropertyValues(java.lang.String propertyName, java.lang.Object value, java.lang.Object vo) throws ModelException
setPropertyValues
in class ObjectValueHolder
ModelException
protected void setPropertyValues(java.lang.String[] propertyNames, java.lang.Object[] values, java.lang.Object vo) throws ModelException
setPropertyValues
in class ObjectValueHolder
ModelException
protected PropertyAccessor getPropertyAccessor(java.lang.String propertyName) throws ModelException
ModelException
protected java.util.Map getPropertyAccessors()
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
public java.lang.String toString()
toString
in class ObjectValueHolder
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |