|
Oracle® OLAP Java API Reference 10g Release 2 (10.2.0.4) B14348-04 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.olapi.data.source.DataProvider
oracle.express.olapi.data.full.ExpressDataProvider
A concrete subclass of DataProvider that creates objects
that an application uses in creating queries and retrieving data from
an Oracle Database instance.
Each ExpressDataProvider is associated
with an oracle.jdbc.OracleConnection and
an ExpressTransactionProvider.
After creating a new ExpressDataProvider, an application
must call its initialize method.
After initializing the ExpressDataProvider, the
application should call the getDefaultMetadataProvider
method of the ExpressDataProvider to get the
MetadataProvider to use.
By default, an ExpressDataProvider has the following
characteristics:
ALTER SESSION SET NLS_LANGUAGE SQL command that sets
the language of the database.
Using a constructor that takes a Properties or a
Locale object, or both, an application can create an
ExpressTransactionProvider that has different
characteristics.
The following table lists the keys and the case-sensitive values for
the properties that you can set in a Properties object
and provides a brief description of them.
The values are mutually exclusive choices.
| Key | Value | Property Description |
|---|---|---|
HierarchyValueType |
uniquelocal
|
Specifies whether to use unique or
local values for members of dimension hierarchies.
The use of Model objects requires unique dimension
hierarchy values.
For more information on unique and local values, see the Overview of
this documentation.
The
The |
MetadataReaderMode |
ALLNONE10103AWONLY
CWM2ONLY
|
Specifies the type of metadata recognized by
the MetadataProvider associated with the
ExpressDataProvider.
The
The
The
The |
UseDefaultLanguage |
YESNO
|
Specifies whether Oracle OLAP issues
an ALTER SESSION SET NLS_LANGUAGE SQL command that sets
the language of the database and whether Oracle OLAP prevents changing
the language.
This property affects only metadata and data from an analytic
workspace.
If an application wants to manage the language use, then it should
specify NO for this property.
The
The |
As an example, the following code sets properties that specify using local dimension member values and recognizing only analytic workspace metadata.
props.setProperty("HierarchyValueType", "local");
props.setProperty("MetadataReaderMode", "10103AWONLY");
For one or more queries you can override the hierarchy value type of
the ExpressDataProvider with a createCursorManager
method that takes a Properties object as an input parameter.
| Constructor Summary | |
ExpressDataProvider(oracle.jdbc.OracleConnection connection,
TransactionProvider transactionProvider)
Creates an ExpressDataProvider with the default
characteristics. |
|
ExpressDataProvider(oracle.jdbc.OracleConnection connection,
TransactionProvider transactionProvider,
java.util.Locale locale)
Creates an ExpressDataProvider that provides the
String values of an analytic workspace in the language
specified by the Locale. |
|
ExpressDataProvider(oracle.jdbc.OracleConnection connection,
TransactionProvider transactionProvider,
java.util.Locale locale,
java.util.Properties props)
Creates a new ExpressDataProvider that provides the
String values of an analytic workspace in the language
specified by the Locale and that has the
characteristics specified in the Properties
object. |
|
ExpressDataProvider(oracle.jdbc.OracleConnection connection,
TransactionProvider transactionProvider,
java.util.Properties props)
Creates a new ExpressDataProvider with the
characteristics specified in the Properties
object. |
|
| Method Summary | |
void |
close()
Closes the ExpressDataProvider and releases its
associated resources. |
SpecifiedCursorManager |
createCursorManager(CursorManagerSpecification cursorManagerSpecification,
Source[] inputSources,
java.util.Properties queryParameters)
Creates a SpecifiedCursorManager that can override the
hierarchy value type of the ExpressDataProvider. |
SpecifiedCursorManager[] |
createCursorManagers(CursorManagerSpecification[] cursorManagerSpecifications,
Source[][] inputLists)
Creates an array of SpecifiedCursorManager objects. |
CursorManager[] |
createCursorManagers(Source[] rootSources,
int[] fetchSizes,
CursorInfoSpecification[] cursorInfoSpecs,
java.util.Properties queryProperties)
Creates an array of ExpressDataCursorManager objects
that can override the hierarchy value type of the
ExpressDataProvider. |
SQLCursorManager[] |
createSQLCursorManagers(Source[] sources)
Creates a SQLCursorManager for each
Source in the sources array. |
SQLCursorManager[] |
createSQLCursorManagers(Source[] sources,
boolean createCountColumn,
java.lang.String[] generatedSQLStatements)
Creates a SQLCursorManager for each
Source in the sources array and
provides the SQL statements and a count column for each query. |
SQLCursorManager[] |
createSQLCursorManagers(Source[] sources,
java.lang.String[] generatedSQLStatements)
Creates a SQLCursorManager for each
Source in the sources array and
provides the SQL statements for each query. |
oracle.jdbc.OracleConnection |
getConnection()
Retrieves the oracle.jdbc.OracleConnection object that
represents the connection between the client application and the Oracle
Database instance. |
MetadataProvider |
getDefaultMetadataProvider()
Retrieves the MetadataProvider associated with
the connection. |
void |
initialize()
Initializes the ExpressDataProvider. |
boolean |
isOpen()
Indicates whether the connection to the Oracle Database instance is currently open. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ExpressDataProvider(oracle.jdbc.OracleConnection connection,
TransactionProvider transactionProvider)
ExpressDataProvider with the default
characteristics.
connection - An oracle.jdbc.OracleConnection.transactionProvider - An ExpressTransactionProvider.
public ExpressDataProvider(oracle.jdbc.OracleConnection connection,
TransactionProvider transactionProvider,
java.util.Locale locale)
ExpressDataProvider that provides the
String values of an analytic workspace in the language
specified by the Locale.
connection - An oracle.jdbc.OracleConnection.transactionProvider - An ExpressTransactionProvider.locale - The java.util.Locale that specifies the
language to use for an analytic workspace.
public ExpressDataProvider(oracle.jdbc.OracleConnection connection,
TransactionProvider transactionProvider,
java.util.Properties props)
ExpressDataProvider with the
characteristics specified in the Properties
object.
For a list of the properties that you can set, see the
class description.
connection - An oracle.jdbc.OracleConnection.transactionProvider - An ExpressTransactionProvider.props - A java.util.Properties object that specifies
characteristics of the ExpressDataProvider.
public ExpressDataProvider(oracle.jdbc.OracleConnection connection,
TransactionProvider transactionProvider,
java.util.Locale locale,
java.util.Properties props)
ExpressDataProvider that provides the
String values of an analytic workspace in the language
specified by the Locale and that has the
characteristics specified in the Properties
object.
For a list of the properties that you can set, see the
class description.
connection - An oracle.jdbc.OracleConnection.transactionProvider - An ExpressTransactionProvider.locale - The java.util.Locale that specifies the
language to use for an analytic workspace.props - A java.util.Properties object that specifies
characteristics of the ExpressDataProvider.| Method Detail |
public void initialize()
throws java.sql.SQLException
ExpressDataProvider.
Always call this method after creating a new
ExpressDataProvider.
initialize in class DataProviderjava.sql.SQLExceptionpublic oracle.jdbc.OracleConnection getConnection()
oracle.jdbc.OracleConnection object that
represents the connection between the client application and the Oracle
Database instance.
oracle.jdbc.OracleConnection object that represents
the connection between the client application and the Oracle Database instance.
public CursorManager[] createCursorManagers(Source[] rootSources,
int[] fetchSizes,
CursorInfoSpecification[] cursorInfoSpecs,
java.util.Properties queryProperties)
ExpressDataCursorManager objects
that can override the hierarchy value type of the
ExpressDataProvider.
The array contains one ExpressDataCursorManager for
each Source in the rootSources array.
You use the ExpressDataCursorManager objects to create
Cursor objects that retrieve the results of the queries.
The fetchSizes and cursorInfoSpecs arrays
supply a fetch size and a CursorInfoSpecification for
the ExpressDataCursorManager for the corresponding
Source in the rootSources array.
A fetch size of -1 fetches the entire result set.
With the Properties object for the
queryProperties parameter, you can specify the use of
local or unique dimension hierarchy member values for retrieving
data for a query.
The property setting must match the query.
For example, if you use local values to specify a query, then the
hierarchy value type must be set to local for a
Cursor to retrieve data.
To use local values, set the property as in the following:
queryProperties.setProperty("HierarchyValueType", "local");
To use unique values, set the property as in the following:
queryProperties.setProperty("HierarchyValueType", "unique");
For more information on unique and local values, see the Overview of this documentation.
rootSources - An array of Source objects for which
you want CursorManager objects.fetchSizes - An array of integers that specify the fetch sizes
for the Cursor objects created by the
corresponding CursorManager objects.cursorInfoSpecs - An array of CursorInfoSpecification
objects for the corresponding
CursorManager objects.queryProperties - A java.util.Properties object that
specifies the use of local or unique dimension
hierarchy member values.
CursorManager objects for the
corresponding Source objects.
public final SpecifiedCursorManager createCursorManager(CursorManagerSpecification cursorManagerSpecification,
Source[] inputSources,
java.util.Properties queryParameters)
throws CursorManagerSpecificationExpiredException,
DataProviderMismatchException,
ExpressServerException,
ObjectClosedException,
TransactionalObjectInvalidException
SpecifiedCursorManager that can override the
hierarchy value type of the ExpressDataProvider.
This method returns an instance of
ExpressSpecifiedCursorManager.
You use an ExpressSpecifiedCursorManager to create
Cursor object that retrieve the results of a query.
If the Source that you used to create
the CursorManagerSpecification has inputs, then with the
inputSources array you must specify Source
objects that can match to the inputs.
Otherwise, the inputSources array can be empty.
A Source that you include in the inputSources
array must not have any inputs itself and it must not have any
outputs.
When you create a Cursor from the
ExpressSpecifiedCursorManager,
you use CursorInput objects to specify values for the
input Source objects.
If the inputSources array is empty, then you do not have
to pass in an array of CursorInput objects when creating
a Cursor.
With the Properties object for the
queryParameters parameter, you can specify that the
ExpressSpecifiedCursorManager use local or unique dimension
hierarchy member values for retrieving data for a query.
The property setting must match the query.
For example, if you use unique values to specify a query, then the
hierarchy value type must be set to unique for a
Cursor to retrieve data.
To use local values, set the property as in the following:
queryParameters.setProperty("HierarchyValueType", "local");
To use unique values, set the property as in the following:
queryParameters.setProperty("HierarchyValueType", "unique");
For more information on unique and local values, see the Overview of this documentation.
cursorManagerSpecification - A CursorManagerSpecification
for a Source.
If the Source has inputs,
then the inputSources array
must provide Source objects
that match to the inputs.inputSources - An array of Source objects, one for each
input of the Source used to create the
CursorManagerSpecification.
If that Source does not have inputs, the
array can be empty.queryParameters - A java.util.Properties object that
specifies the use of local or unique dimension
hierarchy member values.
SpecifiedCursorManager.
CursorManagerSpecificationExpiredException
DataProviderMismatchException
ExpressServerException
ObjectClosedException
TransactionalObjectInvalidExceptionpublic final boolean isOpen()
isOpen in class DataProvidertrue when the connection is open;
false when it is not.public MetadataProvider getDefaultMetadataProvider()
MetadataProvider associated with
the connection.
MetadataProvider associated with the connection.public void close()
ExpressDataProvider and releases its
associated resources.
close in class DataProviderpublic final SQLCursorManager[] createSQLCursorManagers(Source[] sources)
SQLCursorManager for each
Source in the sources array.
All of the Source objects in the array must belong to
the same Transaction.
With a SQLCursorManager, you can obtain the SQL
statements that Oracle OLAP generates for a query.
createSQLCursorManagers in class DataProvidersources - An array of Source objects for which you
want to create SQLCursorManager objects.
SQLCursorManager for the specified
Source objects.
public final SQLCursorManager[] createSQLCursorManagers(Source[] sources,
java.lang.String[] generatedSQLStatements)
SQLCursorManager for each
Source in the sources array and
provides the SQL statements for each query.
This method replaces the elements of the
generatedSQLStatements array
with the SQL statements that the Oracle OLAP SQL generator
produces for the Source in the corresponding element
of the sources array.
All of the Source objects in the sources
array must belong to the same Transaction.
The generatedSQLStatements array must be the same size
as the sources array.
sources - An array of Source objects for which you
want SQLCursorManager objects.generatedSQLStatements - An array of String objects
that that this method replaces with the
SQL statements generated for the corresponding
objects in the sources
array.
SQLCursorManager objects.
public final SQLCursorManager[] createSQLCursorManagers(Source[] sources,
boolean createCountColumn,
java.lang.String[] generatedSQLStatements)
SQLCursorManager for each
Source in the sources array and
provides the SQL statements and a count column for each query.
This method replaces the elements of the
generatedSQLStatements array
with the count column and the SQL statements that the Oracle OLAP
SQL generator produces for the Source in the
corresponding element of the sources array.
All of the Source objects in the sources
array must belong to the same Transaction.
The generatedSQLStatements array must be the same size
as the sources array.
sources - An array of Source objects for which you
want SQLCursorManager objects.createCountColumn - A boolean that specifies whether to include a
count column in the generated SQL.generatedSQLStatements - An array of String objects
that that this method replaces with the
the count column and SQL statements
generated for the corresponding objects
in the sources array.
SQLCursorManager objects.
public final SpecifiedCursorManager[] createCursorManagers(CursorManagerSpecification[] cursorManagerSpecifications,
Source[][] inputLists)
throws DataProviderMismatchException,
ExpressServerException,
ObjectClosedException,
TransactionalObjectInvalidException
SpecifiedCursorManager objects.
The array contains one SpecifiedCursorManager for
each CursorManagerSpecification in the
cursorManagerSpecifications array.
The inputLists array contains the arrays of input
Source objects required by the corresponding
CursorManagerSpecification objects.
cursorManagerSpecifications - An array of
CursorManagerSpecification
objects for which you want
CursorManager objects.inputLists - An array of arrays of Source objects that
are the input Source objects required by
the CursorManagerSpecification objects.
SpecifiedCursorManager objects for the
CursorManagerSpecification objects.
DataProviderMismatchException
ExpressServerException
ObjectClosedException
TransactionalObjectInvalidExceptionDataProvider.createCursorManager(CursorManagerSpecification
cursorManagerSpecification,
Source[] inputSources)
|
Oracle® OLAP Java API Reference 10g Release 2 (10.2.0.4) B14348-04 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||