Enum Level.Type

java.lang.Object
java.lang.Enum<Level.Type>
org.olap4j.metadata.Level.Type
All Implemented Interfaces:
Serializable, Comparable<Level.Type>, Constable, XmlaConstant
Enclosing interface:
Level

public static enum Level.Type extends Enum<Level.Type> implements XmlaConstant
Enumeration of the types of a Level.

Several of the values are defined by OLE DB for OLAP and/or XML/A, sans the "MDLEVEL_TYPE_" prefix to their name. For example, GEO_CONTINENT corresponds to the value MDLEVEL_TYPE_GEO_CONTINENT for the LEVEL_TYPE property in the MDSCHEMA_LEVELS schema rowset.

Some of the values are specified by OLE DB for OLAP:

  • MDLEVEL_TYPE_REGULAR (0x0000)
  • MDLEVEL_TYPE_ALL (0x0001)
  • MDLEVEL_TYPE_TIME_YEARS (0x0014)
  • MDLEVEL_TYPE_TIME_HALF_YEAR (0x0024)
  • MDLEVEL_TYPE_TIME_QUARTERS (0x0044)
  • MDLEVEL_TYPE_TIME_MONTHS (0x0084)
  • MDLEVEL_TYPE_TIME_WEEKS (0x0104)
  • MDLEVEL_TYPE_TIME_DAYS (0x0204)
  • MDLEVEL_TYPE_TIME_HOURS (0x0304)
  • MDLEVEL_TYPE_TIME_MINUTES (0x0404)
  • MDLEVEL_TYPE_TIME_SECONDS (0x0804)
  • MDLEVEL_TYPE_TIME_UNDEFINED (0x1004)
Some of the OLE DB for OLAP values are as flags, and do not become values of the enumeration:
  • MDLEVEL_TYPE_UNKNOWN (0x0000) signals that no other flags are set. Use REGULAR
  • MDLEVEL_TYPE_CALCULATED (0x0002) indicates that the level is calculated. Use Level.isCalculated().
  • MDLEVEL_TYPE_TIME (0x0004) indicates that the level is time-related. Use isTime().
  • MDLEVEL_TYPE_RESERVED1 (0x0008) is reserved for future use.

Some of the values are specified by XMLA:

  • MDLEVEL_TYPE_GEO_CONTINENT (0x2001)
  • MDLEVEL_TYPE_GEO_REGION (0x2002)
  • MDLEVEL_TYPE_GEO_COUNTRY (0x2003)
  • MDLEVEL_TYPE_GEO_STATE_OR_PROVINCE (0x2004)
  • MDLEVEL_TYPE_GEO_COUNTY (0x2005)
  • MDLEVEL_TYPE_GEO_CITY (0x2006)
  • MDLEVEL_TYPE_GEO_POSTALCODE (0x2007)
  • MDLEVEL_TYPE_GEO_POINT (0x2008)
  • MDLEVEL_TYPE_ORG_UNIT (0x1011)
  • MDLEVEL_TYPE_BOM_RESOURCE (0x1012)
  • MDLEVEL_TYPE_QUANTITATIVE (0x1013)
  • MDLEVEL_TYPE_ACCOUNT (0x1014)
  • MDLEVEL_TYPE_CUSTOMER (0x1021)
  • MDLEVEL_TYPE_CUSTOMER_GROUP (0x1022)
  • MDLEVEL_TYPE_CUSTOMER_HOUSEHOLD (0x1023)
  • MDLEVEL_TYPE_PRODUCT (0x1031)
  • MDLEVEL_TYPE_PRODUCT_GROUP (0x1032)
  • MDLEVEL_TYPE_SCENARIO (0x1015)
  • MDLEVEL_TYPE_UTILITY (0x1016)
  • MDLEVEL_TYPE_PERSON (0x1041)
  • MDLEVEL_TYPE_COMPANY (0x1042)
  • MDLEVEL_TYPE_CURRENCY_SOURCE (0x1051)
  • MDLEVEL_TYPE_CURRENCY_DESTINATION (0x1052)
  • MDLEVEL_TYPE_CHANNEL (0x1061)
  • MDLEVEL_TYPE_REPRESENTATIVE (0x1062)
  • MDLEVEL_TYPE_PROMOTION (0x1071)
See Also:
  • Enum Constant Details

    • REGULAR

      public static final Level.Type REGULAR
      Indicates that the level is not related to time.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_REGULAR(0x0000).

    • ALL

      public static final Level.Type ALL
      Indicates that the level contains the 'all' member of its hierarchy.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_ALL(0x0001).

    • NULL

      public static final Level.Type NULL
      Indicates that a level holds the null member. Does not correspond to an XMLA or OLE DB value.
    • TIME_YEARS

      public static final Level.Type TIME_YEARS
      Indicates that a level refers to years.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_YEARS(0x0014).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • TIME_HALF_YEAR

      public static final Level.Type TIME_HALF_YEAR
      Indicates that a level refers to half years.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_HALF_YEAR(0x0304).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • TIME_QUARTERS

      public static final Level.Type TIME_QUARTERS
      Indicates that a level refers to quarters.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_QUARTERS(0x0044).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • TIME_MONTHS

      public static final Level.Type TIME_MONTHS
      Indicates that a level refers to months.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_MONTHS(0x0084).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • TIME_WEEKS

      public static final Level.Type TIME_WEEKS
      Indicates that a level refers to weeks.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_WEEKS(0x0104).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • TIME_DAYS

      public static final Level.Type TIME_DAYS
      Indicates that a level refers to days.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_DAYS(0x0204).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • TIME_HOURS

      public static final Level.Type TIME_HOURS
      Indicates that a level refers to hours.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_HOURS(0x0304).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • TIME_MINUTES

      public static final Level.Type TIME_MINUTES
      Indicates that a level refers to minutes.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_MINUTES(0x0404).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • TIME_SECONDS

      public static final Level.Type TIME_SECONDS
      Indicates that a level refers to seconds.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_SECONDS(0x0804).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • TIME_UNDEFINED

      public static final Level.Type TIME_UNDEFINED
      Indicates that a level refers to an unspecified time unit.

      Corresponds to the OLE DB for OLAP constant MDLEVEL_TYPE_TIME_UNDEFINED(0x1004).

      It must be used in a dimension whose type is Dimension.Type.TIME.

    • GEO_CONTINENT

      public static final Level.Type GEO_CONTINENT
      Corresponds to XMLA constant MDLEVEL_TYPE_GEO_CONTINENT(0x2001).
    • GEO_REGION

      public static final Level.Type GEO_REGION
      Corresponds to XMLA constant MDLEVEL_TYPE_GEO_REGION(0x2002).
    • GEO_COUNTRY

      public static final Level.Type GEO_COUNTRY
      Corresponds to XMLA constant MDLEVEL_TYPE_GEO_COUNTRY(0x2003).
    • GEO_STATE_OR_PROVINCE

      public static final Level.Type GEO_STATE_OR_PROVINCE
      Corresponds to XMLA constant MDLEVEL_TYPE_GEO_STATE_OR_PROVINCE(0x2004).
    • GEO_COUNTY

      public static final Level.Type GEO_COUNTY
      Corresponds to XMLA constant MDLEVEL_TYPE_GEO_COUNTY(0x2005).
    • GEO_CITY

      public static final Level.Type GEO_CITY
      Corresponds to XMLA constant MDLEVEL_TYPE_GEO_CITY(0x2006).
    • GEO_POSTALCODE

      public static final Level.Type GEO_POSTALCODE
      Corresponds to XMLA constant MDLEVEL_TYPE_GEO_POSTALCODE(0x2007).
    • GEO_POINT

      public static final Level.Type GEO_POINT
      Corresponds to XMLA constant MDLEVEL_TYPE_GEO_POINT(0x2008).
    • ORG_UNIT

      public static final Level.Type ORG_UNIT
      Corresponds to XMLA constant MDLEVEL_TYPE_ORG_UNIT(0x1011).
    • BOM_RESOURCE

      public static final Level.Type BOM_RESOURCE
      Corresponds to XMLA constant MDLEVEL_TYPE_BOM_RESOURCE(0x1012).
    • QUANTITATIVE

      public static final Level.Type QUANTITATIVE
      Corresponds to XMLA constant MDLEVEL_TYPE_QUANTITATIVE(0x1013).
    • ACCOUNT

      public static final Level.Type ACCOUNT
      Corresponds to XMLA constant MDLEVEL_TYPE_ACCOUNT(0x1014).
    • CUSTOMER

      public static final Level.Type CUSTOMER
      Corresponds to XMLA constant MDLEVEL_TYPE_CUSTOMER(0x1021).
    • CUSTOMER_GROUP

      public static final Level.Type CUSTOMER_GROUP
      Corresponds to XMLA constant MDLEVEL_TYPE_CUSTOMER_GROUP(0x1022).
    • CUSTOMER_HOUSEHOLD

      public static final Level.Type CUSTOMER_HOUSEHOLD
      Corresponds to XMLA constant MDLEVEL_TYPE_CUSTOMER_HOUSEHOLD(0x1023).
    • PRODUCT

      public static final Level.Type PRODUCT
      Corresponds to XMLA constant MDLEVEL_TYPE_PRODUCT(0x1031).
    • PRODUCT_GROUP

      public static final Level.Type PRODUCT_GROUP
      Corresponds to XMLA constant MDLEVEL_TYPE_PRODUCT_GROUP(0x1032).
    • SCENARIO

      public static final Level.Type SCENARIO
      Corresponds to XMLA constant MDLEVEL_TYPE_SCENARIO(0x1015).
    • UTILITY

      public static final Level.Type UTILITY
      Corresponds to XMLA constant MDLEVEL_TYPE_UTILITY(0x1016).
    • PERSON

      public static final Level.Type PERSON
      Corresponds to XMLA constant MDLEVEL_TYPE_PERSON(0x1041).
    • COMPANY

      public static final Level.Type COMPANY
      Corresponds to XMLA constant MDLEVEL_TYPE_COMPANY(0x1042).
    • CURRENCY_SOURCE

      public static final Level.Type CURRENCY_SOURCE
      Corresponds to XMLA constant MDLEVEL_TYPE_CURRENCY_SOURCE(0x1051).
    • CURRENCY_DESTINATION

      public static final Level.Type CURRENCY_DESTINATION
      Corresponds to XMLA constant MDLEVEL_TYPE_CURRENCY_DESTINATION(0x1052).
    • CHANNEL

      public static final Level.Type CHANNEL
      Corresponds to XMLA constant MDLEVEL_TYPE_CHANNEL(0x1061).
    • REPRESENTATIVE

      public static final Level.Type REPRESENTATIVE
      Corresponds to XMLA constant MDLEVEL_TYPE_REPRESENTATIVE(0x1062).
    • PROMOTION

      public static final Level.Type PROMOTION
      Corresponds to XMLA constant MDLEVEL_TYPE_PROMOTION(0x1071).
  • Method Details

    • values

      public static Level.Type[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Level.Type valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getDictionary

      public static XmlaConstant.Dictionary<Level.Type> getDictionary()
      Per XmlaConstant, returns a dictionary of all values of this enumeration.
      Returns:
      Dictionary of all values
    • xmlaName

      public String xmlaName()
      Description copied from interface: XmlaConstant
      Returns the name of this constant as specified by XMLA.

      Often the name is an enumeration-specific prefix plus the name of the Java enum constant. For example, Dimension.Type has prefix "MD_DIMTYPE_", and therefore this method returns "MD_DIMTYPE_PRODUCTS" for the enum constant Dimension.Type.PRODUCTS.

      Specified by:
      xmlaName in interface XmlaConstant
      Returns:
      ordinal code as specified by XMLA.
    • getDescription

      public String getDescription()
      Description copied from interface: XmlaConstant
      Returns the description of this constant.
      Specified by:
      getDescription in interface XmlaConstant
      Returns:
      Description of this constant.
    • xmlaOrdinal

      public int xmlaOrdinal()
      Description copied from interface: XmlaConstant
      Returns the code of this constant as specified by XMLA.

      For example, the XMLA specification says that the ordinal of MD_DIMTYPE_PRODUCTS is 8, and therefore this method returns 8 for Dimension.Type.PRODUCTS.

      Specified by:
      xmlaOrdinal in interface XmlaConstant
      Returns:
      ordinal code as specified by XMLA.
    • isTime

      public boolean isTime()
      Returns:
      whether this is a time-related level