public abstract class MemberBase extends OlapElementBase implements Member
MemberBase is a partial implementation of Member.Member.MemberTypeOlapElement.LocalizedProperty| Modifier and Type | Field and Description |
|---|---|
protected int |
flags
Combines member type and other properties, such as whether the member is the 'all' or 'null' member of its
hierarchy and whether it is a measure or is calculated, into an integer field.
|
protected Level |
level |
protected Member |
parentMember |
protected String |
uniqueName |
caption, visible| Modifier | Constructor and Description |
|---|---|
protected |
MemberBase() |
protected |
MemberBase(Member parentMember,
Level level,
Member.MemberType memberType) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
computeCalculated(Member.MemberType memberType)
Computes the value to be returned by
isCalculated(), so it can be cached in a variable. |
List<Member> |
getAncestorMembers()
Returns a list of the ancestor members of this member.
|
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.
|
String |
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.
|
Hierarchy |
getHierarchy() |
Level |
getLevel() |
Member.MemberType |
getMemberType()
Returns the type of member.
|
abstract 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.
|
Member |
getParentMember()
Returns this member's parent, or null (not the 'null member', as returned by
Hierarchy.getNullMember())
if it
has no parent. |
String |
getParentUniqueName()
Returns name of parent member, or empty string (not null) if we are the root.
|
String |
getPropertyFormattedValue(String propertyName)
Returns the formatted value of the property named
propertyName. |
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 |
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 |
isChildOrEqualTo(Member member)
Returns whether
member is equal to, a child, or a descendent of this Member. |
boolean |
isChildOrEqualTo(String uniqueName)
Returns whether this
Member's unique name is equal to, a child of, or a descendent of a member whose
unique name is
uniqueName. |
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 |
isOnSameHierarchyChain(Member otherMember)
Returns true if this member is on the same hierarchy chain as
otherMember. |
boolean |
isOnSameHierarchyChainInternal(MemberBase otherMember) |
boolean |
isParentChildLeaf() |
boolean |
isParentChildPhysicalMember() |
OlapElement |
lookupChild(SchemaReader schemaReader,
Id.Segment childName,
MatchType matchType)
Looks up a child element, returning null if it does not exist.
|
clone, computeHashCode, equals, equals, getLocalized, getLogger, hashCode, isVisible, setCaption, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetDepth, getProperties, getPropertyValue, getPropertyValue, isCalculatedInQuery, setName, setPropertygetLocalized, isVisiblecompareTogetAnnotationMapprotected Member parentMember
protected final Level level
protected String uniqueName
protected final int flags
The fields are:
FLAG_TYPE_MASK) are member type;
FLAG_HIDDEN) is set if the member is hidden;
FLAG_ALL) is set if this is the all member of its
hierarchy;
FLAG_NULL) is set if this is the null member of its
hierarchy;
FLAG_CALCULATED) is set if this is a calculated
member.
FLAG_MEASURE) is set if this is a measure.
NOTE: jhyde, 2007/8/10. It is necessary to cache whether the member is 'all', 'calculated' or 'null' in the member's state, because these properties are used so often. If we used a virtual method call - say we made each subclass implement 'boolean isNull()' - it would be slower. We use one flags field rather than 4 boolean fields to save space.
protected MemberBase(Member parentMember, Level level, Member.MemberType memberType)
protected MemberBase()
public String getQualifiedName()
OlapElementgetQualifiedName in interface OlapElementpublic abstract String getName()
getName in interface OlapElementpublic String getUniqueName()
getUniqueName in interface OlapElementpublic String getCaption()
OlapElementBasegetCaption in interface OlapElementgetCaption in class OlapElementBasepublic String getParentUniqueName()
MembergetParentUniqueName in interface Memberpublic Dimension getDimension()
OlapElementExample 1:
has dimension[Sales].children
[Sales].
Example 2:
order(except([Promotion Media].[Media Type].members,
{[Promotion Media].[Media Type].[No Media]}),
[Measures].[Unit Sales], DESC)
has dimension [Promotion Media].
Example 3:
CrossJoin([Product].[Product Department].members,
[Gender].members)
has no dimension (well, actually it is [Product] x [Gender], but we
can't represent that, so we return null);getDimension in interface OlapElementpublic Hierarchy getHierarchy()
getHierarchy in interface MembergetHierarchy in interface OlapElementpublic Member.MemberType getMemberType()
MembergetMemberType in interface Memberpublic String getDescription()
getDescription in interface OlapElementpublic boolean isMeasure()
Memberpublic boolean isAll()
Memberpublic boolean isNull()
Memberpublic boolean isCalculated()
Memberwith member clause in an mdx query or a
calculated member defined in cube.isCalculated in interface Memberpublic boolean isEvaluated()
MemberNormally Member.isCalculated() and Member.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.
isEvaluated in interface Memberpublic OlapElement lookupChild(SchemaReader schemaReader, Id.Segment childName, MatchType matchType)
OlapElementlookupChild in interface OlapElementpublic Member getParentMember()
MemberHierarchy.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).
getParentMember in interface Memberpublic boolean isChildOrEqualTo(Member member)
Membermember is equal to, a child, or a descendent of this Member.isChildOrEqualTo in interface Memberpublic boolean isChildOrEqualTo(String uniqueName)
Member's unique name is equal to, a child of, or a descendent of a member whose
unique name is
uniqueName.protected boolean computeCalculated(Member.MemberType memberType)
isCalculated(), so it can be cached in a variable.memberType - Member typepublic int getSolveOrder()
getSolveOrder in interface Memberpublic Exp getExpression()
getExpression in interface Memberpublic List<Member> getAncestorMembers()
MembergetAncestorMembers in interface Memberpublic int getOrdinal()
getOrdinal in interface Memberpublic Comparable getOrderKey()
getOrderKey in interface Memberpublic boolean isHidden()
Memberpublic Member getDataMember()
MemberReturns this member if this member is a leaf member, or if the nonleaf member does not have an associated data member.
getDataMember in interface Memberpublic String getPropertyFormattedValue(String propertyName)
MemberpropertyName.getPropertyFormattedValue in interface Memberpublic boolean isParentChildPhysicalMember()
isParentChildPhysicalMember in interface Memberpublic boolean isParentChildLeaf()
isParentChildLeaf in interface Memberpublic boolean isOnSameHierarchyChain(Member otherMember)
MemberotherMember.isOnSameHierarchyChain in interface Memberpublic boolean isOnSameHierarchyChainInternal(MemberBase otherMember)
Copyright © 2021 Hitachi Vantara. All rights reserved.