|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.olap.OlapElementBase
mondrian.olap.HierarchyBase
mondrian.rolap.RolapHierarchy
mondrian.rolap.RolapCubeHierarchy
public class RolapCubeHierarchy
Hierarchy that is associated with a specific Cube.
| Nested Class Summary | |
|---|---|
class |
RolapCubeHierarchy.CacheRolapCubeHierarchyMemberReader
member reader wrapper - uses existing member reader, but wraps and caches all intermediate members. |
class |
RolapCubeHierarchy.NoCacheRolapCubeHierarchyMemberReader
Same as RolapCubeHierarchy.RolapCubeHierarchyMemberReader but without caching
anything. |
static interface |
RolapCubeHierarchy.RolapCubeHierarchyMemberReader
TODO: Since this is part of a caching strategy, should be implemented as a Strategy Pattern, avoiding hirarchy. |
static class |
RolapCubeHierarchy.RolapCubeSqlMemberSource
|
| Nested classes/interfaces inherited from class mondrian.rolap.RolapHierarchy |
|---|
RolapHierarchy.LimitedRollupMember, RolapHierarchy.RolapCalculatedMeasure, RolapHierarchy.RolapNullMember |
| Nested classes/interfaces inherited from interface mondrian.olap.OlapElement |
|---|
OlapElement.LocalizedProperty |
| Field Summary | |
|---|---|
protected boolean |
usingCubeFact
True if the hierarchy is degenerate - has no dimension table of its own, just drives from the cube's fact table. |
| Fields inherited from class mondrian.rolap.RolapHierarchy |
|---|
closureFor, nullLevel, relation, xmlHierarchy |
| Fields inherited from class mondrian.olap.HierarchyBase |
|---|
allLevelName, allMemberName, description, dimension, hasAll, levels, name, subName, uniqueName |
| Fields inherited from class mondrian.olap.OlapElementBase |
|---|
caption, visible |
| Constructor Summary | |
|---|---|
RolapCubeHierarchy(RolapCubeDimension cubeDimension,
MondrianDef.CubeDimension cubeDim,
RolapHierarchy rolapHierarchy,
String subName,
int ordinal)
Creates a RolapCubeHierarchy. |
|
| Method Summary | |
|---|---|
protected int |
computeHashCode()
Computes this object's hash code. |
(package private) String |
convertMemberName(String memberUniqueName)
Converts the unique name of a member of the underlying hierarchy to the appropriate name for this hierarchy. |
Member |
createMember(Member parent,
Level level,
String name,
Formula formula)
Creates a member of this hierarchy. |
boolean |
equals(Object o)
|
protected void |
extractNewAliases(MondrianDef.RelationOrJoin oldrel,
MondrianDef.RelationOrJoin newrel)
Populates the alias map for the old and new relations. |
String |
getAllLevelName()
Returns the name of the 'all' level in this hierarchy. |
RolapCubeMember |
getAllMember()
Returns the 'all' member. |
String |
getAllMemberName()
|
RolapCube |
getCube()
|
RolapCubeMember |
getDefaultMember()
Returns the default member of this hierarchy. |
RolapCubeLevel[] |
getLevels()
Returns the levels in this hierarchy. |
(package private) MemberReader |
getMemberReader()
|
Member |
getNullMember()
Returns a special member representing the "null" value. |
int |
getOrdinalInCube()
Returns the ordinal of this hierarchy in its cube. |
MondrianDef.RelationOrJoin |
getRelation()
The currentRelation object is derived from the shared relation object it is generated via the RolapStar object, and contains unique aliases for it's particular join path |
RolapHierarchy |
getRolapHierarchy()
|
String |
getSharedHierarchyName()
Returns the name of the source hierarchy, if this hierarchy is shared, otherwise null. |
(package private) void |
init(MondrianDef.CubeDimension xmlDimension)
Initializes a hierarchy within the context of a cube. |
boolean |
isUsingCubeFact()
|
String |
lookupAlias(String origTable)
|
void |
setDefaultMember(Member defaultMeasure)
Sets default member of this Hierarchy. |
(package private) void |
setMemberReader(MemberReader memberReader)
|
(package private) boolean |
tableExists(String tableName)
|
| Methods inherited from class mondrian.rolap.RolapHierarchy |
|---|
addToFrom, addToFrom, addToFromInverse, createAnnotationMap, createClosedPeerDimension, createMemberReader, getAggregateChildrenExpression, getAlias, getAnnotationMap, getLogger, getRolapSchema, getTable, getUniqueKeyLevelName, getUniqueTable, getXmlHierarchy, isRagged, newMeasuresLevel |
| Methods inherited from class mondrian.olap.HierarchyBase |
|---|
equals, getDescription, getDimension, getHierarchy, getName, getQualifiedName, getSubName, getUniqueName, getUniqueNameSsas, hasAll, lookupChild |
| Methods inherited from class mondrian.olap.OlapElementBase |
|---|
clone, getCaption, getLocalized, hashCode, isVisible, setCaption, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface mondrian.olap.OlapElement |
|---|
getCaption, getLocalized, isVisible |
| Field Detail |
|---|
protected final boolean usingCubeFact
| Constructor Detail |
|---|
public RolapCubeHierarchy(RolapCubeDimension cubeDimension,
MondrianDef.CubeDimension cubeDim,
RolapHierarchy rolapHierarchy,
String subName,
int ordinal)
cubeDimension - DimensioncubeDim - XML dimension elementrolapHierarchy - Wrapped hierarchysubName - Name of hierarchy within dimensionordinal - Ordinal of hierarchy within cube| Method Detail |
|---|
public RolapCubeLevel[] getLevels()
HierarchyIf a hierarchy is subject to access-control, some of the levels may
not be visible; use SchemaReader.getHierarchyLevels(mondrian.olap.Hierarchy) instead.
getLevels in interface HierarchygetLevels in class HierarchyBasepublic String getAllMemberName()
getAllMemberName in class HierarchyBasepublic String getSharedHierarchyName()
RolapHierarchyIf this hierarchy is a public -- that is, it belongs to a dimension
which is a usage of a shared dimension -- then
sharedHierarchyName holds the unique name of the shared
hierarchy; otherwise it is null.
Suppose this hierarchy is "Weekly" in the dimension "Order Date" of
cube "Sales", and that "Order Date" is a usage of the "Time"
dimension. Then sharedHierarchyName will be
"[Time].[Weekly]".
getSharedHierarchyName in class RolapHierarchypublic String getAllLevelName()
HierarchyBase
getAllLevelName in class HierarchyBasepublic boolean isUsingCubeFact()
public String lookupAlias(String origTable)
public final RolapHierarchy getRolapHierarchy()
public final int getOrdinalInCube()
RolapHierarchyTemporarily defined against RolapHierarchy; will be moved to RolapCubeHierarchy as soon as the measures hierarchy is a RolapCubeHierarchy.
getOrdinalInCube in class RolapHierarchy
protected void extractNewAliases(MondrianDef.RelationOrJoin oldrel,
MondrianDef.RelationOrJoin newrel)
This method may be simplified when we obsolete
HierarchyUsage.
oldrel - Original relation, as defined in the schemanewrel - New star relation, generated by RolapStar, canonical, and
shared between all cubes with similar structurepublic boolean equals(Object o)
equals in class RolapHierarchyprotected int computeHashCode()
OlapElementBase
computeHashCode in class RolapHierarchy
public Member createMember(Member parent,
Level level,
String name,
Formula formula)
Hierarchyformula must not be null.
createMember in interface HierarchycreateMember in class RolapHierarchyboolean tableExists(String tableName)
tableExists in class RolapHierarchypublic MondrianDef.RelationOrJoin getRelation()
getRelation in class RolapHierarchypublic final RolapCubeMember getDefaultMember()
HierarchyIf a hierarchy is subject to access-control, the default member may
not be visible, so use SchemaReader.getHierarchyDefaultMember(mondrian.olap.Hierarchy).
getDefaultMember in interface HierarchygetDefaultMember in class RolapHierarchypublic Member getNullMember()
HierarchyLead,
NextMember and ParentMember walk off the end
of the hierarchy.
getNullMember in interface HierarchygetNullMember in class RolapHierarchypublic RolapCubeMember getAllMember()
getAllMember in interface HierarchygetAllMember in class RolapHierarchyvoid setMemberReader(MemberReader memberReader)
setMemberReader in class RolapHierarchyMemberReader getMemberReader()
getMemberReader in class RolapHierarchypublic void setDefaultMember(Member defaultMeasure)
RolapHierarchy
setDefaultMember in class RolapHierarchydefaultMeasure - Default membervoid init(MondrianDef.CubeDimension xmlDimension)
RolapHierarchy
init in class RolapHierarchyfinal String convertMemberName(String memberUniqueName)
For example, if the shared hierarchy is [Time].[Quarterly] and the hierarchy usage is [Ship Time].[Quarterly], then [Time].[1997].[Q1] would be translated to [Ship Time].[Quarerly].[1997].[Q1].
memberUniqueName - Unique name of member from underlying hierarchy
public final RolapCube getCube()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||