|
Oracle OLAP Java API Reference 10g Release 1 (10.1) B10994-01 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for an object that produces a Source
for a Template
. A SourceGenerator
must produce only one type of Source
, such as a BooleanSource
, a NumberSource
, or a StringSource
.
In producing the Source
, a SourceGenerator
uses the current state of the data stored in the MetadataState
for the Template
. An application creates a DynamicDefinition
by passing the SourceGenerator
to the createDynamicDefinition
method on the Template
. The application then gets the Source
by calling the getSource
method on the DynamicDefinition
.
A Template
can have more than one DynamicDefinition
, each with a different SourceGenerator
. Such a Template
can produce different Source
objects based on the same data, as defined by the current state of the MetadataState
.
DynamicDefinition
, MetadataState
, Template
Method Summary | |
Source |
generateSource(MetadataState state) Produces a Source for a Template using the current state of the MetadataState . |
Method Detail |
public Source generateSource(MetadataState state)
Source
for a Template
using the current state of the MetadataState
. To get the Source
produced by this method, an application calls the getSource
method on a DynamicDefinition
that was created using this SourceGenerator
. An implementation of the generateSource
method performs the operations needed to build the Source
.
For example, suppose a Template
, called TopBottomTemplate
, produces a Source
that defines a number of data values from the top or bottom of the elements of a measure for one of the dimensions of the measure. The other dimensions of the measure are limited to single values. An application lets the end user do the following:
The application calls methods on the Template
to get the current state of the MetadataState
, specify the values, and set the current state of the MetadataState
. To get the Source
produced by the Template
, the application calls getSource
on the DynamicDefinition
.
The generateSource
method performs the OLAP API operations that create a Source
based on the current state of the MetadataState
. In the example above, the generateSource
method does the following:
Source
that represents the single value selections for the customers, times, channels, and promotions dimensions ("San Francisco", "2000-Q1", "S", and "TV").Source
, which is products, calls the sortDescending
method and passes it the Source
that represents the single value selections.Source
returned by the call to sortDescending
, calls the interval
method and passes it a bottom value, such as 1, and the number of values to display, which is 10 in this case.Source
returned by the call to the interval
method.Source
represents the data selection that the user defined.state
- The MetadataState
whose fields contain the values of the current state of the Template
.Source
representing a request for data from a data store.
|
Oracle OLAP Java API Reference 10g Release 1 (10.1) B10994-01 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |