Skip navigation links

Oracle® OLAP Java API Reference
11g Release 1 (11.1)

B28128-03


oracle.olapi.syntax
Class ClearCommand

java.lang.Object
  extended by oracle.olapi.syntax.SyntaxObject
      extended by oracle.olapi.syntax.BuildCommand
          extended by oracle.olapi.syntax.SimpleCommand
              extended by oracle.olapi.syntax.ClearCommand


public final class ClearCommand
extends SimpleCommand

A SimpleCommand that clears data from the measures of a cube during a build process. You use a ClearCommand in a BuildSpecification for an MdmCube to delete existing data before using a LoadCommand to load data in the measures of the cube.

You can add ClearCommand in a BuildSpecification for an MdmPrimaryDimension, which deletes all members of the dimension. Instead, however, you can use a synchronized load command, which deletes dimension members that no longer exist in the relational source tables. To get a synchronized load command, use the LoadCommand.SYNCH constant.

You get an instance of a ClearCommand by using one of static constant fields of this class. Each constant produces a ClearCommand that specifies a different extent and manner of clearing of data. You can clear detail (leaf-level) values only, aggregate values only, or all values. You can also clear the data serially or by using parallel processes. A serial clear operation uses a single process when clearing partitioned data, regardless of the parallelism setting specified by the BuildProperties object that is associated with the BuildProcess. A parallel clear operation uses multiple processes when clearing partitioned data.

For the constant fields CLEAR, CLEAR_PARALLEL, and CLEAR_SERIAL, which do not explicitly specify that the target of the CLEAR operation is the detail, aggregate, or all values, the target is determined by the refresh method specified for the build. For a description of the refresh methods, see the setRefreshMethod of BuildProperties. The refresh method affects a ClearCommand as follows.

Refresh Method Effect on ClearCommand
C Results in a CLEAR_VALUES, which deletes all values.
S Results in a CLEAR_LEAVES, which deletes detail-level values.
F or P Results in the refreshing of materialized views, which does not involve a CLEAR operation.
? Results in the effect of an F, P, C, or S, depending on the cube and the changes that have occurred since the last refresh.

Field Summary
static ClearCommand CLEAR
          Produces a ClearCommand that specifies deleting either detail values only, if the refresh method is or all values, depending on the refresh method of the build.
static ClearCommand CLEAR_AGGREGATES
          Produces a ClearCommand that specifies deleting only the aggregate values of the measures of a cube.
static ClearCommand CLEAR_AGGREGATES_PARALLEL
          Produces a ClearCommand that specifies deleting only the aggregate values of the measures of a cube using parallel processes, if possible.
static ClearCommand CLEAR_AGGREGATES_SERIAL
          Produces a ClearCommand that specifies deleting only the aggregate values of the measures of a cube using a single process.
static ClearCommand CLEAR_LEAVES
          Produces a ClearCommand that specifies deleting only the detail values of the measures of a cube.
static ClearCommand CLEAR_LEAVES_PARALLEL
          Produces a ClearCommand that specifies deleting only the detail values of the measures of a cube using parallel processes, if possible.
static ClearCommand CLEAR_LEAVES_SERIAL
          Produces a ClearCommand that specifies deleting only the detail values of the measures of a cube using a single process.
static ClearCommand CLEAR_PARALLEL
          Produces a ClearCommand that specifies using parallel processes in deleting either detail values only or all values, depending on the refresh method of the build.
static ClearCommand CLEAR_SERIAL
          Produces a ClearCommand that specifies using a single process in deleting either detail values only or all values, depending on the refresh method of the build.
static ClearCommand CLEAR_VALUES
          Produces a ClearCommand that specifies deleting all of the values of the measures of a cube.
static ClearCommand CLEAR_VALUES_PARALLEL
          Produces a ClearCommand that specifies deleting all of the values of the measures of a cube using parallel processes, if possible.
static ClearCommand CLEAR_VALUES_SERIAL
          Produces a ClearCommand that specifies deleting all of the values of the measures of a cube using a single process.

 

Method Summary
 java.lang.String getClearTarget()
          Gets a value that indicates the extent of the clearing of measure values that this ClearCommand represents, such as AGGREGATES, LEAVES, or VALUES.
 java.lang.Object visit(SyntaxObjectVisitor visitor, java.lang.Object context)
          Calls the visitClearCommand method of the SyntaxObjectVisitor and passes that method this ClearCommand and an Object.

 

Methods inherited from class oracle.olapi.syntax.SyntaxObject
equals, equals, fromSyntax, fromSyntax, fromSyntax, fromSyntax, fromSyntax, isValid, toSyntax, toSyntax, toSyntax, toSyntax, toSyntax

 

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

 

Field Detail

CLEAR

public static final ClearCommand CLEAR
Produces a ClearCommand that specifies deleting either detail values only, if the refresh method is or all values, depending on the refresh method of the build.

CLEAR_PARALLEL

public static final ClearCommand CLEAR_PARALLEL
Produces a ClearCommand that specifies using parallel processes in deleting either detail values only or all values, depending on the refresh method of the build.

CLEAR_SERIAL

public static final ClearCommand CLEAR_SERIAL
Produces a ClearCommand that specifies using a single process in deleting either detail values only or all values, depending on the refresh method of the build.

CLEAR_VALUES

public static final ClearCommand CLEAR_VALUES
Produces a ClearCommand that specifies deleting all of the values of the measures of a cube.

CLEAR_VALUES_SERIAL

public static final ClearCommand CLEAR_VALUES_SERIAL
Produces a ClearCommand that specifies deleting all of the values of the measures of a cube using a single process.

CLEAR_VALUES_PARALLEL

public static final ClearCommand CLEAR_VALUES_PARALLEL
Produces a ClearCommand that specifies deleting all of the values of the measures of a cube using parallel processes, if possible.

CLEAR_AGGREGATES

public static final ClearCommand CLEAR_AGGREGATES
Produces a ClearCommand that specifies deleting only the aggregate values of the measures of a cube.

CLEAR_AGGREGATES_PARALLEL

public static final ClearCommand CLEAR_AGGREGATES_PARALLEL
Produces a ClearCommand that specifies deleting only the aggregate values of the measures of a cube using parallel processes, if possible.

CLEAR_AGGREGATES_SERIAL

public static final ClearCommand CLEAR_AGGREGATES_SERIAL
Produces a ClearCommand that specifies deleting only the aggregate values of the measures of a cube using a single process.

CLEAR_LEAVES

public static final ClearCommand CLEAR_LEAVES
Produces a ClearCommand that specifies deleting only the detail values of the measures of a cube.

CLEAR_LEAVES_SERIAL

public static final ClearCommand CLEAR_LEAVES_SERIAL
Produces a ClearCommand that specifies deleting only the detail values of the measures of a cube using a single process.

CLEAR_LEAVES_PARALLEL

public static final ClearCommand CLEAR_LEAVES_PARALLEL
Produces a ClearCommand that specifies deleting only the detail values of the measures of a cube using parallel processes, if possible.

Method Detail

visit

public java.lang.Object visit(SyntaxObjectVisitor visitor,
                              java.lang.Object context)
Calls the visitClearCommand method of the SyntaxObjectVisitor and passes that method this ClearCommand and an Object.
Specified by:
visit in class SyntaxObject
Parameters:
visitor - A SyntaxObjectVisitor.
context - An Object.
Returns:
The Object returned by the visitClearCommand method.

getClearTarget

public java.lang.String getClearTarget()
Gets a value that indicates the extent of the clearing of measure values that this ClearCommand represents, such as AGGREGATES, LEAVES, or VALUES. For the ClearCommand objects produced by the CLEAR, CLEAR_PARALLEL, and CLEAR_SERIAL constants, this method returns an empty string.
Returns:
A String that indicates the extent of the clearing of the measure values.

Skip navigation links

Copyright © 2002, 2008, Oracle. All rights reserved.