|
Oracle® OLAP Java API Reference 11g Release 2 (11.2) E10794-06 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.olapi.metadata.BaseMetadataObject
oracle.olapi.metadata.mdm.MdmObject
oracle.olapi.metadata.mdm.MdmSource
oracle.olapi.metadata.mdm.MdmDimension
oracle.olapi.metadata.mdm.MdmSubDimension
oracle.olapi.metadata.mdm.MdmHierarchy
oracle.olapi.metadata.mdm.MdmLevelHierarchy
public final class MdmLevelHierarchy
An MdmHierarchy
that represents members of an Oracle OLAP dimension that are organized either nonhierarchically or hierarchically by levels. An application creates an MdmLevelHierarchy
with the
method of an findOrCreateLevelHierarchy
MdmPrimaryDimension
.
An MdmLevelHierarchy
has component MdmHierarchyLevel
objects. A nonhierarchical MdmLevelHierarchy
has only one MdmHierarchyLevel
component, and a hierarchical MdmLevelHierarchy
has more than one MdmHierarchyLevel
components. An MdmLevelHierarchy
can have up to 31 component MdmHierarchyLevel
objects.
The hierarchical organization is defined by parent-child relationships between the members of the MdmHierarchyLevel
components. MdmAttribute
objects record the parent-child relationships among the members of an MdmLevelHierarchy
You use the getParentAttribute
and getAncestorsAttribute
methods to get the MdmAttribute
objects that relate parents to children and ancestors to descendents, respectively.
The MdmLevelHierarchy
has all of the members of its MdmHierarchyLevel
components. Each of its component MdmHierarchyLevel
objects has the members of the hierarchy for that level. For example, an MdmLevelHierarchy
for a calendar year time hierarchy might have parent-child relationships organized at year, quarter, month, and day levels. The MdmLevelHierarchy
would have the members at every level. It would also have four component MdmHierarchyLevel
objects, one for each level.
To map the levels of an MdmLevelHierarchy
to data sources, you can either use MemberListMap
objects to map the MdmDimensionLevel
objects or you can use HierarchyLevelMap
objects to map the MdmHierarchyLevel
objects.
Method Summary | |
---|---|
java.lang.Object |
acceptVisitor(MdmObjectVisitor visitor, java.lang.Object context) Calls the visitMdmLevelHierarchy method of the specified MdmObjectVisitor and passes that method the MdmLevelHierarchy and the specified context object. |
void |
addHierarchyLevel(MdmHierarchyLevel level) Appends an MdmHierarchyLevel to the ordered list of hierarchy levels that are associated with this MdmLevelHierarchy . |
void |
addHierarchyLevel(MdmHierarchyLevel level, int levelNumber) Adds an MdmHierarchyLevel at the specified position in the ordered list of hierarchy levels that are associated with this When the findOrCreateHierarchyLevel method creates a new MdmHierarchyLevel , it adds the new hierarchy level to the end of the ordered list. |
MdmHierarchyLevel |
findOrCreateHierarchyLevel(MdmDimensionLevel dimLevel) Gets the specified MdmHierarchyLevel or, if it does not already exist, creates a new one for this MdmLevelHierarchy . |
MdmDimensionMemberInfo |
getDefaultMember() Gets the MdmDimensionMemberInfo that specifies the default member of the MdmLevelHierarchy . |
java.util.List<MdmHierarchyLevel> |
getHierarchyLevels() Gets the MdmHierarchyLevel components of the MdmLevelHierarchy . |
MdmAttribute |
getLevelAttribute() Gets the MdmAttribute that relates the members of a component MdmHierarchyLevel to a level in the hierarchy. |
MdmAttribute |
getLevelDepthAttribute() Gets the MdmAttribute that relates the members of a component MdmHierarchyLevel to the depth of a level in the hierarchy. |
java.util.List |
getLevels() Gets the MdmHierarchyLevel components of the MdmLevelHierarchy . |
MdmQueryColumn |
getQueryColumn(java.lang.String name) Gets the specified MdmQueryColumn . |
java.util.List<MdmQueryColumn> |
getQueryColumns() Gets the MdmQueryColumn objects that are associated with this MdmLevelHierarchy . |
boolean |
isRagged() Indicates whether the hierarchy is ragged, which means that not all of the leaf members are at the same level. |
boolean |
isSkipLevel() Indicates whether this MdmLevelHierarchy is a skip-level hierarchy. |
void |
removeHierarchyLevel(MdmHierarchyLevel level) Removes the specified MdmHierarchyLevel from this MdmLevelHierarchy . |
void |
removeLevel(MdmLevel level) Removes the specified MdmLevel from this MdmLevelHierarchy . |
void |
setDefaultMember(MdmDimensionMemberInfo defaultMember) Specifies a default member for the MdmLevelHierarchy . |
void |
setIsRagged(boolean input) Specifies that the hierarchy is ragged or not ragged. |
void |
setIsSkipLevel(boolean input) Specifies whether this MdmLevelHierarchy is a skip-level hierarchy. |
Methods inherited from class oracle.olapi.metadata.mdm.MdmHierarchy |
---|
getAncestorsAttribute, getETDepthColumn, getETParentColumn, getETViewName, getParentAttribute, getQuery, getQueryName, isDefaultHierarchy, setETViewName |
Methods inherited from class oracle.olapi.metadata.mdm.MdmSubDimension |
---|
addAttribute, getAttributes, removeAttribute |
Methods inherited from class oracle.olapi.metadata.mdm.MdmDimension |
---|
getCardinality, getCustomOrder, getPluralDescription, getPrimaryDimension, getShortPluralDescription, setCardinality, setCustomOrder, setPluralDescription, setShortPluralDescription |
Methods inherited from class oracle.olapi.metadata.mdm.MdmSource |
---|
getDataType, getSource, getType |
Methods inherited from class oracle.olapi.metadata.mdm.MdmObject |
---|
addDescription, addObjectClassification, findOrCreateDescription, getDescription, getDescription, getDescription, getDescriptions, getMetadataProvider, getName, getNewName, getObjectClassifications, getShortDescription, isClassifiedAs, removeDescription, removeObjectClassification, setDescription, setDescription, setDescription, setName, setShortDescription |
Methods inherited from class oracle.olapi.metadata.BaseMetadataObject |
---|
getContainedByObject, getID, getOwner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.Object acceptVisitor(MdmObjectVisitor visitor, java.lang.Object context)
visitMdmLevelHierarchy
method of the specified MdmObjectVisitor
and passes that method the MdmLevelHierarchy
and the specified context
object.acceptVisitor
in class MdmObject
visitor
- An MdmObjectVisitor
.context
- An Object
.Object
returned by the visitMdmLevelHierarchy
method.public final MdmAttribute getLevelAttribute()
MdmAttribute
that relates the members of a component MdmHierarchyLevel
to a level in the hierarchy.MdmAttribute
that relates the members of the MdmHierarchyLevel
components of this MdmLevelHierarchy
to a level in the hierarchy.public final MdmAttribute getLevelDepthAttribute()
MdmAttribute
that relates the members of a component MdmHierarchyLevel
to the depth of a level in the hierarchy. For example, an MdmLevelHierarchy
that represents a hierarchy that has four levels would have four component MdmHierarchyLevel
objects. The members of the MdmHierarchyLevel
for the top level of the hierarchy have a level depth of 1, the members of the MdmHierarchyLevel
that are the children of the level 1 members have a level depth of 2, and so on.MdmAttribute
that relates the members of the MdmHierarchyLevel
components of this MdmLevelHierarchy
to the depth of their level in the hierarchy.public final java.util.List getLevels()
MdmHierarchyLevel
components of the MdmLevelHierarchy
. This method provides compatibility with earlier versions of the Oracle OLAP Java API. In those earlier versions, this method returned a List
of MdmLevel
objects. The MdmLevel
class is now a subclass of MdmHierarchyLevel
and is deprecated.List
that contains the MdmHierarchyLevel
components of the MdmLevelHierarchy
.public final java.util.List<MdmHierarchyLevel> getHierarchyLevels()
MdmHierarchyLevel
components of the MdmLevelHierarchy
.List
that contains the MdmHierarchyLevel
components of the MdmLevelHierarchy
.public MdmDimensionMemberInfo getDefaultMember() throws oracle.express.mdm.MetadataNotFoundException
MdmDimensionMemberInfo
that specifies the default member of the MdmLevelHierarchy
. From the MdmDimensionMemberInfo
you can get the value of the default member by calling the getLocalValue
or getUniqueValue
method.getDefaultMember
in class MdmHierarchy
MdmDimensionMemberInfo
that has the default member of the MdmLevelHierarchy
.oracle.express.mdm.MetadataNotFoundException
public void setDefaultMember(MdmDimensionMemberInfo defaultMember) throws oracle.express.mdm.MetadataNotFoundException, MdmInvalidValueException
MdmLevelHierarchy
.setDefaultMember
in class MdmHierarchy
defaultMember
- An MdmDimensionMemberInfo
that has the value to specify as the default member of the MdmLevelHierarchy
.oracle.express.mdm.MetadataNotFoundException
MdmInvalidValueException
public void addHierarchyLevel(MdmHierarchyLevel level, int levelNumber)
MdmHierarchyLevel
at the specified position in the ordered list of hierarchy levels that are associated with this When the findOrCreateHierarchyLevel
method creates a new MdmHierarchyLevel
, it adds the new hierarchy level to the end of the ordered list. To place a MdmHierarchyLevel
in a different position in the list, you must remove it and add it back in the desired position. For example, the following code moves an MdmHierarchyLevel
to the specified position in the list. The example creates three MdmHierarchyLevel
objects. It removes the second MdmHierarchyLevel
and then adds it back at the beginning of the list, which is position 0 (zero). In the example, mdmDLevelFee
, mdmDLevelFie
, and mdmDLevelFoe
are MdmDimensionLevel
objects.
MdmHierarchyLevel mdmHLevelFee = mdmLevelHierarchy.findOrCreateHierarchyLevel(mdmDLevelFee); MdmHierarchyLevel mdmHLevelFie = mdmLevelHierarchy.findOrCreateHierarchyLevel(mdmDLevelFie); MdmHierarchyLevel mdmHLevelFoe = mdmLevelHierarchy.findOrCreateHierarchyLevel(mdmDLevelFoe); mdmLevelHierarchy.removeHierarchyLevel(mdmHLevelFie); mdmLevelHierarchy.addHierarchyLevel(mdmHLevelFie, 0);
level
- The MdmHierarchyLevel
to add to the list.levelNumber
- The position in the hierarchy for the level.public void addHierarchyLevel(MdmHierarchyLevel level)
MdmHierarchyLevel
to the ordered list of hierarchy levels that are associated with this MdmLevelHierarchy
. MdmLevelHierarchy
. When the findOrCreateHierarchyLevel
method creates a new MdmHierarchyLevel
, it adds the new hierarchy level to the end of the ordered list. To place a MdmHierarchyLevel
in a different position in the list, you must remove it and add it back in the desired position. For example, the following code positions a new MdmHierarchyLevel
before a previously existing MdmHierarchyLevel
. To do so, it removes the existing MdmHierarchyLevel
, creates the new MdmHierarchyLevel
, and then adds the previously existing MdmHierarchyLevel
to the end of the list. In the example, mdmDLevelFoo
and mdmDLevelBar
are MdmDimensionLevel
objects.
MdmHierarchyLevel mdmHLevelFoo = mdmLevelHierarchy.findOrCreateHierarchyLevel(mdmDLevelFoo); MdmHierarchyLevel mdmHLevelBar = mdmLevelHierarchy.findOrCreateHierarchyLevel(mdmDLevelBar); mdmLevelHierarchy.removeHierarchyLevel(mdmHLevelFoo); mdmLevelHierarchy.addHierarchyLevel(mdmHLevelFoo);
level
- The MdmHierarchyLevel
to append to the list.public void removeLevel(MdmLevel level)
MdmLevel
from this MdmLevelHierarchy
.level
- The MdmLevel
to remove as a component of the hierarchy.public void removeHierarchyLevel(MdmHierarchyLevel level)
MdmHierarchyLevel
from this MdmLevelHierarchy
.level
- The MdmHierarchyLevel
to remove as a component of the hierarchy.public final boolean isSkipLevel()
MdmLevelHierarchy
is a skip-level hierarchy. A skip-level hierarchy contains at least one member whose parents are more than one level above it.boolean
that is true
if the hierarchy is a skip-level hierarchy or false
if it is not.public final void setIsSkipLevel(boolean input)
MdmLevelHierarchy
is a skip-level hierarchy. A skip-level hierarchy contains at least one member whose parents are more than one level above it, creating a hole in the hierarchy. An example of a skip-level hierarchy is City-State-Country, where at least one city has a country as its parent (for example, Washington D.C. in the United States).input
- A boolean
that is true
if the hierarchy is a skip-level hierarchy or false
if it is not.public final boolean isRagged()
boolean
that is true
if the hierarchy is ragged or false
if it is not.public final void setIsRagged(boolean input)
input
- A boolean
that is true
if the hierarchy is ragged or false
if it is not.public final java.util.List<MdmQueryColumn> getQueryColumns()
MdmQueryColumn
objects that are associated with this MdmLevelHierarchy
.getQueryColumns
in interface MdmQuery
getQueryColumns
in class MdmHierarchy
List
of the MdmQueryColumn
objects associated with this MdmLevelHierarchy
.public MdmQueryColumn getQueryColumn(java.lang.String name)
MdmQueryColumn
.getQueryColumn
in interface MdmQuery
getQueryColumn
in class MdmHierarchy
name
- A String
that contains the name of an MdmQueryColumn
.MdmQueryColumn
that has the specified name.public MdmHierarchyLevel findOrCreateHierarchyLevel(MdmDimensionLevel dimLevel)
MdmHierarchyLevel
or, if it does not already exist, creates a new one for this MdmLevelHierarchy
. An MdmHierarchyLevel
has an associated MdmDimensionLevel
.
If this method creates a new MdmHierarchyLevel
, then it appends the new MdmHierarchyLevel
to the list of MdmHierarchyLevel
objects that are owned by this MdmLevelHierarchy
. For information on changing the position of an MdmHierarchyLevel
in the list, see the addHierarchyLevel
methods.
dimLevel
- An existing MdmDimensionLevel
to associate with a new MdmHierarchyLevel
or that is associated with an existing MdmHierarchyLevel
.MdmHierarchyLevel
or a new one.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |