In JDeveloper, when you create a new Dataview
object (that is, a crosstab, graph,
or table) using the Presentation wizard, the wizard also performs the following tasks:
Creates a query with the data that you select.
Specifies the query as the data source for the presentation.
This means that you do not have to write code to associate data with a presentation that you create with the Presentation wizard.
To specify the data to display in a BI Beans view, you set the DataSource
property of the Dataview
class or of the ThinDataview
class.
The DataSource
property takes an implementation of the DataSource
interface, which is defined in the oracle.dss.util
package. The
oracle.dss.dataSource.common.Query
class implements the DataSource
interface. You can also provide your data source to a Dataview
or
ThinDataview
.
A DataSource
provides a DataDirector
to a view. The view calls the
DataDirector
to manipulate the data that is being displayed.
Different views need data in different formats, so they use different subclasses of the
DataDirector
class:
A crosstab displays data in a multidimensional format. It gets data through a
CubeDataDirector
.
A table displays data in a relational format. It gets data through a
RelationalDataDirector
.
A graph displays data in a graphical format. It can retrieve either relational data or cube
data. In addition to the DataSource
property, you must set the
DataDirectorType
property of the graph. If the specified data source is relational,
then set the DataDirectorType
to Graph.DDT_RELATIONAL
.
If the specified data source is multidimensional, then set the DataDirectorType
to
Graph.DDT_CUBE
.
The Query
object supports both a CubeDataDirector
and a
RelationalDataDirector
.