|
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.mapping.ObjectMap
oracle.olapi.metadata.mapping.CubeMap
public final class CubeMap
An ObjectMap
that maps an MdmCube
to an Expression
. An application gets a CubeMap
by calling the
method of an createCubeMap
MdmCube
.
A CubeMap
has a MeasureMap
for each MdmMeasure
that is contained by the cube and a CubeDimensionalityMap
for each MdmPrimaryDimension
that is associated with the cube. It has an associated Query
or FromClause
and an aggregation method. It can have a Condition
, which functions like a WHERE
clause in a SQL SELECT
statement.
Method Summary | |
---|---|
void |
addDimensionalityMap(CubeDimensionalityMap value) Adds a CubeDimensionalityMap to the CubeMap . |
void |
addMeasureMap(MeasureMap value) Adds a MeasureMap to the CubeMap . |
CubeDimensionalityMap |
findOrCreateCubeDimensionalityMap(MdmDimensionality diml) Gets the CubeDimensionalityMap that has the specified name or, if the map does not exist, creates a CubeDimensionalityMap . |
MeasureMap |
findOrCreateMeasureMap(MdmBaseMeasure measure) Gets the MeasureMap for the specified measure or, if the map does not exist, creates a MeasureMap for the measure. |
java.lang.String |
getAggregationMethod() Gets the aggregation method specified for the cube. |
MdmCube |
getCube() Gets the MdmCube that contains the CubeMap . |
java.util.List |
getDimensionalityMaps() Gets the CubeDimensionalityMap objects that are associated with the CubeMap . |
FromClause |
getFromClause() Gets the FromClause that is associated with the CubeMap . |
java.util.List |
getMeasureMaps() Gets the MeasureMap objects associated with the CubeMap . |
java.lang.String |
getName() Gets the name of the CubeMap . |
Query |
getQuery() Gets the Query that is associated with the CubeMap . |
Condition |
getWhereClause() Gets the Condition associated with the CubeMap . |
void |
removeDimensionalityMap(CubeDimensionalityMap value) Removes a CubeDimensionalityMap from the CubeMap . |
void |
removeMeasureMap(MeasureMap value) Removes a MeasureMap from the CubeMap . |
void |
setAggregationMethod(java.lang.String input) Specifies an aggregation method for the cube. |
void |
setFromClause(FromClause fromClause) Specifies a FromClause to associate with the CubeMap . |
void |
setName(java.lang.String name) Specifies a name for the CubeMap . |
void |
setQuery(Query input) Specifies a query for the CubeMap . |
void |
setWhereClause(Condition whereClause) Specifies a Condition to associate with the CubeMap . |
Methods inherited from class oracle.olapi.metadata.BaseMetadataObject |
---|
getContainedByObject, getID, getNewName, getOwner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setWhereClause(Condition whereClause)
Condition
to associate with the CubeMap
. The Condition
functions like a WHERE
clause in a SQL SELECT
statement.whereClause
- The Condition
to associate with the CubeMap
.public Condition getWhereClause()
Condition
associated with the CubeMap
.Condition
associated with the CubeMap
.public void setFromClause(FromClause fromClause)
FromClause
to associate with the CubeMap
. A CubeMap
can have a FromClause
or a Query
, but not both.
A FromClause
specifies tables that Oracle OLAP joins to get the leaf-level values that it requires for aggregating the data for the measures of the cube. A FromClause
that specifies only one table is functionally the same as a Query
.
A FromClause
that specifies two or more tables requires a Condition
that specifies the join conditions for the tables. You specify the Condition
with the setWhereClause
method.
fromClause
- The FromClause
to associate with the CubeMap
.public FromClause getFromClause()
FromClause
that is associated with the CubeMap
.FromClause
associated with the CubeMap
.public void setQuery(Query input)
CubeMap
. A CubeMap
can have a Query
or a FromClause
, but not both.
The Query
for a cube identifies the relational table that contains the leaf-level data for the measures of the cube. The following example gets the Query
for an MdmTable
and then specifies it as the Query
for an MdmCube
. In the example, the mdmDBSchema
object is an MdmDatabaseSchema
.
// Get the MdmTable and the Query for the cube. MdmTable unitsTable = null; Query cubeQuery = null; try { unitsTable = (MdmTable) mdmDBSchema.getTopLevelObject("UNITS_FACT"); cubeQuery = unitsTable.getQuery(); } catch (Exception ex) { println("Could not get the UNITS_FACT table. " + ex); } CubeMap cubeMap = mdmUnitsCube.createCubeMap(); cubeMap.setQuery(cubeQuery);
input
- The Query
to specify for the CubeMap
.public Query getQuery()
Query
that is associated with the CubeMap
.Query
associated with the CubeMap
.public void addMeasureMap(MeasureMap value)
MeasureMap
to the CubeMap
.value
- The MeasureMap
to add.public void removeMeasureMap(MeasureMap value)
MeasureMap
from the CubeMap
.value
- The MeasureMap
to remove.public java.util.List getMeasureMaps()
MeasureMap
objects associated with the CubeMap
.List
that contains the MeasureMap
objects associated with the CubeMap
.public void addDimensionalityMap(CubeDimensionalityMap value)
CubeDimensionalityMap
to the CubeMap
.value
- The CubeDimensionalityMap
to add.public void removeDimensionalityMap(CubeDimensionalityMap value)
CubeDimensionalityMap
from the CubeMap
.value
- The CubeDimensionalityMap
to remove.public java.util.List getDimensionalityMaps()
CubeDimensionalityMap
objects that are associated with the CubeMap
.List
that contains the CubeDimensionalityMap
objects associated with the CubeMap
.public MdmCube getCube()
MdmCube
that contains the CubeMap
.public java.lang.String getAggregationMethod()
String
that contains the aggregation method of the cube.public void setAggregationMethod(java.lang.String input)
SUM
, MAX
, AVG
, and so on. The aggregation method specified by this method should typically be the same method as the method in the ConsistentSolveSpecification
for the cube. The method in the ConsistentSolveSpecification
specifies the aggregation method to use when aggregating the leaf-level data before loading it into the analytic workspace.input
- A String
that contains an aggregation method for the cube.public MeasureMap findOrCreateMeasureMap(MdmBaseMeasure measure)
MeasureMap
for the specified measure or, if the map does not exist, creates a MeasureMap
for the measure.measure
- The MdmBaseMeasure
for which to get a MeasureMap
.MeasureMap
for the specified measure.public CubeDimensionalityMap findOrCreateCubeDimensionalityMap(MdmDimensionality diml)
CubeDimensionalityMap
that has the specified name or, if the map does not exist, creates a CubeDimensionalityMap
.diml
- The MdmDimensionality
for which to get a CubeDimensionalityMap
.CubeDimensionalityMap
for the specified MdmDimensionality
.public final java.lang.String getName()
CubeMap
.getName
in class ObjectMap
String
that contains the name of the CubeMap
.public void setName(java.lang.String name)
CubeMap
.name
- A String
that contains a name for the CubeMap
.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |