Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.treetable.db
Interface DatabaseTreeTableModel

All Superinterfaces:
TreeModel, TreeTableModel
All Known Implementing Classes:
AbstractDatabaseTreeTableModel, DefaultDatabaseTreeTableModel

public interface DatabaseTreeTableModel
extends TreeTableModel

DatabaseTreeTableModel defines methods for retrieving data from an underlying database for use with a treetable model.


Field Summary
 
Fields inherited from interface com.citra.treetable.TreeTableModel
CHANGE_COLUMN_SOURCE
 
Method Summary
 List fetchChildren(Object parent, int from, int to)
          This method retrieves the data from the database for the children of parent in the range from - to.
 int fetchGroupCount(Object node)
          This method retrieves the aggregate values for the children of parent in the range from - to, and assigns them on the treeModel.
 List fetchGroups(Object parent, int from, int to)
          This method retrieves the group values from the database for the children of parent in the range from - to.
 
Methods inherited from interface com.citra.treetable.TreeTableModel
getColumnClass, getColumnCount, getColumnName, getValueAt, isAggregate, isCellEditable, isFooter, isHeader, setValueAt
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
 

Method Detail

fetchChildren

List fetchChildren(Object parent,
                   int from,
                   int to)
This method retrieves the data from the database for the children of parent in the range from - to. The following condition must be true: from >= to. The List returned must contain the row elements starting at from. However, the List may contain less elements than those specified in the range.

Parameters:
parent - the parent node
from - the index of the first child
to - the index of the last child
Returns:
the retrieved group values as a List.

fetchGroupCount

int fetchGroupCount(Object node)
This method retrieves the aggregate values for the children of parent in the range from - to, and assigns them on the treeModel.

Parameters:
node - the node to consider
Returns:
the group count for node

fetchGroups

List fetchGroups(Object parent,
                 int from,
                 int to)
This method retrieves the group values from the database for the children of parent in the range from - to. The following condition must be true: from >= to. The List returned must contain the row elements starting at from. However, the List may contain less elements than those specified in the range.

Parameters:
parent - the parent node
from - the index of the first child
to - the index of the last child
Returns:
the retrieved childrend of parent as a List.

Copyright © 2011 Citra Technologies. All Rights Reserved.