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


Oracle® OLAP Java API Reference.


Packages Contains classes that support processing in Oracle OLAP. Except for the exception classes, the interfaces and classes in this package are deprecated; use the classes in the oracle.olapi.metadata.mdm package instead of the classes in this package. Contains an implementation of the SpecifiedCursorManager interface, an extension of the DataProvider class, and ExpressSQLCursorManager, a class that returns the SQL SELECT statement specified by its Source objects. Contains an implementation of the oracle.olapi.transaction.TransactionProvider interface for Oracle OLAP. Provides support for the internationalization of the package. Provides support for the internationalization of the package. Contains classes that support the execution of OLAP DML commands in Oracle OLAP.
oracle.olapi Contains an interface, an exception, and a class that are of general use in the OLAP API. Contains interfaces and classes for retrieving and accessing the result set of a query. Contains classes and interfaces that provide, represent, and define the objects that specify queries.
oracle.olapi.metadata Contains interfaces and classes that represent metadata for a data store and that Oracle OLAP uses to make metadata objects available.
oracle.olapi.metadata.mdm Contains classes that represent data supporting the multidimensional model (MDM) for metadata.
oracle.olapi.metadata.mtm Contains classes that map OLAP metadata objects to columns of relational tables and views and that specify aspects of the operations of those objects.
oracle.olapi.metadata.resource Provides support for the internationalization of the oracle.olapi.metadata package.
oracle.olapi.transaction Contains interfaces that are not implemented by OLAP API application developers and exception classes that an application might encounter.
oracle.olapi.transaction.metadataStateManager Contains an interface to implement when you use Template objects and a class that is not used by OLAP API application developers.


Oracle® OLAP Java API Reference.

November 19, 2007

This is the reference documentation for the Oracle OLAP Java API, the Java application programming interface for Oracle OLAP.

Intended Audience

This documentation is intended for Java programmers who are responsible for creating applications that perform online analytical processing. It assumes that you are already familiar with Java, relational database management systems, data warehousing, and online analytical processing (OLAP) concepts.

Before You Begin

To use the Oracle OLAP Java API, you must have access to an Oracle Database instance that has the OLAP option installed. An Oracle Database with the OLAP option provides the Oracle OLAP Java API classes, and other required classes, in JAR files. Before you can compile an OLAP Java API program, you must get the required JAR files and add them to your Java development environment.

The following table lists the required JAR files and their location under the ORACLE_HOME directory in an Oracle Database installation. The awxml.jar file is in the list because it is required to compile the example program that defines and builds the analytic workspace that is used by all of the other example programs.

File Name Location
  awxml.jar   /olap/api/lib
  olap_api.jar   /olap/api/lib
  ojdbc14.jar   /jdbc/lib
  xmlparserv2.jar   /lib

You must use the JDBC files included in your Oracle Database installation and not those from another Oracle product or from another vendor. For information on Oracle JDBC, see Oracle JDBC Developer's Guide and Reference.

For information on installing an Oracle Database with the OLAP option, see your Oracle Database installation documentation. For more information on administering the OLAP option, see Oracle OLAP Application Developer's Guide.

JDK Version Required

This version of the Oracle OLAP Java API requires JDK 1.4.

New Features

For a description of the new features of the Oracle OLAP Java API for this release, see New Features.

Examples of Using the OLAP Java API

The examples of OLAP Java API code in this documentation use OLAP metadata that is created by the BuildAWExample, which is a Java program that uses the Oracle OLAP Analytic Workspace Java API to build an analytic workspace. The program maps the metadata objects of the analytic workspace to columns in the tables of the Global sample relational schema.

You can download the source code for the BuildAWExample program and the complete source code for example programs that use the OLAP Java API from the Documentation section of the Oracle Technology Network Web site at

To download the examples, in the Documentation section see Example Programs for Documentation. For descriptions of the example programs, see Example Oracle OLAP Java API Programs.

From the same OTN Web site, you can download a zip file that contains the SQL script and other files that create the Global schema. To download the appropriate version of the sample schema for the examples in this release, in the Documentation section see Sample Schemas for Documentation. For more information on the Global schema, see Oracle OLAP Application Developer's Guide.

Unique and Local Values in the OLAP Java API

The members of an Oracle OLAP dimension are usually organized into one or more hierarchies. Some hierarchies have parent-child relationships based on levels and some have those relationships based on values. In the OLAP Java API a dimension always has at least one hierarchy dimension object and that hierarchy object has at least one level object. Even a nonhierarchical dimension is represented by a hierarchy dimension object with one level object.

The OLAP Java API uses a three-part format to specify the hierarchy, the level, and the value of a dimension member, and thereby identify a unique value. The first part of a unique value is the name of the hierarchy object, the second part is the name of the level object, and the third part is the value of the member in the level. The parts of the unique value are separated by a value separation string, which by default is double colons (::). The following is an example of unique value in the YEAR level of the CALENDAR hierarchy of the TIME dimension:


The third part of a unique value is the local value. In the preceding example, the local value is 4, which is the identifier for the year 2001 in the Global schema. The OLAP Java API has classes and methods that you can use to get the local values of dimension members. See the descriptions of the MdmPrimaryDimension and MdmDimensionMemberInfo classes for more information about unique and local values.

An application can specify that Oracle OLAP use unique or local dimension hierarchy values by setting the HierarchyValueType property in a java.util.Properties object and using the Properties object to construct an ExpressDataProvider. The use of Model objects requires unique hierarchy values.

An application can also specify the use of unique or local hierarchy values in the context of a query by setting the HierarchyValueType property and passing the Properties object to a createCursorManager method of an ExpressDataProvider. The selection of dimension members in the query must match the setting of the property. For a complex query, using unique dimension hierarchy values generally provides faster performance when Oracle OLAP fetches the data.

Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For additional information, visit the Oracle Accessibility Program Web site at

Accessibility of Code Examples in Documentation

Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation

This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

Related Documentation

The following documentation is helpful when using Oracle OLAP.

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


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