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, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
areMembersUnique, getApproxRowCount, getInheritedProperties, getProperties
getCaption, getLocalized, isVisible
getAnnotationMap
protected 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()
OlapElement
getQualifiedName
in interface OlapElement
public LevelType getLevelType()
getLevelType
in interface Level
public String getUniqueName()
getUniqueName
in interface OlapElement
public String getName()
getName
in interface OlapElement
public String getDescription()
getDescription
in interface OlapElement
public Hierarchy getHierarchy()
getHierarchy
in interface Level
getHierarchy
in interface OlapElement
public Dimension getDimension()
OlapElement
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)
getDimension
in interface OlapElement
public int getDepth()
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.
public Level getChildLevel()
getChildLevel
in interface Level
public Level getParentLevel()
getParentLevel
in interface Level
public boolean isMeasure()
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
OlapElement
lookupChild
in interface OlapElement
public MemberFormatter getMemberFormatter()
Level
getMemberFormatter
in interface Level
Copyright © 2018 Hitachi Vantara. All rights reserved.