Oracle Reports
Java API Reference
11g Release 1 (11.1.1)
E10775-01

oracle.reports.plugin.datasource
Class PluginDataSourceTemplate

java.lang.Object
  extended by oracle.reports.plugin.datasource.PluginDataSourceTemplate
All Implemented Interfaces:
PluginDataSource, Plugin

public class PluginDataSourceTemplate
extends java.lang.Object
implements PluginDataSource

Template Plug-in Data Source class. It provides sample code of a real functioning Plug-in Data Source. Application developers are encouraged to extend, or copy/modify Template Plug-in Data Source to create their own Plug-in Data Source.


Field Summary
protected static java.lang.String DEFINITION
           
protected  DataSource mDataSource
           
protected  PluginFactory mFactory
           
protected  PluginResultSetMetaData mMetaData
           
protected  Parameter mSignOnParameter
           
 
Fields inherited from interface oracle.reports.plugin.datasource.PluginDataSource
ALL_ROWS
 
Constructor Summary
PluginDataSourceTemplate()
           
 
Method Summary
 boolean applyXML(java.lang.String xml)
          Template Data Source has only static definition for sample code purpose.
 PluginResultSetMetaData describe()
          Returns static meta-data of Template Plug-in Data Source.
 void dispose()
          Clean up any Plug-in's resources here.
 java.sql.ResultSet execute(java.lang.Object[] refedColVals, PluginCondition[] conds, int maxrows)
          Returns static result set of Template Plug-in Data Source.
 DataSource getDataSource()
          Gets the hosting Reports data source object of the Plugin.
 PluginFactory getFactory()
          Gets the factory passed to setFactory.
 java.lang.String getQueryDescription()
          Returns the high-light data source description to be displayed in Reports Wizard Data Tab.
 java.lang.String[] getReferencedColumns()
          Template Plug-in Data Source does not reference Reports columns.
 Report getReport()
          Gets the hosting report of the plugin.
 ReportContext getReportContext()
          Gets the report context which provides environment information.
 Parameter getSignOnParameter()
          Return sign-on parameter of this Plug-in Data Source.
 java.lang.String saveToXML()
          Return the static definition to be saved with report.
 void setDataSource(DataSource datasource)
          Sets the Reports hosting data source object of the plugin
 void setFactory(PluginFactory fac)
          Sets the factory which creates the Plugin.
 void setSignOnParameter(Parameter signOnParam)
          Sets sign on parameter of this Plug-in Data Source whenever it is set or changed in Reports Property Palette.
 void startRuntime()
          Template Plug-in Data Source does not need any initilization before runtime.
 boolean supportCondition()
          Template Plugin Data Source does not support condition, simply returns false here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFINITION

protected static final java.lang.String DEFINITION
See Also:
Constant Field Values

mFactory

protected PluginFactory mFactory

mDataSource

protected DataSource mDataSource

mSignOnParameter

protected Parameter mSignOnParameter

mMetaData

protected PluginResultSetMetaData mMetaData
Constructor Detail

PluginDataSourceTemplate

public PluginDataSourceTemplate()
Method Detail

getReferencedColumns

public java.lang.String[] getReferencedColumns()
                                        throws PluginException
Template Plug-in Data Source does not reference Reports columns. Please check XML Plug-in Data Source for example.

Specified by:
getReferencedColumns in interface PluginDataSource
Returns:
names of referenced Reports columns
Throws:
PluginException

startRuntime

public void startRuntime()
                  throws PluginException
Template Plug-in Data Source does not need any initilization before runtime. Please check JDBC Plug-in Data Source for example.

Specified by:
startRuntime in interface Plugin
Throws:
PluginException

setFactory

public void setFactory(PluginFactory fac)
                throws PluginException
Sets the factory which creates the Plugin. Store the factory with Plugin for later use.

Specified by:
setFactory in interface Plugin
Throws:
PluginException

getFactory

public PluginFactory getFactory()
                         throws PluginException
Gets the factory passed to setFactory.

Specified by:
getFactory in interface Plugin
Throws:
PluginException

getDataSource

public DataSource getDataSource()
                         throws PluginException
Gets the hosting Reports data source object of the Plugin.

Throws:
PluginException

getReport

public Report getReport()
                 throws PluginException
Gets the hosting report of the plugin.

Throws:
PluginException

getReportContext

public ReportContext getReportContext()
                               throws PluginException
Gets the report context which provides environment information.

Throws:
PluginException

setSignOnParameter

public void setSignOnParameter(Parameter signOnParam)
                        throws PluginException
Sets sign on parameter of this Plug-in Data Source whenever it is set or changed in Reports Property Palette. Template Data Source does not need sign-on (PluginDataSourceTemplate.needsSignOnParameter returns false), so that this method should never be called.

Specified by:
setSignOnParameter in interface PluginDataSource
Parameters:
signOnParam - sign on parameter of this Plugin Data Source
Throws:
PluginException

getSignOnParameter

public Parameter getSignOnParameter()
                             throws PluginException
Return sign-on parameter of this Plug-in Data Source.

Throws:
PluginException

applyXML

public boolean applyXML(java.lang.String xml)
                 throws PluginException
Template Data Source has only static definition for sample code purpose.

Specified by:
applyXML in interface Plugin
Returns:
true if plugin data source changed with the xml. false if the plugin data source unchanged.
Throws:
PluginException

setDataSource

public void setDataSource(DataSource datasource)
                   throws PluginException
Sets the Reports hosting data source object of the plugin

Specified by:
setDataSource in interface PluginDataSource
Parameters:
datasource - the hosting data source object
Throws:
PluginException

getQueryDescription

public java.lang.String getQueryDescription()
                                     throws PluginException
Returns the high-light data source description to be displayed in Reports Wizard Data Tab.

Specified by:
getQueryDescription in interface PluginDataSource
Returns:
query description text
Throws:
PluginException

describe

public PluginResultSetMetaData describe()
                                 throws PluginException
Returns static meta-data of Template Plug-in Data Source.

Specified by:
describe in interface PluginDataSource
Returns:
result set meta data
Throws:
PluginException

execute

public java.sql.ResultSet execute(java.lang.Object[] refedColVals,
                                  PluginCondition[] conds,
                                  int maxrows)
                           throws PluginException
Returns static result set of Template Plug-in Data Source.

Specified by:
execute in interface PluginDataSource
Parameters:
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.
Returns:
Result Set, please check PluginResultSetTemplate for example
Throws:
PluginException

supportCondition

public boolean supportCondition()
                         throws PluginException
Template Plugin Data Source does not support condition, simply returns false here.

Specified by:
supportCondition in interface PluginDataSource
Returns:
true if the plugin datasource supports condition, flase otherwise.
Throws:
PluginException

dispose

public void dispose()
Clean up any Plug-in's resources here.

Specified by:
dispose in interface Plugin

saveToXML

public java.lang.String saveToXML()
                           throws PluginException
Return the static definition to be saved with report.

Specified by:
saveToXML in interface Plugin
Returns:
XML or text description of plugin's definition
Throws:
PluginException

Oracle Reports
Java API Reference

Copyright © 1994, 2009 Oracle Corporation. All Rights Reserved.