Package org.olap4j.type
Class ScalarType
java.lang.Object
org.olap4j.type.ScalarType
- All Implemented Interfaces:
Type
- Direct Known Subclasses:
BooleanType,NullType,NumericType,StringType,SymbolType
Base class for types which represent scalar values.
An instance of this class means a scalar value of unknown type.
Usually one of the derived classes NumericType,
StringType, BooleanType is used instead.
- Since:
- Feb 17, 2005
- Author:
- jhyde
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the dimension of this type, or null if not known.Returns the hierarchy of this type.getLevel()Returns the level of this type, or null if not known.booleanusesDimension(Dimension dimension, boolean maybe) Returns whether this type contains a given dimension.
-
Constructor Details
-
ScalarType
public ScalarType()
-
-
Method Details
-
usesDimension
Description copied from interface:TypeReturns 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.
maybeparameter comes into play when the dimensional information is incomplete. For example, when applied toTupleType(MemberType(null), MemberType([Store])),usesDimension([Gender], false)returns true because it is possible that the expression returns a member of the[Gender]dimension.- Specified by:
usesDimensionin interfaceType- Parameters:
dimension- Dimensionmaybe- If true, returns true only if this type definitely uses the dimension- Returns:
- whether this type definitely (or if
maybeis true, possibly) uses the given dimension
-
getHierarchy
Description copied from interface:TypeReturns the hierarchy of this type. If not applicable, throws.- Specified by:
getHierarchyin interfaceType- Returns:
- hierarchy of this type
-
getLevel
Description copied from interface:TypeReturns the level of this type, or null if not known. -
getDimension
Description copied from interface:TypeReturns the dimension of this type, or null if not known.- Specified by:
getDimensionin interfaceType- Returns:
- dimension of this type
-