org.apache.wicket.extensions.markup.html.repeater.tree.table
Class NodeModel<T>

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.repeater.tree.table.NodeModel<T>
All Implemented Interfaces:
Serializable, IDetachable, IModel<T>, IClusterable

public class NodeModel<T>
extends Object
implements IModel<T>

A model wrapping the actual node model, carrying additional information about the parental branches.

Author:
svenmeier
See Also:
getBranches(), ITreeProvider.model(Object), Serialized Form

Constructor Summary
NodeModel(IModel<T> model, boolean[] branches)
           
 
Method Summary
 void detach()
          Detaches model after use.
 boolean equals(Object obj)
           
 boolean[] getBranches()
           
 int getDepth()
           
 T getObject()
          Gets the model object.
 IModel<T> getWrappedModel()
           
 int hashCode()
           
 void setObject(T object)
          Sets the model object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeModel

public NodeModel(IModel<T> model,
                 boolean[] branches)
Method Detail

getWrappedModel

public IModel<T> getWrappedModel()

getObject

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

Specified by:
getObject in interface IModel<T>
Returns:
The model object

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

detach

public void detach()
Description copied from interface: IDetachable
Detaches model after use. This is generally used to null out transient references that can be re-attached later.

Specified by:
detach in interface IDetachable

getDepth

public int getDepth()

getBranches

public boolean[] getBranches()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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