Package mondrian.olap
Class LevelBase
java.lang.Object
mondrian.olap.OlapElementBase
mondrian.olap.LevelBase
- All Implemented Interfaces:
Annotated
,Level
,OlapElement
- Direct Known Subclasses:
RolapLevel
Skeleton implementation of
Level
.- Since:
- 6 August, 2001
- Author:
- jhyde
-
Nested Class Summary
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected final int
protected final String
protected final Hierarchy
protected final LevelType
protected MemberFormatter
protected final String
protected final String
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getDepth()
Returns the depth of this level.Returns the dimension of a this expression, or null if no dimension is defined.Returns the object that is used to format members of this level.getName()
Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".abstract boolean
isAll()
boolean
lookupChild
(SchemaReader schemaReader, Id.Segment s, MatchType matchType) Looks up a child element, returning null if it does not exist.void
setApproxRowCount
(int approxRowCount) Sets the approximate number of members in this Level.Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, equals, equals, getCaption, getLocalized, getLogger, hashCode, isVisible, setCaption, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface mondrian.olap.Annotated
getAnnotationMap
Methods inherited from interface mondrian.olap.Level
areMembersUnique, getApproxRowCount, getInheritedProperties, getProperties
Methods inherited from interface mondrian.olap.OlapElement
getCaption, getLocalized, isVisible
-
Field Details
-
hierarchy
-
name
-
uniqueName
-
description
-
depth
protected final int depth -
levelType
-
memberFormatter
-
approxRowCount
protected int approxRowCount
-
-
Constructor Details
-
LevelBase
-
-
Method Details
-
setApproxRowCount
public void setApproxRowCount(int approxRowCount) Sets the approximate number of members in this Level.- See Also:
-
getQualifiedName
Description copied from interface:OlapElement
Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".- Specified by:
getQualifiedName
in interfaceOlapElement
-
getLevelType
- Specified by:
getLevelType
in interfaceLevel
-
getUniqueName
- Specified by:
getUniqueName
in interfaceOlapElement
-
getName
- Specified by:
getName
in interfaceOlapElement
-
getDescription
- Specified by:
getDescription
in interfaceOlapElement
-
getHierarchy
- Specified by:
getHierarchy
in interfaceLevel
- Specified by:
getHierarchy
in interfaceOlapElement
-
getDimension
Description copied from interface:OlapElement
Returns the dimension of a this expression, or null if no dimension is defined. Applicable only to set expressions.Example 1:
has dimension[Sales].children
[Sales]
.Example 2:
has dimension [Promotion Media].order(except([Promotion Media].[Media Type].members, {[Promotion Media].[Media Type].[No Media]}), [Measures].[Unit Sales], DESC)
Example 3:
has no dimension (well, actually it is [Product] x [Gender], but we can't represent that, so we return null);CrossJoin([Product].[Product Department].members, [Gender].members)
- Specified by:
getDimension
in interfaceOlapElement
-
getDepth
public int getDepth()Description copied from interface:Level
Returns the depth of this level.Note #1: In an access-controlled context, the first visible level of a hierarchy (as returned by
SchemaReader.getHierarchyLevels(mondrian.olap.Hierarchy)
) may not have a depth of 0.Note #2: In a parent-child hierarchy, the depth of a member (as returned by
SchemaReader.getMemberDepth(mondrian.olap.Member)
) may not be the same as the depth of its level. -
getChildLevel
- Specified by:
getChildLevel
in interfaceLevel
-
getParentLevel
- Specified by:
getParentLevel
in interfaceLevel
-
isAll
public abstract boolean isAll() -
isMeasure
public boolean isMeasure() -
lookupChild
Description copied from interface:OlapElement
Looks up a child element, returning null if it does not exist.- Specified by:
lookupChild
in interfaceOlapElement
-
getMemberFormatter
Description copied from interface:Level
Returns the object that is used to format members of this level.- Specified by:
getMemberFormatter
in interfaceLevel
-