|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.platform.plugin.action.jfreereport.helper.PentahoTableDataFactory
public class PentahoTableDataFactory
The PentahoTableDataFactory class implements JFreeReport's data factory and manages the TableModels provided to JFreeReport. The primary difference between this class and JFreeReport's standard TableDataFactory is the "getTableIterator" method, which allows the Platform to clean up and table model resources after their use. Also, we support Pentaho's IPreparedComponent interface which allows a prepared component to generate a result set when requested.
Field Summary |
---|
Fields inherited from interface org.pentaho.reporting.engine.classic.core.DataFactory |
---|
QUERY_LIMIT, QUERY_TIMEOUT |
Constructor Summary | |
---|---|
PentahoTableDataFactory()
default constructor |
|
PentahoTableDataFactory(String name,
TableModel tableModel)
constructor with one time call to addTable for convenience. |
Method Summary | |
---|---|
void |
addPreparedComponent(String name,
IPreparedComponent component)
add a prepared component to the map |
void |
addTable(String name,
TableModel tableModel)
add a table to the map |
void |
cancelRunningQuery()
|
Object |
clone()
|
void |
close()
|
void |
closeTables()
|
org.pentaho.reporting.engine.classic.core.DataFactory |
derive()
Derives a freshly initialized report data factory, which is independend of the original data factory. |
String[] |
getQueryNames()
|
void |
initialize(org.pentaho.reporting.libraries.base.config.Configuration configuration,
org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager,
org.pentaho.reporting.libraries.resourceloader.ResourceKey contextKey,
org.pentaho.reporting.engine.classic.core.ResourceBundleFactory resourceBundleFactory)
Initializes the data factory and provides new context information. |
boolean |
isQueryExecutable(String query,
org.pentaho.reporting.engine.classic.core.DataRow parameters)
|
void |
open()
|
TableModel |
queryData(String query,
org.pentaho.reporting.engine.classic.core.DataRow parameters)
Queries a datasource. |
void |
removeTable(String name)
remove a table from the map |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PentahoTableDataFactory()
public PentahoTableDataFactory(String name, TableModel tableModel)
name
- table nametableModel
- instance of table modelMethod Detail |
---|
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, org.pentaho.reporting.engine.classic.core.ResourceBundleFactory resourceBundleFactory)
initialize
in interface org.pentaho.reporting.engine.classic.core.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 addTable(String name, TableModel tableModel)
name
- table nametableModel
- instance of table modelpublic void addPreparedComponent(String name, IPreparedComponent component)
name
- prepared component namecomponent
- instance of prepared componentpublic void removeTable(String name)
name
- table namepublic TableModel queryData(String query, org.pentaho.reporting.engine.classic.core.DataRow parameters)
queryData
in interface org.pentaho.reporting.engine.classic.core.DataFactory
query
- the name of the table.parameters
- are ignored for this factory.
public void open()
open
in interface org.pentaho.reporting.engine.classic.core.DataFactory
public void close()
close
in interface org.pentaho.reporting.engine.classic.core.DataFactory
public void closeTables()
public org.pentaho.reporting.engine.classic.core.DataFactory derive()
derive
in interface org.pentaho.reporting.engine.classic.core.DataFactory
public Object clone()
clone
in interface org.pentaho.reporting.engine.classic.core.DataFactory
clone
in class Object
public String[] getQueryNames()
getQueryNames
in interface org.pentaho.reporting.engine.classic.core.DataFactory
public boolean isQueryExecutable(String query, org.pentaho.reporting.engine.classic.core.DataRow parameters)
isQueryExecutable
in interface org.pentaho.reporting.engine.classic.core.DataFactory
public void cancelRunningQuery()
cancelRunningQuery
in interface org.pentaho.reporting.engine.classic.core.DataFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |