Package org.olap4j.type
Class MemberType
java.lang.Object
org.olap4j.type.MemberType
- All Implemented Interfaces:
Type
The type of an expression which represents a member.
- Since:
- Feb 17, 2005
- Author:
- jhyde
-
Constructor Summary
ConstructorsConstructorDescriptionMemberType
(Dimension dimension, Hierarchy hierarchy, Level level, Member member) Creates a type representing a member. -
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.Returns the member of this type, or null if not known.toString()
boolean
usesDimension
(Dimension dimension, boolean maybe) Returns whether this type contains a given dimension.
-
Constructor Details
-
MemberType
Creates a type representing a member.- Parameters:
dimension
- Dimension the member belongs to, or null if not known.hierarchy
- Hierarchy the member belongs to, or null if not known.level
- Level the member belongs to, or null if not knownmember
- The precise member, or null if not known
-
-
Method Details
-
toString
-
getHierarchy
Description copied from interface:Type
Returns the hierarchy of this type. If not applicable, throws.- Specified by:
getHierarchy
in interfaceType
- Returns:
- hierarchy of this type
-
getLevel
Description copied from interface:Type
Returns the level of this type, or null if not known. -
getMember
Returns the member of this type, or null if not known.- Returns:
- member of this type
-
usesDimension
Description copied from interface:Type
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.
maybe
parameter 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:
usesDimension
in interfaceType
- Parameters:
dimension
- Dimensionmaybe
- 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
Description copied from interface:Type
Returns the dimension of this type, or null if not known.- Specified by:
getDimension
in interfaceType
- Returns:
- dimension of this type
-