Interface Member
-
- All Superinterfaces:
MetadataElement
- All Known Subinterfaces:
Measure
public interface Member extends MetadataElement
Member
is a data value in an OLAP Dimension.- Since:
- Aug 22, 2006
- Author:
- jhyde
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface 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.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Member>
getAncestorMembers()
Returns array of all members which are ancestor tothis
.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.java.lang.String
getPropertyFormattedValue(Property property)
Returns the formatted value of a given property.java.lang.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 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, java.lang.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 Detail
-
getChildMembers
NamedList<? extends Member> getChildMembers() throws OlapException
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:
OlapDatabaseMetaData.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>)
-
getChildMemberCount
int getChildMemberCount() throws OlapException
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:
Hierarchy.hasAll()
-
isChildOrEqualTo
boolean isChildOrEqualTo(Member member)
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:
isCalculatedInQuery()
-
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
java.util.List<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:
isCalculated()
-
getPropertyValue
java.lang.Object getPropertyValue(Property property) throws OlapException
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(Property)
-
getPropertyFormattedValue
java.lang.String getPropertyFormattedValue(Property property) throws OlapException
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:
getPropertyValue(Property)
-
setProperty
void setProperty(Property property, java.lang.Object value) throws OlapException
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
NamedList<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
-
-