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

B14351-01

oracle.AWXML
Class AllocationDefinition

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

public class AllocationDefinition
extends SolveDefinition

A SolveDefinition that specifies allocation instructions for an AllocationSolve. For a diagram of AllocationDefinition associations, see AllocationDefinition Class Associations.

An AllocationDefinition is owned by a Cube. An AllocationDefinition owns an ordered list of Allocation objects, each of which specifies an allocation statement for a dimension hierarchy. Oracle OLAP performs the calculations in the order in which they appear in the calculation list. AllocationHierarchySpecification, which extends Allocation, specifies the hierarchy. An Allocation also owns an AllocationOperator, and it can own one or more AllocationArgument objects.

An AllocationDefinition is implemented in the OLAP DML as an aggmap object of type ALLOCMAP. This type of aggmap specifies the rules for allocating hierarchically dimensioned data to the cells of a target. An Allocation is implemented in the OLAP DML as a RELATION statement in the aggmap.

The AllocationDefinition class includes methods for specifying CHILDLOCK, DEADLOCK, and SOURCEVAL statements in the allocation specification. The CHILDLOCK statement specifies whether to detect locks on child elements in a hierarchy when the parent elements are also locked, a condition that can cause incorrect allocation results. A DEADLOCK statement specifies whether to continue an allocation when a targeted cell is locked or has a value of NA. A SOURCEVAL statement specifies the value to assign to source cells after the source values have been allocated to a target.

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

See Also:
AllocationSolve

Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

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

Method Summary
void addAllocation(Allocation input)
Adds the specified Allocation to the AllocationDefinition, and appends it to the end of the calculation list.
void addAllocationAfter(Allocation input, BaseObject reference)
Adds the specified Allocation to the AllocationDefinition, and inserts it after the referenced Allocation in the calculation list.
void addAllocationBefore(Allocation input, BaseObject reference)
Adds the specified Allocation to the AllocationDefinition, and inserts it before the referenced Allocation in the calculation list.
void addAllocationFirst(Allocation input)
Adds the specified Allocation to the AllocationDefinition, and puts it at the beginning of the calculation list.
java.lang.String Create(AWConnection connection)
Creates the AllocationDefinition in the current analytic workspace of the specified database connection.
AllocationHierarchySpecification createAllocateHierarchySpecification()
Creates an AllocationHierarchySpecification for the AllocationDefinition, and appends it to the end of the calculation list.
AllocationHierarchySpecification createAllocateHierarchySpecificationAfter(Allocation input)
Creates an AllocationHierarchySpecification for the AllocationDefinition, and inserts it after the specified Allocation in the calculation list.
AllocationHierarchySpecification createAllocateHierarchySpecificationBefore(Allocation input)
Creates an AllocationHierarchySpecification for the AllocationDefinition, and inserts it before the specified Allocation in the calculation list.
AllocationHierarchySpecification createAllocateHierarchySpecificationFirst()
Creates an AllocationHierarchySpecification and inserts it at the beginning of the calculation list.
java.lang.String Delete(AWConnection connection)
Deletes the AllocationDefinition in the current analytic workspace of the specified database connection.
java.util.Vector getAllocations()
Gets the ordered list of Allocation objects in the AllocationDefinition.
java.lang.String getChildLock()
Gets the value of the CHILDLOCK statement in the allocation specification.
java.lang.String getDeadLock()
Gets the value of the DEADLOCK statement in the allocation specification.
java.lang.String getSourceVal()
Gets the value of the SOURCEVAL statement in the allocation specification.
void readAWDefinitions(AWConnection connection, boolean readType)
Reads the objects owned by the AllocationDefinition into memory, making them available for processing within the current analytic workspace of the specified database connection.
void removeAllocation(Allocation input)
Removes an Allocation from the AllocationDefinition.
void setChildLock(java.lang.String input)
Specifies the CHILDLOCK statement in the allocation specification.
void setDeadLock(java.lang.String input)
Specifies the value of the DEADLOCK statement in the allocation specification.
void setSourceVal(java.lang.String input)
Specifies the value of the SOURCEVAL statement in the allocation specification.
java.lang.String WriteToXML()
Gets an XML representation of the AllocationDefinition.

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

AllocationDefinition

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

Method Detail

getSourceVal

public java.lang.String getSourceVal()
Gets the value of the SOURCEVAL statement in the allocation specification. The SOURCEVAL statement determines the value that the OLAP DML ALLOCATE command assigns to a source cell after successfully allocating its original value to a target. The value of the SOURCEVAL statement can be CURRENT, ZERO, or NA.
Returns:
A String that contains the value of the SOURCEVAL statement.

setSourceVal

public void setSourceVal(java.lang.String input)
Specifies the value of the SOURCEVAL statement in the allocation specification. The SOURCEVAL statement determines the data value that the OLAP DML ALLOCATE command assigns to a source cell after successfully allocating its original value to a target.

The SOURCEVAL statement can have one of the following values:

Parameters:
input - The value that you want the SOURCEVAL statement to have.

getDeadLock

public java.lang.String getDeadLock()
Gets the value of the DEADLOCK statement in the allocation specification. The DEADLOCK statement determines the behavior of the OLAP DML ALLOCATE command when it cannot distribute a source value to a target cell because the target cell is either locked or has a basis value of NA. The value of the DEADLOCK statement can be SKIP or NOSKIP.
Returns:
A String that contains the value of the DEADLOCK statement.

setDeadLock

public void setDeadLock(java.lang.String input)
Specifies the value of the DEADLOCK statement in the allocation specification. The DEADLOCK statement determines the behavior of the OLAP DML ALLOCATE command when it cannot distribute a source value to a target cell because the target cell is either locked or has a basis value of NA.

DEADLOCK can have one of the following values:

Parameters:
input - The value that you want the DEADLOCK statement to have.

getChildLock

public java.lang.String getChildLock()
Gets the value of the CHILDLOCK statement in the allocation specification. The CHILDLOCK statement specifies the behavior of the OLAP DML ALLOCATE command when both a parent and a child within a hierarchy are locked. Locking both a parent and one of its children can cause incorrect allocation results. The value of the CHILDLOCK statement can be DETECT or NODETECT.
Returns:
A String that contains the value of the CHILDLOCK statement.

setChildLock

public void setChildLock(java.lang.String input)
Specifies the CHILDLOCK statement in the allocation specification.

The CHILDLOCK statement specifies the behavior of the OLAP DML ALLOCATE command when both a parent and a child within a hierarchy are locked. Locking both a parent and one of its children can cause incorrect allocation results.

The value of the CHILDLOCK statement can be one of the following:

Parameters:
input - The value that you want the CHILDLOCK statement to have.

WriteToXML

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

addAllocation

public void addAllocation(Allocation input)
Adds the specified Allocation to the AllocationDefinition, and appends it to the end of the calculation list.
Parameters:
input - The Allocation to add.

addAllocationAfter

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

addAllocationBefore

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

addAllocationFirst

public void addAllocationFirst(Allocation input)
Adds the specified Allocation to the AllocationDefinition, and puts it at the beginning of the calculation list.
Parameters:
input - The Allocation to add.

removeAllocation

public void removeAllocation(Allocation input)
Removes an Allocation from the AllocationDefinition.
Parameters:
input - The Allocation to remove.

getAllocations

public java.util.Vector getAllocations()
Gets the ordered list of Allocation objects in the AllocationDefinition.
Returns:
A Vector of Allocation objects.

createAllocateHierarchySpecification

public AllocationHierarchySpecification createAllocateHierarchySpecification()
Creates an AllocationHierarchySpecification for the AllocationDefinition, and appends it to the end of the calculation list.
Returns:
The new AllocationHierarchySpecification.

createAllocateHierarchySpecificationAfter

public AllocationHierarchySpecification createAllocateHierarchySpecificationAfter(Allocation input)
Creates an AllocationHierarchySpecification for the AllocationDefinition, and inserts it after the specified Allocation in the calculation list.
Parameters:
input - The referenced Allocation.
Returns:
The new AllocationHierarchySpecification.

createAllocateHierarchySpecificationBefore

public AllocationHierarchySpecification createAllocateHierarchySpecificationBefore(Allocation input)
Creates an AllocationHierarchySpecification for the AllocationDefinition, and inserts it before the specified Allocation in the calculation list.
Parameters:
input - The referenced Allocation.
Returns:
The new AllocationHierarchySpecification.

createAllocateHierarchySpecificationFirst

public AllocationHierarchySpecification createAllocateHierarchySpecificationFirst()
Creates an AllocationHierarchySpecification and inserts it at the beginning of the calculation list.
Returns:
The new AllocationHierarchySpecification.

Create

public java.lang.String Create(AWConnection connection)
Creates the AllocationDefinition 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 AllocationDefinition 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 AllocationDefinition 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 AllocationSpecification and all its child objects. Specify False to read the AllocationSpecification 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.