org.olap4j.type
public class MemberType extends Object implements Type
Constructor and Description |
---|
MemberType(Dimension dimension,
Hierarchy hierarchy,
Level level,
Member member)
Creates a type representing a member.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Member |
getMember()
Returns the member of this type, or null if not known.
|
String |
toString() |
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. |
public MemberType(Dimension dimension, Hierarchy hierarchy, Level level, Member member)
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 knownpublic Hierarchy getHierarchy()
Type
getHierarchy
in interface Type
public Level getLevel()
Type
public Member getMember()
public boolean usesDimension(Dimension dimension, boolean maybe)
Type
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 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.usesDimension
in interface Type
dimension
- Dimensionmaybe
- If true, returns true only if this type definitely
uses the dimensionmaybe
is true,
possibly) uses the given dimensionpublic Dimension getDimension()
Type
getDimension
in interface Type