|
Oracle® OLAP Java API Reference 11g Release 2 (11.2) E10794-06 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.olapi.data.source.DataProvider
public class DataProvider
Creates user sessions for a connection to Oracle OLAP and creates objects that an application uses in getting metadata objects, in specifying queries, and in retrieving data from a data store. A DataProvider
is associated with a TransactionProvider
and one or more UserSession
objects.
The DataProvider
class includes methods that do the following:
UserSession
associated with a oracle.jdbc.OracleConnectiown
.MdmMetadataProvider
to use to get MdmObject
metadata objects.Source
objects that an application uses in producing a Source
that defines a query.CursorManager
objects that an application uses in creating Cursor
objects for retrieving the data specified by a query.CustomModel
objects, which are Model
objects that an application can explicitly create.FundamentalDataProvider
, which provides objects that represent the OLAP Java API data types that an application can use in defining a query.TransactionProvider
, which provides Transaction
objects. Every Source
is associated with a specific Transaction
. After creating a new DataProvider
, an application must call a createSession
method of the DataProvider
. After specifying an initial UserSession
, the application should call the getMdmMetadataProvider
method of the DataProvider
to get the MdmMetadataProvider
to use.
A DataProvider
can create from one to many UserSession
objects, each of which has a different connection to the Oracle Database instance. Each UserSession
has access to a shared set of metadata objects. An application can create local metadata objects for an individual UserSession
. The management of the UserSession
objects is the responsibility of the application.
For the createList
methods, the values of the elements
array must be unique. The array cannot contain duplicate values.
A DataProvider
has settings that determine certain characteristics of the DataProvider
, By default, a DataProvider
has the following settings:
The DataProvider
class has constructors that take a Locale
object, or a Locale
and either a Properties
object or an XML String
that specifies settings for the DataProvider
. For a table of the property keys or setting names and the case-sensitive values for the settings, and for brief descriptions of them, see DataProvider Settings.
Constructor Summary | |
---|---|
DataProvider() Creates a DataProvider with the default Locale and the default settings. |
|
DataProvider(java.util.Locale defaultLocale) Creates a DataProvider using the specified Locale and the default settings. |
|
DataProvider(java.util.Locale defaultLocale, java.util.Properties defaultProperties) Creates a DataProvider using the specified Locale and settings. |
|
DataProvider(java.util.Locale defaultLocale, java.lang.String defaultSettings) Creates a DataProvider using the specified Locale and settings. |
Method Summary | |
---|---|
void |
close() Closes the DataProvider and releases any associated resources. |
BooleanSource |
createConstantSource(boolean element) Creates a BooleanSource that has only one element, which has the specified boolean value. |
DateSource |
createConstantSource(java.util.Date element) Creates a DateSource that has only one element, which has the specified Date value. |
NumberSource |
createConstantSource(double element) Creates a NumberSource that has only one element, which has the specified double value. |
NumberSource |
createConstantSource(float element) Creates a NumberSource that has only one element, which has the specified float value. |
NumberSource |
createConstantSource(int element) Creates a NumberSource that has only one element, which has the specified int value. |
NumberSource |
createConstantSource(short element) Creates a NumberSource that has only one element, which has the specified short value. |
Source |
createConstantSource(Source element) Creates a Source that has only one element, which has the specified Source value. |
StringSource |
createConstantSource(java.lang.String element) Creates a StringSource that has only one element, which has the specified String value. |
CursorInfoSpecification |
createCursorInfoSpecification(Source rootSource) Creates a CursorInfoSpecification for the specified Source . |
CursorManager |
createCursorManager(Source rootSource) Creates a CursorManager for the specified Source . |
CursorManager |
createCursorManager(Source rootSource, int fetchSize, CursorInfoSpecification cursorInfoSpec) Creates a CursorManager object for the specified Source with the specified CursorInfoSpecification and fetch size. |
CursorManager[] |
createCursorManagers(Source[] rootSources) Creates an array of CursorManager objects, one for each of the corresponding Source objects in the rootSources array. |
CursorManager[] |
createCursorManagers(Source[] rootSource, int[] fetchSize, CursorInfoSpecification[] cursorInfoSpec) Creates an array of CursorManager objects with the specified CursorInfoSpecification objects and fetch sizes. |
CursorManager[] |
createCursorManagers(Source[] rootSources, int[] fetchSizes, CursorInfoSpecification[] cursorInfoSpecs, java.util.Properties queryProperties) Creates an array of CursorManager objects that can override the local or unique hierarchy value type setting of the DataProvider . |
CursorManager[] |
createCursorManagers(Source[] rootSources, int[] fetchSizes, CursorInfoSpecification[] cursorInfoSpecs, java.lang.String querySettings) Creates an array of CursorManager objects that can override the local or unique hierarchy value type of the DataProvider . |
BooleanSource |
createListSource(boolean[] elements) Creates a BooleanSource with elements that have the specified boolean values. |
DateSource |
createListSource(java.util.Date[] elements) Creates a DateSource with elements that have the specified Date values. |
NumberSource |
createListSource(double[] elements) Creates a NumberSource with elements that have the specified double values. |
NumberSource |
createListSource(float[] elements) Creates a NumberSource with elements that have the specified float values. |
NumberSource |
createListSource(int[] elements) Creates a NumberSource with elements that have the specified int values. |
Source |
createListSource(java.lang.Object[][] tuples) Creates a Source that has as element values the arrays in the tuples array. |
NumberSource |
createListSource(short[] elements) Creates a NumberSource with elements that have the specified short values. |
Source |
createListSource(Source[] elements) Creates a Source with elements that have the specified Source objects as values. |
StringSource |
createListSource(java.lang.String[] elements) Creates a StringSource with elements that have the specified String values. |
CustomModel |
createModel(Source input) Creates a CustomModel with the specified input and a data type of Number. |
CustomModel |
createModel(Source[] inputs) Creates a CustomModel with the specified inputs and a data type of Number. |
CustomModel |
createModel(Source[] inputs, Source datatype) Creates a CustomModel with the specified inputs and data type. |
CustomModel |
createModel(Source[] inputs, Source datatype, Model[] parentModels) Creates a CustomModel with the specified inputs, data type, and parent models. |
CustomModel |
createModel(Source[] inputs, Source datatype, Source[] outputs) Creates a CustomModel with the specified inputs, data type, and outputs. |
CustomModel |
createModel(Source[] inputs, Source datatype, Source[] outputs, Model[] parentModels) Creates a CustomModel with the specified inputs, data type, outputs, and parent models. |
CustomModel |
createModel(Source input, Source datatype) Creates a CustomModel with the specified input and data type. |
BooleanSource |
createParameterizedSource(BooleanParameter param) Deprecated. As of Oracle 11g Release 1 (11.1); replaced by createSource method of a Parameter . |
NumberSource |
createRangeSource(int bottom, int top) Creates a NumberSource with elements that have consecutive int values that range from the specified lowest value to the specified highest value. |
NumberSource |
createRangeSource(int bottom, NumberSource top) Creates a NumberSource with elements that have consecutive int values that range from the specified lowest value to the specified highest value. |
NumberSource |
createRangeSource(NumberSource bottom, int top) Creates a NumberSource with elements that have consecutive int values that range from the specified lowest value to the specified highest value. |
NumberSource |
createRangeSource(NumberSource bottom, NumberSource top) Creates a NumberSource with elements that have consecutive int values that range from the specified lowest value to the specified highest value. |
UserSession |
createSession(oracle.jdbc.OracleConnection newConnection) Creates a new UserSession that shares the DataProvider but that has a different OracleConnection . |
UserSession |
createSession(oracle.jdbc.OracleConnection newConnection, java.lang.String settings) Creates a new UserSession that shares the DataProvider but that has a different OracleConnection and has the specified settings. |
UserSession |
createSession(oracle.jdbc.OracleConnection newConnection, java.lang.String settings, java.util.Locale locale) Creates a new UserSession that shares the DataProvider but that has a different OracleConnection and has the specified settings, and language. |
SQLCursorManager |
createSQLCursorManager(Source source) Creates a SQLCursorManager for the specified Source . |
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. |
void |
executeBuild(BuildProcess buildProcess, BuildProperties props) Executes the commands of a BuildProcess that has the specified properties. |
void |
executeBuild(BuildProcess buildProcess, BuildProperties props, BuildResult buildResult) Executes the commands of a BuildProcess that has the specified properties; the build process generates an identification number for the build and stores it in the BuildResult . |
void |
executeBuild(BuildProcess buildProcess, int parallelism) Executes the commands of a BuildProcess using the specified number of parallel processes. |
void |
executeBuild(BuildProcess buildProcess, int parallelism, BuildResult buildResult) Executes the commands of a BuildProcess using the specified number of parallel processes; the build process generates an identification number for the build and stores it in the BuildResult . |
void |
executeBuild(MdmNamedBuildProcess namedBuildProcess, int parallelism) Executes the commands of an MdmNamedBuildProcess using the specified number of parallel processes. |
void |
executeBuild(MdmNamedBuildProcess namedBuildProcess, int parallelism, BuildResult buildResult) Executes the commands of an MdmNamedBuildProcess using the specified number of parallel processes; the build process generates an identification number for the build and stores it in the BuildResult . |
oracle.jdbc.OracleConnection |
getConnection() Gets the oracle.jdbc.OracleConnectiown object that represents the connection between a client application and Oracle OLAP in the Oracle Database instance. |
MetadataProvider |
getDefaultMetadataProvider() Gets the default MetadataProvider that is associated with this DataProvider ; this method provides backward compatibility with previous versions of the Oracle OLAP Java API. |
UserSession |
getDefaultUserSession() Gets the default UserSession associated with this DataProvider . |
Source |
getEmptySource() Gets the empty Source , which does not have any elements. |
FundamentalMetadataProvider |
getFundamentalMetadataProvider() Gets the FundamentalMetadataProvider for this DataProvider . |
MdmMetadataProvider |
getMdmMetadataProvider() Gets the MdmMetadataProvider that is associated with this DataProvider . |
Transaction |
getRootTransaction(oracle.jdbc.OracleConnection connection) Gets the root Transaction for the specified OracleConnection . |
TransactionProvider |
getTransactionProvider() Gets the TransactionProvider associated with this DataProvider . |
Source |
getVoidSource() Gets the void Source object, which has a single element that has null as the value. |
boolean |
isOpen() Indicates whether the connection to the Oracle Database instance is currently open. |
void |
reserveBuildID(BuildResult buildResult) Reserves an identification number for the build and stores it in the BuildResult . |
void |
setDefaultUserSession(UserSession defaultSession) Specifies the UserSession to associate with this DataProvider if a UserSession is not already associated with the active Transaction . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataProvider()
DataProvider
with the default Locale
and the default settings.public DataProvider(java.util.Locale defaultLocale)
DataProvider
using the specified Locale
and the default settings.
defaultLocale
- The Locale
to use as the default.public DataProvider(java.util.Locale defaultLocale, java.lang.String defaultSettings) throws org.xml.sax.SAXException
DataProvider
using the specified Locale
and settings. For the settings that you can specify, see DataProvider Settings.
The following is an example of creating a DataProvider
and specifying settings with a String
in XML format. The settings specify using local dimension member values and recognizing only 11g metadata objects.
String settings = "<olapsettings>
<setting name = 'HierarchyValueType' value = 'local' />
<setting name = 'MetadataReaderMode' value = '11_ONLY' />
</olapsettings>
";
DataProvider dp = new DataProvider(null, settings);
defaultLocale
- The Locale
to use as the default for UserSession
objects created by this DataProvider
.defaultSettings
- A String
that contains an XML representation of the settings to use as the default values for UserSession
objects created by this DataProvider
.org.xml.sax.SAXException
- Indicates a problem with the XML in the defaultSettings
string.public DataProvider(java.util.Locale defaultLocale, java.util.Properties defaultProperties)
DataProvider
using the specified Locale
and settings. For the settings that you can specify, see DataProvider Settings.
The following is an example of creating a DataProvider
and specifying settings with a Properties
object. The settings specify using local dimension member values and recognizing only 10g analytic workspace metadata.
Properties props = new Properties(); props.setProperty("HierarchyValueType", "local"); props.setProperty("MetadataReaderMode", "10103ONLY"); DataProvider dp = new DataProvider(null, props);
defaultLocale
- The Locale
to use as the default.defaultProperties
- A Properties
object that contains settings to use as the default values.Method Detail |
---|
public final NumberSource createConstantSource(double element)
NumberSource
that has only one element, which has the specified double
value.element
- A double
to be the value of the new NumberSource
.NumberSource
that has the specified double
value.public final NumberSource createConstantSource(float element)
NumberSource
that has only one element, which has the specified float
value.element
- A float
to be the value of the new NumberSource
.NumberSource
that has the specified float
value.public final NumberSource createConstantSource(int element)
NumberSource
that has only one element, which has the specified int
value.element
- An int
to be the value of the new NumberSource
.NumberSource
that has the specified int
value.public final StringSource createConstantSource(java.lang.String element)
StringSource
that has only one element, which has the specified String
value.element
- A String
to be the value of the new StringSource
.StringSource
that has the specified String
value.public final DateSource createConstantSource(java.util.Date element)
DateSource
that has only one element, which has the specified Date
value.element
- A Date
to be the value of the new DateSource
.DateSource
that has the specified Date
value.public final Source createConstantSource(Source element)
Source
that has only one element, which has the specified Source
value.element
- A Source
to be the value of the new Source
.Source
that has an element that has the specified Source
as the value.public final NumberSource createConstantSource(short element)
NumberSource
that has only one element, which has the specified short
value.element
- A short
to be the value of the new NumberSource
.NumberSource
that has the specified short
value.public final BooleanSource createConstantSource(boolean element)
BooleanSource
that has only one element, which has the specified boolean
value.element
- A boolean
to be the value of the new BooleanSource
.BooleanSource
that has the specified boolean
value.public final CursorManager createCursorManager(Source rootSource)
CursorManager
for the specified Source
.rootSource
- The Source
for the new CursorManager
.CursorManager
for the specified Source
.public final CursorManager[] createCursorManagers(Source[] rootSources)
CursorManager
objects, one for each of the corresponding Source
objects in the rootSources
array.rootSources
- The Source
objects for the CursorManager
objects.CursorManager
objects, one for each Source
.public final CursorManager createCursorManager(Source rootSource, int fetchSize, CursorInfoSpecification cursorInfoSpec)
CursorManager
object for the specified Source
with the specified CursorInfoSpecification
and fetch size. A fetch size of -1 specifies fetching the entire result set.rootSource
- The Source
for the new CursorManager
.fetchSize
- An integer that specifies the fetch size for the Cursor
objects created by the CursorManager
.cursorInfoSpec
- A CursorInfoSpecification
for the CursorManager
.CursorManager
for the Source
.public CursorManager[] createCursorManagers(Source[] rootSource, int[] fetchSize, CursorInfoSpecification[] cursorInfoSpec)
CursorManager
objects with the specified CursorInfoSpecification
objects and fetch sizes. The array contains one CursorManager
for each Source
in the rootSource
array. The fetchSize
and cursorInfoSpec
arrays supply a fetch size and a CursorInfoSpecification
for the CursorManager
for the corresponding Source
in the rootSource
array. A fetch size of -1 specifies fetching the entire result set.rootSource
- An array of Source
objects for the CursorManager
objects.fetchSize
- An array of integers that specify the fetch sizes for the Cursor
objects created by the corresponding CursorManager
objects.cursorInfoSpec
- An array of CursorInfoSpecification
objects for the corresponding CursorManager
objects.CursorManager
objects for the corresponding Source
objects.public void reserveBuildID(BuildResult buildResult)
BuildResult
.buildResult
- A BuildResult
to contain an identification number that you can use to identify a build.public final void executeBuild(BuildProcess buildProcess, BuildProperties props)
BuildProcess
that has the specified properties.buildProcess
- A BuildProcess
that contains the build commands to execute.props
- A BuildProperties
that specifies properties for the build.public void executeBuild(BuildProcess buildProcess, BuildProperties props, BuildResult buildResult)
BuildProcess
that has the specified properties; the build process generates an identification number for the build and stores it in the BuildResult
.buildProcess
- A BuildProcess
that contains the build commands to execute.props
- A BuildProperties
that specifies properties for the build.buildResult
- A BuildResult
to contain an identification number that is generated by the build.public void executeBuild(BuildProcess buildProcess, int parallelism, BuildResult buildResult)
BuildProcess
using the specified number of parallel processes; the build process generates an identification number for the build and stores it in the BuildResult
.buildProcess
- A BuildProcess
that contains the build commands to execute.parallelism
- An integer that specifies the number of processes to allocate for parallel execution of the commands. The value can be 0 (zero) or more.buildResult
- A BuildResult
to contain an identification number that is generated by the build.public void executeBuild(BuildProcess buildProcess, int parallelism)
BuildProcess
using the specified number of parallel processes.buildProcess
- A BuildProcess
that contains the build commands to execute.parallelism
- An integer that specifies the number of processes to allocate for parallel execution of the commands. The value can be 0 (zero) or more.public void executeBuild(MdmNamedBuildProcess namedBuildProcess, int parallelism, BuildResult buildResult)
MdmNamedBuildProcess
using the specified number of parallel processes; the build process generates an identification number for the build and stores it in the BuildResult
.namedBuildProcess
- An MdmNamedBuildProcess
with the build commands to execute.parallelism
- An integer that specifies the number of processes to allocate for parallel execution of the commands. The value can be 0 (zero) or more.buildResult
- A BuildResult
to contain an identification number that is generated by the build.public void executeBuild(MdmNamedBuildProcess namedBuildProcess, int parallelism)
MdmNamedBuildProcess
using the specified number of parallel processes.namedBuildProcess
- The MdmNamedBuildProcess
with the commands to execute.parallelism
- An integer that specifies the number of processes to allocate for parallel execution of the commands. The value can be 0 (zero) or more.public final CursorInfoSpecification createCursorInfoSpecification(Source rootSource) throws TransactionalObjectInvalidException
CursorInfoSpecification
for the specified Source
.rootSource
- The Source
for the CursorInfoSpecification
.CursorInfoSpecification
for the specified Source
.TransactionalObjectInvalidException
- Indicates that the Source
is not valid in the current Transaction
.public final NumberSource createListSource(double[] elements)
NumberSource
with elements that have the specified double
values.elements
- An array of double
values.NumberSource
with elements that have the specified double
values.public final NumberSource createListSource(float[] elements)
NumberSource
with elements that have the specified float
values.elements
- An array of float
values.NumberSource
with elements that have the specified float
values.public final NumberSource createListSource(int[] elements)
NumberSource
with elements that have the specified int
values.elements
- An array of int
values.NumberSource
with elements that have the specified int
values.public final StringSource createListSource(java.lang.String[] elements)
StringSource
with elements that have the specified String
values.elements
- An array of String
values.StringSource
with elements that have the specified String
values.public final DateSource createListSource(java.util.Date[] elements)
DateSource
with elements that have the specified Date
values.elements
- An array of Date
values.DateSource
with elements that have the specified Date
values.public final Source createListSource(Source[] elements)
Source
with elements that have the specified Source
objects as values.elements
- An array of Source
objects.Source
with elements that have the specified Source
objects as values.public final NumberSource createListSource(short[] elements)
NumberSource
with elements that have the specified short
values.elements
- An array of short
values.NumberSource
with elements that have the specified short
values.public final BooleanSource createListSource(boolean[] elements)
BooleanSource
with elements that have the specified boolean
values.elements
- An array of boolean
values.BooleanSource
with elements that have the specified boolean
values.public final Source createListSource(java.lang.Object[][] tuples)
Source
that has as element values the arrays in the tuples
array. Each array in the tuples
array specifies a member for one or more MdmSubDimension
objects or elements of MdmAttribute
objects. MdmSubDimension
member values are always String
objects. An MdmAttribute
can be of any data type; to specify a value of an element of an MdmAttribute
, you must encapsulate the value in an appropriate java.lang
class. For example, if you want to specify a value for the level depth attribute, then you must wrap the integer in the java.lang.Number
class. Valid object types are Boolean
, Date
, Number
, and String
. You cannot use a Source
object as a value of a component array.
You typically use the Source
returned by this method as the comparison
parameter in a join
method, or as the parameter for the selectValues
method, of a Source
that has the one of the dimensions as the type and the other dimensions as the types of the outputs. If you use the Source
returned by this method in either those ways, then the order of the elements of the each array in the tuples
array must match the order of the elements of the Source
for which the arrays are providing the values.
The data types of the corresponding elements of each component array must match. For example, if the data types of the elements of the first array are String
, Number
, and Date
, in that order, then the data types of the elements of the other arrays must also be String
, Number
, and Date
in the same order.
The following example creates custSel
, which specifies one member of a hierarchy of a Customer dimension, and edge
, which represents hierarchies of other dimensions for an edge of a cube. Next it creates edgeSel
, which specifies members for the hierarchies of edge
. All of the values are String
objects. The example then joins the dimension selections to a measure.
In the code, shipHier
, prodHier
, calHier
, and chanHier
are StringSource
objects for the SHIPMENTS
, PRODUCT
, CALENDAR
, and CHANNEL
hierarchies, respectively. The dp
object is the DataProvider
, and units
is the Source
for a measure of unit quantities sold.
Source custSel = shipHier.selectValue( "SHIPMENTS::SHIP_TO::WARREN SYS NY"); Source edge = prodHier.join(calHier).join(chanHier); Source edgeSel = edge.selectValues(dp.createListSource( new Object [][] { {"PRODUCT_PRIMARY::ITEM::ENVY STD", "CALENDAR_YEAR::MONTH::1998.03", "CHANNEL_PRIMARY::CHANNEL::CAT"}, {"PRODUCT_PRIMARY::ITEM::ENVY STD", "CALENDAR_YEAR::MONTH::1998.04", "CHANNEL_PRIMARY::CHANNEL::CAT"}, {"PRODUCT_PRIMARY::ITEM::ENVY EXE", "CALENDAR_YEAR::MONTH::1998.05", "CHANNEL_PRIMARY::CHANNEL::CAT"}})); Source results = units.join(custSel) .join(edgeSel);
tuples
- An array of Object
arrays.Source
with elements that have the specified arrays, and that is typically used to provide values for a set of dimensions.public final CustomModel createModel(Source[] inputs, Source datatype, Source[] outputs, Model[] parentModels)
CustomModel
with the specified inputs, data type, outputs, and parent models.inputs
- An array of Source
objects that are the inputs of the CustomModel
.datatype
- A fundamental Source
that represents the data type of the CustomModel
.outputs
- An array of Source
objects that are the outputs of the CustomModel
.parentModels
- An array of Model
objects that are the parent models from which the CustomModel
inherits Assignment
objects.CustomModel
that has the specified inputs, data type, outputs, and parent models.public final CustomModel createModel(Source[] inputs, Source datatype, Source[] outputs)
CustomModel
with the specified inputs, data type, and outputs.inputs
- An array of Source
objects that are the inputs of the CustomModel
.datatype
- A fundamental Source
that represents the data type of the CustomModel
.outputs
- An array of Source
objects that are the outputs of the CustomModel
.CustomModel
that has the specified inputs, data type, and outputs.public final CustomModel createModel(Source[] inputs, Source datatype, Model[] parentModels)
CustomModel
with the specified inputs, data type, and parent models.inputs
- An array of Source
objects that are the inputs of the CustomModel
.datatype
- A fundamental Source
that represents the data type of the CustomModel
.parentModels
- An array of Model
objects that are the parent models from which the CustomModel
inherits Assignment
objects.CustomModel
that has the specified inputs, data type, and parent models.public final CustomModel createModel(Source[] inputs, Source datatype)
CustomModel
with the specified inputs and data type.inputs
- An array of Source
objects that are the inputs of the CustomModel
.datatype
- A fundamental Source
that represents the data type of the CustomModel
.CustomModel
that has the specified inputs and data type.public final CustomModel createModel(Source[] inputs)
CustomModel
with the specified inputs and a data type of Number.inputs
- An array of Source
objects that are the inputs of the CustomModel
.CustomModel
that has the specified inputs.public final CustomModel createModel(Source input, Source datatype)
CustomModel
with the specified input and data type.input
- A Source
that the input of the CustomModel
.datatype
- A fundamental Source
that represents the data type of the CustomModel
.CustomModel
that has the specified input and data type.public final CustomModel createModel(Source input)
CustomModel
with the specified input and a data type of Number.input
- A Source
that the input of the CustomModel
.CustomModel
that has the specified input.public final BooleanSource createParameterizedSource(BooleanParameter param)
createSource
method of a Parameter
.public final NumberSource createRangeSource(int bottom, int top)
NumberSource
with elements that have consecutive int
values that range from the specified lowest value to the specified highest value.bottom
- The lowest value for the range.top
- The highest value for the range.NumberSource
that has the specified range of values.public final NumberSource createRangeSource(int bottom, NumberSource top)
NumberSource
with elements that have consecutive int
values that range from the specified lowest value to the specified highest value.bottom
- The lowest value for the range.top
- The highest value for the range.NumberSource
that has the specified range of values.public final NumberSource createRangeSource(NumberSource bottom, int top)
NumberSource
with elements that have consecutive int
values that range from the specified lowest value to the specified highest value.bottom
- A NumberSource
with a single element, which has the int
value as the lowest value for the range.top
- The highest value for the range.NumberSource
that has the specified range of values.public final NumberSource createRangeSource(NumberSource bottom, NumberSource top)
NumberSource
with elements that have consecutive int
values that range from the specified lowest value to the specified highest value.bottom
- A NumberSource
with a single element, which has the int
value as the lowest value for the range.top
- A NumberSource
with a single element, which has the int
value as the highest value for the range.NumberSource
that has the specified range of values.public final Source getEmptySource()
Source
, which does not have any elements. The empty Source
represents an empty result set.Source
.public final FundamentalMetadataProvider getFundamentalMetadataProvider()
FundamentalMetadataProvider
for this DataProvider
. The FundamentalMetadataProvider
provides FundamentalMetadataObject
objects that represent Oracle OLAP data types. You can use FundamentalMetadataObject
objects to create derived Source
objects.FundamentalMetadataProvider
for this DataProvider
.public final TransactionProvider getTransactionProvider()
TransactionProvider
associated with this DataProvider
.TransactionProvider
for this DataProvider
.public final Source getVoidSource()
Source
object, which has a single element that has null
as the value.Source
.public final SQLCursorManager createSQLCursorManager(Source source) throws TransactionalObjectInvalidException
SQLCursorManager
for the specified Source
. From the SQLCursorManager
you can obtain the SQL statement that Oracle OLAP generates for the Source
.source
- A Source
that specifies a query.SQLCursorManager
that has the SQL statement generated for the specified Source
.TransactionalObjectInvalidException
public UserSession getDefaultUserSession()
UserSession
associated with this DataProvider
.UserSession
for the DataProvider
.public void setDefaultUserSession(UserSession defaultSession)
UserSession
to associate with this DataProvider
if a UserSession
is not already associated with the active Transaction
.defaultSession
- A UserSession
to specify as the default UserSession
for the DataProvider
.public CursorManager[] createCursorManagers(Source[] rootSources, int[] fetchSizes, CursorInfoSpecification[] cursorInfoSpecs, java.util.Properties queryProperties)
CursorManager
objects that can override the local or unique hierarchy value type setting of the DataProvider
. The array contains one CursorManager
for each Source
in the rootSources
array. You use the CursorManager
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 CursorManager
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 the 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 CursorManager[] createCursorManagers(Source[] rootSources, int[] fetchSizes, CursorInfoSpecification[] cursorInfoSpecs, java.lang.String querySettings) throws org.xml.sax.SAXException
CursorManager
objects that can override the local or unique hierarchy value type of the DataProvider
. The array contains one CursorManager
for each Source
in the rootSources
array. You use the CursorManager
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 CursorManager
for the corresponding Source
in the rootSources
array. A fetch size of -1 fetches the entire result set.
With an XML String
as the querySettings
parameter you can specify the use of local or unique dimension hierarchy member values for retrieving data fora query. The setting must match the query. For example, if you use local values to specify a query, then the hierarchy value type for the CursorManager
must be set to local
for a Cursor
to retrieve data.
The following code specifies the use of local hierarchy values.
String querySettings = "<olapsettings> <setting name = 'HierarchyValueType'" +
" value = 'local' /> </olapsettings>"
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.querySettings
- A String
in XML format that specifies the use of local or unique hierarchy values.CursorManager
objects for the corresponding Source
objects.org.xml.sax.SAXException
- Indicates a problem with the XML in the querySettings
string.public oracle.jdbc.OracleConnection getConnection()
oracle.jdbc.OracleConnectiown
object that represents the connection between a client application and Oracle OLAP in the Oracle Database instance.OracleConnection
that represents the connection to the Oracle Database instance.public final boolean isOpen()
boolean
that is true
if the connection is open or false
if it is not.public Transaction getRootTransaction(oracle.jdbc.OracleConnection connection)
Transaction
for the specified OracleConnection
.connection
- An oracle.jdbc.OracleConnection
.Transaction
for the OracleConnection
.public 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.sources
- An array of Source
objects for the 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 the 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 the 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 count column and SQL statements generated for the corresponding objects in the sources
array.SQLCursorManager
objects.public MetadataProvider getDefaultMetadataProvider()
MetadataProvider
that is associated with this DataProvider
; this method provides backward compatibility with previous versions of the Oracle OLAP Java API.MetadataProvider
associated with the DataProvider
.public final MdmMetadataProvider getMdmMetadataProvider()
MdmMetadataProvider
that is associated with this DataProvider
.MdmMetadataProvider
associated with the DataProvider
.public UserSession createSession(oracle.jdbc.OracleConnection newConnection) throws java.sql.SQLException
UserSession
that shares the DataProvider
but that has a different OracleConnection
.newConnection
- The OracleConnection
with which to connect to the Oracle Database instance.UserSession
that has the specified connection.java.sql.SQLException
- Indicates a problem with the connection to the database instance.public UserSession createSession(oracle.jdbc.OracleConnection newConnection, java.lang.String settings) throws java.sql.SQLException, org.xml.sax.SAXException
UserSession
that shares the DataProvider
but that has a different OracleConnection
and has the specified settings. For the settings that you can specify, see the class description.newConnection
- The OracleConnection
with which to connect to the Oracle Database instance.settings
- A String
that contains settings in an XML format to apply to the session.UserSession
that has the specified connection and settings.java.sql.SQLException
- Indicates a problem with the connection to the database instance.org.xml.sax.SAXException
- Indicates a problem with the XML in the settings
string.public UserSession createSession(oracle.jdbc.OracleConnection newConnection, java.lang.String settings, java.util.Locale locale) throws java.sql.SQLException, org.xml.sax.SAXException
UserSession
that shares the DataProvider
but that has a different OracleConnection
and has the specified settings, and language. For the settings that you can specify, see the class description.newConnection
- The OracleConnection
with which to connect to the Oracle Database instance.settings
- A String
that contains settings in XML format to apply to the session.locale
- A Locale
object that specifies the language to use for the session.UserSession
that has the specified connection, settings, and language.java.sql.SQLException
- Indicates a problem with the connection to the database instance.org.xml.sax.SAXException
- Indicates a problem with the XML in the settings
string.public void close()
DataProvider
and releases any associated resources.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |