Package org.apache.wicket.model
Class ChainingModel<T>
- java.lang.Object
-
- org.apache.wicket.model.ChainingModel<T>
-
- Type Parameters:
T- The Model object type
- All Implemented Interfaces:
java.io.Serializable,IDetachable,IModel<T>,org.apache.wicket.util.io.IClusterable
- Direct Known Subclasses:
AbstractPropertyModel,CompoundPropertyModel
public class ChainingModel<T> extends java.lang.Object implements IModel<T>
Default implementation of IChainingModel- Since:
- 6.0.0
- See Also:
CompoundPropertyModel,AbstractPropertyModel, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ChainingModel(java.lang.Object modelObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddetach()Unsets this property model's instance variables and detaches the model.java.lang.ObjectgetInnermostModelOrObject()TgetObject()Gets the model object.protected java.lang.ObjectgetTarget()voidsetObject(T object)Sets the model object.protected ChainingModel<T>setTarget(java.lang.Object modelObject)Sets a new target - object or modeljava.lang.StringtoString()
-
-
-
Method Detail
-
detach
public void detach()
Unsets this property model's instance variables and detaches the model.- Specified by:
detachin interfaceIDetachable- Specified by:
detachin interfaceIModel<T>- See Also:
IDetachable.detach()
-
setObject
public void setObject(T object)
Description copied from interface:IModelSets the model object.
-
getTarget
protected final java.lang.Object getTarget()
- Returns:
- The target - object or model
-
setTarget
protected final ChainingModel<T> setTarget(java.lang.Object modelObject)
Sets a new target - object or model- Returns:
- this object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getInnermostModelOrObject
public final java.lang.Object getInnermostModelOrObject()
- Returns:
- The innermost model or the object if the target is not a model
-
-