|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.data.util.AbstractProperty<T> com.vaadin.data.util.NestedMethodProperty<T>
public class NestedMethodProperty<T>
Nested accessor based property for a bean. The property is specified in the dotted notation, e.g. "address.street", and can contain multiple levels of nesting. When accessing the property value, all intermediate getters must return non-null values.
MethodProperty
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class com.vaadin.data.util.AbstractProperty |
---|
AbstractProperty.ReadOnlyStatusChangeEvent |
Nested classes/interfaces inherited from interface com.vaadin.data.Property |
---|
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
Constructor Summary | |
---|---|
NestedMethodProperty(Object instance,
String propertyName)
Constructs a nested method property for a given object instance. |
Method Summary | |
---|---|
protected List<Method> |
getGetMethods()
Returns an unmodifiable list of getter methods to call in sequence to get the property value. |
Class<? extends T> |
getType()
Returns the type of the Property. |
T |
getValue()
Gets the value stored in the Property. |
protected void |
invokeSetMethod(T value)
Internal method to actually call the setter method of the wrapped property. |
boolean |
isReadOnly()
Tests if the Property is in read-only mode. |
void |
setValue(Object newValue)
Sets the value of the property. |
Methods inherited from class com.vaadin.data.util.AbstractProperty |
---|
addListener, addListener, fireReadOnlyStatusChange, fireValueChange, getListeners, removeListener, removeListener, setReadOnly, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NestedMethodProperty(Object instance, String propertyName)
instance
- top-level bean to which the property appliespropertyName
- dot separated nested property name
IllegalArgumentException
- if the property name is invalidMethod Detail |
---|
public Class<? extends T> getType()
Property
getValue
and
setValue
must be compatible with this type: one must be able
to safely cast the value returned from getValue
to the given
type and pass any variable assignable to this type as an argument to
setValue
.
public boolean isReadOnly()
AbstractProperty
setValue
will throw
ReadOnlyException
and will not modify the value of the
Property.
Override for additional restrictions on what is considered a read-only
property.
isReadOnly
in interface Property<T>
isReadOnly
in class AbstractProperty<T>
true
if the Property is in read-only mode,
false
if it's notpublic T getValue()
public void setValue(Object newValue) throws Property.ReadOnlyException
newValue
- the New value of the property.
Property.ReadOnlyException
- if the object is in
read-only mode.
Property.ReadOnlyException
- if the object is in read-only modeinvokeSetMethod(Object)
protected void invokeSetMethod(T value)
value
- protected List<Method> getGetMethods()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |