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

java.lang.Object
  extended by org.apache.wicket.model.AbstractWrapModel<T>
Type Parameters:
T - The Model object type
All Implemented Interfaces:
Serializable, IClusterable, IDetachable, IModel<T>, IWrapModel<T>

public abstract class AbstractWrapModel<T>
extends Object
implements IWrapModel<T>

Simple base class for IWrapModel objects see IComponentAssignedModel or IComponentInheritedModel so that you don't have to have empty methods like detach or setObject() when not used in the wrapper. The detach method calls the wrapped models detach.

Author:
jcompagner
See Also:
Serialized Form

Constructor Summary
AbstractWrapModel()
           
 
Method Summary
 void detach()
          Calls getWrappedModel().detach();
 T getObject()
          Gets the model object.
 void setObject(T object)
          Sets the model object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.wicket.model.IWrapModel
getWrappedModel
 

Constructor Detail

AbstractWrapModel

public AbstractWrapModel()
Method Detail

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()

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)

detach

public void detach()
Calls getWrappedModel().detach();

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


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.