|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.widget.table.NestedWriter
public class NestedWriter
This Writer
uses a chaining implementation of getter methods to allow nested properties.
Constructor Summary | |
---|---|
NestedWriter(Class<?> clazz,
String propertyName,
String nestedPropertyName)
Convenience constructor. |
|
NestedWriter(Method getter,
String nestedPropertyName)
Constructor. |
Method Summary | |
---|---|
Class<?> |
getPropertyType()
Returns the property type of the value that can be obtained through this accessor. |
Object |
getValue(Object fromEntity)
Get the value from the source entity. |
void |
setValue(Object toEntity,
Object newValue)
Set the value on the source entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NestedWriter(Class<?> clazz, String propertyName, String nestedPropertyName)
NestedWriter(Method, String)
.
clazz
- type with the nested property.propertyName
- the first part of the nested property.nestedPropertyName
- the nested property, possibly containing more nesting levels. Only the last one in the line
needs the setter method.NestedWriter(Method, String)
public NestedWriter(Method getter, String nestedPropertyName)
getter
- the method providing the entity.nestedPropertyName
- the nested property on the entity.Method Detail |
---|
public void setValue(Object toEntity, Object newValue) throws IllegalAccessException, InvocationTargetException
setValue
in interface Writer
toEntity
- the entity on which the getter should operate.newValue
- the value to set.
IllegalAccessException
InvocationTargetException
public Class<?> getPropertyType()
getPropertyType
in interface Accessor
public Object getValue(Object fromEntity) throws IllegalAccessException, InvocationTargetException
null
.
getValue
in interface Accessor
fromEntity
- the entity on which the getter should operate.
null
if at any point in the chaining a property returned null
or
the value of the nested property.
IllegalAccessException
InvocationTargetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |