public abstract class MemberBase extends OlapElementBase implements Member
MemberBase
is a partial implementation of Member
.Member.MemberType
OlapElement.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 |
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, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
getDepth, getProperties, getPropertyValue, getPropertyValue, isCalculatedInQuery, setName, setProperty
getLocalized, isVisible
compareTo
getAnnotationMap
protected 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.
protected MemberBase(Member parentMember, Level level, Member.MemberType memberType)
protected MemberBase()
public String getQualifiedName()
OlapElement
getQualifiedName
in interface OlapElement
public abstract String getName()
getName
in interface OlapElement
public String getUniqueName()
getUniqueName
in interface OlapElement
public String getCaption()
OlapElementBase
getCaption
in interface OlapElement
getCaption
in class OlapElementBase
public String getParentUniqueName()
Member
getParentUniqueName
in interface Member
public Dimension getDimension()
OlapElement
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)
getDimension
in interface OlapElement
public Hierarchy getHierarchy()
getHierarchy
in interface Member
getHierarchy
in interface OlapElement
public Member.MemberType getMemberType()
Member
getMemberType
in interface Member
public String getDescription()
getDescription
in interface OlapElement
public boolean isMeasure()
Member
public boolean isAll()
Member
public boolean isNull()
Member
public boolean isCalculated()
Member
with
member
clause in an mdx query or a calculated member defined in
cube.isCalculated
in interface Member
public boolean isEvaluated()
Member
Normally 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 Member
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment childName, MatchType matchType)
OlapElement
lookupChild
in interface OlapElement
public Member getParentMember()
Member
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)
.
getParentMember
in interface Member
public boolean isChildOrEqualTo(Member member)
Member
member
is equal to, a child, or a
descendent of this Member
.isChildOrEqualTo
in interface Member
public 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 Member
public Exp getExpression()
getExpression
in interface Member
public List<Member> getAncestorMembers()
Member
getAncestorMembers
in interface Member
public int getOrdinal()
getOrdinal
in interface Member
public Comparable getOrderKey()
getOrderKey
in interface Member
public boolean isHidden()
Member
public Member getDataMember()
Member
Returns this member if this member is a leaf member, or if the nonleaf member does not have an associated data member.
getDataMember
in interface Member
public String getPropertyFormattedValue(String propertyName)
Member
propertyName
.getPropertyFormattedValue
in interface Member
public boolean isParentChildPhysicalMember()
isParentChildPhysicalMember
in interface Member
public boolean isParentChildLeaf()
isParentChildLeaf
in interface Member
Copyright © 2018 Hitachi Vantara. All rights reserved.