Class RolapCubeMember
- All Implemented Interfaces:
Comparable
,Annotated
,Member
,OlapElement
,RolapMember
,RolapMemberInCube
- Direct Known Subclasses:
RolapHierarchy.LimitedRollupMember
- Author:
- Will Gorman, 19 October 2007
-
Nested Class Summary
Nested classes/interfaces inherited from class mondrian.rolap.RolapMemberBase
RolapMemberBase.DefaultPropertyValueMapFactory, RolapMemberBase.PropertyValueMapFactory, RolapMemberBase.PropertyValueMapFactoryFactory
Nested classes/interfaces inherited from interface mondrian.olap.Member
Member.MemberType
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
Field Summary
Fields inherited from class mondrian.rolap.DelegatingRolapMember
member
Fields inherited from class mondrian.olap.MemberBase
flags, level, parentMember, uniqueName
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
Constructor Summary
ConstructorDescriptionRolapCubeMember
(RolapCubeMember parent, RolapMember member, RolapCubeLevel cubeLevel) Creates a RolapCubeMember. -
Method Summary
Modifier and TypeMethodDescriptionint
Compares this member to anotherRolapMemberBase
.boolean
Returns whether this calculation contains an aggregate function.boolean
boolean
getCompiledExpression
(mondrian.rolap.RolapEvaluatorRoot root) Returns the compiled expression to evaluate the scalar value of the current cell.final RolapCube
getCube()
Returns the cube this cube member belongs to.final RolapCubeMember
Returns the system-generated data member that is associated with a nonleaf member of a dimension.final RolapCubeDimension
Returns the dimension of a this expression, or null if no dimension is defined.Returns the expression by which this member is calculated.final RolapCubeHierarchy
int
Returns the ordinal of this calculation; to resolve ties.final RolapCubeLevel
getLevel()
final RolapCubeMember
Returns this member's parent, or null (not the 'null member', as returned byHierarchy.getNullMember()
) if it has no parent.getPropertyValue
(String propertyName) Returns the value of the property namedpropertyName
.getPropertyValue
(String propertyName, boolean matchCase) Returns the value of the property namedpropertyName
, matching according to the required case-sensitivity.final RolapMember
Returns the underlying member.int
Returns the solve order of this calculation.int
hashCode()
boolean
Returns whether this calculation is a member is computed from aWITH MEMBER
clause in an MDX query.lookupChild
(SchemaReader schemaReader, Id.Segment childName, MatchType matchType) Looks up a child element, returning null if it does not exist.void
setContextIn
(RolapEvaluator evaluator) Pushes this calculated member or tuple onto the stack of evaluation contexts, and sets the context to the default member of the hierarchy.void
setProperty
(String name, Object value) Sets a property of this member to a given value.toString()
Methods inherited from class mondrian.rolap.DelegatingRolapMember
getAncestorMembers, getAnnotationMap, getCaption, getDepth, getDescription, getKey, getMemberType, getName, getOrderKey, getOrdinal, getParentUniqueName, getProperties, getPropertyFormattedValue, getQualifiedName, getSolveOrder, isAll, isAllMember, isCalculated, isCalculatedInQuery, isChildOrEqualTo, isEvaluated, isHidden, isMeasure, isNull, isParentChildLeaf, isParentChildPhysicalMember, setName
Methods inherited from class mondrian.rolap.RolapMemberBase
childLevelHasApproxRowCount, containsAggregateFunction, getAllMembers, getCaptionValue, getCompiledExpression, getHierarchyCardinality, getHierarchyOrdinal, getLogger, getPropertyFromMap, keyToString, setCaptionValue, setContextIn, setOrdinal, setOrdinals, setUniqueName
Methods inherited from class mondrian.olap.MemberBase
computeCalculated, isChildOrEqualTo, isOnSameHierarchyChain, isOnSameHierarchyChainInternal
Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, getLocalized, isVisible, setCaption
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface mondrian.olap.Annotated
getAnnotationMap
Methods inherited from interface mondrian.olap.Member
getAncestorMembers, getDepth, getMemberType, getOrderKey, getOrdinal, getParentUniqueName, getProperties, getPropertyFormattedValue, getSolveOrder, isAll, isCalculated, isCalculatedInQuery, isChildOrEqualTo, isEvaluated, isHidden, isMeasure, isNull, isOnSameHierarchyChain, isParentChildLeaf, isParentChildPhysicalMember, setName
Methods inherited from interface mondrian.olap.OlapElement
getCaption, getDescription, getLocalized, getName, getQualifiedName, isVisible
Methods inherited from interface mondrian.rolap.RolapMember
getKey, isAllMember
-
Field Details
-
cubeLevel
-
parentCubeMember
-
-
Constructor Details
-
RolapCubeMember
Creates a RolapCubeMember.- Parameters:
parent
- Parent membermember
- Member of underlying (non-cube) hierarchycubeLevel
- Level
-
-
Method Details
-
getUniqueName
- Specified by:
getUniqueName
in interfaceOlapElement
- Overrides:
getUniqueName
in classDelegatingRolapMember
-
getRolapMember
Returns the underlying member. This is a member of a shared dimension and does not belong to a cube.- Returns:
- Underlying member
-
getCube
Description copied from interface:RolapMemberInCube
Returns the cube this cube member belongs to.This method is not in the
RolapMember
interface, because regular members may be shared, and therefore do not belong to a specific cube.- Specified by:
getCube
in interfaceRolapMemberInCube
- Returns:
- Cube this cube member belongs to, never null
-
getDataMember
Description copied from interface:Member
Returns the system-generated data member that is associated with a nonleaf member of a dimension.Returns this member if this member is a leaf member, or if the nonleaf member does not have an associated data member.
- Specified by:
getDataMember
in interfaceMember
- Overrides:
getDataMember
in classDelegatingRolapMember
-
compareTo
Description copied from class:RolapMemberBase
Compares this member to anotherRolapMemberBase
.The method first compares on keys; null keys always collate last. If the keys are equal, it compares using unique name.
This method does not consider
RolapMemberBase.ordinal
field, because ordinal is only unique within a parent. If you want to compare members which may be at any position in the hierarchy, useFunUtil.compareHierarchically(mondrian.olap.Member, mondrian.olap.Member, boolean)
.- Specified by:
compareTo
in interfaceComparable
- Overrides:
compareTo
in classDelegatingRolapMember
- Returns:
- -1 if this is less, 0 if this is the same, 1 if this is greater
-
toString
- Overrides:
toString
in classOlapElementBase
-
hashCode
public int hashCode()- Overrides:
hashCode
in classRolapMemberBase
-
equals
- Overrides:
equals
in classRolapMemberBase
-
equals
- Overrides:
equals
in classRolapMemberBase
-
getHierarchy
- Specified by:
getHierarchy
in interfaceMember
- Specified by:
getHierarchy
in interfaceOlapElement
- Specified by:
getHierarchy
in interfaceRolapMember
- Overrides:
getHierarchy
in classDelegatingRolapMember
-
getDimension
Description copied from interface:OlapElement
Returns the dimension of a this expression, or null if no dimension is defined. Applicable only to set expressions.Example 1:
has dimension[Sales].children
[Sales]
.Example 2:
has dimension [Promotion Media].order(except([Promotion Media].[Media Type].members, {[Promotion Media].[Media Type].[No Media]}), [Measures].[Unit Sales], DESC)
Example 3:
has no dimension (well, actually it is [Product] x [Gender], but we can't represent that, so we return null);CrossJoin([Product].[Product Department].members, [Gender].members)
- Specified by:
getDimension
in interfaceOlapElement
- Overrides:
getDimension
in classDelegatingRolapMember
-
getLevel
This method is central to how RolapCubeMember works. It allows a member from the cache to be used within different usages of the same shared dimension. The cache member is the same, but the RolapCubeMembers wrapping the cache member report that they belong to different levels, and hence different hierarchies, dimensions, and cubes.
- Specified by:
getLevel
in interfaceMember
- Specified by:
getLevel
in interfaceRolapMember
- Overrides:
getLevel
in classDelegatingRolapMember
-
setProperty
Description copied from class:RolapMemberBase
Sets a property of this member to a given value.WARNING: Setting system properties such as "$name" may have nasty side-effects.
- Specified by:
setProperty
in interfaceMember
- Overrides:
setProperty
in classDelegatingRolapMember
-
getPropertyValue
Description copied from interface:Member
Returns the value of the property namedpropertyName
, matching according to the required case-sensitivity.- Specified by:
getPropertyValue
in interfaceMember
- Overrides:
getPropertyValue
in classDelegatingRolapMember
-
getPropertyValue
Description copied from interface:Member
Returns the value of the property namedpropertyName
. Name match is case-sensitive.- Specified by:
getPropertyValue
in interfaceMember
- Overrides:
getPropertyValue
in classDelegatingRolapMember
-
getParentMember
Description copied from interface:Member
Returns this member's parent, or null (not the 'null member', as returned byHierarchy.getNullMember()
) if it has no parent.In an access-control context, a member may have no visible parents, so use
SchemaReader.getMemberParent(mondrian.olap.Member)
.- Specified by:
getParentMember
in interfaceMember
- Specified by:
getParentMember
in interfaceRolapMember
- Overrides:
getParentMember
in classDelegatingRolapMember
-
getExpression
Description copied from class:MemberBase
Returns the expression by which this member is calculated. The expression is not null if and only if the member is not calculated.- Specified by:
getExpression
in interfaceMember
- Overrides:
getExpression
in classDelegatingRolapMember
-
lookupChild
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment childName, MatchType matchType) Description copied from interface:OlapElement
Looks up a child element, returning null if it does not exist.- Specified by:
lookupChild
in interfaceOlapElement
- Overrides:
lookupChild
in classDelegatingRolapMember
-
setContextIn
Pushes this calculated member or tuple onto the stack of evaluation contexts, and sets the context to the default member of the hierarchy.- Parameters:
evaluator
- Evaluator
-
getSolveOrder
int getSolveOrder()Returns the solve order of this calculation. Identifies which order calculations are expanded.- Returns:
- Solve order
-
getHierarchyOrdinal
int getHierarchyOrdinal()Returns the ordinal of this calculation; to resolve ties.- Returns:
- Ordinal or calculation
-
isCalculatedInQuery
boolean isCalculatedInQuery()Returns whether this calculation is a member is computed from aWITH MEMBER
clause in an MDX query.- Returns:
- whether this calculation is computed in an MDX query
-
getCompiledExpression
Returns the compiled expression to evaluate the scalar value of the current cell. This method will be called frequently, so the implementation should probably compile once and cache the result.- Parameters:
root
- Root evaluation context- Returns:
- Compiled scalar expression
-
containsAggregateFunction
boolean containsAggregateFunction()Returns whether this calculation contains an aggregate function.- Returns:
- Whether this calculation contains an aggregate function.
-