|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.CompoundDataFactory
public class CompoundDataFactory
The compound data factory is a collection of data-factories. Each of the child datafactories is queried in the order of their addition to the collection.
Field Summary |
---|
Fields inherited from interface org.pentaho.reporting.engine.classic.core.DataFactory |
---|
QUERY_LIMIT, QUERY_TIMEOUT |
Constructor Summary | |
---|---|
CompoundDataFactory()
|
Method Summary | |
---|---|
void |
add(DataFactory factory)
|
void |
add(int index,
DataFactory factory)
|
void |
cancelRunningQuery()
Attempts to cancel the query process that is generating the data for this data factory. |
Object |
clone()
Creates and returns a copy of this object. |
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. |
DataFactory |
get(int idx)
|
DataFactory |
getDataFactoryForQuery(String queryName)
|
DataFactory |
getDataFactoryForQuery(String queryName,
boolean freeform)
|
String[] |
getQueryNames()
Returns all known query-names. |
DataFactory |
getReference(int idx)
|
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 |
isFreeFormQueryExecutable(String query,
DataRow parameters)
|
boolean |
isNormalized()
|
boolean |
isQueryExecutable(String query,
DataRow parameters)
Checks whether the query would be executable by this datafactory. |
boolean |
isStaticQueryExecutable(String query,
DataRow parameters)
|
static CompoundDataFactory |
normalize(DataFactory dataFactory)
|
static CompoundDataFactory |
normalize(DataFactory dataFactory,
boolean derive)
|
void |
open()
Opens the data factory. |
TableModel |
queryData(String query,
DataRow parameters)
Queries a datasource. |
TableModel |
queryFreeForm(String query,
DataRow parameters)
|
TableModel |
queryStatic(String query,
DataRow parameters)
|
void |
remove(DataFactory dataFactory)
|
void |
remove(int index)
|
void |
set(int index,
DataFactory factory)
|
int |
size()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompoundDataFactory()
Method 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, ResourceBundleFactory resourceBundleFactory) throws ReportDataFactoryException
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.
ReportDataFactoryException
public void open() throws ReportDataFactoryException
DataFactory
open
in interface DataFactory
ReportDataFactoryException
- if an error occured while opening the datafactory resources.public final TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
queryData
in interface DataFactory
query
- the query stringparameters
- the parameters for the query
ReportDataFactoryException
- if an error occured while performing the query.public TableModel queryFreeForm(String query, DataRow parameters) throws ReportDataFactoryException
queryFreeForm
in interface CompoundDataFactorySupport
ReportDataFactoryException
public TableModel queryStatic(String query, DataRow parameters) throws ReportDataFactoryException
queryStatic
in interface CompoundDataFactorySupport
ReportDataFactoryException
public DataFactory derive()
derive
in interface DataFactory
public void close()
close
in interface DataFactory
public final boolean isQueryExecutable(String query, DataRow parameters)
isQueryExecutable
in interface DataFactory
query
- query name.parameters
- the parameters for the query.
public boolean isFreeFormQueryExecutable(String query, DataRow parameters)
isFreeFormQueryExecutable
in interface CompoundDataFactorySupport
public boolean isStaticQueryExecutable(String query, DataRow parameters)
isStaticQueryExecutable
in interface CompoundDataFactorySupport
public Object clone()
clone
in interface DataFactory
clone
in class Object
public void add(DataFactory factory)
public void add(int index, DataFactory factory) throws ReportDataFactoryException
ReportDataFactoryException
public void set(int index, DataFactory factory) throws ReportDataFactoryException
ReportDataFactoryException
public void remove(int index)
public void remove(DataFactory dataFactory)
public int size()
public DataFactory get(int idx)
public DataFactory getReference(int idx)
public boolean isNormalized()
public static CompoundDataFactory normalize(DataFactory dataFactory)
public static CompoundDataFactory normalize(DataFactory dataFactory, boolean derive)
public String[] getQueryNames()
DataFactory
getQueryNames
in interface DataFactory
public void cancelRunningQuery()
DataFactory
cancelRunningQuery
in interface DataFactory
public DataFactory getDataFactoryForQuery(String queryName, boolean freeform)
getDataFactoryForQuery
in interface CompoundDataFactorySupport
public DataFactory getDataFactoryForQuery(String queryName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |