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 TypeMethodDescriptionintReturns the number of members in this Level.intgetDepth()Returns the depth of thisLevel.Returns the Dimension thisLevelbelongs to.Returns theHierarchythisLevelbelongs to.Returns the type of thisLevel.Returns a list ofMemberobjects that belong to this Level.Returns a list of definitions for the properties available to members of thisLevel.booleanReturns 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 theHierarchythisLevelbelongs to.- Returns:
- hierarchy this level belongs to
-
getDimension
Dimension getDimension()Returns the Dimension thisLevelbelongs 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.
- Returns:
- properties of this Level
- See Also:
-
getMembers
Returns a list ofMemberobjects 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,FilterandOrderare 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 aListnot 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
-