Package mondrian.rolap
Class RolapStar.Table
java.lang.Object
mondrian.rolap.RolapStar.Table
- Enclosing class:
- RolapStar
Definition of a table in a star schema.
A 'table' is defined by a
MondrianDef.RelationOrJoin
so may, in fact, be a
view.
Every table in the star schema except the fact table has a parent table, and a condition which specifies how it is joined to its parent. So the star schema is, in effect, a hierarchy with the fact table at its root.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds this table to the FROM clause of a query, and also, ifjoinToParent
, any join condition.boolean
containsColumn
(String columnName) Returns whether this table has a column with the given name.boolean
containsColumn
(RolapStar.Column column) boolean
boolean
equalsTableName
(String tableName) findAncestor
(String tableName) Returns an ancestor with a given alias, or null if not found.findChild
(MondrianDef.Relation relation, RolapStar.Condition joinCondition) Returns a child relation which maps onto a given relation, or null if there is none.findDescendant
(String seekAlias) Returns a descendant with a given alias, or null if none found.This is used during aggregate table validation to make sure that the mapping from for the aggregate join condition is valid.findTableWithLeftJoinCondition
(String columnName) Finds the child table of the fact table with the given columnName used in its left join condition.getAlias()
Returns a list of childRolapStar.Table
s.Returns a list of this table'sRolapStar.Column
s.Returns the condition by which a dimension table is connected to itsparent
; or null if this is the fact table.Returns this table's parent table, or null if this is the fact table (which is at the center of the star).Sometimes one need to get to the "real" name when the table has been given an alias.int
hashCode()
boolean
isFunky()
Note: I do not think that this is ever true.lookupColumn
(String columnName) Given a MondrianDef.Expression return a column with that expression or null.lookupColumns
(String columnName) Returns an array of all columns in this star with a given name.lookupMeasureByName
(String cubeName, String name) Look up aRolapStar.Measure
by its name.void
print
(PrintWriter pw, String prefix) Prints this table and its children.toString()
-
Method Details
-
getJoinCondition
Returns the condition by which a dimension table is connected to itsparent
; or null if this is the fact table. -
getParentTable
Returns this table's parent table, or null if this is the fact table (which is at the center of the star). -
lookupColumns
Returns an array of all columns in this star with a given name. -
lookupColumn
-
lookupColumnByExpression
Given a MondrianDef.Expression return a column with that expression or null. -
containsColumn
-
lookupMeasureByName
Look up aRolapStar.Measure
by its name. Returns null if not found. -
getRelation
-
getAlias
-
getTableName
Sometimes one need to get to the "real" name when the table has been given an alias. -
findChild
Returns a child relation which maps onto a given relation, or null if there is none. -
findDescendant
Returns a descendant with a given alias, or null if none found. -
findAncestor
Returns an ancestor with a given alias, or null if not found. -
equalsTableName
-
addToFrom
Adds this table to the FROM clause of a query, and also, ifjoinToParent
, any join condition.- Parameters:
query
- Query to add tofailIfExists
- Pass in false if you might have already added the table before and if that happens you want to do nothing.joinToParent
- Pass in true if you are constraining a cell calculation, false if you are retrieving members.
-
getChildren
Returns a list of childRolapStar.Table
s. -
getColumns
Returns a list of this table'sRolapStar.Column
s. -
findTableWithLeftJoinCondition
Finds the child table of the fact table with the given columnName used in its left join condition. This is used by the AggTableManager while characterizing the fact table columns. -
findTableWithLeftCondition
This is used during aggregate table validation to make sure that the mapping from for the aggregate join condition is valid. It returns the child table with the matching left join condition. -
isFunky
public boolean isFunky()Note: I do not think that this is ever true. -
equals
-
hashCode
public int hashCode() -
toString
-
print
Prints this table and its children. -
containsColumn
Returns whether this table has a column with the given name.
-