org.apache.wicket.model
Class ChainingModel<T>

java.lang.Object
  extended by org.apache.wicket.model.ChainingModel<T>
Type Parameters:
T - The Model object type
All Implemented Interfaces:
Serializable, IChainingModel<T>, IDetachable, IModel<T>, IClusterable
Direct Known Subclasses:
AbstractPropertyModel, CompoundPropertyModel

public abstract class ChainingModel<T>
extends Object
implements IChainingModel<T>

Default implementation of IChainingModel

Since:
6.0.0
See Also:
CompoundPropertyModel, AbstractPropertyModel, Serialized Form

Constructor Summary
ChainingModel(Object modelObject)
           
 
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.
protected  Object getTarget()
           
 void setChainedModel(IModel<?> model)
          Sets the model that is chained inside this model.
 void setObject(T object)
          Sets the model object.
protected  ChainingModel<T> setTarget(Object modelObject)
          Sets a new target - object or model
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChainingModel

public ChainingModel(Object modelObject)
Method Detail

detach

public void detach()
Unsets this property model's instance variables and detaches the model.

Specified by:
detach in interface IDetachable
See Also:
IDetachable.detach()

setObject

public void setObject(T object)
Description copied from interface: IModel
Sets the model object.

Specified by:
setObject in interface IModel<T>
Parameters:
object - The model object
See Also:
IModel.setObject(java.lang.Object)

getObject

public T getObject()
Description copied from interface: IModel
Gets the model object.

Specified by:
getObject in interface IModel<T>
Returns:
The model object
See Also:
IModel.getObject()

getChainedModel

public IModel<?> getChainedModel()
Description copied from interface: IChainingModel
Returns the chained model if there is a chained model.

Specified by:
getChainedModel in interface IChainingModel<T>
Returns:
The chained model
See Also:
IChainingModel.getChainedModel()

setChainedModel

public void setChainedModel(IModel<?> model)
Description copied from interface: IChainingModel
Sets the model that is chained inside this model.

Specified by:
setChainedModel in interface IChainingModel<T>
See Also:
IChainingModel.setChainedModel(org.apache.wicket.model.IModel)

getTarget

protected final Object getTarget()
Returns:
The target - object or model

setTarget

protected final ChainingModel<T> setTarget(Object modelObject)
Sets a new target - object or model

Returns:
this object

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.