Module org.apache.wicket.extensions
Class TreeDataProvider<T>
java.lang.Object
org.apache.wicket.extensions.markup.html.repeater.tree.table.TreeDataProvider<T>
- Type Parameters:
T
- node type
- All Implemented Interfaces:
Serializable
,ITreeDataProvider<T>
,IDataProvider<T>
,IDetachable
,IClusterable
An adapter of a
ITreeProvider
to a IDataProvider
.- Author:
- svenmeier
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
detach()
Detaches model after use.protected abstract boolean
iterateChildren
(T node) Hook method to decide whether the given node's children should be iterated.iterator
(long first, long count) Gets an iterator for the subset of total dataWrap the given node in aNodeModel
which provides additional branch information needed byTreeColumn
.long
size()
Gets total number of items in the collection represented by the DataProvider
-
Constructor Details
-
TreeDataProvider
Construct.- Parameters:
provider
- the provider to adapt
-
-
Method Details
-
size
Description copied from interface:IDataProvider
Gets total number of items in the collection represented by the DataProvider- Specified by:
size
in interfaceIDataProvider<T>
- Returns:
- total item count
-
iterator
Description copied from interface:IDataProvider
Gets an iterator for the subset of total data- Specified by:
iterator
in interfaceIDataProvider<T>
- Parameters:
first
- first row of datacount
- minimum number of elements to retrieve- Returns:
- iterator capable of iterating over {first, first+count} items
-
iterateChildren
Hook method to decide whether the given node's children should be iterated.- Parameters:
node
- node- Returns:
true
if the node's children should be iterated
-
model
Description copied from interface:ITreeDataProvider
Wrap the given node in aNodeModel
which provides additional branch information needed byTreeColumn
.- Specified by:
model
in interfaceIDataProvider<T>
- Specified by:
model
in interfaceITreeDataProvider<T>
- Parameters:
object
- node- Returns:
- the model representation of the object
-
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 interfaceIDataProvider<T>
- Specified by:
detach
in interfaceIDetachable
-