|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.citra.treetable.AbstractTreeTableModel
com.citra.treetable.MutableTreeTableModel
com.citra.treetable.ComparableTreeTableModel
com.citra.treetable.ObjectTreeTableModel
com.citra.pivot.olap.DefaultOlapTableModel
public class DefaultOlapTableModel
DefaultOlapTableModel is the default model for creating a tree structure of an olap hierarchy. The tree can either be created automatically, given a datasource and a parent member, or manually, by supplying only the model's name in the constructor.
Field Summary | |
---|---|
protected OlapHierarchy |
hierarchy
the model's hierarchy |
Fields inherited from class com.citra.treetable.ComparableTreeTableModel |
---|
addChildForGroup, comparators, defaultComparatorsByColumnClass |
Fields inherited from class com.citra.treetable.MutableTreeTableModel |
---|
classes, columns |
Fields inherited from class com.citra.treetable.AbstractTreeTableModel |
---|
listenerList, root |
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 |
Constructor Summary | |
---|---|
DefaultOlapTableModel(OlapHierarchy hierarchy)
Constructs a DefaultOlapTableModel by supplying only the hierarchy. |
|
DefaultOlapTableModel(OlapHierarchy hierarchy,
Connection connection)
Constructs a DefaultOlapTableModel dynamically by supplying the datasource connection and the hierarchy. |
|
DefaultOlapTableModel(OlapHierarchy hierarchy,
Connection connection,
String name)
Constructs a DefaultOlapTableModel dynamically by supplying the datasource connection the hierarchy and its name. |
|
DefaultOlapTableModel(OlapMember rootMember,
Connection connection)
Constructs a DefaultOlapTableModel dynamically by supplying the datasource connection and the parent root member. |
|
DefaultOlapTableModel(OlapMember rootMember,
Connection connection,
String name)
Constructs a DefaultOlapTableModel dynamically by supplying the datasource connection the parent root member and the hierarchy's name. |
|
DefaultOlapTableModel(String name)
Constructs a DefaultOlapTableModel by supplying only the hierarchy's name. |
Method Summary | |
---|---|
MutableTreeNode |
addEntry(OlapEdge edge)
Adds a member to the tree structure at the end of the tree's root. |
MutableTreeNode |
addEntry(OlapMember member)
Adds a member to the tree structure at the end of the tree's root. |
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. |
MutableTreeNode |
insertEntry(OlapEdge edge,
MutableTreeNode parent)
Adds a member to the tree structure at a position specified by the passed arguments. |
MutableTreeNode |
insertEntry(OlapEdge edge,
MutableTreeNode parent,
int index)
Adds a member to the tree structure at a position specified by the passed arguments. |
MutableTreeNode |
insertEntry(OlapMember member,
MutableTreeNode parent)
Adds a member to the tree structure at a position specified by the passed arguments. |
MutableTreeNode |
insertEntry(OlapMember member,
MutableTreeNode parent,
int index)
Adds a member to the tree structure at a position specified by the passed arguments. |
void |
setMember(OlapEdge edge,
Object node)
Assigns a member to a given node. |
void |
setName(String name,
Object node)
Assigns a name to a given node. |
void |
setOlapHierarchy(OlapHierarchy hierarchy)
Assigns the model's hierarchy. |
void |
setRootMember(OlapEdge edge)
Assigns a new member to be used as the root. |
void |
setRootMember(OlapMember member)
Assigns a new member to be used as the root. |
Methods inherited from class com.citra.treetable.ObjectTreeTableModel |
---|
createLeafNode, createNonLeafNode, getObjectAt, getValueAt, replicateLeafNode, setObjectAt, setValueAt |
Methods inherited from class com.citra.treetable.MutableTreeTableModel |
---|
addColumn, addColumn, addReorderListener, clear, fireRowsMapped, fireRowsReordered, getChild, getChildCount, getColumnClass, getColumnCount, getColumnName, getIndexOfChild, getPathToRoot, getPathToRoot, insertNodeInto, isCellEditable, isLeaf, moveNode, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, removeNodeFromParent, removeReorderListener, setColumnClasses, setColumnNames, valueForPathChanged |
Methods inherited from class com.citra.treetable.AbstractTreeTableModel |
---|
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeTableStructureChanged, fireTreeTableStructureChanged, getRoot, isAggregate, isFooter, isHeader, removeTreeModelListener, setRoot |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 |
Field Detail |
---|
protected OlapHierarchy hierarchy
Constructor Detail |
---|
public DefaultOlapTableModel(OlapHierarchy hierarchy)
addEntry
or
insertEntry
methods must be then called, in order
to add some members to the tree.
public DefaultOlapTableModel(OlapHierarchy hierarchy, Connection connection)
public DefaultOlapTableModel(OlapHierarchy hierarchy, Connection connection, String name)
public DefaultOlapTableModel(OlapMember rootMember, Connection connection)
public DefaultOlapTableModel(OlapMember rootMember, Connection connection, String name)
public DefaultOlapTableModel(String name)
addEntry
or
insertEntry
methods must be then called, in order
to add some members to the tree. Note that in order to use the model
constructed in this way in a pivot table, you must set the hierarchy
with the setOlapHierarchy
method.
Method Detail |
---|
public MutableTreeNode addEntry(OlapMember member)
member
- the member to add
public MutableTreeNode addEntry(OlapEdge edge)
edge
- the edge object to add, containing the member and measure
public String getName(Object node)
getName
in interface OlapTableModel
node
- the node for which the name is returned
public OlapHierarchy getOlapHierarchy()
getOlapHierarchy
in interface OlapTableModel
public OlapMeasure getOlapMeasure(Object node)
getOlapMeasure
in interface OlapTableModel
node
- the node for which the measure is returned
public OlapMember getOlapMember(Object node)
getOlapMember
in interface OlapTableModel
node
- the node for which the member is returned
public int getOlapType(Object node)
PivotConstants
and can be NORMAL_TYPE, SUBTOTAL_TYPE or GRAND_TOTAL_TYPE.
getOlapType
in interface OlapTableModel
node
- the node for which the type is returned
public MutableTreeNode insertEntry(OlapMember member, MutableTreeNode parent)
member
- the member to addparent
- the parent the member is added to
public MutableTreeNode insertEntry(OlapMember member, MutableTreeNode parent, int index)
member
- the member to addparent
- the parent the member is added toindex
- the child position at which the member is added
public MutableTreeNode insertEntry(OlapEdge edge, MutableTreeNode parent)
edge
- the edge object to add, containing the member and measureparent
- the parent the member is added to
public MutableTreeNode insertEntry(OlapEdge edge, MutableTreeNode parent, int index)
edge
- the edge object to add, containing the member and measureparent
- the parent the member is added toindex
- the child position at which the member is added
public void setMember(OlapEdge edge, Object node)
edge
- the edge member to assignnode
- the node the assignment takes placepublic void setName(String name, Object node)
setName
in interface OlapTableModel
name
- the name to assignnode
- the node the assignment takes placepublic void setOlapHierarchy(OlapHierarchy hierarchy)
hierarchy
- the hierarchy to assignpublic void setRootMember(OlapMember member)
member
- the new root member to assignpublic void setRootMember(OlapEdge edge)
edge
- the new root member edge to assign
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |