Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.pivot.table
Class TableHierarchy

java.lang.Object
  extended by com.citra.pivot.table.AbstractTableObject
      extended by com.citra.pivot.table.TableHierarchy
All Implemented Interfaces:
OlapHierarchy, OlapObject

public class TableHierarchy
extends AbstractTableObject
implements OlapHierarchy

TableHierarchy is the the concrete OlapHierarchy implementation for the table datasource.


Field Summary
protected  OlapMember defaultMember
          the hierarchy's default member
protected  OlapDimension dimension
          the hierarchy's dimension
protected  LevelList levels
          the hierarchy's levels
 
Fields inherited from class com.citra.pivot.table.AbstractTableObject
caption, description, id, name
 
Method Summary
 void addLevel(TableLevel level)
          Adds a level to the hierarchy.
 TableLevel createLevel(String name, int column)
          Creates, adds and returns a level to the hierarchy with a given name.
 TableLevel createLevel(String name, TableContext context)
          Creates, adds and returns a level to the hierarchy with a given name and context.
 OlapMember getDefaultMember()
          Retrieves the default member of the hierarchy.
 OlapDimension getDimension()
          Retrieves the dimension this hierarchy belongs to.
 LevelList getLevels()
          Retrieves the levels that the hierarchy contains.
 boolean hasAll()
          Determines whether the hierarchy has an 'all' member.
 void insertLevel(TableLevel level, int index)
          Inserts a level to the hierarchy's list of levels at a given location.
 void removeLevel(TableLevel level)
          Removes a level from the hierarchy.
 void setDefaultMember(OlapMember defaultMember)
          Assigns the hierarchy's default member.
 
Methods inherited from class com.citra.pivot.table.AbstractTableObject
getCaption, getCaption, getDescription, getDescription, getID, getName, setCaption, setCaption, setDescription, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.citra.pivot.olap.metadata.OlapObject
getCaption, getDescription, getID, getName
 

Field Detail

dimension

protected OlapDimension dimension
the hierarchy's dimension


levels

protected LevelList levels
the hierarchy's levels


defaultMember

protected OlapMember defaultMember
the hierarchy's default member

Method Detail

getDefaultMember

public OlapMember getDefaultMember()
Retrieves the default member of the hierarchy.

Specified by:
getDefaultMember in interface OlapHierarchy
Returns:
the hierarchy's default member

getDimension

public OlapDimension getDimension()
Retrieves the dimension this hierarchy belongs to.

Specified by:
getDimension in interface OlapHierarchy
Returns:
the hierarchy's dimension

getLevels

public LevelList getLevels()
Retrieves the levels that the hierarchy contains.

Specified by:
getLevels in interface OlapHierarchy
Returns:
the hierarchy's levels

hasAll

public boolean hasAll()
Determines whether the hierarchy has an 'all' member.

Specified by:
hasAll in interface OlapHierarchy
Returns:
true if the hierarchy has an 'all' member, false otherwise

insertLevel

public void insertLevel(TableLevel level,
                        int index)
Inserts a level to the hierarchy's list of levels at a given location.

Parameters:
level - the level to add
index - the location in the list of levels to which the level is added

removeLevel

public void removeLevel(TableLevel level)
Removes a level from the hierarchy.

Parameters:
level - the level to remove

setDefaultMember

public void setDefaultMember(OlapMember defaultMember)
Assigns the hierarchy's default member.

Parameters:
defaultMember - the member to assign as the default

addLevel

public void addLevel(TableLevel level)
Adds a level to the hierarchy.

Parameters:
level - the level to add

createLevel

public TableLevel createLevel(String name,
                              int column)
Creates, adds and returns a level to the hierarchy with a given name. The level's context will be based on a single table column, for discovering the level members.

Parameters:
name - the level's name
column - the column on which the discovery of members will be based
Returns:
the level that was created

createLevel

public TableLevel createLevel(String name,
                              TableContext context)
Creates, adds and returns a level to the hierarchy with a given name and context.

Parameters:
name - the level's name
context - the level's context
Returns:
the level that was created

Copyright © 2011 Citra Technologies. All Rights Reserved.