Skip Headers
Oracle® OLAP Java API Developer's Guide
11g Release 1 (11.1)

Part Number B28127-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

What's New

This preface describes the features of the Oracle OLAP Java API that are new in Oracle OLAP 11g Release 1 (11.1).

What's New in 11.1

Some aspects of the Oracle OLAP Java API are much the same as in previous releases, such as the ability to create queries with classes in the oracle.olapi.data.source package and to retrieve the data with classes in the oracle.olapi.data.cursor package. However, in Oracle OLAP 11g Release 1 (11.1) the metadata model of the API has changed and has many new features. The major new features are presented in the following topics.

Create Persistent Metadata Objects

The Oracle OLAP Java API now has the ability to create and maintain persistent metadata objects. The Oracle Database stores the metadata objects in the Oracle data dictionary.

To provide this new functionality, the Oracle OLAP Java API substantially revises the metadata model. The new model includes several new packages and has significant changes to some existing packages. For example, the oracle.olapi.metadata.mdm package has many new classes. It also has many new methods added to existing classes.

An application creates most metadata objects with findOrCreate methods of the owning object. For example, the following code finds the MdmStandardDimension named PRODUCTS_AWJ or creates a standard dimension with that name if it does not already exist. The mdmDBSchema object is the MdmDatabaseSchema that owns the dimension.

MdmStandardDimension prodDim =
            mdmDBSchema.findOrCreateStandardDimension("PRODUCTS_AWJ");

Some classes and methods are deprecated in the new model. For example, all of the classes in the oracle.olapi.metadata.mtm package are deprecated, and methods of other classes that use the mtm classes are also deprecated. Some mtm classes mapped transient mdm objects to relational database structures, such as columns in tables and views. Other mtm classes specified how Oracle OLAP performed operations such as aggregation or allocation of the values of custom measures. That functionality is replaced by classes in the oracle.olapi.metadata subpackages deployment, mapping, and mdm, and the oracle.olapi.syntax package. With the new classes, an application can create permanent metadata objects, map them to data sources, and specify the operations that provide values for measures.

Restrict Access to Persistent Objects

When an application commits the Transaction in which it has created top-level objects in the OLAP metadata model, such are instances of classes like AW, MdmCube, and MdmPrimaryDimension, those classes then exist in the Oracle data dictionary. They are available for use by ordinary SQL queries as well as for use by applications that use the Oracle OLAP Java API.

Because the metadata objects exist in the Oracle data dictionary, an Oracle Database DBA can restrict access to certain types of the metadata objects. An client application can set such restrictions by using the JDBC API to send SQL commands through the JDBC connection for the user session. See Oracle OLAP User's Guide for more information on object security.

Define and Build Analytic Workspaces

An application can now define, build, and maintain analytic workspaces. This new functionality is provided by classes in the oracle.olapi.metadata subpackages deployment, mapping, and mdm, and the oracle.olapi.syntax package. In 10g releases of Oracle Database, that functionality was provided by a separate API, the Oracle OLAP Analytic Workspace Java API, which is entirely deprecated in this release.

Export and Import XML Definitions

After defining a metadata object, an application can export that definition in an XML format. Analytic Workspace Manager refers to such a saved definition as a template. An application can also import the XML definition of a metadata object. The MdmMetadataProvider class has methods for exporting and importing the XML.

Use SQL Expression Syntax

With the classes in the oracle.olap.syntax package, an application can create Java objects that are based on SQL expressions, functions, operators, and conditions. The SyntaxObject class has static fromSyntax and toSyntax methods that an application can use to convert SQL expressions into Java objects or to get the SQL syntax from a Java object.

An application can create an Expression object by using the SyntaxObject.fromSyntax method or by using a constructor. For example, the following code creates a StringExpression using a fromSyntax method and another StringExpression using a constructor method. The mp object is the MdmMetadataProvider for the session.

StringExpression exp = (StringExpression)
                     SyntaxObject.fromSyntax("'Hello world from syntax.'", mp);
StringExpression strExp = new StringExpression("Hello world from constructor.");

Share a Connection Between Multiple Sessions

Another new feature is the ability to have multiple user sessions that share the same JDBC connection to the Oracle Database instance and that share the same cache of metadata objects. This ability is provided by the UserSession class in the oracle.olapi.session package.

Use Cost-Based Aggregation

Cost-based aggregation optimizes the aggregation and storage of summary data for an OLAP cube. The optimization can produce faster refresh and query operation performance.

Cost-based aggregation automatically determines the aggregate data within a cube to precompute and to store. It calculates the cost of computing the aggregate data in the cube and determines if it is better to precalculate the data and store it or to allow Oracle OLAP to calculate the data dynamically (on the fly).

An application can specify a percentage of the measure values that Oracle OLAP precomputes for a compressed cube. For a compressed and partitioned cube, an application can also specify the percentage of values to precompute for the top level of the partitioned dimension. When Oracle OLAP aggregates the measure values for the cube, it optimizes the aggregation based on the percentages specified. Methods of the AWCubeOrganization class get and set the percentage for precomputing.

Specify a Metadata Reader Mode

To support legacy applications, the OLAP Java API provides a means of specifying a metadata reader that can recognize metadata objects that were created by a previous method. The DataProvider class has a metadata reader mode. By default, the metadata reader recognizes Oracle OLAP 11g metadata. If an application that was created using a previous version of the OLAP Java API connects to an instance of Oracle Database 11g Release 1 (11.1) and creates a DataProvider, then Oracle OLAP automatically uses the appropriate metadata reader mode.

An application can specify a metadata reader mode with a property of a Properties object or with a string in the proper XML format. For information on the modes and how to specify one, see the constructor methods of the DataProvider class in the Oracle OLAP Java API Reference documentation.

An application cannot mix metadata reader modes. The 11g metadata reader does not recognize earlier forms of metadata.