Interface Level

  • All Superinterfaces:
    MetadataElement

    public interface Level
    extends MetadataElement
    Group of Member objects in a Hierarchy, all with the same attributes and at the same depth in the hierarchy.
    Since:
    Aug 23, 2006
    Author:
    jhyde
    • Method Detail

      • getDepth

        int getDepth()
        Returns the depth of this Level.

        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 the Hierarchy this Level belongs to.
        Returns:
        hierarchy this level belongs to
      • getDimension

        Dimension getDimension()
        Returns the Dimension this Level belongs to. (Always equivalent to getHierarchy().getDimension().)
        Returns:
        dimension this level belongs to
      • getLevelType

        Level.Type getLevelType()
        Returns the type of this Level.
        Returns:
        level type
      • isCalculated

        boolean isCalculated()
        Returns whether the level is calculated.
        Returns:
        Whether this level is calculated
      • getMembers

        java.util.List<Member> getMembers()
                                   throws OlapException
        Returns a list of Member 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 and Order 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() and Member.getChildMembers() the result type is a List not a NamedList.

        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