Oracle Reports
Java API Reference
10g (9.0.4)
B12019-01

oracle.reports.plugin.datasource
Class PluginDataSourceTemplate

java.lang.Object
  |
  +--oracle.reports.plugin.datasource.PluginDataSourceTemplate
All Implemented Interfaces:
Plugin, PluginDataSource

public class PluginDataSourceTemplate
extends java.lang.Object
implements PluginDataSource

Template Plugin Data Source class. Provides sample code for a Plugin Data Source. Application developers are encouraged to extend or copy/modify the Template Plugin Data Source to create their own Plugin 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)
          The Template Data Source has only static definition for sample code purposes.
 PluginResultSetMetaData describe()
          Returns static meta-data of the Template Plugin Data Source.
 void dispose()
          Removes the plugin and cleans up related resources.
 java.sql.ResultSet execute(java.lang.Object[] refedColVals, PluginCondition[] conds, int maxrows)
          Returns static result set of the Template Plugin Data Source.
 DataSource getDataSource()
          Returns the hosting Reports data source object of the plugin.
 PluginFactory getFactory()
          Returns the factory passed to setFactory.
 java.lang.String getQueryDescription()
          Returns the highlight data source description to be displayed in the Reports Wizard Data page.
 java.lang.String[] getReferencedColumns()
          The Template Plugin Data Source does not reference Reports columns.
 Report getReport()
          Returns the hosting report of the plugin.
 ReportContext getReportContext()
          Returns the report context, which provides environment information.
 Parameter getSignOnParameter()
          Returns the Sign-on Parameter of this Plugin Data Source.
 java.lang.String saveToXML()
          Returns 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 that creates the plugin.
 void setSignOnParameter(Parameter signOnParam)
          Sets the Sign-on Parameter of this Plugin Data Source whenever it is set or changed in the Reports Property Inspector.
 void startRuntime()
          The Template Plugin Data Source does not need any initialization before runtime.
 boolean supportCondition()
          The Template Plugin Data Source does not support conditions, so returns false.

 

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

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
The Template Plugin Data Source does not reference Reports columns. Refer to the XML Plugin Data Source for an example.
Specified by:
getReferencedColumns in interface PluginDataSource

startRuntime

public void startRuntime()
                  throws PluginException
The Template Plugin Data Source does not need any initialization before runtime. Refer to the JDBC Plugin Data Source an for example.
Specified by:
startRuntime in interface Plugin

setFactory

public void setFactory(PluginFactory fac)
                throws PluginException
Sets the factory that creates the plugin. Stores the factory with the plugin for later use.
Specified by:
setFactory in interface Plugin

getFactory

public PluginFactory getFactory()
                         throws PluginException
Returns the factory passed to setFactory.
Specified by:
getFactory in interface Plugin

getDataSource

public DataSource getDataSource()
                         throws PluginException
Returns the hosting Reports data source object of the plugin.

getReport

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

getReportContext

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

setSignOnParameter

public void setSignOnParameter(Parameter signOnParam)
                        throws PluginException
Sets the Sign-on Parameter of this Plugin Data Source whenever it is set or changed in the Reports Property Inspector. The Template Data Source does not need sign-on (PluginDataSourceTemplate.needsSignOnParameter returns false), so this method should never be called.
Specified by:
setSignOnParameter in interface PluginDataSource
Following copied from interface: oracle.reports.plugin.datasource.PluginDataSource
Parameters:
signOnParam - The Sign-on Parameter of this Plugin Data Source.

getSignOnParameter

public Parameter getSignOnParameter()
                             throws PluginException
Returns the Sign-on Parameter of this Plugin Data Source.

applyXML

public boolean applyXML(java.lang.String xml)
                 throws PluginException
The Template Data Source has only static definition for sample code purposes.
Specified by:
applyXML in interface Plugin
Following copied from interface: oracle.reports.plugin.Plugin
Parameters:
xml - The xml to apply.
Returns:
true if the plugin data source changed with the xml. false if the plugin data source is unchanged.

setDataSource

public void setDataSource(DataSource datasource)
                   throws PluginException
Sets the Reports hosting data source object of the plugin.
Specified by:
setDataSource in interface PluginDataSource
Following copied from interface: oracle.reports.plugin.datasource.PluginDataSource
Parameters:
datasource - The hosting data source object.
Returns:
void

getQueryDescription

public java.lang.String getQueryDescription()
                                     throws PluginException
Returns the highlight data source description to be displayed in the Reports Wizard Data page.
Specified by:
getQueryDescription in interface PluginDataSource

describe

public PluginResultSetMetaData describe()
                                 throws PluginException
Returns static meta-data of the Template Plugin Data Source.
Specified by:
describe in interface PluginDataSource

execute

public java.sql.ResultSet execute(java.lang.Object[] refedColVals,
PluginCondition[] conds,
                                  int maxrows)
                           throws PluginException
Returns static result set of the Template Plugin Data Source.
Specified by:
execute in interface PluginDataSource
Following copied from interface: oracle.reports.plugin.datasource.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.

supportCondition

public boolean supportCondition()
                         throws PluginException
The Template Plugin Data Source does not support conditions, so returns false.
Specified by:
supportCondition in interface PluginDataSource
Following copied from interface: oracle.reports.plugin.datasource.PluginDataSource
Returns:
true if the Plugin Data Source supports conditions, false if it does not.

dispose

public void dispose()
Removes the plugin and cleans up related resources. This method is called when Reports is shut down.
Specified by:
dispose in interface Plugin

saveToXML

public java.lang.String saveToXML()
                           throws PluginException
Returns the static definition to be saved with report.
Specified by:
saveToXML in interface Plugin

Oracle Reports
Java API Reference

Copyright © 2003 Oracle Corporation. All Rights Reserved.