|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.ExternalDataFactory
public class ExternalDataFactory
A datafactory that allows to use a tablemodel passed in as a parameter as primary report-datasource.
Field Summary |
---|
Fields inherited from interface org.pentaho.reporting.engine.classic.core.DataFactory |
---|
QUERY_LIMIT, QUERY_TIMEOUT |
Constructor Summary | |
---|---|
ExternalDataFactory()
|
Method Summary | |
---|---|
void |
cancelRunningQuery()
Attempts to cancel the query process that is generating the data for this data factory. |
Object |
clone()
|
void |
close()
Closes the data factory and frees all resources held by this instance. |
DataFactory |
derive()
Returns a copy of the data factory that is not affected by its anchestor and holds no connection to the anchestor anymore. |
String[] |
getQueryNames()
Returns all known query-names. |
void |
initialize(org.pentaho.reporting.libraries.base.config.Configuration configuration,
org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager,
org.pentaho.reporting.libraries.resourceloader.ResourceKey contextKey,
ResourceBundleFactory resourceBundleFactory)
Initializes the data factory and provides new context information. |
boolean |
isQueryExecutable(String query,
DataRow parameters)
Checks whether the query would be executable by this datafactory. |
void |
open()
Opens the data factory. |
TableModel |
queryData(String query,
DataRow parameters)
Queries a datasource. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExternalDataFactory()
Method Detail |
---|
public TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
DataFactory
queryData
in interface DataFactory
query
- the query string, never null.parameters
- the parameters for the query, never null.
ReportDataFactoryException
- if an error occured while performing the query.public DataFactory derive()
DataFactory
derive
in interface DataFactory
public void open() throws ReportDataFactoryException
DataFactory
open
in interface DataFactory
ReportDataFactoryException
- if an error occured while opening the datafactory resources.public void close()
DataFactory
close
in interface DataFactory
public boolean isQueryExecutable(String query, DataRow parameters)
DataFactory
isQueryExecutable
in interface DataFactory
query
- the query, never null.parameters
- the parameters, never null.
public String[] getQueryNames()
DataFactory
getQueryNames
in interface DataFactory
public void cancelRunningQuery()
DataFactory
cancelRunningQuery
in interface DataFactory
public Object clone()
clone
in interface DataFactory
clone
in class Object
public void initialize(org.pentaho.reporting.libraries.base.config.Configuration configuration, org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager, org.pentaho.reporting.libraries.resourceloader.ResourceKey contextKey, ResourceBundleFactory resourceBundleFactory)
DataFactory
initialize
in interface DataFactory
configuration
- the current report configuration.resourceManager
- the report's resource manager.contextKey
- the report's context key to access resources relative to the report location.resourceBundleFactory
- the report's resource-bundle factory to access localization information.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |