Interface Member
- All Superinterfaces:
MetadataElement
- All Known Subinterfaces:
Measure
Member
is a data value in an OLAP Dimension.- Since:
- Aug 22, 2006
- Author:
- jhyde
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Enumeration of tree operations which can be used when querying members.static enum
Enumeration of types of members. -
Method Summary
Modifier and TypeMethodDescriptionReturns array of all members which are ancestor tothis
.int
Returns the number of children this Member has.Returns the children of this Member, indexed by name.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.Returns the Dimension of this Member.Expression by which this member is derived, if it is a calculated member.Returns the Hierarchy of this Member.getLevel()
Returns the Level of this Member.Returns the type of this Member.int
Returns the ordinal of the member.Returns the parent of this Member, or null if it has no parent.Returns the definitions of the properties this member may have.getPropertyFormattedValue
(Property property) Returns the formatted value of a given property.getPropertyValue
(Property property) Returns the value of a given property.int
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
Returns whether this member is calculated using a formula.boolean
Returns whether this member is computed from aWITH MEMBER
clause in an MDX query.boolean
isChildOrEqualTo
(Member member) Returns whethermember
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.Methods inherited from interface org.olap4j.metadata.MetadataElement
getCaption, getDescription, getName, getUniqueName, isVisible
-
Method Details
-
getChildMembers
Returns the children of this Member, indexed by name.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.
- Returns:
- children of this member
- Throws:
OlapException
- if database error occurs- See Also:
-
getChildMemberCount
Returns the number of children this Member has.This method has the same effect as
getChildMembers().size()
, but is typically less expensive.- Returns:
- number of children
- Throws:
OlapException
- if database error occurs
-
getParentMember
Member getParentMember()Returns the parent of this Member, or null if it has no parent.- Returns:
- Parent member, or null if member has no parent
-
getLevel
Level getLevel()Returns the Level of this Member.Never returns null.
- Returns:
- Level which this Member belongs to
-
getHierarchy
Hierarchy getHierarchy()Returns the Hierarchy of this Member.Never returns null. Result is always the same as
getLevel().getHierarchy()
.- Returns:
- Hierarchy which this Member belongs to
-
getDimension
Dimension getDimension()Returns the Dimension of this Member.Never returns null. Result is always the same as
getLevel().getHierarchy().getDimension()
.- Returns:
- Dimension which this Member belongs to
-
getMemberType
Member.Type getMemberType()Returns the type of this Member.Never returns null.
- Returns:
- What kind of member this is
-
isAll
boolean isAll()Returns whether this Member represents the aggregation of all members in its Dimension.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.- Returns:
- whether this Member is the 'all' member of its Dimension
- See Also:
-
isChildOrEqualTo
Returns whethermember
is equal to, a child of, or a descendent of this Member.- Parameters:
member
- Member- Returns:
- Whether the given Member is a descendent of this Member
-
isCalculated
boolean isCalculated()Returns whether this member is calculated using a formula.Examples of calculated members include those defined using a
WITH MEMBER
clause in an MDX query (getMemberType()
will returnMember.Type.FORMULA
for these), or a calculated member defined in a cube.- Returns:
- Whether this Member is calculated
- See Also:
-
getSolveOrder
int getSolveOrder()Returns the solve order of this member in a formula.- Returns:
- solve order of this Member
-
getExpression
ParseTreeNode getExpression()Expression by which this member is derived, if it is a calculated member. If the member is not calulated, returns null.- Returns:
- expression for this member
-
getAncestorMembers
Returns array of all members which are ancestor tothis
.- Returns:
- ancestor Members
-
isCalculatedInQuery
boolean isCalculatedInQuery()Returns whether this member is computed from aWITH MEMBER
clause in an MDX query. (Calculated members can also be calculated in a cube.)- Returns:
- Whether this member is calculated in a query
- See Also:
-
getPropertyValue
Returns the value of a given property.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 (seeLevel.getProperties()
).- Parameters:
property
- Property- Returns:
- formatted value of the given property
- Throws:
OlapException
- if database error occurs- See Also:
-
getPropertyFormattedValue
Returns the formatted value of a given property.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 (seeLevel.getProperties()
).- Parameters:
property
- Property- Returns:
- formatted value of the given property
- Throws:
OlapException
- if database error occurs- See Also:
-
setProperty
Sets a property of this member to a given value.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 (seeLevel.getProperties()
).- Parameters:
property
- propertyvalue
- Property value- Throws:
OlapException
- if the value not valid for this property (for example, a String value assigned to a Boolean property)
-
getProperties
Returns the definitions of the properties this member may have.For many providers, properties are defined against a Level, so result of this method will be identical to
member.getLevel().
.getProperties
()- Returns:
- properties of this Member
-
getOrdinal
int getOrdinal()Returns the ordinal of the member.- Returns:
- ordinal of this Member
-
isHidden
boolean isHidden()Returns whether this member is 'hidden', as per the rules which define a ragged hierarchy.- Returns:
- whether this member is a hidden member of a ragged hierarchy
-
getDepth
int getDepth()Returns the depth of this member.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.
- Returns:
- depth of this Member
-
getDataMember
Member getDataMember()Returns the system-generated data member that is associated with a non-leaf member of a dimension.Returns this member if this member is a leaf member, or if the non-leaf member does not have an associated data member.
- Returns:
- system-generated data member
-