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

B14351-01

oracle.AWXML
Class Cube

java.lang.Object
  |
  +--oracle.AWXML.BaseObject
        |
        +--oracle.AWXML.AWObject
              |
              +--oracle.AWXML.Cube

public class Cube
extends AWObject

An AWObject that specifies an OLAP cube. A cube defines a multidimensional framework for fact data. Each fact in a cube is defined as a measure. All the measures of a cube have the same set of dimensions.

A Cube is a top-level object in the Analytic Workspace Java API object model. For a description and diagram of the model hierarchy, see Object Hierarchy. Top-level objects are logically owned by an AW object, and they exist within the name space of the relational schema associated with the AW.

The Cube class supports methods for building the logical cube in memory and action methods for physically manipulating the cube within the Oracle Database. The action methods take an AWConnection argument that specifies a JDBC connection to the Database.

Within an analytic workspace, composites are a means of reducing the amount of space required for storing sparse data. When one or more of the dimensions of a cube is identified as sparse, an OLAP DML composite is created for each measure in the cube. By default, standard composites are created. To create compressed composites, use the setSparseType method. To create a single shared composite for all the measures in the cube, use the setGlobalIndex method.

You can store the data for a specific hierarchy and level within its own database partition. For a diagram of the model for data partitioning, Data Partitioning for a Cube.

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

See Also:
Measure, CubeDimRef, SolveDefinition

Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

Constructor Summary
Cube()
Creates a Cube.

Method Summary
void addCubeDimRef(CubeDimRef input)
Adds the specified dimension reference to the end of the list of dimension references associated with the Cube.
void addCubeDimRefAfter(CubeDimRef input, BaseObject reference)
Adds the specified CubeDimRef after the referenced CubeDimRef in the list of dimension references associated with the Cube.
void addCubeDimRefBefore(CubeDimRef input, BaseObject reference)
Adds the specified CubeDimRef before the referenced CubeDimRef in the list of dimension references associated with the Cube.
void addCubeDimRefFirst(CubeDimRef input)
Adds the specified dimension reference to the beginning of the list of dimension references associated with the Cube.
void addDerivedMeasure(DerivedMeasure input)
Adds the specified DerivedMeasure to the Cube.
void addMeasure(Measure input)
Adds the specified Measure to the measures associated with the Cube.
void addOlapMeasure(OlapMeasure input)
Adds the specified OlapMeasure to the Cube.
void addSolveDefinition(SolveDefinition input)
Adds the specified SolveDefinition to the Cube.
java.lang.String Alter(AWConnection connection)
Alters the Cube in the current analytic workspace.
java.lang.String Create(AWConnection connection)
Creates the Cube in the current analytic workspace of the specified database connection.
AggregationDefinition createAggregationDefinition()
Creates an AggregationDefinition and adds it to the Cube.
AllocationDefinition createAllocationDefinition()
Creates an AllocationDefinition and adds it to the Cube.
CubeDimRef createCubeDimRef()
Creates a CubeDimRef and adds it to the end of the list of dimension references associated with the Cube.
CubeDimRef createCubeDimRefAfter(CubeDimRef input)
Creates a CubeDimRef and adds it after the specified CubeDimRef in the list of dimension references associated with the Cube.
CubeDimRef createCubeDimRefBefore(CubeDimRef input)
Creates a CubeDimRef and adds it before the specified CubeDimRef in the list of dimension references associated with the Cube.
CubeDimRef createCubeDimRefFirst()
Creates a CubeDimRef and adds it the beginning of the list of dimension references associated with the Cube.
DerivedMeasure createDerivedMeasure()
Creates a DerivedMeasure and adds it to the Cube.
ForecastDefinition createForecastDefinition()
Creates a ForecastDefinition and adds it to the Cube.
Measure createMeasure()
Creates a Measure and adds it to the Cube.
OlapMeasure createOlapMeasure()
Creates an OlapMeasure and adds it to the Cube.
java.lang.String Delete(AWConnection connection)
Deletes the Cube in the current analytic workspace of the specified database connection.
AggregationDefinition findAggregationDefinition(java.lang.String name)
Gets the specified AggregationDefinition associated with the Cube.
AllocationDefinition findAllocationDefinition(java.lang.String name)
Gets the specified AllocationDefinition associated with the Cube.
Measure findDerivedMeasure(java.lang.String input)
Gets the specified DerivedMeasure associated with the Cube.
ForecastDefinition findForecastDefinition(java.lang.String name)
Gets the specified ForecastDefinition associated with the Cube.
Measure findMeasure(java.lang.String input)
Gets the specified Measure associated with the Cube.
java.lang.String getAutoSolve()
Indicates whether the analytic workspace automatically calculates the aggregate values of the Measure objects (solves the measures) owned by the Cube when it builds the Cube.
java.util.Vector getCubeDimRefs()
Gets the list of the dimension references associated with the Cube.
AggregationDefinition getDefaultAggregationDefinition()
Gets the default AggregationDefinition, which specifies the aggregation rules for the Cube.
java.lang.String getDefaultDataType()
Returns the default data type of Measureobjects in the Cube.
java.util.Vector getDerivedMeasures()
Gets a list of the DerivedMeasure objects associated with the Cube.
java.lang.String getId()
Gets the full name of the Cube.
java.util.Vector getMeasures()
Gets a list of the Measure objects associated with the Cube.
Hierarchy getPartitionHierarchy()
Gets the partition Hierarchy for the Cube.
Level getPartitionLevel()
Gets the partition level for the Cube.
java.util.Vector getSolveDefinitions()
Gets the SolveDefinition objects owned by the Cube.
java.lang.String getSparseType()
Gets the type of composite that the analytic workspace uses to manage sparsity within the Cube.
java.lang.Boolean getUseGlobalIndex()
Gets a Boolean that indicates whether the analytic workspace uses the same composite to store the data for all of the Measure objects owned by the Cube.
void readAWDefinitions(AWConnection connection, boolean readType)
Reads the objects owned by the Cube into memory, making them available for processing within the current analytic workspace of the specified database connection.
void removeCubeDimRef(CubeDimRef input)
Removes the specified dimension reference from the list of dimension references associated with the Cube.
void removeDerivedMeasure(DerivedMeasure input)
Removes the specified DerivedMeasure from the Cube.
void removeMeasure(Measure input)
Removes the specified Measure from the Cube.
void removeOlapMeasure(OlapMeasure input)
Removes the specified OlapMeasure from the Cube.
void removeSolveDefinition(SolveDefinition input)
Removes the specified SolveDefinition from the Cube.
void setAutoSolve(java.lang.String input)
Specifies whether the analytic workspace automatically calculates the aggregate values of the Measure objects (solves the measures) owned by the Cube when it builds the Cube.
void setDefaultAggregationDefinition(AggregationDefinition input)
Specifies the default AggregationDefinition, which contains the aggregation rules for the Cube.
void setDefaultDataType(java.lang.String input)
Specifies a default data type for Measureobjects in the Cube.
void setPartitionHierarchy(Hierarchy input)
Specifies a partition hierarchy for the Cube.
void setPartitionLevel(Level input)
Specifies a partition level for the Cube.
void setSparseType(java.lang.String input)
Specifies the type of composite that the analytic workspace uses to manage sparsity within the Cube.
void setUseGlobalIndex(java.lang.Boolean input)
Specifies whether to use the same composite for all of the Measure objects owned by the Cube.
java.lang.String WriteToXML()
Gets an XML representation of the Cube.

Methods inherited from class oracle.AWXML.AWObject
addAttribute, addAttributeProjection, addSourceCubeMapGroup, addSourceDimensionMapGroup, addSourceMappingGroup, createAttribute, createAttributeProjection, createSourceCubeMapGroup, createSourceDimensionMapGroup, getAttributes, getSourceMapGroup, removeAttribute, removeAttributeProjection, removeAttributeProjection, removeSourceMappingGroup

Methods inherited from class oracle.AWXML.BaseObject
CreateAfter, CreateBefore, CreateFirst, DataRead, getColumnName, 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

Cube

public Cube()
Creates a Cube.

Method Detail

getId

public java.lang.String getId()
Gets the full name of the Cube.

Because the Cube class is at the top of the object hierarchy, the full name of a Cube is simply the logical name and the object type, in the following format.

cube_name.Cube

Overrides:
getId in class BaseObject
Returns:
The full name of the Cube.

setDefaultAggregationDefinition

public void setDefaultAggregationDefinition(AggregationDefinition input)
Specifies the default AggregationDefinition, which contains the aggregation rules for the Cube.
Parameters:
input - The AggregationDefinition to use as the default set of aggregation rules.

getDefaultAggregationDefinition

public AggregationDefinition getDefaultAggregationDefinition()
Gets the default AggregationDefinition, which specifies the aggregation rules for the Cube.
Returns:
The default AggregationDefinition.

getDefaultDataType

public java.lang.String getDefaultDataType()
Returns the default data type of Measureobjects in the Cube. Unless you have specified a default data type with the setDefaultDataType method, the Cube does not have a default data type.
Returns:
The name of the default data type or NULL if no default data type has been specified.

setDefaultDataType

public void setDefaultDataType(java.lang.String input)
Specifies a default data type for Measureobjects in the Cube. The Cube does not have a default data type unless you explicitly specify it. The possible data types are INTEGER, DECIMAL, NUMBER, and TEXT.
Parameters:
input - The data type to use as the default.

setAutoSolve

public void setAutoSolve(java.lang.String input)
Specifies whether the analytic workspace automatically calculates the aggregate values of the Measure objects (solves the measures) owned by the Cube when it builds the Cube. When it automatically solves the measures, the analytic workspace uses the default AggregationDefinition of the Cube.

The build process is initiated by the Execute method of the AWAction.BuildDatabase class.

Parameters:
input - A String that is YES to specify that the analytic workspace automatically solves the measures or NO to specify that it does not automatically solve them.

getAutoSolve

public java.lang.String getAutoSolve()
Indicates whether the analytic workspace automatically calculates the aggregate values of the Measure objects (solves the measures) owned by the Cube when it builds the Cube.
Returns:
A String that is YES to indicate that the analytic workspace automatically solves the measures or NO to indicate that that it does not automatically solve them.

WriteToXML

public java.lang.String WriteToXML()
Gets an XML representation of the Cube.
Overrides:
WriteToXML in class AWObject
Returns:
A String that is an XML representation of the Cube.

addCubeDimRef

public void addCubeDimRef(CubeDimRef input)
Adds the specified dimension reference to the end of the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to add to the list of dimension references for the Cube.

addCubeDimRefAfter

public void addCubeDimRefAfter(CubeDimRef input,
                               BaseObject reference)
Adds the specified CubeDimRef after the referenced CubeDimRef in the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to add to the list of dimension references for the Cube.
reference - The CubeDimRef after which to add the specified CubeDimRef.

addCubeDimRefBefore

public void addCubeDimRefBefore(CubeDimRef input,
                                BaseObject reference)
Adds the specified CubeDimRef before the referenced CubeDimRef in the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to add to the list of dimension references for the Cube.
reference - The CubeDimRef before which to add the specified CubeDimRef.

addCubeDimRefFirst

public void addCubeDimRefFirst(CubeDimRef input)
Adds the specified dimension reference to the beginning of the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to add to the list of dimension references for the Cube.

removeCubeDimRef

public void removeCubeDimRef(CubeDimRef input)
Removes the specified dimension reference from the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to remove from the list of dimension references for the Cube.

getCubeDimRefs

public java.util.Vector getCubeDimRefs()
Gets the list of the dimension references associated with the Cube.
Returns:
A Vector that contains the CubeDimRef objects associated with the Cube.

addMeasure

public void addMeasure(Measure input)
Adds the specified Measure to the measures associated with the Cube.
Parameters:
input - The Measure to add to the Cube.

removeMeasure

public void removeMeasure(Measure input)
Removes the specified Measure from the Cube.
Parameters:
input - The Measure to remove from the Cube.

getMeasures

public java.util.Vector getMeasures()
Gets a list of the Measure objects associated with the Cube.
Returns:
A Vector that contains the Measure objects associated with the Cube.

addOlapMeasure

public void addOlapMeasure(OlapMeasure input)
Adds the specified OlapMeasure to the Cube.
Parameters:
input - The OlapMeasure to add.

removeOlapMeasure

public void removeOlapMeasure(OlapMeasure input)
Removes the specified OlapMeasure from the Cube.
Parameters:
input - The OlapMeasure to remove.

addDerivedMeasure

public void addDerivedMeasure(DerivedMeasure input)
Adds the specified DerivedMeasure to the Cube.
Parameters:
input - The DerivedMeasure to add.

removeDerivedMeasure

public void removeDerivedMeasure(DerivedMeasure input)
Removes the specified DerivedMeasure from the Cube.
Parameters:
input - The DerivedMeasure to remove.

getDerivedMeasures

public java.util.Vector getDerivedMeasures()
Gets a list of the DerivedMeasure objects associated with the Cube.
Returns:
A Vector that contains the DerivedMeasure objects associated with the Cube.

setSparseType

public void setSparseType(java.lang.String input)
Specifies the type of composite that the analytic workspace uses to manage sparsity within the Cube. The types are standard and compressed composites. The default is standard.

When one or more of the dimensions of the Cube is identified as sparse, the analytic workspace creates a composite for each measure owned by the Cube. If more than one of the dimensions of the Cube is sparse, then they must be contiguous in the list of dimensions for the Cube.

By default the analytic workspace creates a separate composite for each measure owned by the Cube. To specify that all of the measures share the same composite, use the setGlobalIndex method.

Parameters:
input - A String that contains STANDARD or COMPRESSED.

getSparseType

public java.lang.String getSparseType()
Gets the type of composite that the analytic workspace uses to manage sparsity within the Cube. The types are standard and compressed composites.
Returns:
A String that contains STANDARD or COMPRESSED.

createMeasure

public Measure createMeasure()
Creates a Measure and adds it to the Cube.
Returns:
The new Measure.

createDerivedMeasure

public DerivedMeasure createDerivedMeasure()
Creates a DerivedMeasure and adds it to the Cube.
Returns:
The new DerivedMeasure.

createOlapMeasure

public OlapMeasure createOlapMeasure()
Creates an OlapMeasure and adds it to the Cube.
Returns:
The new OlapMeasure.

createCubeDimRef

public CubeDimRef createCubeDimRef()
Creates a CubeDimRef and adds it to the end of the list of dimension references associated with the Cube.
Returns:
The new CubeDimRef.

createCubeDimRefAfter

public CubeDimRef createCubeDimRefAfter(CubeDimRef input)
Creates a CubeDimRef and adds it after the specified CubeDimRef in the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef after which to add the new CubeDimRef.
Returns:
The new CubeDimRef.

createCubeDimRefBefore

public CubeDimRef createCubeDimRefBefore(CubeDimRef input)
Creates a CubeDimRef and adds it before the specified CubeDimRef in the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef before which to add the new CubeDimRef.
Returns:
The new CubeDimRef.

createCubeDimRefFirst

public CubeDimRef createCubeDimRefFirst()
Creates a CubeDimRef and adds it the beginning of the list of dimension references associated with the Cube.
Returns:
The new CubeDimRef.

Create

public java.lang.String Create(AWConnection connection)
Creates the Cube in the current analytic workspace of the specified database connection. If it cannot create the Cube, then this method throws an AWException exception.
Overrides:
Create in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method creates the Cube.

Alter

public java.lang.String Alter(AWConnection connection)
Alters the Cube in the current analytic workspace. If it cannot successfully alter the Cube, then this method throws an AWException exception.
Overrides:
Alter in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method alters the Measure.

Delete

public java.lang.String Delete(AWConnection connection)
Deletes the Cube in the current analytic workspace of the specified database connection. If it cannot delete the Cube, then this method throws an AWException exception.
Overrides:
Delete in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method deletes the Cube.

findMeasure

public Measure findMeasure(java.lang.String input)
Gets the specified Measure associated with the Cube.
Parameters:
input - The name of a Measure.
Returns:
The Measure named.

findDerivedMeasure

public Measure findDerivedMeasure(java.lang.String input)
Gets the specified DerivedMeasure associated with the Cube.
Parameters:
input - The name of a DerivedMeasure.
Returns:
The Measure.

setPartitionHierarchy

public void setPartitionHierarchy(Hierarchy input)
Specifies a partition hierarchy for the Cube. If you specify a partition hierarchy but do not specify a partition level, then the analytic workspace stores all of the data for each dimension member in the hierarchy in a separate partition in the database. Use the setPartitionLevel method to restrict the data in the partition to a single level within the partition hierarchy.
Parameters:
input - The Hierarchy to use as the partition Hierarchy.

getPartitionHierarchy

public Hierarchy getPartitionHierarchy()
Gets the partition Hierarchy for the Cube.
Returns:
The partition Hierarchy.

setPartitionLevel

public void setPartitionLevel(Level input)
Specifies a partition level for the Cube. The partition level identifies a level within the partition hierarchy. The analytic workspace stores in a separate partition in the database all of the data for each dimension member in the partition level and in the levels that are children of the partition level.

For example, you could choose to partition a Cube by region (the REGION_AW Level within the SHIPMENTS_ROLLUP_AW Hierarchy of the CUSTOMER_AW Dimension). The analytic worksoace would store all of the data for each region in a single partition. It would also store in that partition all of the data for the WAREHOUSE_AW and SHIP_TO_AW levels, which are children of the REGION_AW level.

Parameters:
input - The Level to use as the partition Level.

getPartitionLevel

public Level getPartitionLevel()
Gets the partition level for the Cube.
Returns:
The partition Level.

setUseGlobalIndex

public void setUseGlobalIndex(java.lang.Boolean input)
Specifies whether to use the same composite for all of the Measure objects owned by the Cube. By default, each Measure has its own composite.

An analytic workspace uses composites to manage sparsity within a Cube. The types of composits are standard and compressed. The default is standard. Use the setSparseType method to specify the type of composite.

If one or more of the dimensions of the Cube is specified as sparse, then the analytic workspace creates a composite for the Cube. If more than one of the dimensions of the Cube is sparse, they must be contiguous in the list of dimension references for the cube.

Parameters:
input - A Boolean that contains true if you want all of the Measure objects owned by the Cube to share the same composite, or false if you do want them to share the composite.

getUseGlobalIndex

public java.lang.Boolean getUseGlobalIndex()
Gets a Boolean that indicates whether the analytic workspace uses the same composite to store the data for all of the Measure objects owned by the Cube. By default, each Measure has its own composite.
Returns:
A Boolean that contains true if all of Measure objects share the same composite or false if they do not.

readAWDefinitions

public void readAWDefinitions(AWConnection connection,
                              boolean readType)
Reads the objects owned by the Cube 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 - A boolean that is true if you want to read into memory the Cube and all of objects owned by the Cube, or false if you want to read only the Cube with its dimensions and measures, but not to read other child objects.

createForecastDefinition

public ForecastDefinition createForecastDefinition()
Creates a ForecastDefinition and adds it to the Cube.
Returns:
The new ForecastDefinition.

createAllocationDefinition

public AllocationDefinition createAllocationDefinition()
Creates an AllocationDefinition and adds it to the Cube.
Returns:
The new AllocationDefinition.

createAggregationDefinition

public AggregationDefinition createAggregationDefinition()
Creates an AggregationDefinition and adds it to the Cube.
Returns:
The new AggregationDefinition.

addSolveDefinition

public void addSolveDefinition(SolveDefinition input)
Adds the specified SolveDefinition to the Cube.
Parameters:
input - The SolveDefinition to add.

removeSolveDefinition

public void removeSolveDefinition(SolveDefinition input)
Removes the specified SolveDefinition from the Cube.
Parameters:
input - The SolveDefinition to remove.

getSolveDefinitions

public java.util.Vector getSolveDefinitions()
Gets the SolveDefinition objects owned by the Cube.
Returns:
A Vector of SolveDefinition objects.

findAggregationDefinition

public AggregationDefinition findAggregationDefinition(java.lang.String name)
Gets the specified AggregationDefinition associated with the Cube.
Parameters:
name - The name of the AggregationDefinition to find.
Returns:
The specified AggregationDefinition.

findAllocationDefinition

public AllocationDefinition findAllocationDefinition(java.lang.String name)
Gets the specified AllocationDefinition associated with the Cube.
Parameters:
name - The name of the AllocationDefinition to find.
Returns:
The specified AllocationDefinition.

findForecastDefinition

public ForecastDefinition findForecastDefinition(java.lang.String name)
Gets the specified ForecastDefinition associated with the Cube.
Parameters:
name - The name of the ForecastDefinition to find.
Returns:
The specified ForecastDefinition.

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

B14351-01

Copyright © 2003, 2005 Oracle. All rights reserved.