org.olap4j.type
Interface Type

All Known Implementing Classes:
BooleanType, CubeType, DecimalType, DimensionType, HierarchyType, LevelType, MemberType, NullType, NumericType, ScalarType, SetType, StringType, SymbolType, TupleType

public interface Type

Type of an MDX expression.

All type objects are immutable.

Since:
Feb 17, 2005
Version:
$Id: Type.java 229 2009-05-08 19:11:29Z jhyde $
Author:
jhyde

Method Summary
 Dimension getDimension()
          Returns the dimension of this type, or null if not known.
 Hierarchy getHierarchy()
          Returns the hierarchy of this type.
 Level getLevel()
          Returns the level of this type, or null if not known.
 boolean usesDimension(Dimension dimension, boolean maybe)
          Returns whether this type contains a given dimension.

For example: DimensionType([Gender]) uses only the [Gender] dimension. TupleType(MemberType([Gender]), MemberType([Store])) uses [Gender] and [Store] dimensions.

The maybe parameter comes into play when the dimensional information is incomplete.

 

Method Detail

usesDimension

boolean usesDimension(Dimension dimension,
                      boolean maybe)
Returns whether this type contains a given dimension.

For example:

The maybe parameter comes into play when the dimensional information is incomplete. For example, when applied to TupleType(MemberType(null), MemberType([Store])), usesDimension([Gender], false) returns true because it is possible that the expression returns a member of the [Gender] dimension.

Parameters:
dimension - Dimension
maybe - If true, returns true only if this type definitely uses the dimension
Returns:
whether this type definitely (or if maybe is true, possibly) uses the given dimension

getDimension

Dimension getDimension()
Returns the dimension of this type, or null if not known.

Returns:
dimension of this type

getHierarchy

Hierarchy getHierarchy()
Returns the hierarchy of this type. If not applicable, throws.

Returns:
hierarchy of this type

getLevel

Level getLevel()
Returns the level of this type, or null if not known.

Returns:
level of this type

SourceForge.net_Logo