|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.TableDataFactory
public class TableDataFactory
The TableDataFactory provides keyed access to predefined tablemodels. The factory does not accept parameters and therefore cannot be used for parametrized queries. The queryname is used to lookup the table by its previously registered name.
Field Summary |
---|
Fields inherited from interface org.pentaho.reporting.engine.classic.core.DataFactory |
---|
QUERY_LIMIT, QUERY_TIMEOUT |
Constructor Summary | |
---|---|
TableDataFactory()
Default Constructor. |
|
TableDataFactory(String name,
TableModel tableModel)
Creates a new TableDataFactory and registers the tablemodel with the given name. |
Method Summary | |
---|---|
void |
addTable(String name,
TableModel tableModel)
Registers a tablemodel with the given name. |
void |
cancelRunningQuery()
Attempts to cancel the query process that is generating the data for this data factory. |
Object |
clone()
Creates a copy of this data-factory. |
void |
close()
Closes the data factory. |
DataFactory |
derive()
Derives a freshly initialized report data factory, which is independend of the original data factory. |
String[] |
getQueryNames()
Returns all known query-names. |
TableModel |
getTable(String name)
|
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()
This does nothing. |
TableModel |
queryData(String query,
DataRow parameters)
Queries a datasource. |
void |
removeTable(String name)
Removes the table that has been registered by the given name. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableDataFactory()
public TableDataFactory(String name, TableModel tableModel)
name
- the name of the table.tableModel
- the tablemodel.Method Detail |
---|
public boolean isQueryExecutable(String query, DataRow parameters)
isQueryExecutable
in interface DataFactory
query
- parameters
-
public void addTable(String name, TableModel tableModel)
name
- the name of the table.tableModel
- the tablemodel that should be registered.public void removeTable(String name)
name
- the name of the table to be removed.public TableModel getTable(String name)
public TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
queryData
in interface DataFactory
query
- the name of the table.parameters
- are ignored for this factory.
ReportDataFactoryException
- if an error occured while performing the query.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.public void open()
open
in interface DataFactory
public void close()
close
in interface DataFactory
public DataFactory derive()
derive
in interface DataFactory
public Object clone()
clone
in interface DataFactory
clone
in class Object
public String[] getQueryNames()
DataFactory
getQueryNames
in interface DataFactory
public void cancelRunningQuery()
DataFactory
cancelRunningQuery
in interface DataFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |