|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.model.AbstractPropertyModel
public abstract class AbstractPropertyModel
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(java.lang.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. |
java.lang.Object |
getObject()
Gets the model object. |
java.lang.Class |
getObjectClass()
Returns the class of model object |
java.lang.String |
getPropertyExpression()
Gets the property expression for this model |
java.lang.reflect.Field |
getPropertyField()
Returns the field of model property or null if the field doesn't exist. |
java.lang.reflect.Method |
getPropertyGetter()
Returns the getter method of model property or null if the method doesn't exist. |
java.lang.reflect.Method |
getPropertySetter()
Returns the setter method of model property or null if the method doesn't exist. |
java.lang.Object |
getTarget()
|
protected java.lang.Object |
onGetObject(Component component)
Deprecated. use getObject() instead |
protected void |
onSetObject(Component component,
java.lang.Object object)
Deprecated. use setObject(Object) instead |
protected abstract java.lang.String |
propertyExpression()
|
void |
setChainedModel(IModel model)
Sets the model that is chained inside this model. |
void |
setObject(java.lang.Object object)
Applies the property expression on the model object using the given object argument. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractPropertyModel(java.lang.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
IChainingModel.getChainedModel()
public java.lang.Object getObject()
IModel
getObject
in interface IModel
IModel.getObject()
public final java.lang.String getPropertyExpression()
public void setChainedModel(IModel model)
IChainingModel
setChainedModel
in interface IChainingModel
IChainingModel.setChainedModel(org.apache.wicket.model.IModel)
public void setObject(java.lang.Object object)
setObject
in interface IModel
object
- The object that will be used when setting a value on the model objectIModel.setObject(Object)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public final java.lang.Object getTarget()
public java.lang.Class getObjectClass()
IObjectClassAwareModel
getObjectClass
in interface IObjectClassAwareModel
public java.lang.reflect.Field getPropertyField()
IPropertyReflectionAwareModel
getPropertyField
in interface IPropertyReflectionAwareModel
IPropertyReflectionAwareModel.getPropertyField()
public java.lang.reflect.Method getPropertyGetter()
IPropertyReflectionAwareModel
getPropertyGetter
in interface IPropertyReflectionAwareModel
IPropertyReflectionAwareModel.getPropertyGetter()
public java.lang.reflect.Method getPropertySetter()
IPropertyReflectionAwareModel
getPropertySetter
in interface IPropertyReflectionAwareModel
IPropertyReflectionAwareModel.getPropertySetter()
protected abstract java.lang.String propertyExpression()
protected final java.lang.Object onGetObject(Component component)
getObject()
instead
component
-
protected final void onSetObject(Component component, java.lang.Object object)
setObject(Object)
instead
component
- object
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |