|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 | |
---|---|
void |
detach()
Unsets this property model's instance variables and detaches the model. |
IModel<?> |
getChainedModel()
Returns the chained model if there is a chained model. |
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. |
Object |
getTarget()
|
protected Object |
onGetObject(Component component)
Deprecated. use getObject() instead |
protected void |
onSetObject(Component component,
Object object)
Deprecated. use setObject(Object) instead |
protected abstract String |
propertyExpression()
|
void |
setChainedModel(IModel<?> model)
Sets the model that is chained inside this model. |
void |
setObject(T object)
Applies the property expression on the model object using the given object argument. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractPropertyModel(Object modelObject)
modelObject
- The nested model objectMethod Detail |
---|
public void detach()
detach
in interface IDetachable
IDetachable.detach()
public IModel<?> getChainedModel()
IChainingModel
getChainedModel
in interface IChainingModel<T>
IChainingModel.getChainedModel()
public T getObject()
IModel
getObject
in interface IModel<T>
IModel.getObject()
public final String getPropertyExpression()
public void setChainedModel(IModel<?> model)
IChainingModel
setChainedModel
in interface IChainingModel<T>
IChainingModel.setChainedModel(org.apache.wicket.model.IModel)
public void setObject(T object)
setObject
in interface IModel<T>
object
- The object that will be used when setting a value on the model objectIModel#setObject(T)
public String toString()
toString
in class Object
Object.toString()
public final Object getTarget()
public Class<T> getObjectClass()
IObjectClassAwareModel
getObjectClass
in interface IObjectClassAwareModel<T>
public Field getPropertyField()
IPropertyReflectionAwareModel
getPropertyField
in interface IPropertyReflectionAwareModel
IPropertyReflectionAwareModel.getPropertyField()
public Method getPropertyGetter()
IPropertyReflectionAwareModel
getPropertyGetter
in interface IPropertyReflectionAwareModel
IPropertyReflectionAwareModel.getPropertyGetter()
public Method getPropertySetter()
IPropertyReflectionAwareModel
getPropertySetter
in interface IPropertyReflectionAwareModel
IPropertyReflectionAwareModel.getPropertySetter()
protected abstract String propertyExpression()
@Deprecated protected final Object onGetObject(Component component)
getObject()
instead
component
-
@Deprecated protected final void onSetObject(Component component, Object object)
setObject(Object)
instead
component
- object
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |