|
Oracle® OLAP Java API Reference 10g Release 2 (10.2) B14348-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.olapi.data.source.DataProvider
Creates objects that an application uses in creating queries and retrieving data from a data store. ExpressDataProvider
is the concrete subclass of DataProvider
for an Oracle Database instance.
The DataProvider
class includes methods that do the following:
Source
objects that you can use in producing a Source
that defines a query on the data store.CursorManager
objects that you use in creating Cursor
objects with which you retrieve 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 API data types that you can use in defining a query.TransactionProvider
, which provides Transaction
objects. Every Source
is associated with a specific Transaction
.For the createListSource
methods, the values of the elements
array must be unique. The array cannot contain duplicate values.
Method Summary | |
abstract void |
close() Closes the DataProvider and releases resources associated with it. |
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 . |
SpecifiedCursorManager |
createCursorManager(CursorManagerSpecification cursorManagerSpecification) Creates a CursorManager based on a CursorManagerSpecification . |
SpecifiedCursorManager |
createCursorManager(CursorManagerSpecification cursorManagerSpecification, Source[] inputSources) Creates a CursorManager for a Source that has inputs. |
CursorManager |
createCursorManager(Source rootSource) Creates a CursorManager for the specified Source . |
CursorManager |
createCursorManager(Source rootSource, int fetchSize, CursorInfoSpecification cursorInfoSpec) Creates a CursorManager object with the specified CursorInfoSpecification and fetch size. |
CursorManager[] |
createCursorManagers(Source[] rootSources) Creates an array of CursorManager objects, one for each of the corresponding Source 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. |
CursorManagerSpecification |
createCursorManagerSpecification(Source rootSource) Creates a CursorManagerSpecification for a Source object. |
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 the arrays in the tuples array as its element values. |
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) Creates a parameterized BooleanSource that has the value of the specified BooleanParameter as the value of its element. |
DateSource |
createParameterizedSource(DateParameter param) Creates a parameterized DateSource that has the value of the specified DateParameter as the value of its element. |
NumberSource |
createParameterizedSource(NumberParameter param) Creates a parameterized NumberSource that has the value of the specified NumberParameter as the value of its element. |
StringSource |
createParameterizedSource(StringParameter param) Creates a parameterized StringSource that has the value of the specified StringParameter as the value of its element. |
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. |
SQLCursorManager |
createSQLCursorManager(Source source) Creates a SQLCursorManager for the specified Source . |
abstract SQLCursorManager[] |
createSQLCursorManagers(Source[] sources) Creates an array of SQLCursorManager objects that has one SQLCursorManager for each of the specified Source objects. |
Source |
getEmptySource() Gets the empty Source , which does not have any elements. |
FundamentalMetadataProvider |
getFundamentalMetadataProvider() Gets the FundamentalMetadataProvider for this DataProvider . |
TransactionProvider |
getTransactionProvider() Gets the TransactionProvider for this DataProvider . |
Source |
getVoidSource() Gets the void Source object, which has a single element that has null as its value. |
abstract void |
initialize() Initializes this DataProvider . |
abstract boolean |
isOpen() Indicates whether the connection to the data store is currently open. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public abstract void close()
DataProvider
and releases resources associated with it.public final NumberSource createConstantSource(double element)
NumberSource
that has only one element, which has the specified double
value.element
- The double
value that you want the returned NumberSource
to have.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
- The float
value that you want the returned NumberSource
to have.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
- The int
value that you want the returned NumberSource
to have.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
- The String
value that you want the returned StringSource
to have.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
- The Date
value that you want the returned DateSource
to have.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
- The Source
that you want as the value of the element of the returned Source
to have.Source
that has an element that has the specified Source
as its value.public final NumberSource createConstantSource(short element)
NumberSource
that has only one element, which has the specified short
value.element
- The short
value that you want the returned NumberSource
to have.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
- The boolean
value that you want the returned BooleanSource
to have.BooleanSource
that has the specified boolean
value.public final SpecifiedCursorManager createCursorManager(CursorManagerSpecification cursorManagerSpecification) throws CursorManagerSpecificationExpiredException
CursorManager
based on a CursorManagerSpecification
. You use a CursorManager
to create Cursor
objects, which provide access to the results of a query.
Use this method if the Source
that you used to create the CursorManagerSpecification
has no inputs. If the Source
has inputs, then use the createCursorManager(CursorManagerSpecification cursorManagerSpecification, Source[] inputSources)
method.
cursorManagerSpecification
- The CursorManagerSpecification
for the Source
for which you want to create a Cursor
.SpecifiedCursorManager
for the Source
for which you want to create a Cursor
.public SpecifiedCursorManager createCursorManager(CursorManagerSpecification cursorManagerSpecification, Source[] inputSources) throws CursorManagerSpecificationExpiredException
CursorManager
for a Source
that has inputs. With the inputSources
argument, you specify Source
objects for the inputs of the Source
. 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 CursorManager
, you supply a CursorInput
object for each Source
in the inputSources
array.cursorManagerSpecification
- A CursorManagerSpecification
for the Source
that has inputs.inputSources
- An array of Source
objects, one for each input of the Source
for the CursorManagerSpecification
.SpecifiedCursorManager
for the Source
.public final CursorManager createCursorManager(Source rootSource)
CursorManager
for the specified Source
.rootSource
- The Source
for which you want a CursorManager
.CursorManager
for the specified Source
.public final CursorManager[] createCursorManagers(Source[] rootSources)
CursorManager
objects, one for each of the corresponding Source
in the rootSources
array.rootSources
- The Source
objects for which you want CursorManager
objects.CursorManager
objects for the specified Source
objects.public final CursorManager createCursorManager(Source rootSource, int fetchSize, CursorInfoSpecification cursorInfoSpec)
CursorManager
object with the specified CursorInfoSpecification
and fetch size. A fetch size of -1 specifies fetching the entire result set.rootSource
- A Source
for which you want a 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 which you want 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 final CursorInfoSpecification createCursorInfoSpecification(Source rootSource) throws TransactionalObjectInvalidException
CursorInfoSpecification
for the specified Source
.rootSource
- The Source
for which you want a CursorInfoSpecification
.CursorInfoSpecification
for the specified Source
.public final CursorManagerSpecification createCursorManagerSpecification(Source rootSource) throws TransactionalObjectInvalidException
CursorManagerSpecification
for a Source
object. You can use the CursorManagerSpecification
to create CursorManager
objects. The CursorManagerSpecification
specifies the behavior of Cursor
objects that you create from a CursorManager
.rootSource
- A Source
that defines a query to make on the data source.CursorManagerSpecification
for the specified Source
.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 Date
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 the arrays in the tuples
array as its element values. 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 its type and the other dimensions as the types of its 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 element of the CUSTOMER
dimension, and edge
, which represents dimensions for an edge of a cube. Next it creates edgeSel
, which specifies values for the dimensions of edge
. All of the values are String
objects. The example then joins the dimension selections to a measure.
In the code, shipmentsRollup
, prodRollup
, calendar
, and chanRollup
are StringSource
objects for hierarchies of the CUSTOMER
, PRODUCT
, TIME
, and CHANNEL
dimensions, respectively. The dp
object is the DataProvider
, and units
is the Source
for the UNITS
measure.
Source custSel = shipmentsRollup.selectValue( "SHIPMENTS_ROLLUP::SHIP_TO::104"); Source edge = prodRollup.join(calendar).join(chanRollup); Source edgeSel = edge.selectValues(dp.createListSource( new Object [][] { {"PRODUCT_ROLLUP::ITEM::13", "CALENDAR::MONTH::21", "CHANNEL_ROLLUP::CHANNEL::3"}, {"PRODUCT_ROLLUP::ITEM::13", "CALENDAR::MONTH::22", "CHANNEL_ROLLUP::CHANNEL::3"}, {"PRODUCT_ROLLUP::ITEM::14", "CALENDAR::MONTH::21", "CHANNEL_ROLLUP::CHANNEL::3"}})); 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 StringSource createParameterizedSource(StringParameter param)
StringSource
that has the value of the specified StringParameter
as the value of its element.param
- A StringParameter
that supplies the value of the element of the StringSource
returned by this method.StringSource
whose element has the current value of the specified StringParameter
.public final DateSource createParameterizedSource(DateParameter param)
DateSource
that has the value of the specified DateParameter
as the value of its element.param
- A DateParameter
that supplies the value of the element of the DateSource
returned by this method.DateSource
whose element has the current value of the specified DateParameter
.public final BooleanSource createParameterizedSource(BooleanParameter param)
BooleanSource
that has the value of the specified BooleanParameter
as the value of its element.param
- A BooleanParameter
that supplies the value of the element of the BooleanSource
returned by this method.BooleanSource
whose element has the current value of the specified BooleanParameter
.public final NumberSource createParameterizedSource(NumberParameter param)
NumberSource
that has the value of the specified NumberParameter
as the value of its element.param
- A NumberParameter
that supplies the value of the element of the NumberSource
returned by this method.NumberSource
whose element has the current value of the specified NumberParameter
.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 that you want the returned NumberSource
to have.top
- The highest value that you want the returned NumberSource
to have.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 that you want the returned NumberSource
to have.top
- A NumberSource
with a single element, which has the int
value that you want as the highest value of the returned NumberSource
.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 that you want as the lowest value of the returned NumberSource
.top
- The highest value that you want the returned NumberSource
to have.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 that you want as the lowest value of the returned NumberSource
.top
- A NumberSource
with a single element, which has the int
value that you want as the highest value of the returned NumberSource
.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 or instances of custom MtmObject
objects.FundamentalMetadataProvider
for this DataProvider
.public final TransactionProvider getTransactionProvider()
TransactionProvider
for this DataProvider
.TransactionProvider
for this DataProvider
.public final Source getVoidSource()
Source
object, which has a single element that has null
as its value.Source
.public abstract void initialize() throws java.sql.SQLException
DataProvider
. Always call this method after creating a new DataProvider
.
This method throws a java.sql.SQLException
if an error occurs when Oracle OLAP is preparing for its interactions with the database.
public abstract boolean isOpen()
true
when the connection to the data store is open or false
when it is not.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
.public abstract SQLCursorManager[] createSQLCursorManagers(Source[] sources)
SQLCursorManager
objects that has one SQLCursorManager
for each of the specified Source
objects. From each SQLCursorManager
you can obtain the SQL statement that Oracle OLAP generates for its Source
. All of the Source
objects in the sources
array must be active in the same Transaction
.sources
- An array of Source
objects from the same Transaction
.SQLCursorManager
objects that have the SQL statements generated for the specified Source
objects. .
|
Oracle® OLAP Java API Reference 10g Release 2 (10.2) B14348-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |