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

public abstract class TreeDataProvider<T> extends Object implements ITreeDataProvider<T>
An adapter of a ITreeProvider to a IDataProvider.
Author:
svenmeier
See Also:
  • Constructor Details

  • Method Details

    • size

      public long size()
      Description copied from interface: IDataProvider
      Gets total number of items in the collection represented by the DataProvider
      Specified by:
      size in interface IDataProvider<T>
      Returns:
      total item count
    • iterator

      public Iterator<? extends T> iterator(long first, long count)
      Description copied from interface: IDataProvider
      Gets an iterator for the subset of total data
      Specified by:
      iterator in interface IDataProvider<T>
      Parameters:
      first - first row of data
      count - minimum number of elements to retrieve
      Returns:
      iterator capable of iterating over {first, first+count} items
    • iterateChildren

      protected abstract boolean iterateChildren(T node)
      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

      public NodeModel<T> model(T object)
      Description copied from interface: ITreeDataProvider
      Wrap the given node in a NodeModel which provides additional branch information needed by TreeColumn.
      Specified by:
      model in interface IDataProvider<T>
      Specified by:
      model in interface ITreeDataProvider<T>
      Parameters:
      object - node
      Returns:
      the model representation of the 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 IDataProvider<T>
      Specified by:
      detach in interface IDetachable