Interface Level
- All Superinterfaces:
MetadataElement
Member
objects in a Hierarchy
,
all with the same attributes and at the same depth in the hierarchy.- Since:
- Aug 23, 2006
- Author:
- jhyde
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of members in this Level.int
getDepth()
Returns the depth of thisLevel
.Returns the Dimension thisLevel
belongs to.Returns theHierarchy
thisLevel
belongs to.Returns the type of thisLevel
.Returns a list ofMember
objects that belong to this Level.Returns a list of definitions for the properties available to members of thisLevel
.boolean
Returns whether the level is calculated.Methods inherited from interface org.olap4j.metadata.MetadataElement
getCaption, getDescription, getName, getUniqueName, isVisible
-
Method Details
-
getDepth
int getDepth()Returns the depth of thisLevel
.Note #1: In an access-controlled context, the first visible level of a hierarchy may not have a depth of 0.
Note #2: In a parent-child hierarchy, the depth of a member (as returned by may not be the same as the depth of its level.
- Returns:
- depth of this level
-
getHierarchy
Hierarchy getHierarchy()Returns theHierarchy
thisLevel
belongs to.- Returns:
- hierarchy this level belongs to
-
getDimension
Dimension getDimension()Returns the Dimension thisLevel
belongs to. (Always equivalent togetHierarchy().getDimension()
.)- Returns:
- dimension this level belongs to
-
getLevelType
Level.Type getLevelType()Returns the type of thisLevel
.- Returns:
- level type
-
isCalculated
boolean isCalculated()Returns whether the level is calculated.- Returns:
- Whether this level is calculated
-
getProperties
Returns a list of definitions for the properties available to members of thisLevel
.The caller should assume that the list is immutable; if the caller modifies the list, behavior is undefined.
-
getMembers
Returns a list ofMember
objects that belong to this Level.The list includes calculated members which are defined in the cube, if any. The list does not include any calculated members defined in a query, if accessed through a
CellSet
.Some levels have a very many members. In this case, calling this method may be expensive in space and/or time and is not recommended.
If you need to include calculated members, or if you need to query specific members or subsets of members in a level, consider instead generating and executing an MDX query with a single axis. MDX functions
AddCalculatedMembers
,Filter
andOrder
are especially useful. For example,with member [Measures].[Zero] as 0 select AddCalculatedMembers([Time].[Month].Members) on 0 from [Sales] where [Measures].[Zero]
returns the[Month]
level including calculated members. The[Measures].[Zero]
calculated member saves the OLAP server the effort of retrieving cell values.The members of a level do not have unique names, so unlike
Hierarchy.getRootMembers()
andMember.getChildMembers()
the result type is aList
not aNamedList
.- Returns:
- List of members in this Level
- Throws:
OlapException
- if database error occurs
-
getCardinality
int getCardinality()Returns the number of members in this Level.- Returns:
- number of members
-