|
Oracle Reports Java API Reference 10g (9.0.4) B12019-01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The Reports Plugin Data Source interface that allows application developers to write their own Java components to provide data from arbitrary sources to be used in reports. For example, one application developer can write an Excel Plugin Data Source to provide data in Excel files for reporting. The Plugin Data Source interface is based on the JDBC API, in the sense that JDBC ResultSet and ResultSetMetaData are used for fetching data and describing meta information. Most JDBC v1 data types (as defined in java.sql.Types) are supported by the interface. Besides JDBC data types, the interface also supports Oracle data types CHAR, DATE, and NUMBER. See PluginTypes for details of supported types.
| Field Summary | |
static int |
ALL_ROWSRequests all rows of the data source. |
| Method Summary | |
PluginResultSetMetaData |
describe()Returns the result set meta information of the data source. |
java.sql.ResultSet |
execute(java.lang.Object[] refedColVals, PluginCondition[] conds, int maxrows)Executes the Plugin Data Source and returns the result set. |
java.lang.String |
getQueryDescription()Returns the text description of the query, which usually contains the information of the source, columns, and bind variables. |
java.lang.String[] |
getReferencedColumns()Returns the names of the Reports columns whose values will be used in the Plugin Data Source's execution. |
void |
setDataSource(DataSource datasource)Sets the hosting Reports data source object of this Plugin Data Source. |
void |
setSignOnParameter(Parameter signOnParam)Sets the Sign-on Parameter of this Plugin Data Source. |
boolean |
supportCondition()Returns true or false, depending on whether the Plugin Data Source supports conditions. |
| Methods inherited from interface oracle.reports.plugin.Plugin |
applyXML, dispose, getFactory, saveToXML, setFactory, startRuntime |
| Field Detail |
public static final int ALL_ROWS
| Method Detail |
public void setSignOnParameter(Parameter signOnParam)
throws PluginException
1. PluginDataSource() // default constructor 2. setSignOnParameter(signOnParam) // restore Sign-on Parameter binding 3. applyXML(definitionXml) // restore Plugin Data source's own definition
signOnParam - The Sign-on Parameter of this Plugin Data Source.
public java.lang.String[] getReferencedColumns()
throws PluginException
Using getReferencedColumns enables the Plugin Data Source to access column values in its execute method, and enables Reports to know the dependencies of the Plugin Data Source. A Plugin Data Source (as well as other types of Reports Data Sources) can only reference columns in its master data sources, report level columns, and parameters. If a Plugin Data Source references a column in its child query or an unrelated query, Reports will raise an error when users try to run this report.
Note the getReferencedColumns is called before Reports starts to run. That is, the Plugin Data Source's dependency needs to be determined before Reports starts to run. Reports needs to know such depedencies before runtime, so that it can detect if any circular dependency between different objects (say, two data sources that depend on columns of each other), and determine the right sequence to process each object (say, a master query needs to be processed before the child query).
If getReferencedColumns returns a name of non-existing column, Reports will create a new user parameter of that name, and default its datatype as character.
public java.lang.String getQueryDescription()
throws PluginException
public void setDataSource(DataSource datasource)
throws PluginException
datasource - The hosting data source object.
public PluginResultSetMetaData describe()
throws PluginException
getColumnCount getColumnDisplaySize(int columnIndex) getColumnLabel(int columnIndex) getColumnName(int columnIndex) getColumnType(int columnIndex) getPrecision(int columnIndex) getScale(int columnIndex) getSortOrder(int columnIndex) sortColumnOf(int columnIndex)
public boolean supportCondition()
throws PluginException
public java.sql.ResultSet execute(java.lang.Object[] refedColVals,
PluginCondition[] conds,
int maxrows)
throws PluginException
refedColVals - values of the referenced Reports columns as given by getReferencedColumns method. See getReferencedColumns for details.conds - conditions imposed on the result set required by column links. See supportCondition method for details.maxrows - maximum number of rows the result set should return. ALL_ROWS means no limit.
|
Oracle Reports Java API Reference | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||