Oracle OLAP Java API Reference
10g Release 1 (10.1)

B10994-01

oracle.olapi.metadata.mtm
Class MtmSimpleAggregationStep

java.lang.Object
  |
  +--oracle.olapi.metadata.BaseMetadataObject
        |
        +--oracle.olapi.metadata.mtm.MtmObject
              |
              +--oracle.olapi.metadata.mtm.MtmAggregationStep
                    |
                    +--oracle.olapi.metadata.mtm.MtmSimpleAggregationStep

public class MtmSimpleAggregationStep
extends MtmAggregationStep

An MtmAggregationStep that specifies a SQL function and a weighting factor to apply to the calculation of the measure values for the node levels of the hierarchies of the dimensions of this MtmAggregationStep. The default function is SUM and the default weight is 1. You can create an instance of this class with the createMtmSimpleAggregationStep method of an MtmObjectFactory.

With the setFunction method, you can specify a SQL group function or your own function. The SQL group functions are AVG, COUNT, MAX, MIN, STDDEV, SUM, and VARIANCE. Oracle OLAP uses the function you specify exactly as you specify it.

You can specify a weighting factor with the setWeight function. The weighting factor can be a constant, an expression, or an existing column. You can create an instance of an MtmValueExpression to specify as the weighting factor with the createColumnExpression or createCustomExpression methods of an MtmObjectFactory.


Method Summary
 java.lang.Object acceptVisitor(MtmObjectVisitor visitor, java.lang.Object context)
          Calls the visitMtmSimpleAggregationStep method of the specified MtmObjectVisitor and passes that method this MtmSimpleAggregationStep and the specified context object.
 java.lang.String getFunction()
          Gets the SQL function for this MtmSimpleAggregationStep.
 MtmValueExpression getWeight()
          Gets the weighting factor to apply to the function of this MtmSimpleAggregationStep.
 void setFunction(java.lang.String function)
          Specifies the SQL function for this MtmSimpleAggregationStep.
 void setWeight(MtmValueExpression weight)
          Specifies the weighting factor to apply to the function for this MtmSimpleAggregationStep.

 

Methods inherited from class oracle.olapi.metadata.mtm.MtmAggregationStep
addDimensionMap, getDimensionMaps, removeDimensionMap

 

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

acceptVisitor

public java.lang.Object acceptVisitor(MtmObjectVisitor visitor,
                                      java.lang.Object context)
Calls the visitMtmSimpleAggregationStep method of the specified MtmObjectVisitor and passes that method this MtmSimpleAggregationStep and the specified context object.
Parameters:
visitor - An MtmObjectVisitor.
context - An Object.
Returns:
The Object returned by the visitMtmSimpleAggregationStep method.
Overrides:
acceptVisitor in class MtmObject

getFunction

public java.lang.String getFunction()
Gets the SQL function for this MtmSimpleAggregationStep.
Returns:
A String whose value is the SQL function for this MtmSimpleAggregationStep.

getWeight

public MtmValueExpression getWeight()
Gets the weighting factor to apply to the function of this MtmSimpleAggregationStep.
Returns:
An MtmValueExpression that specifies the weighting factor that applies to the SQL function for this MtmSimpleAggregationStep.

setFunction

public void setFunction(java.lang.String function)
Specifies the SQL function for this MtmSimpleAggregationStep.
Parameters:
function - A String that specifies the SQL function for this MtmSimpleAggregationStep.

setWeight

public void setWeight(MtmValueExpression weight)
Specifies the weighting factor to apply to the function for this MtmSimpleAggregationStep. The weighting factor can be a constant, an expression, such as a custom expression that you create, or an column, such as an existing column in a table.
Parameters:
weight - An MtmValueExpression that specifies a weighting factor to apply to the SQL function for this MtmSimpleAggregationStep.

Oracle OLAP Java API Reference
10g Release 1 (10.1)

B10994-01

Copyright © 2002, 2003, Oracle. All Rights Reserved.