|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.olap.OlapElementBase mondrian.olap.MemberBase
public abstract class MemberBase
MemberBase
is a partial implementation of Member
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface mondrian.olap.Member |
---|
Member.MemberType |
Field Summary | |
---|---|
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 |
parentUniqueName
|
protected String |
uniqueName
|
Fields inherited from class mondrian.olap.OlapElementBase |
---|
caption |
Constructor Summary | |
---|---|
protected |
MemberBase()
|
protected |
MemberBase(Member parentMember,
Level level,
Member.MemberType memberType)
|
Method Summary | |
---|---|
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 |
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'. |
OlapElement |
lookupChild(SchemaReader schemaReader,
Id.Segment childName)
Looks up a child element, returning null if it does not exist. |
OlapElement |
lookupChild(SchemaReader schemaReader,
Id.Segment childName,
MatchType matchType)
|
Methods inherited from class mondrian.olap.OlapElementBase |
---|
clone, computeHashCode, equals, equals, getLogger, hashCode, setCaption, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface mondrian.olap.Member |
---|
getDepth, getProperties, getPropertyValue, getPropertyValue, isCalculatedInQuery, setName, setProperty |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
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 String parentUniqueName
Constructor Detail |
---|
protected MemberBase(Member parentMember, Level level, Member.MemberType memberType)
protected MemberBase()
Method Detail |
---|
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 Level getLevel()
getLevel
in interface Member
public Member.MemberType getMemberType()
Member
getMemberType
in interface Member
public String getDescription()
getDescription
in interface OlapElement
public boolean isMeasure()
Member
isMeasure
in interface Member
public boolean isAll()
Member
isAll
in interface Member
public boolean isNull()
Member
isNull
in interface Member
public boolean isCalculated()
Member
with
member
clause in an mdx query or a calculated member defined in
cube.
isCalculated
in interface Member
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment childName)
OlapElement
lookupChild
in interface OlapElement
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment childName, MatchType matchType)
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 type
public 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
isHidden
in interface 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |