public class CachingDataFactory extends AbstractDataFactory implements CompoundDataFactorySupport
AbstractDataFactory.DataRowWrapper
QUERY_LIMIT, QUERY_SORT, QUERY_TIMEOUT
DESIGN_TIME
Constructor and Description |
---|
CachingDataFactory(DataFactory backend,
boolean dataCacheEnabled) |
CachingDataFactory(DataFactory backend,
boolean noClose,
boolean dataCacheEnabled) |
CachingDataFactory(DataFactory backend,
boolean noClose,
DataCache dataCache) |
Modifier and Type | Method and Description |
---|---|
void |
cancelRunningQuery()
Attempts to cancel the query process that is generating the data for this data factory.
|
CachingDataFactory |
clone() |
void |
close()
Closes the report data factory and all report data instances that have been returned by this instance.
|
DataFactory |
derive()
Derives a freshly initialized report data factory, which is independend of the original data factory.
|
DataFactory |
getDataFactoryForQuery(String queryName,
boolean freeform) |
String[] |
getQueryNames()
Returns all known query-names.
|
void |
initialize(DataFactoryContext dataFactoryContext)
Initializes the data factory and provides new context information.
|
boolean |
isFreeFormQueryExecutable(String query,
DataRow parameter) |
boolean |
isQueryExecutable(String query,
DataRow parameters)
Checks whether the query would be executable by this datafactory.
|
boolean |
isStaticQueryExecutable(String query,
DataRow parameters) |
static void |
printTableModelContents(TableModel mod)
Prints a table model to standard output.
|
TableModel |
queryData(String query,
DataRow parameters)
Queries a datasource.
|
TableModel |
queryDesignTimeStructure(String query,
DataRow parameters) |
TableModel |
queryDesignTimeStructureFreeForm(String query,
DataRow parameters) |
TableModel |
queryDesignTimeStructureStatic(String query,
DataRow parameters) |
TableModel |
queryFreeForm(String query,
DataRow parameters) |
TableModel |
queryStatic(String query,
DataRow parameters) |
calculateQueryLimit, calculateQueryTimeOut, getConfiguration, getContextKey, getDataFactoryContext, getDisplayConnectionName, getLocale, getMetaData, getQueryHash, getReferencedFields, getResourceBundleFactory, getResourceManager
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetaData
public CachingDataFactory(DataFactory backend, boolean dataCacheEnabled)
public CachingDataFactory(DataFactory backend, boolean noClose, boolean dataCacheEnabled)
public CachingDataFactory(DataFactory backend, boolean noClose, DataCache dataCache)
public void initialize(DataFactoryContext dataFactoryContext) throws ReportDataFactoryException
DataFactory
initialize
in interface DataFactory
initialize
in class AbstractDataFactory
dataFactoryContext
- the current data-factory context, holding the configuration, resource-manager, context-key and
resource-bundle-factory.ReportDataFactoryException
public boolean isQueryExecutable(String query, DataRow parameters)
DataFactory
isQueryExecutable
in interface DataFactory
query
- the query, never null.parameters
- the parameters, never null.public boolean isFreeFormQueryExecutable(String query, DataRow parameter)
isFreeFormQueryExecutable
in interface CompoundDataFactorySupport
public TableModel queryStatic(String query, DataRow parameters) throws ReportDataFactoryException
queryStatic
in interface CompoundDataFactorySupport
ReportDataFactoryException
public TableModel queryDesignTimeStructureStatic(String query, DataRow parameters) throws ReportDataFactoryException
queryDesignTimeStructureStatic
in interface CompoundDataFactorySupport
ReportDataFactoryException
public TableModel queryFreeForm(String query, DataRow parameters) throws ReportDataFactoryException
queryFreeForm
in interface CompoundDataFactorySupport
ReportDataFactoryException
public TableModel queryDesignTimeStructureFreeForm(String query, DataRow parameters) throws ReportDataFactoryException
queryDesignTimeStructureFreeForm
in interface CompoundDataFactorySupport
ReportDataFactoryException
public boolean isStaticQueryExecutable(String query, DataRow parameters)
isStaticQueryExecutable
in interface CompoundDataFactorySupport
public TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
queryData
in interface DataFactory
query
- parameters
- ReportDataFactoryException
- if an error occured while performing the query.public TableModel queryDesignTimeStructure(String query, DataRow parameters) throws ReportDataFactoryException
queryDesignTimeStructure
in interface DataFactoryDesignTimeSupport
queryDesignTimeStructure
in class AbstractDataFactory
ReportDataFactoryException
public void close()
close
in interface DataFactory
public DataFactory derive()
derive
in interface DataFactory
derive
in class AbstractDataFactory
UnsupportedOperationException
- as this class is not derivable.public static void printTableModelContents(TableModel mod)
mod
- the model.public String[] getQueryNames()
DataFactory
getQueryNames
in interface DataFactory
public void cancelRunningQuery()
DataFactory
cancelRunningQuery
in interface DataFactory
cancelRunningQuery
in class AbstractDataFactory
public CachingDataFactory clone()
clone
in interface DataFactory
clone
in class AbstractDataFactory
public DataFactory getDataFactoryForQuery(String queryName, boolean freeform)
getDataFactoryForQuery
in interface CompoundDataFactorySupport
Copyright © 2017 Hitachi Vantara. All rights reserved.