|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.rolap.RolapStar.Table
public static class RolapStar.Table
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 | |
---|---|
(package private) RolapStar.Table |
addJoin(RolapCube cube,
MondrianDef.RelationOrJoin relationOrJoin,
RolapStar.Condition joinCondition)
Extends this 'leg' of the star by adding relation
joined by joinCondition . |
void |
addToFrom(SqlQuery query,
boolean failIfExists,
boolean joinToParent)
Adds this table to the FROM clause of a query, and also, if joinToParent , any join condition. |
boolean |
containsColumn(RolapStar.Column column)
|
boolean |
containsColumn(String columnName)
Returns whether this table has a column with the given name. |
boolean |
equals(Object obj)
|
boolean |
equalsTableName(String tableName)
|
RolapStar.Table |
findAncestor(String tableName)
Returns an ancestor with a given alias, or null if not found. |
RolapStar.Table |
findChild(MondrianDef.Relation relation,
RolapStar.Condition joinCondition)
Returns a child relation which maps onto a given relation, or null if there is none. |
RolapStar.Table |
findDescendant(String seekAlias)
Returns a descendant with a given alias, or null if none found. |
RolapStar.Table |
findTableWithLeftCondition(MondrianDef.Expression left)
This is used during aggregate table validation to make sure that the mapping from for the aggregate join condition is valid. |
RolapStar.Table |
findTableWithLeftJoinCondition(String columnName)
Finds the child table of the fact table with the given columnName used in its left join condition. |
String |
getAlias()
|
List<RolapStar.Table> |
getChildren()
Returns a list of child RolapStar.Table s. |
List<RolapStar.Column> |
getColumns()
Returns a list of this table's RolapStar.Column s. |
RolapStar.Condition |
getJoinCondition()
Returns the condition by which a dimension table is connected to its parent ; or null if this is the fact table. |
RolapStar.Table |
getParentTable()
Returns this table's parent table, or null if this is the fact table (which is at the center of the star). |
MondrianDef.Relation |
getRelation()
|
(package private) RolapStar |
getStar()
|
String |
getTableName()
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. |
RolapStar.Column |
lookupColumn(String columnName)
|
RolapStar.Column |
lookupColumnByExpression(MondrianDef.Expression xmlExpr)
Given a MondrianDef.Expression return a column with that expression or null. |
RolapStar.Column[] |
lookupColumns(String columnName)
Returns an array of all columns in this star with a given name. |
RolapStar.Measure |
lookupMeasureByName(String cubeName,
String name)
Look up a RolapStar.Measure by its name. |
(package private) RolapStar.Column |
makeColumns(RolapCube cube,
RolapCubeLevel level,
RolapStar.Column parentColumn,
String usagePrefix)
This is only called by RolapCube. |
(package private) void |
makeMeasure(RolapBaseCubeMeasure measure)
|
void |
print(PrintWriter pw,
String prefix)
Prints this table and its children. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public RolapStar.Condition getJoinCondition()
parent
; or null if this is the fact table.
public RolapStar.Table getParentTable()
public RolapStar.Column[] lookupColumns(String columnName)
public RolapStar.Column lookupColumn(String columnName)
public RolapStar.Column lookupColumnByExpression(MondrianDef.Expression xmlExpr)
public boolean containsColumn(RolapStar.Column column)
public RolapStar.Measure lookupMeasureByName(String cubeName, String name)
RolapStar.Measure
by its name.
Returns null if not found.
RolapStar getStar()
public MondrianDef.Relation getRelation()
public String getAlias()
public String getTableName()
void makeMeasure(RolapBaseCubeMeasure measure)
RolapStar.Column makeColumns(RolapCube cube, RolapCubeLevel level, RolapStar.Column parentColumn, String usagePrefix)
cube
- Cubelevel
- LevelparentColumn
- Parent columnRolapStar.Table addJoin(RolapCube cube, MondrianDef.RelationOrJoin relationOrJoin, RolapStar.Condition joinCondition)
relation
joined by joinCondition
. If the same expression is
already present, does not create it again. Stores the unaliased
table names to RolapStar.Table mapping associated with the
input cube
.
public RolapStar.Table findChild(MondrianDef.Relation relation, RolapStar.Condition joinCondition)
public RolapStar.Table findDescendant(String seekAlias)
public RolapStar.Table findAncestor(String tableName)
public boolean equalsTableName(String tableName)
public void addToFrom(SqlQuery query, boolean failIfExists, boolean joinToParent)
joinToParent
, any join condition.
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.public List<RolapStar.Table> getChildren()
RolapStar.Table
s.
public List<RolapStar.Column> getColumns()
RolapStar.Column
s.
public RolapStar.Table findTableWithLeftJoinCondition(String columnName)
public RolapStar.Table findTableWithLeftCondition(MondrianDef.Expression left)
public boolean isFunky()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public void print(PrintWriter pw, String prefix)
public boolean containsColumn(String columnName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |