Enum Level.Type
- java.lang.Object
-
- java.lang.Enum<Level.Type>
-
- org.olap4j.metadata.Level.Type
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Level.Type>
,XmlaConstant
- Enclosing interface:
- Level
public static enum Level.Type extends java.lang.Enum<Level.Type> implements XmlaConstant
Enumeration of the types of aLevel
.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 valueMDLEVEL_TYPE_GEO_CONTINENT
for theLEVEL_TYPE
property in theMDSCHEMA_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)
- 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)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.olap4j.metadata.XmlaConstant
XmlaConstant.Dictionary<E extends java.lang.Enum<E> & XmlaConstant>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCOUNT
Corresponds to XMLA constantMDLEVEL_TYPE_ACCOUNT(0x1014)
.ALL
Indicates that the level contains the 'all' member of its hierarchy.BOM_RESOURCE
Corresponds to XMLA constantMDLEVEL_TYPE_BOM_RESOURCE(0x1012)
.CHANNEL
Corresponds to XMLA constantMDLEVEL_TYPE_CHANNEL(0x1061)
.COMPANY
Corresponds to XMLA constantMDLEVEL_TYPE_COMPANY(0x1042)
.CURRENCY_DESTINATION
Corresponds to XMLA constantMDLEVEL_TYPE_CURRENCY_DESTINATION(0x1052)
.CURRENCY_SOURCE
Corresponds to XMLA constantMDLEVEL_TYPE_CURRENCY_SOURCE(0x1051)
.CUSTOMER
Corresponds to XMLA constantMDLEVEL_TYPE_CUSTOMER(0x1021)
.CUSTOMER_GROUP
Corresponds to XMLA constantMDLEVEL_TYPE_CUSTOMER_GROUP(0x1022)
.CUSTOMER_HOUSEHOLD
Corresponds to XMLA constantMDLEVEL_TYPE_CUSTOMER_HOUSEHOLD(0x1023)
.GEO_CITY
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_CITY(0x2006)
.GEO_CONTINENT
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_CONTINENT(0x2001)
.GEO_COUNTRY
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_COUNTRY(0x2003)
.GEO_COUNTY
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_COUNTY(0x2005)
.GEO_POINT
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_POINT(0x2008)
.GEO_POSTALCODE
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_POSTALCODE(0x2007)
.GEO_REGION
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_REGION(0x2002)
.GEO_STATE_OR_PROVINCE
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_STATE_OR_PROVINCE(0x2004)
.NULL
Indicates that a level holds the null member.ORG_UNIT
Corresponds to XMLA constantMDLEVEL_TYPE_ORG_UNIT(0x1011)
.PERSON
Corresponds to XMLA constantMDLEVEL_TYPE_PERSON(0x1041)
.PRODUCT
Corresponds to XMLA constantMDLEVEL_TYPE_PRODUCT(0x1031)
.PRODUCT_GROUP
Corresponds to XMLA constantMDLEVEL_TYPE_PRODUCT_GROUP(0x1032)
.PROMOTION
Corresponds to XMLA constantMDLEVEL_TYPE_PROMOTION(0x1071)
.QUANTITATIVE
Corresponds to XMLA constantMDLEVEL_TYPE_QUANTITATIVE(0x1013)
.REGULAR
Indicates that the level is not related to time.REPRESENTATIVE
Corresponds to XMLA constantMDLEVEL_TYPE_REPRESENTATIVE(0x1062)
.SCENARIO
Corresponds to XMLA constantMDLEVEL_TYPE_SCENARIO(0x1015)
.TIME_DAYS
Indicates that a level refers to days.TIME_HALF_YEAR
Indicates that a level refers to half years.TIME_HOURS
Indicates that a level refers to hours.TIME_MINUTES
Indicates that a level refers to minutes.TIME_MONTHS
Indicates that a level refers to months.TIME_QUARTERS
Indicates that a level refers to quarters.TIME_SECONDS
Indicates that a level refers to seconds.TIME_UNDEFINED
Indicates that a level refers to an unspecified time unit.TIME_WEEKS
Indicates that a level refers to weeks.TIME_YEARS
Indicates that a level refers to years.UTILITY
Corresponds to XMLA constantMDLEVEL_TYPE_UTILITY(0x1016)
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Returns the description of this constant.static XmlaConstant.Dictionary<Level.Type>
getDictionary()
PerXmlaConstant
, returns a dictionary of all values of this enumeration.boolean
isTime()
Returns whether this is a time-related level (TIME_YEARS
,TIME_HALF_YEAR
,TIME_QUARTERS
,TIME_MONTHS
,TIME_WEEKS
,TIME_DAYS
,TIME_HOURS
,TIME_MINUTES
,TIME_SECONDS
,TIME_UNDEFINED
).static Level.Type
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Level.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.java.lang.String
xmlaName()
Returns the name of this constant as specified by XMLA.int
xmlaOrdinal()
Returns the code of this constant as specified by XMLA.
-
-
-
Enum Constant Detail
-
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 constantMDLEVEL_TYPE_GEO_CONTINENT(0x2001)
.
-
GEO_REGION
public static final Level.Type GEO_REGION
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_REGION(0x2002)
.
-
GEO_COUNTRY
public static final Level.Type GEO_COUNTRY
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_COUNTRY(0x2003)
.
-
GEO_STATE_OR_PROVINCE
public static final Level.Type GEO_STATE_OR_PROVINCE
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_STATE_OR_PROVINCE(0x2004)
.
-
GEO_COUNTY
public static final Level.Type GEO_COUNTY
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_COUNTY(0x2005)
.
-
GEO_CITY
public static final Level.Type GEO_CITY
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_CITY(0x2006)
.
-
GEO_POSTALCODE
public static final Level.Type GEO_POSTALCODE
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_POSTALCODE(0x2007)
.
-
GEO_POINT
public static final Level.Type GEO_POINT
Corresponds to XMLA constantMDLEVEL_TYPE_GEO_POINT(0x2008)
.
-
ORG_UNIT
public static final Level.Type ORG_UNIT
Corresponds to XMLA constantMDLEVEL_TYPE_ORG_UNIT(0x1011)
.
-
BOM_RESOURCE
public static final Level.Type BOM_RESOURCE
Corresponds to XMLA constantMDLEVEL_TYPE_BOM_RESOURCE(0x1012)
.
-
QUANTITATIVE
public static final Level.Type QUANTITATIVE
Corresponds to XMLA constantMDLEVEL_TYPE_QUANTITATIVE(0x1013)
.
-
ACCOUNT
public static final Level.Type ACCOUNT
Corresponds to XMLA constantMDLEVEL_TYPE_ACCOUNT(0x1014)
.
-
CUSTOMER
public static final Level.Type CUSTOMER
Corresponds to XMLA constantMDLEVEL_TYPE_CUSTOMER(0x1021)
.
-
CUSTOMER_GROUP
public static final Level.Type CUSTOMER_GROUP
Corresponds to XMLA constantMDLEVEL_TYPE_CUSTOMER_GROUP(0x1022)
.
-
CUSTOMER_HOUSEHOLD
public static final Level.Type CUSTOMER_HOUSEHOLD
Corresponds to XMLA constantMDLEVEL_TYPE_CUSTOMER_HOUSEHOLD(0x1023)
.
-
PRODUCT
public static final Level.Type PRODUCT
Corresponds to XMLA constantMDLEVEL_TYPE_PRODUCT(0x1031)
.
-
PRODUCT_GROUP
public static final Level.Type PRODUCT_GROUP
Corresponds to XMLA constantMDLEVEL_TYPE_PRODUCT_GROUP(0x1032)
.
-
SCENARIO
public static final Level.Type SCENARIO
Corresponds to XMLA constantMDLEVEL_TYPE_SCENARIO(0x1015)
.
-
UTILITY
public static final Level.Type UTILITY
Corresponds to XMLA constantMDLEVEL_TYPE_UTILITY(0x1016)
.
-
PERSON
public static final Level.Type PERSON
Corresponds to XMLA constantMDLEVEL_TYPE_PERSON(0x1041)
.
-
COMPANY
public static final Level.Type COMPANY
Corresponds to XMLA constantMDLEVEL_TYPE_COMPANY(0x1042)
.
-
CURRENCY_SOURCE
public static final Level.Type CURRENCY_SOURCE
Corresponds to XMLA constantMDLEVEL_TYPE_CURRENCY_SOURCE(0x1051)
.
-
CURRENCY_DESTINATION
public static final Level.Type CURRENCY_DESTINATION
Corresponds to XMLA constantMDLEVEL_TYPE_CURRENCY_DESTINATION(0x1052)
.
-
CHANNEL
public static final Level.Type CHANNEL
Corresponds to XMLA constantMDLEVEL_TYPE_CHANNEL(0x1061)
.
-
REPRESENTATIVE
public static final Level.Type REPRESENTATIVE
Corresponds to XMLA constantMDLEVEL_TYPE_REPRESENTATIVE(0x1062)
.
-
PROMOTION
public static final Level.Type PROMOTION
Corresponds to XMLA constantMDLEVEL_TYPE_PROMOTION(0x1071)
.
-
-
Method Detail
-
values
public static Level.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Level.Type c : Level.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Level.Type valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getDictionary
public static XmlaConstant.Dictionary<Level.Type> getDictionary()
PerXmlaConstant
, returns a dictionary of all values of this enumeration.- Returns:
- Dictionary of all values
-
xmlaName
public java.lang.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 constantDimension.Type.PRODUCTS
.- Specified by:
xmlaName
in interfaceXmlaConstant
- Returns:
- ordinal code as specified by XMLA.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:XmlaConstant
Returns the description of this constant.- Specified by:
getDescription
in interfaceXmlaConstant
- 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 interfaceXmlaConstant
- Returns:
- ordinal code as specified by XMLA.
-
isTime
public boolean isTime()
Returns whether this is a time-related level (TIME_YEARS
,TIME_HALF_YEAR
,TIME_QUARTERS
,TIME_MONTHS
,TIME_WEEKS
,TIME_DAYS
,TIME_HOURS
,TIME_MINUTES
,TIME_SECONDS
,TIME_UNDEFINED
).- Returns:
- whether this is a time-related level
-
-