Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.pivot.olap
Interface OlapTableModel

All Superinterfaces:
PivotConstants, TreeModel, TreeTableModel
All Known Subinterfaces:
DrillableOlapModel
All Known Implementing Classes:
DefaultOlapTableModel

public interface OlapTableModel
extends TreeTableModel, PivotConstants

OlapTableModel is the model that contains the olap information that is pivoted. Each node is required to contain an olap member (or measure). Additionally, it may optionally contain an olap measure.

Examples:
"All Years" - all years member
"Beverages" - beverages member
"Sales" - sales measure
"Beverages", "Sales" - sales for the beverages member - this will show up as Beverages (Sales)


Field Summary
 
Fields inherited from interface com.citra.treetable.TreeTableModel
CHANGE_COLUMN_SOURCE
 
Fields inherited from interface com.citra.pivot.PivotConstants
GRAND_TOTAL_TYPE, NORMAL_TYPE, SUBTOTAL_TYPE
 
Method Summary
 String getName(Object node)
          Retrieves the name of the node.
 OlapHierarchy getOlapHierarchy()
          Retrieves the hierarchy that the model represents.
 OlapMeasure getOlapMeasure(Object node)
          Retrieves the olap measure at the specified node.
 OlapMember getOlapMember(Object node)
          Retrieves the olap member at the specified node.
 int getOlapType(Object node)
          Retrieves the type of the pivoted member at the specified node.
 void setName(String name, Object node)
          Assigns the name of the node.
 
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

getOlapHierarchy

OlapHierarchy getOlapHierarchy()
Retrieves the hierarchy that the model represents.

Returns:
the model's hierarchy

getOlapMeasure

OlapMeasure getOlapMeasure(Object node)
Retrieves the olap measure at the specified node. This method may return null.

Parameters:
node - the node for which the measure is returned
Returns:
the measure at node

getOlapMember

OlapMember getOlapMember(Object node)
Retrieves the olap member at the specified node.

Parameters:
node - the node for which the member is returned
Returns:
the member at node

getOlapType

int getOlapType(Object node)
Retrieves the type of the pivoted member at the specified node. The type is taken from PivotConstants and can be NORMAL_TYPE, SUBTOTAL_TYPE or GRAND_TOTAL_TYPE.

Parameters:
node - the node for which the type is returned
Returns:
the type for the member at node

getName

String getName(Object node)
Retrieves the name of the node. This value will be used when displaying information on a pivot table.

Parameters:
node - the node for which the name is returned
Returns:
the node's name

setName

void setName(String name,
             Object node)
Assigns the name of the node. This value will be used when displaying information on a pivot table.

Parameters:
name - the name to assign
node - the node for which a name is assigned

Copyright © 2011 Citra Technologies. All Rights Reserved.