public abstract class LevelBase extends OlapElementBase implements Level
Level.OlapElement.LocalizedProperty| Modifier and Type | Field and Description |
|---|---|
protected int |
approxRowCount |
protected int |
depth |
protected String |
description |
protected Hierarchy |
hierarchy |
protected LevelType |
levelType |
protected MemberFormatter |
memberFormatter |
protected String |
name |
protected String |
uniqueName |
caption, visible| Modifier | Constructor and Description |
|---|---|
protected |
LevelBase(Hierarchy hierarchy,
String name,
String caption,
boolean visible,
String description,
int depth,
LevelType levelType) |
| Modifier and Type | Method and Description |
|---|---|
Level |
getChildLevel() |
int |
getDepth()
Returns the depth of this level.
|
String |
getDescription() |
Dimension |
getDimension()
Returns the dimension of a this expression, or null if no dimension is
defined.
|
Hierarchy |
getHierarchy() |
LevelType |
getLevelType() |
MemberFormatter |
getMemberFormatter()
Returns the object that is used to format members of this level.
|
String |
getName() |
Level |
getParentLevel() |
String |
getQualifiedName()
Returns the name of this element qualified by its class, for example
"hierarchy 'Customers'".
|
String |
getUniqueName() |
abstract boolean |
isAll() |
boolean |
isMeasure() |
OlapElement |
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.
|
clone, computeHashCode, equals, equals, getCaption, getLocalized, getLogger, hashCode, isVisible, setCaption, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitareMembersUnique, getApproxRowCount, getInheritedProperties, getPropertiesgetCaption, getLocalized, isVisiblegetAnnotationMapprotected final Hierarchy hierarchy
protected final String name
protected final String uniqueName
protected final String description
protected final int depth
protected final LevelType levelType
protected MemberFormatter memberFormatter
protected int approxRowCount
public void setApproxRowCount(int approxRowCount)
Level.getApproxRowCount()public String getQualifiedName()
OlapElementgetQualifiedName in interface OlapElementpublic LevelType getLevelType()
getLevelType in interface Levelpublic String getUniqueName()
getUniqueName in interface OlapElementpublic String getName()
getName in interface OlapElementpublic String getDescription()
getDescription in interface OlapElementpublic Hierarchy getHierarchy()
getHierarchy in interface LevelgetHierarchy in interface OlapElementpublic Dimension getDimension()
OlapElementExample 1:
has dimension[Sales].children
[Sales].
Example 2:
order(except([Promotion Media].[Media Type].members,
{[Promotion Media].[Media Type].[No Media]}),
[Measures].[Unit Sales], DESC)
has dimension [Promotion Media].
Example 3:
CrossJoin([Product].[Product Department].members,
[Gender].members)
has no dimension (well, actually it is [Product] x [Gender], but we
can't represent that, so we return null);getDimension in interface OlapElementpublic int getDepth()
LevelNote #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.
public Level getChildLevel()
getChildLevel in interface Levelpublic Level getParentLevel()
getParentLevel in interface Levelpublic boolean isMeasure()
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
OlapElementlookupChild in interface OlapElementpublic MemberFormatter getMemberFormatter()
LevelgetMemberFormatter in interface LevelCopyright © 2021 Hitachi Vantara. All rights reserved.