Package mondrian.olap
Class LevelBase
- java.lang.Object
-
- mondrian.olap.OlapElementBase
-
- mondrian.olap.LevelBase
-
- All Implemented Interfaces:
Annotated,Level,OlapElement
- Direct Known Subclasses:
RolapLevel
public abstract class LevelBase extends OlapElementBase implements Level
Skeleton implementation ofLevel.- Since:
- 6 August, 2001
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
-
Field Summary
Fields Modifier and Type Field Description protected intapproxRowCountprotected intdepthprotected Stringdescriptionprotected Hierarchyhierarchyprotected LevelTypelevelTypeprotected MemberFormattermemberFormatterprotected Stringnameprotected StringuniqueName-
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description LevelgetChildLevel()intgetDepth()Returns the depth of this level.StringgetDescription()DimensiongetDimension()Returns the dimension of a this expression, or null if no dimension is defined.HierarchygetHierarchy()LevelTypegetLevelType()MemberFormattergetMemberFormatter()Returns the object that is used to format members of this level.StringgetName()LevelgetParentLevel()StringgetQualifiedName()Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".StringgetUniqueName()abstract booleanisAll()booleanisMeasure()OlapElementlookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)Looks up a child element, returning null if it does not exist.voidsetApproxRowCount(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 Detail
-
hierarchy
protected final Hierarchy hierarchy
-
name
protected final String name
-
uniqueName
protected final String uniqueName
-
description
protected final String description
-
depth
protected final int depth
-
levelType
protected final LevelType levelType
-
memberFormatter
protected MemberFormatter memberFormatter
-
approxRowCount
protected int approxRowCount
-
-
Method Detail
-
setApproxRowCount
public void setApproxRowCount(int approxRowCount)
Sets the approximate number of members in this Level.- See Also:
Level.getApproxRowCount()
-
getQualifiedName
public String getQualifiedName()
Description copied from interface:OlapElementReturns the name of this element qualified by its class, for example "hierarchy 'Customers'".- Specified by:
getQualifiedNamein interfaceOlapElement
-
getLevelType
public LevelType getLevelType()
- Specified by:
getLevelTypein interfaceLevel
-
getUniqueName
public String getUniqueName()
- Specified by:
getUniqueNamein interfaceOlapElement
-
getName
public String getName()
- Specified by:
getNamein interfaceOlapElement
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceOlapElement
-
getHierarchy
public Hierarchy getHierarchy()
- Specified by:
getHierarchyin interfaceLevel- Specified by:
getHierarchyin interfaceOlapElement
-
getDimension
public Dimension getDimension()
Description copied from interface:OlapElementReturns 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:
getDimensionin interfaceOlapElement
-
getDepth
public int getDepth()
Description copied from interface:LevelReturns 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
public Level getChildLevel()
- Specified by:
getChildLevelin interfaceLevel
-
getParentLevel
public Level getParentLevel()
- Specified by:
getParentLevelin interfaceLevel
-
isMeasure
public boolean isMeasure()
-
lookupChild
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
Description copied from interface:OlapElementLooks up a child element, returning null if it does not exist.- Specified by:
lookupChildin interfaceOlapElement
-
getMemberFormatter
public MemberFormatter getMemberFormatter()
Description copied from interface:LevelReturns the object that is used to format members of this level.- Specified by:
getMemberFormatterin interfaceLevel
-
-