com.citra.treetable.db
Class DefaultDatabaseAggregator
java.lang.Object
com.citra.treetable.AbstractAggregator
com.citra.treetable.db.AbstractDatabaseAggregator
com.citra.treetable.db.DefaultDatabaseAggregator
- All Implemented Interfaces:
- Aggregator, DatabaseAggregator
public class DefaultDatabaseAggregator
- extends AbstractDatabaseAggregator
This class returns the value of the column under which the children of the header row
are grouped, or an emptry string if the column was not used to group this node's children.
It is also assumed that the aggregate rows returned from the database are Object arrays.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDatabaseAggregator
public DefaultDatabaseAggregator(DefaultDatabaseTreeTableModel treeModel)
- Constructs a DefaultDatabaseAggregator.
getAggregateObject
public Object getAggregateObject(Object ob,
int column)
- Returns the Object found at
column
of aggregateObject
passed as a parameter.
- Parameters:
ob
- the aggregate object as it was received from the fetch database callcolumn
- the column index
- Returns:
- an appropriate value for the object at
column
getAggregateValue
public Object getAggregateValue(AggregateRow row,
int columnIndex)
- Calculates and returns the aggregate value for
node
at columnIndex
.
- Parameters:
row
- the nodecolumnIndex
- the index of the column
- Returns:
- the aggregate value
getAggregateValues
public List getAggregateValues(AggregateRow parent,
int from,
int to)
- Calculates and returns the aggregate values of the children of
parent
in the range from - to
.
- Parameters:
parent
- the parent nodefrom
- the index of the first childto
- the index of the last child
- Returns:
- the aggregate values as a List