|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.model.ChainingModel<T> org.apache.wicket.model.AbstractPropertyModel<T>
T
- The Model object typepublic abstract class AbstractPropertyModel<T>
Serves as a base class for different kinds of property models. By default, this class uses
PropertyResolver
to resolve expressions on the target model object. Note that the
property resolver by default provides access to private members and methods. If guaranteeing
encapsulation of the target objects is a big concern, you should consider using an alternative
implementation.
PropertyResolver
,
IDetachable
,
Serialized FormConstructor Summary | |
---|---|
AbstractPropertyModel(Object modelObject)
Constructor |
Method Summary | |
---|---|
Object |
getInnermostModelOrObject()
|
T |
getObject()
Gets the model object. |
Class<T> |
getObjectClass()
Returns the class of model object |
String |
getPropertyExpression()
Gets the property expression for this model |
Field |
getPropertyField()
Returns the field of model property or null if the field doesn't exist. |
Method |
getPropertyGetter()
Returns the getter method of model property or null if the method doesn't exist. |
Method |
getPropertySetter()
Returns the setter method of model property or null if the method doesn't exist. |
protected abstract String |
propertyExpression()
|
void |
setObject(T object)
Applies the property expression on the model object using the given object argument. |
Methods inherited from class org.apache.wicket.model.ChainingModel |
---|
detach, getChainedModel, getTarget, setChainedModel, setTarget, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.wicket.model.IDetachable |
---|
detach |
Constructor Detail |
---|
public AbstractPropertyModel(Object modelObject)
modelObject
- The nested model objectMethod Detail |
---|
public T getObject()
IModel
getObject
in interface IModel<T>
getObject
in class ChainingModel<T>
IModel.getObject()
public final String getPropertyExpression()
public void setObject(T object)
setObject
in interface IModel<T>
setObject
in class ChainingModel<T>
object
- The object that will be used when setting a value on the model objectIModel.setObject(Object)
public Class<T> getObjectClass()
IObjectClassAwareModel
getObjectClass
in interface IObjectClassAwareModel<T>
public Field getPropertyField()
IPropertyReflectionAwareModel
getPropertyField
in interface IPropertyReflectionAwareModel<T>
IPropertyReflectionAwareModel.getPropertyField()
public Method getPropertyGetter()
IPropertyReflectionAwareModel
getPropertyGetter
in interface IPropertyReflectionAwareModel<T>
IPropertyReflectionAwareModel.getPropertyGetter()
public Method getPropertySetter()
IPropertyReflectionAwareModel
getPropertySetter
in interface IPropertyReflectionAwareModel<T>
IPropertyReflectionAwareModel.getPropertySetter()
protected abstract String propertyExpression()
public final Object getInnermostModelOrObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |