mondrian.rolap
Class RolapCubeMember

java.lang.Object
  extended by mondrian.olap.OlapElementBase
      extended by mondrian.olap.MemberBase
          extended by mondrian.rolap.RolapMember
              extended by mondrian.rolap.RolapCubeMember
All Implemented Interfaces:
Comparable, Member, OlapElement
Direct Known Subclasses:
RolapHierarchy.LimitedRollupMember

public class RolapCubeMember
extends RolapMember

RolapCubeMember wraps RolapMembers and binds them to a specific cube. RolapCubeMember wraps or overrides RolapMember methods that directly reference the wrapped Member. Methods that only contain calls to other methods do not need wrapped.

Author:
Will Gorman (wgorman@pentaho.org)
 

Nested Class Summary
 
Nested classes/interfaces inherited from interface mondrian.olap.Member
Member.MemberType
 
Field Summary
protected  String rolapAllMemberCubeName
           
protected  RolapCube rolapCube
           
protected  RolapCubeLevel rolapLevel
           
protected  RolapMember rolapMember
           
 
Fields inherited from class mondrian.olap.MemberBase
flags, level, parentMember, parentUniqueName, uniqueName
 
Fields inherited from class mondrian.olap.OlapElementBase
caption
 
Constructor Summary
RolapCubeMember(RolapCubeMember parent, RolapMember member, RolapCubeLevel level, RolapCube cube)
           
 
Method Summary
 int compareTo(Object o)
          Compares this member to another RolapMember.
 boolean equals(Object o)
           
 boolean equals(OlapElement o)
           
 String getCaption()
          Returns the display name of this catalog element.
 RolapCube getCube()
          Returns the cube this cube member belongs to.
 Member getDataMember()
          Returns the system-generated data member that is associated with a nonleaf member of a dimension.
 int getDepth()
          returns the depth of this member, which is not the level's depth in case of parent child dimensions
 Exp getExpression()
          Returns the expression by which this member is calculated.
 RolapCubeHierarchy getHierarchy()
           
 Object getKey()
           
 RolapCubeLevel getLevel()
          
 Member.MemberType getMemberType()
          Returns the type of member.
 String getName()
           
 Comparable getOrderKey()
          Returns the order key of this member among its siblings.
 int getOrdinal()
          Returns the ordinal of this member within its hierarchy.
 RolapCubeMember getParentMember()
          Returns this member's parent, or null (not the 'null member', as returned by Hierarchy.getNullMember()) if it has no parent.
protected  Object getPropertyFromMap(String propertyName, boolean matchCase)
          Returns the value of a property by looking it up in the property map.
 Object getPropertyValue(String propertyName, boolean matchCase)
          Returns the value of the property named propertyName, matching according to the required case-sensitivity.
 RolapMember getRolapMember()
           
 int getSolveOrder()
           
 boolean isAll()
          Returns whether this is the 'all' member.
 boolean isCalculated()
          Returns whether this member is computed using either a with member clause in an mdx query or a calculated member defined in cube.
 boolean isCalculatedInQuery()
          Returns whether this member is computed from a WITH MEMBER clause in an MDX query.
 boolean isMeasure()
          Returns whether this is a member of the measures dimension.
 boolean isNull()
          Returns whether this is the 'null member'.
 OlapElement lookupChild(SchemaReader schemaReader, Id.Segment childName, MatchType matchType)
           
(package private)  void setOrderKey(Comparable orderKey)
           
(package private)  void setOrdinal(int ordinal)
           
 void setProperty(String name, Object value)
          Sets a property of this member to a given value.
 
Methods inherited from class mondrian.rolap.RolapMember
childLevelHasApproxRowCount, getAllMembers, getHierarchyCardinality, getLogger, getProperties, getPropertyFormattedValue, getPropertyValue, hashCode, isAllMember, isHidden, keyToString, makeUniqueName, setName, setOrdinals, setParentMember, setUniqueName
 
Methods inherited from class mondrian.olap.MemberBase
computeCalculated, getAncestorMembers, getDescription, getDimension, getParentUniqueName, getQualifiedName, getUniqueName, isChildOrEqualTo, isChildOrEqualTo, lookupChild
 
Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, setCaption, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

rolapAllMemberCubeName

protected final String rolapAllMemberCubeName

rolapMember

protected final RolapMember rolapMember

rolapLevel

protected final RolapCubeLevel rolapLevel

rolapCube

protected final RolapCube rolapCube
Constructor Detail

RolapCubeMember

public RolapCubeMember(RolapCubeMember parent,
                       RolapMember member,
                       RolapCubeLevel level,
                       RolapCube cube)
Method Detail

getDepth

public int getDepth()
Description copied from interface: Member
returns the depth of this member, which is not the level's depth in case of parent child dimensions

Specified by:
getDepth in interface Member
Overrides:
getDepth in class RolapMember
Returns:
depth

isNull

public boolean isNull()
Description copied from interface: Member
Returns whether this is the 'null member'.

Specified by:
isNull in interface Member
Overrides:
isNull in class MemberBase

isMeasure

public boolean isMeasure()
Description copied from interface: Member
Returns whether this is a member of the measures dimension.

Specified by:
isMeasure in interface Member
Overrides:
isMeasure in class MemberBase

isAll

public boolean isAll()
Description copied from interface: Member
Returns whether this is the 'all' member.

Specified by:
isAll in interface Member
Overrides:
isAll in class MemberBase

getRolapMember

public RolapMember getRolapMember()

getCube

public RolapCube getCube()
Returns the cube this cube member belongs to.

This method is not in the Member interface, because regular members may be shared, and therefore do not belong to a specific cube.

Returns:
Cube this cube member belongs to

getDataMember

public Member 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 interface Member
Overrides:
getDataMember in class MemberBase

compareTo

public int compareTo(Object o)
Description copied from class: RolapMember
Compares this member to another RolapMember.

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 RolapMember.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, use FunUtil.compareHierarchically(mondrian.olap.Member, mondrian.olap.Member, boolean).

Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class RolapMember
Returns:
-1 if this is less, 0 if this is the same, 1 if this is greater

equals

public boolean equals(Object o)
Overrides:
equals in class RolapMember

equals

public boolean equals(OlapElement o)
Overrides:
equals in class RolapMember

getKey

public Object getKey()
Overrides:
getKey in class RolapMember

getHierarchy

public RolapCubeHierarchy getHierarchy()
Specified by:
getHierarchy in interface Member
Specified by:
getHierarchy in interface OlapElement
Overrides:
getHierarchy in class RolapMember

getLevel

public RolapCubeLevel 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 interface Member
Overrides:
getLevel in class RolapMember

getName

public String getName()
Specified by:
getName in interface OlapElement
Overrides:
getName in class RolapMember

getOrderKey

public Comparable getOrderKey()
Description copied from class: MemberBase
Returns the order key of this member among its siblings. The default implementation returns null.

Specified by:
getOrderKey in interface Member
Overrides:
getOrderKey in class RolapMember

setOrderKey

void setOrderKey(Comparable orderKey)
Overrides:
setOrderKey in class RolapMember

getOrdinal

public int getOrdinal()
Description copied from class: MemberBase
Returns the ordinal of this member within its hierarchy. The default implementation returns -1.

Specified by:
getOrdinal in interface Member
Overrides:
getOrdinal in class RolapMember

setOrdinal

void setOrdinal(int ordinal)
Overrides:
setOrdinal in class RolapMember

setProperty

public void setProperty(String name,
                        Object value)
Description copied from class: RolapMember
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 interface Member
Overrides:
setProperty in class RolapMember

getPropertyValue

public Object getPropertyValue(String propertyName,
                               boolean matchCase)
Description copied from interface: Member
Returns the value of the property named propertyName, matching according to the required case-sensitivity.

Specified by:
getPropertyValue in interface Member
Overrides:
getPropertyValue in class RolapMember

getSolveOrder

public int getSolveOrder()
Specified by:
getSolveOrder in interface Member
Overrides:
getSolveOrder in class MemberBase

getPropertyFromMap

protected Object getPropertyFromMap(String propertyName,
                                    boolean matchCase)
Description copied from class: RolapMember
Returns the value of a property by looking it up in the property map.

Overrides:
getPropertyFromMap in class RolapMember
Parameters:
propertyName - Name of property
matchCase - Whether to match name case-sensitive
Returns:
Property value

getMemberType

public final Member.MemberType getMemberType()
Description copied from interface: Member
Returns the type of member.

Specified by:
getMemberType in interface Member
Overrides:
getMemberType in class MemberBase

getParentMember

public RolapCubeMember getParentMember()
Description copied from interface: Member
Returns this member's parent, or null (not the 'null member', as returned by Hierarchy.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 interface Member
Overrides:
getParentMember in class RolapMember

getCaption

public String getCaption()
Description copied from class: OlapElementBase
Returns the display name of this catalog element. If no caption is defined, the name is returned.

Specified by:
getCaption in interface OlapElement
Overrides:
getCaption in class MemberBase

isCalculated

public boolean isCalculated()
Description copied from interface: Member
Returns whether this member is computed using either a with member clause in an mdx query or a calculated member defined in cube.

Specified by:
isCalculated in interface Member
Overrides:
isCalculated in class MemberBase

isCalculatedInQuery

public boolean isCalculatedInQuery()
Description copied from interface: Member
Returns whether this member is computed from a WITH MEMBER clause in an MDX query.

Specified by:
isCalculatedInQuery in interface Member
Overrides:
isCalculatedInQuery in class RolapMember

getExpression

public Exp 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 interface Member
Overrides:
getExpression in class MemberBase

lookupChild

public OlapElement lookupChild(SchemaReader schemaReader,
                               Id.Segment childName,
                               MatchType matchType)
Specified by:
lookupChild in interface OlapElement
Overrides:
lookupChild in class MemberBase

SourceForge.net_Logo