|
Oracle® OLAP Java API Reference 10g Release 2 (10.2.0.4) B14348-04 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.olapi.metadata.BaseMetadataObject
oracle.olapi.metadata.mtm.MtmObject
oracle.olapi.metadata.mtm.MtmCube
oracle.olapi.metadata.mtm.MtmBaseCube
oracle.olapi.metadata.mtm.MtmUnsolvedCube
An MtmBaseCube for which only leaf-level data is
available directly from a relational table or view, and for
which aggregate values are supplied by Oracle OLAP.
The Oracle OLAP SQL generator uses one of three forms of aggregation
to specify the aggregate values: GroupingSet, Rollup, or ET.
You can discover or specify the aggregation form for an
MtmUnsolvedCube by calling its getAggregationForm
or setAggregationForm methods.
To aggregate data for an MtmUnsolvedCube, the SQL generator
produces SQL code in the following format.
SELECT SUM(measure1), SUM(measure2), ..., SUM(measureN), dimension-keys FROM fact-table, dimension-tables WHERE join-condition GROUP BY group-by-clause
The format of group-by-clause is controlled by
the aggregation form specified for the MtmUnsolvedCube.
For example, assuming a single hierarchy with three levels, Y,
Q, and M, the GROUP BY clause is
constructed as follows.
GroupingSet: GROUP BY GROUPING SETS((Y), (Q), (M)) Rollup: GROUP BY Y, ROLLUP(Q, M) ET: GROUP BY Y, ROLLUP(Q, M)
The format of dimension-keys is also controlled by
the aggregation form, as shown below.
GroupingSet: SELECT Y, Q, M, GROUPING_ID(Y, Q, M)
Rollup: SELECT Y, Q, M, GROUPING_ID(Y, Q, M)
ET: SELECT
(CASE GROUPING_ID(Y, Q, M)
WHEN 3 THEN Y
WHEN 1 THEN Q
ELSE M
END) et_value,
GROUPING_ID(Y, Q, M)
The join-condition is controlled by the
MtmUnsolvedCubeDimensionality objects for the
MtmUnsolvedCube.
An MtmUnsolvedCube also specifies operations, or steps, that
Oracle OLAP performs during the aggregation, such as applying a function
to the measure value, weighting the value, or using the first or last child
element when aggregating the measure values for a parent element of the
hierarchy.
You can discover the steps for an MtmUnsolvedCube by calling
its getSolveSpecification method, and then calling the
getAggregationSteps method on the
MtmAggregationSpecification it returns.
You can specify other values for the concrete instances of the
MtmAggregationSpecification objects with methods such as the
setWeight method of an MtmSimpleAggregationStep.
You can create other subclasses of
MtmAggregationStep with methods of an
MtmObjectFactory and add them to the
MtmAggregationSpecification with the
addAggregationStep method.
You can then use the MtmAggregationSpecification as the
input parameter of the setSolveSpecification method of the
MtmUnsolvedCube.
You can also change the aggregation step for one or all of the hierarchies
of this MtmUnsolvedCube by using methods such as
aggregateSimple.
| Method Summary | |
java.lang.Object |
acceptVisitor(MtmObjectVisitor visitor,
java.lang.Object context)
Calls the visitMtmUnsolvedCube method of
the specified MtmObjectVisitor and passes that method this
MtmUnsolvedCube and the specified
context object. |
void |
addDimensionality(MtmCubeDimensionality dimensionality)
Adds an MtmCubeDimensionality to this
MtmUnsolvedCube. |
void |
aggregateFirst(MdmHierarchy hierarchy,
boolean isHierarchical)
Specifies an MtmFirstLastAggregationStep for the specified
MdmHierarchy component of this MtmUnsolvedCube;
the aggregation type of the step is FIRST and the value of
isHierarchical specifies whether the step uses the first
value if that value is null. |
void |
aggregateLast(MdmHierarchy hierarchy,
boolean isHierarchical)
Specifies an MtmFirstLastAggregationStep for the specified
MdmHierarchy component of this MtmUnsolvedCube;
the aggregation type of the step is LAST and the value of
isHierarchical specifies whether the step uses the first
value if that value is null. |
void |
aggregateSimple(MdmHierarchy hierarchy,
java.lang.String function,
MtmValueExpression weight)
Specifies an MtmSimpleAggregationStep for the specified
MdmHierarchy component of this MtmUnsolvedCube. |
void |
aggregateSum(MdmHierarchy hierarchy)
Specifies an MtmSimpleAggregationStep for the specified
MdmHierarchy component of this MtmUnsolvedCube;
the function of the simple aggregation step is SUM and its
weighting factor is 1. |
void |
aggregateWeightedAverage(MdmHierarchy hierarchy,
MtmValueExpression weight,
boolean isHierarchical)
Specifies an MtmWeightedAverageAggregationStep for the
specified MdmHierarchy component of this
MtmUnsolvedCube; the weighting factor of the step is
weight and the value of
isHierarchical specifies whether the step includes
null values in the count of the measure values specified by
the children of an element of the dimension hierarchy. |
java.lang.String |
getAggregationForm()
Gets the aggregation form for this MtmUnsolvedCube. |
MtmSolveSpecification |
getSolveSpecification()
Gets the MtmSolveSpecification that specifies operations
that Oracle OLAP performs when aggregating the values of the measures
of this MtmUnsolvedCube. |
java.lang.String |
getSQLHint()
Gets the SQL hint to be embedded in the SELECT statement
for this MtmUnsolvedCube. |
void |
removeAggregation(MdmHierarchy hierarchy)
Removes the MtmAggregationStep, if any, for the specified
MdmHierarchy component of this MtmUnsolvedCube. |
void |
removeDimensionality(MtmCubeDimensionality dimensionality)
Removes an MtmCubeDimensionality from this
MtmUnsolvedCube. |
void |
setAggregationForm(java.lang.String newAggregationForm)
Specifies the form of aggregation that Oracle OLAP uses when aggregating the values of the measures of this MtmUnsolvedCube. |
void |
setSolveSpecification(MtmSolveSpecification solveSpec)
Specifies operations that Oracle OLAP performs when aggregating the values of the measures of this MtmUnsolvedCube. |
void |
setSQLHint(java.lang.String newSQLHint)
Specifies the SQL hint that the SQL generator embeds in the SELECT statement of this MtmUnsolvedCube. |
| Methods inherited from class oracle.olapi.metadata.mtm.MtmBaseCube |
addMeasure, getDimensionality, getPartitionedCube, getTable, removeDimension, removeMeasure |
| Methods inherited from class oracle.olapi.metadata.mtm.MtmCube |
getDimensionMaps, getMeasureMaps, getName, setName |
| Methods inherited from class oracle.olapi.metadata.BaseMetadataObject |
getID |
| 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(MtmObjectVisitor visitor,
java.lang.Object context)
visitMtmUnsolvedCube method of
the specified MtmObjectVisitor and passes that method this
MtmUnsolvedCube and the specified
context object.
acceptVisitor in class MtmObjectvisitor - An MtmObjectVisitor.context - An Object.
Object returned by the
visitMtmUnsolvedCube method.public java.lang.String getAggregationForm()
MtmUnsolvedCube.
String that indicates the aggregation form for
this MtmUnsolvedCube.
Possible values are GroupingSet,
Rollup, and ET.
The description of this class provides information about these
three forms.public MtmSolveSpecification getSolveSpecification()
MtmSolveSpecification that specifies operations
that Oracle OLAP performs when aggregating the values of the measures
of this MtmUnsolvedCube.
public java.lang.String getSQLHint()
SELECT statement
for this MtmUnsolvedCube.
For example, if the return value is no_rewrite, then the
Oracle OLAP SQL generator provides that text as a hint in the
SELECT statement.
A hint is passed to the Oracle optimizer to help it choose an execution
plan for a SELECT statement.
String that is the hint for the SQL code that
is generated for this MtmUnsolvedCube.public void setAggregationForm(java.lang.String newAggregationForm)
MtmUnsolvedCube.
The aggregation forms are GroupingSet, Rollup,
and ET.
newAggregationForm - A String that specifies the form
of aggregation.public void setSolveSpecification(MtmSolveSpecification solveSpec)
MtmUnsolvedCube.
solveSpec - An MtmSolveSpecification that specifies
the operation to perform during the aggregation.public void setSQLHint(java.lang.String newSQLHint)
SELECT statement of this MtmUnsolvedCube.
newSQLHint - A String that specifies the SQL hint for
this MtmUnsolvedCube.public void addDimensionality(MtmCubeDimensionality dimensionality)
MtmCubeDimensionality to this
MtmUnsolvedCube.
addDimensionality in class MtmBaseCubedimensionality - The MtmCubeDimensionality to add to
this MtmUnsolvedCube.public void removeDimensionality(MtmCubeDimensionality dimensionality)
MtmCubeDimensionality from this
MtmUnsolvedCube.
removeDimensionality in class MtmBaseCubedimensionality - The MtmCubeDimensionality to remove
from this MtmUnsolvedCube.
public void aggregateSimple(MdmHierarchy hierarchy,
java.lang.String function,
MtmValueExpression weight)
MtmSimpleAggregationStep for the specified
MdmHierarchy component of this MtmUnsolvedCube.
The function of the simple aggregation step is function and its
weighting factor is weight.
A hierarchy value of null specifies that the
MtmSimpleAggregationStep applies to all of the
MdmHierarchy component of this MtmUnsolvedCube.
hierarchy - The MdmHierarchy of this
MtmUnsolvedCube for which you want to specify
an MtmSimpleAggregationStep.function - A String that specifies the SQL function for
the MtmSimpleAggregationStep.weight - An MtmValueExpression that specifies the
weighting factor for the
MtmSimpleAggregationStep.
A value of null specifies the default weight
of 1.public void aggregateSum(MdmHierarchy hierarchy)
MtmSimpleAggregationStep for the specified
MdmHierarchy component of this MtmUnsolvedCube;
the function of the simple aggregation step is SUM and its
weighting factor is 1.
A hierarchy value of null specifies that the
MtmSimpleAggregationStep applies to all of the
MdmHierarchy component of this MtmUnsolvedCube.
hierarchy - The MdmHierarchy of this
MtmUnsolvedCube for which you want to specify
an MtmSimpleAggregationStep.
public void aggregateFirst(MdmHierarchy hierarchy,
boolean isHierarchical)
MtmFirstLastAggregationStep for the specified
MdmHierarchy component of this MtmUnsolvedCube;
the aggregation type of the step is FIRST and the value of
isHierarchical specifies whether the step uses the first
value if that value is null.
A hierarchy value of null specifies that the
MtmFirstLastAggregationStep applies to all of the
MdmHierarchy component of this MtmUnsolvedCube.
hierarchy - The MdmHierarchy of this
MtmUnsolvedCube for which you want to
specify an MtmFirstLastAggregationStep.isHierarchical - A boolean that specifies whether the
step uses the first value if that value is
null.
public void aggregateLast(MdmHierarchy hierarchy,
boolean isHierarchical)
MtmFirstLastAggregationStep for the specified
MdmHierarchy component of this MtmUnsolvedCube;
the aggregation type of the step is LAST and the value of
isHierarchical specifies whether the step uses the first
value if that value is null.
A hierarchy value of null specifies that the
MtmFirstLastAggregationStep applies to all of the
MdmHierarchy component of this MtmUnsolvedCube.
hierarchy - The MdmHierarchy of this
MtmUnsolvedCube for which you want to
specify an MtmFirstLastAggregationStep.isHierarchical - A boolean that specifies whether the
step uses the first value if that value is
null.
public void aggregateWeightedAverage(MdmHierarchy hierarchy,
MtmValueExpression weight,
boolean isHierarchical)
MtmWeightedAverageAggregationStep for the
specified MdmHierarchy component of this
MtmUnsolvedCube; the weighting factor of the step is
weight and the value of
isHierarchical specifies whether the step includes
null values in the count of the measure values specified by
the children of an element of the dimension hierarchy.
A hierarchy value of null specifies that the
MtmWeightedAverageAggregationStep applies to all of the
MdmHierarchy component of this MtmUnsolvedCube.
hierarchy - The MdmHierarchy of this
MtmUnsolvedCube for which you want to
specify an MtmFirstLastAggregationStep.weight - An MtmValueExpression that specifies the
weighting factor for the
MtmWeightedAverageAggregationStep.isHierarchical - A boolean that specifies whether the
step includes null values in the count
of the measure values specified by the children of
an element of the dimension hierarchy.public void removeAggregation(MdmHierarchy hierarchy)
MtmAggregationStep, if any, for the specified
MdmHierarchy component of this MtmUnsolvedCube.
hierarchy - The MdmHierarchy of this
MtmUnsolvedCube for which you want to
remove any MtmAggregationStep.
|
Oracle® OLAP Java API Reference 10g Release 2 (10.2.0.4) B14348-04 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||