Class DelegatingRolapMember
- java.lang.Object
-
- mondrian.olap.OlapElementBase
-
- mondrian.olap.MemberBase
-
- mondrian.rolap.RolapMemberBase
-
- mondrian.rolap.DelegatingRolapMember
-
- All Implemented Interfaces:
Comparable
,Annotated
,Member
,OlapElement
,RolapMember
- Direct Known Subclasses:
RolapCubeMember
,RolapResult.CompoundSlicerRolapMember
public class DelegatingRolapMember extends RolapMemberBase
Implementation ofRolapMember
that delegates all calls to an underlying member.- Since:
- Mar 16, 2010
- Author:
- jhyde
-
-
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 Modifier and Type Field Description RolapMember
member
-
Fields inherited from class mondrian.olap.MemberBase
flags, level, parentMember, uniqueName
-
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelegatingRolapMember(RolapMember member)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object o)
Compares this member to anotherRolapMemberBase
.List<Member>
getAncestorMembers()
Returns a list of the ancestor members of this member.Map<String,Annotation>
getAnnotationMap()
Returns a list of annotations.String
getCaption()
Returns the display name of this catalog element.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 dimensionsString
getDescription()
Dimension
getDimension()
Returns the dimension of a this expression, or null if no dimension is defined.Exp
getExpression()
Returns the expression by which this member is calculated.RolapHierarchy
getHierarchy()
Object
getKey()
RolapLevel
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.RolapMember
getParentMember()
Returns this member's parent, or null (not the 'null member', as returned byHierarchy.getNullMember()
) if it has no parent.String
getParentUniqueName()
Returns name of parent member, or empty string (not null) if we are the root.Property[]
getProperties()
Returns the definitions of the properties this member may have.String
getPropertyFormattedValue(String propertyName)
Returns the formatted value of the property namedpropertyName
.Object
getPropertyValue(String propertyName)
Returns the value of the property namedpropertyName
.Object
getPropertyValue(String propertyName, boolean matchCase)
Returns the value of the property namedpropertyName
, matching according to the required case-sensitivity.String
getQualifiedName()
Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".int
getSolveOrder()
String
getUniqueName()
boolean
isAll()
Returns whether this is the 'all' member.boolean
isAllMember()
boolean
isCalculated()
Returns whether this member is computed using either awith member
clause in an mdx query or a calculated member defined in cube.boolean
isCalculatedInQuery()
Returns whether this member is computed from aWITH MEMBER
clause in an MDX query.boolean
isChildOrEqualTo(Member member2)
Returns whethermember
is equal to, a child, or a descendent of thisMember
.boolean
isEvaluated()
Returns whether this member should be evaluated within the Evaluator.boolean
isHidden()
Returns whether this member is 'hidden', as per the rules which define a ragged hierarchy.boolean
isMeasure()
Returns whether this is a member of the measures dimension.boolean
isNull()
Returns whether this is the 'null member'.boolean
isParentChildLeaf()
boolean
isParentChildPhysicalMember()
OlapElement
lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
Looks up a child element, returning null if it does not exist.void
setName(String name)
Only allowable if the member is part of theWITH
clause of a query.void
setProperty(String name, Object value)
Sets a property of this member to a given value.-
Methods inherited from class mondrian.rolap.RolapMemberBase
childLevelHasApproxRowCount, containsAggregateFunction, equals, equals, getAllMembers, getCaptionValue, getCompiledExpression, getHierarchyCardinality, getHierarchyOrdinal, getLogger, getPropertyFromMap, hashCode, 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, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface mondrian.olap.Member
isOnSameHierarchyChain
-
Methods inherited from interface mondrian.olap.OlapElement
getLocalized, isVisible
-
-
-
-
Field Detail
-
member
public final RolapMember member
-
-
Constructor Detail
-
DelegatingRolapMember
protected DelegatingRolapMember(RolapMember member)
-
-
Method Detail
-
getLevel
public RolapLevel getLevel()
- Specified by:
getLevel
in interfaceMember
- Specified by:
getLevel
in interfaceRolapMember
- Overrides:
getLevel
in classRolapMemberBase
-
getKey
public Object getKey()
- Specified by:
getKey
in interfaceRolapMember
- Overrides:
getKey
in classRolapMemberBase
-
getParentMember
public RolapMember 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 classRolapMemberBase
-
getHierarchy
public RolapHierarchy getHierarchy()
- Specified by:
getHierarchy
in interfaceMember
- Specified by:
getHierarchy
in interfaceOlapElement
- Specified by:
getHierarchy
in interfaceRolapMember
- Overrides:
getHierarchy
in classRolapMemberBase
-
getParentUniqueName
public String getParentUniqueName()
Description copied from interface:Member
Returns name of parent member, or empty string (not null) if we are the root.- Specified by:
getParentUniqueName
in interfaceMember
- Overrides:
getParentUniqueName
in classMemberBase
-
getMemberType
public Member.MemberType getMemberType()
Description copied from interface:Member
Returns the type of member.- Specified by:
getMemberType
in interfaceMember
- Overrides:
getMemberType
in classMemberBase
-
isParentChildLeaf
public boolean isParentChildLeaf()
- Specified by:
isParentChildLeaf
in interfaceMember
- Overrides:
isParentChildLeaf
in classRolapMemberBase
- Returns:
- True when the member is a leaf member, meaning it has no children
-
isParentChildPhysicalMember
public boolean isParentChildPhysicalMember()
- Specified by:
isParentChildPhysicalMember
in interfaceMember
- Overrides:
isParentChildPhysicalMember
in classMemberBase
- Returns:
- True when the member is part of a Parent-Child hierarchy and it is a physical member. In a Parent Child Hierarchy without a closure table, each member needs to be treated as calculated. We need a way to distinguish between true calculated members and physical members that exist in the source data
-
setName
public void setName(String name)
Description copied from interface:Member
Only allowable if the member is part of theWITH
clause of a query.- Specified by:
setName
in interfaceMember
- Overrides:
setName
in classRolapMemberBase
-
isAll
public boolean isAll()
Description copied from interface:Member
Returns whether this is the 'all' member.- Specified by:
isAll
in interfaceMember
- Overrides:
isAll
in classMemberBase
-
isMeasure
public boolean isMeasure()
Description copied from interface:Member
Returns whether this is a member of the measures dimension.- Specified by:
isMeasure
in interfaceMember
- Overrides:
isMeasure
in classMemberBase
-
isNull
public boolean isNull()
Description copied from interface:Member
Returns whether this is the 'null member'.- Specified by:
isNull
in interfaceMember
- Overrides:
isNull
in classMemberBase
-
isChildOrEqualTo
public boolean isChildOrEqualTo(Member member2)
Description copied from interface:Member
Returns whethermember
is equal to, a child, or a descendent of thisMember
.- Specified by:
isChildOrEqualTo
in interfaceMember
- Overrides:
isChildOrEqualTo
in classMemberBase
-
isCalculated
public boolean isCalculated()
Description copied from interface:Member
Returns whether this member is computed using either awith member
clause in an mdx query or a calculated member defined in cube.- Specified by:
isCalculated
in interfaceMember
- Overrides:
isCalculated
in classMemberBase
-
isEvaluated
public boolean isEvaluated()
Description copied from interface:Member
Returns whether this member should be evaluated within the Evaluator.Normally
Member.isCalculated()
andMember.isEvaluated()
should return the same value, but in situations where mondrian would like to treat the two concepts separately such in role based security, these values may differ.- Specified by:
isEvaluated
in interfaceMember
- Overrides:
isEvaluated
in classMemberBase
- Returns:
- true if evaluated
-
getSolveOrder
public int getSolveOrder()
- Specified by:
getSolveOrder
in interfaceMember
- Overrides:
getSolveOrder
in classMemberBase
-
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 interfaceMember
- Overrides:
getExpression
in classMemberBase
-
getAncestorMembers
public List<Member> getAncestorMembers()
Description copied from interface:Member
Returns a list of the ancestor members of this member.- Specified by:
getAncestorMembers
in interfaceMember
- Overrides:
getAncestorMembers
in classMemberBase
-
isCalculatedInQuery
public boolean isCalculatedInQuery()
Description copied from interface:Member
Returns whether this member is computed from aWITH MEMBER
clause in an MDX query.- Specified by:
isCalculatedInQuery
in interfaceMember
- Overrides:
isCalculatedInQuery
in classRolapMemberBase
-
getPropertyValue
public Object getPropertyValue(String propertyName)
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 classRolapMemberBase
-
getPropertyValue
public Object getPropertyValue(String propertyName, boolean matchCase)
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 classRolapMemberBase
-
getPropertyFormattedValue
public String getPropertyFormattedValue(String propertyName)
Description copied from interface:Member
Returns the formatted value of the property namedpropertyName
.- Specified by:
getPropertyFormattedValue
in interfaceMember
- Overrides:
getPropertyFormattedValue
in classRolapMemberBase
-
setProperty
public void setProperty(String name, Object value)
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 classRolapMemberBase
-
getProperties
public Property[] getProperties()
Description copied from interface:Member
Returns the definitions of the properties this member may have.- Specified by:
getProperties
in interfaceMember
- Overrides:
getProperties
in classRolapMemberBase
-
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 interfaceMember
- Overrides:
getOrdinal
in classRolapMemberBase
-
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 interfaceMember
- Overrides:
getOrderKey
in classRolapMemberBase
-
isHidden
public boolean isHidden()
Description copied from interface:Member
Returns whether this member is 'hidden', as per the rules which define a ragged hierarchy.- Specified by:
isHidden
in interfaceMember
- Overrides:
isHidden
in classRolapMemberBase
-
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 interfaceMember
- Overrides:
getDepth
in classRolapMemberBase
- Returns:
- depth
-
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 interfaceMember
- Overrides:
getDataMember
in classMemberBase
-
compareTo
public int compareTo(Object o)
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 classRolapMemberBase
- Returns:
- -1 if this is less, 0 if this is the same, 1 if this is greater
-
getUniqueName
public String getUniqueName()
- Specified by:
getUniqueName
in interfaceOlapElement
- Overrides:
getUniqueName
in classMemberBase
-
getName
public String getName()
- Specified by:
getName
in interfaceOlapElement
- Overrides:
getName
in classRolapMemberBase
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceOlapElement
- Overrides:
getDescription
in classMemberBase
-
lookupChild
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, 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 classMemberBase
-
getAnnotationMap
public Map<String,Annotation> getAnnotationMap()
Description copied from interface:Annotated
Returns a list of annotations.The map may be empty, never null.
- Specified by:
getAnnotationMap
in interfaceAnnotated
- Overrides:
getAnnotationMap
in classRolapMemberBase
- Returns:
- Map from annotation name to annotations.
-
getQualifiedName
public String getQualifiedName()
Description copied from interface:OlapElement
Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".- Specified by:
getQualifiedName
in interfaceOlapElement
- Overrides:
getQualifiedName
in classMemberBase
-
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 interfaceOlapElement
- Overrides:
getCaption
in classMemberBase
-
getDimension
public Dimension 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 classMemberBase
-
isAllMember
public boolean isAllMember()
- Specified by:
isAllMember
in interfaceRolapMember
- Overrides:
isAllMember
in classRolapMemberBase
-
-