Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-01

oracle.AWXML
Class AggregationDefinition

java.lang.Object
  |
  +--oracle.AWXML.BaseObject
        |
        +--oracle.AWXML.SolveDefinition
              |
              +--oracle.AWXML.AggregationDefinition

public class AggregationDefinition
extends SolveDefinition

A SolveDefinition that specifies aggregation instructions for an AggregationSolve. For a diagram of AggregationDefinition associations, see AggregationDefinition Class Associations.

An AggregationDefinition is owned by a Cube.

An AggregationDefinition owns an ordered set of CalculationSpecification objects, each one specifying how to aggregate the data along one of its dimensions. Position within the calculation list determines when each calculation is performed. A CalculationSpecification can be either an Aggregation or a ModelRef. An Aggregation specifies the aggregation instructions for a hierarchical dimension. A ModelRef uses an OLAP DML model to specify aggregation instructions, typically for non-hierarchical dimensions such as line items.

An AggregationDefinition is implemented in the OLAP DML as an aggmap object for aggregation. This type of aggmap specifies which data to preaggregate, which data to aggregate at runtime, aggregation operators, and other processing parameters. Each CalculationSpecification in the AggregationDefinition is implemented either as an OLAP DML RELATION or MODEL statement in the aggmap.

The AggregationDefinition class includes methods for specifying AGGINDEX, CACHE, and NA/NONA statements in the aggregation specification. AGGINDEX, CACHE, NA, and NONA affect the OLAP DML AGGREGATE function, which performs aggregation at runtime.

For more information on OLAP aggregation, see the OLAP DML Reference and the OLAP Application Developer's Guide.

See Also:
AggregationSolve

Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

Constructor Summary
AggregationDefinition(BaseObject input)
Creates an AggregationDefinition for the specified Cube.

Method Summary
void addCalculationSpecification(CalculationSpecification input)
Adds the specified CalculationSpecification to the AggregationDefinition, and appends it to the end of the calculation list.
void addCalculationSpecificationAfter(CalculationSpecification input, BaseObject reference)
Adds the specified CalculationSpecification to the AggregationDefinition, and inserts it in the calculation list after the referenced CalculationSpecification.
void addCalculationSpecificationBefore(CalculationSpecification input, BaseObject reference)
Adds the specified CalculationSpecification to the AggregationDefinition, and inserts it in the calculation list before the referenced CalculationSpecification.
void addCalculationSpecificationFirst(CalculationSpecification input)
Adds the specified CalculationSpecification to the AggregationDefinition, and appends it to the beginning of the calculation list.
void addSolveDefDimRef(SolveDefDimRef input)
Adds the specified dimension reference to the AggregationDefinition.
java.lang.String Create(AWConnection connection)
Creates the AggregationDefinition in the current analytic workspace of the specified database connection.
AggregationHierarchySpecification createAggregationHierarchySpecification()
Creates an AggregationHierarchySpecification in the AggregationDefinition, and appends it to the end of the calculation list.
AggregationHierarchySpecification createAggregationHierarchySpecificationAfter(CalculationSpecification input)
Creates an AggregationHierarchySpecification in the AggregationDefinition, and inserts it in the calculation list after the referenced CalculationSpecification.
AggregationHierarchySpecification createAggregationHierarchySpecificationBefore(CalculationSpecification input)
Creates an AggregationHierarchySpecification in the AggregationDefinition, and inserts it in the calculation list before the referenced CalculationSpecification.
AggregationHierarchySpecification createAggregationHierarchySpecificationFirst()
Creates an AggregationHierarchySpecification in the AggregationDefinition, and appends it to the beginning of the calculation list.
ModelRef createModelRef()
Creates a ModelRef in the AggregationDefinition, and appends it to the end of the calculation list.
ModelRef createModelRefAfter(CalculationSpecification input)
Creates a ModelRef in the AggregationDefinition, and inserts it in the calculation list after the referenced CalculationSpecification.
ModelRef createModelRefBefore(CalculationSpecification input)
Creates a ModelRef in the AggregationDefinition, and inserts it in the calculation list before the referenced CalculationSpecification.
ModelRef createModelRefFirst()
Creates a ModelRef in the AggregationDefinition, and appends it to the beginning of the calculation list.
SolveDefDimRef createSolveDefDimRef()
Creates a dimension reference in the AggregationDefinition.
java.lang.String Delete(AWConnection connection)
Deletes the AggregationDefinition in the current analytic workspace of the specified database connection.
java.lang.String getAggIndex()
Returns the value of the AGGINDEX statement in the aggregation specification.
java.lang.String getCacheNa()
Returns the NA or NONA keyword in the aggregation specification.
java.lang.String getCacheStore()
Returns the value of the CACHE statement in the aggregation specification.
java.util.Vector getCalculationSpecification()
Returns the ordered list of CalculationSpecification objects in the AggregationDefinition.
java.util.Vector getSolveDefDimRefs()
Returns the dimension references associated with the AggregationDefinition.
void readAWDefinitions(AWConnection connection, boolean readType)
Reads the objects owned by the AggregationDefinition into memory, making them available for processing within the current analytic workspace of the specified database connection.
void removeCalculationSpecification(CalculationSpecification input)
Removes the specified CalculationSpecification from the AggregationDefinition.
void removeSolveDefDimRef(SolveDefDimRef input)
Removes the specified dimension reference from the AggregationDefinition.
void setAggIndex(java.lang.String input)
Returns the value of the AGGINDEX statement in the aggregation specification.
void setCacheNa(java.lang.String input)
Sets the NA or NONA keyword in the aggregation specification.
void setCacheStore(java.lang.String input)
Sets the CACHE statement in the aggregation specification.
java.lang.String WriteToXML()
Gets an XML representation of the AggregationDefinition.

Methods inherited from class oracle.AWXML.BaseObject
Alter, CreateAfter, CreateBefore, CreateFirst, DataRead, getColumnName, getId, getLongName, getLongName, getName, getOwner, getPluralName, getPluralName, getSchema, getShortName, getShortName, setColumnName, setLongName, setLongName, setName, setPluralName, setPluralName, setSchema, setShortName, setShortName

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AggregationDefinition

public AggregationDefinition(BaseObject input)
Creates an AggregationDefinition for the specified Cube.
Parameters:
input - The Cube that owns the AggregationDefinition.

Method Detail

getAggIndex

public java.lang.String getAggIndex()
Returns the value of the AGGINDEX statement in the aggregation specification.
Returns:
The value of AGGINDEX: either "YES" or "NO".

setAggIndex

public void setAggIndex(java.lang.String input)
Returns the value of the AGGINDEX statement in the aggregation specification.
Returns:
The value of AGGINDEX: either "YES" or "NO".

getCacheStore

public java.lang.String getCacheStore()
Returns the value of the CACHE statement in the aggregation specification.
Returns:
The text of the CACHE statement.

setCacheStore

public void setCacheStore(java.lang.String input)
Sets the CACHE statement in the aggregation specification.

The CACHE statement specifies how to store aggregate data and NA values calculated at runtime by the AGGREGATE function. The CACHE statement also controls whether or not to populate the detail data in a target variable.

Parameters:
input - The text of the CACHE statement.

getCacheNa

public java.lang.String getCacheNa()
Returns the NA or NONA keyword in the aggregation specification.
Returns:
Either "NA" or "NONA".

setCacheNa

public void setCacheNa(java.lang.String input)
Sets the NA or NONA keyword in the aggregation specification.

The NA keyword causes NA values generated at runtime by the AGGREGATE function to be stored in the session cache. The NONA keyword causes no NA values generated at runtime by the AGGREGATE function to be stored in the session cache.

Parameters:
input - Either "NA" or "NONA".

WriteToXML

public java.lang.String WriteToXML()
Gets an XML representation of the AggregationDefinition.
Overrides:
WriteToXML in class SolveDefinition
Returns:
An XML String that represents the AggregationDefinition.

getCalculationSpecification

public java.util.Vector getCalculationSpecification()
Returns the ordered list of CalculationSpecification objects in the AggregationDefinition.
Returns:
A Vector of CalculationSpecification objects.

removeCalculationSpecification

public void removeCalculationSpecification(CalculationSpecification input)
Removes the specified CalculationSpecification from the AggregationDefinition.
Parameters:
input - The CalculationSpecification to remove.

addCalculationSpecification

public void addCalculationSpecification(CalculationSpecification input)
Adds the specified CalculationSpecification to the AggregationDefinition, and appends it to the end of the calculation list.
Parameters:
input - The CalculationSpecification to add.

addCalculationSpecificationAfter

public void addCalculationSpecificationAfter(CalculationSpecification input,
                                             BaseObject reference)
Adds the specified CalculationSpecification to the AggregationDefinition, and inserts it in the calculation list after the referenced CalculationSpecification.
Parameters:
input - The CalculationSpecification to add.
reference - The referenced CalculationSpecification.

addCalculationSpecificationBefore

public void addCalculationSpecificationBefore(CalculationSpecification input,
                                              BaseObject reference)
Adds the specified CalculationSpecification to the AggregationDefinition, and inserts it in the calculation list before the referenced CalculationSpecification.
Parameters:
input - The CalculationSpecification to add.
reference - The referenced CalculationSpecification.

addCalculationSpecificationFirst

public void addCalculationSpecificationFirst(CalculationSpecification input)
Adds the specified CalculationSpecification to the AggregationDefinition, and appends it to the beginning of the calculation list.
Parameters:
input - The CalculationSpecification to add.

addSolveDefDimRef

public void addSolveDefDimRef(SolveDefDimRef input)
Adds the specified dimension reference to the AggregationDefinition.
Parameters:
input - The SolveDefDimRef to add.

removeSolveDefDimRef

public void removeSolveDefDimRef(SolveDefDimRef input)
Removes the specified dimension reference from the AggregationDefinition.
Parameters:
input - The SolveDefDimRef to remove.

getSolveDefDimRefs

public java.util.Vector getSolveDefDimRefs()
Returns the dimension references associated with the AggregationDefinition.
Returns:
A Vector of SolveDefDimRef objects.

createSolveDefDimRef

public SolveDefDimRef createSolveDefDimRef()
Creates a dimension reference in the AggregationDefinition.
Returns:
The new SolveDefDimRef.

createAggregationHierarchySpecification

public AggregationHierarchySpecification createAggregationHierarchySpecification()
Creates an AggregationHierarchySpecification in the AggregationDefinition, and appends it to the end of the calculation list.
Returns:
The new AggregationHierarchySpecification.

createAggregationHierarchySpecificationAfter

public AggregationHierarchySpecification createAggregationHierarchySpecificationAfter(CalculationSpecification input)
Creates an AggregationHierarchySpecification in the AggregationDefinition, and inserts it in the calculation list after the referenced CalculationSpecification.
Parameters:
input - The referenced CalculationSpecification.
Returns:
The new AggregationHierarchySpecification.

createAggregationHierarchySpecificationBefore

public AggregationHierarchySpecification createAggregationHierarchySpecificationBefore(CalculationSpecification input)
Creates an AggregationHierarchySpecification in the AggregationDefinition, and inserts it in the calculation list before the referenced CalculationSpecification.
Parameters:
input - The referenced CalculationSpecification.
Returns:
The new AggregationHierarchySpecification.

createAggregationHierarchySpecificationFirst

public AggregationHierarchySpecification createAggregationHierarchySpecificationFirst()
Creates an AggregationHierarchySpecification in the AggregationDefinition, and appends it to the beginning of the calculation list.
Returns:
The new AggregationHierarchySpecification.

createModelRef

public ModelRef createModelRef()
Creates a ModelRef in the AggregationDefinition, and appends it to the end of the calculation list.
Returns:
The new ModelRef.

createModelRefAfter

public ModelRef createModelRefAfter(CalculationSpecification input)
Creates a ModelRef in the AggregationDefinition, and inserts it in the calculation list after the referenced CalculationSpecification.
Parameters:
input - The referenced CalculationSpecification.
Returns:
The new ModelRef.

createModelRefBefore

public ModelRef createModelRefBefore(CalculationSpecification input)
Creates a ModelRef in the AggregationDefinition, and inserts it in the calculation list before the referenced CalculationSpecification.
Parameters:
input - The referenced CalculationSpecification.
Returns:
The new ModelRef.

createModelRefFirst

public ModelRef createModelRefFirst()
Creates a ModelRef in the AggregationDefinition, and appends it to the beginning of the calculation list.
Returns:
The new ModelRef.

Create

public java.lang.String Create(AWConnection connection)
Creates the AggregationDefinition in the current analytic workspace of the specified database connection.
Overrides:
Create in class BaseObject
Parameters:
connection - The AWConnection that specifies the database connection.
Returns:
If successful, a String that contains success.

Delete

public java.lang.String Delete(AWConnection connection)
Deletes the AggregationDefinition in the current analytic workspace of the specified database connection.
Overrides:
Delete in class BaseObject
Parameters:
connection - The AWConnection that specifies the database connection.
Returns:
If successful, a String that contains success.

readAWDefinitions

public void readAWDefinitions(AWConnection connection,
                              boolean readType)
Reads the objects owned by the AggregationDefinition into memory, making them available for processing within the current analytic workspace of the specified database connection.
Parameters:
connection - The AWConnection that specifies the database connection.
readType - Specify True to read the AggregationDefinition and all its child objects. Specify False to read the AggregationDefinition but omit specific child objects.

Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-01

Copyright © 2003, 2005 Oracle. All rights reserved.