public interface Member extends MetadataElement
Member
is a data value in an OLAP Dimension.Modifier and Type | Interface and Description |
---|---|
static class |
Member.TreeOp
Enumeration of tree operations which can be used when querying
members.
|
static class |
Member.Type
Enumeration of types of members.
|
Modifier and Type | Method and Description |
---|---|
List<Member> |
getAncestorMembers()
Returns array of all members which are ancestor to
this . |
int |
getChildMemberCount()
Returns the number of children this Member has.
|
NamedList<? extends Member> |
getChildMembers()
Returns the children of this Member, indexed by name.
|
Member |
getDataMember()
Returns the system-generated data member that is associated with a
non-leaf member of a dimension.
|
int |
getDepth()
Returns the depth of this member.
|
Dimension |
getDimension()
Returns the Dimension of this Member.
|
ParseTreeNode |
getExpression()
Expression by which this member is derived, if it is a calculated
member.
|
Hierarchy |
getHierarchy()
Returns the Hierarchy of this Member.
|
Level |
getLevel()
Returns the Level of this Member.
|
Member.Type |
getMemberType()
Returns the type of this Member.
|
int |
getOrdinal()
Returns the ordinal of the member.
|
Member |
getParentMember()
Returns the parent of this Member, or null if it has no parent.
|
NamedList<Property> |
getProperties()
Returns the definitions of the properties this member may have.
|
String |
getPropertyFormattedValue(Property property)
Returns the formatted value of a given property.
|
Object |
getPropertyValue(Property property)
Returns the value of a given property.
|
int |
getSolveOrder()
Returns the solve order of this member in a formula.
|
boolean |
isAll()
Returns whether this Member represents the aggregation of all members
in its Dimension.
|
boolean |
isCalculated()
Returns whether this member is calculated using a formula.
|
boolean |
isCalculatedInQuery()
Returns whether this member is computed from a
WITH MEMBER
clause in an MDX query. |
boolean |
isChildOrEqualTo(Member member)
Returns whether
member is equal to, a child of, or a
descendent of this Member. |
boolean |
isHidden()
Returns whether this member is 'hidden', as per the rules which define
a ragged hierarchy.
|
void |
setProperty(Property property,
Object value)
Sets a property of this member to a given value.
|
getCaption, getDescription, getName, getUniqueName, isVisible
NamedList<? extends Member> getChildMembers() throws OlapException
If access-control is in place, the list does not contain inaccessible children.
If the member has no children, returns an empty list: the result is never null.
The caller should assume that the list is immutable; if the caller modifies the list, behavior is undefined.
OlapException
- if database error occursOlapDatabaseMetaData.getMembers(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Set<org.olap4j.metadata.Member.TreeOp>)
int getChildMemberCount() throws OlapException
This method has the same effect as
getChildMembers().size()
, but is typically less expensive.
OlapException
- if database error occursMember getParentMember()
Level getLevel()
Never returns null.
Hierarchy getHierarchy()
Never returns null.
Result is always the same as getLevel().getHierarchy()
.
Dimension getDimension()
Never returns null. Result is always the same as
getLevel().getHierarchy().getDimension()
.
Member.Type getMemberType()
Never returns null.
boolean isAll()
An 'all' member is always the root of its Hierarchy; that is,
its parent member is the null member, and
Hierarchy.getRootMembers()
returns the 'all'
member and no others. Some hierarchies do not have an 'all' member.
Hierarchy.hasAll()
boolean isChildOrEqualTo(Member member)
member
is equal to, a child of, or a
descendent of this Member.member
- Memberboolean isCalculated()
Examples of calculated members include
those defined using a WITH MEMBER
clause in an MDX query
(getMemberType()
will return Member.Type.FORMULA
for these),
or a calculated member defined in a cube.
isCalculatedInQuery()
int getSolveOrder()
ParseTreeNode getExpression()
List<Member> getAncestorMembers()
this
.boolean isCalculatedInQuery()
WITH MEMBER
clause in an MDX query. (Calculated members can also be calculated in a
cube.)isCalculated()
Object getPropertyValue(Property property) throws OlapException
Returns null if the property is not set.
Every member has certain system properties such as "name" and
"caption" (the full list is described in the
Property.StandardMemberProperty
enumeration), as well as extra properties defined for its Level
(see Level.getProperties()
).
property
- PropertyOlapException
- if database error occursgetPropertyFormattedValue(Property)
String getPropertyFormattedValue(Property property) throws OlapException
Returns null if the property is not set.
Every member has certain system properties such as "name" and
"caption" (the full list is described in the
Property.StandardMemberProperty
enumeration), as well as extra properties defined for its Level
(see Level.getProperties()
).
property
- PropertyOlapException
- if database error occursgetPropertyValue(Property)
void setProperty(Property property, Object value) throws OlapException
Every member has certain system properties such as "name" and
"caption" (the full list is described in the
Property.StandardMemberProperty
enumeration), as well as extra properties defined for its Level
(see Level.getProperties()
).
property
- propertyvalue
- Property valueOlapException
- if the value not valid for this property
(for example, a String value assigned to a Boolean property)NamedList<Property> getProperties()
For many providers, properties are defined against a Level, so result
of this method will be identical to
member.getLevel().
.getProperties
()
int getOrdinal()
boolean isHidden()
int getDepth()
In regular hierarchies, this is as the same as the level's depth, but in parent-child and ragged hierarchies the value may be different.
Member getDataMember()
Returns this member if this member is a leaf member, or if the non-leaf member does not have an associated data member.