Class EmptyDataFactory
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.AbstractDataFactory
-
- org.pentaho.reporting.engine.classic.core.states.EmptyDataFactory
-
- All Implemented Interfaces:
Serializable
,Cloneable
,DataFactory
,DataFactoryDesignTimeSupport
,DataFactoryMetaProvider
public class EmptyDataFactory extends AbstractDataFactory
A datafactory that does not do any real work.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pentaho.reporting.engine.classic.core.AbstractDataFactory
AbstractDataFactory.DataRowWrapper
-
-
Field Summary
-
Fields inherited from interface org.pentaho.reporting.engine.classic.core.DataFactory
QUERY_LIMIT, QUERY_SORT, QUERY_TIMEOUT
-
Fields inherited from interface org.pentaho.reporting.engine.classic.core.DataFactoryDesignTimeSupport
DESIGN_TIME
-
-
Constructor Summary
Constructors Constructor Description EmptyDataFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EmptyDataFactory
clone()
void
close()
Closes the data factory and frees all resources held by this instance.String[]
getQueryNames()
Returns all known query-names.boolean
isQueryExecutable(String query, DataRow parameters)
Checks whether the query would be executable by this datafactory.TableModel
queryData(String query, DataRow parameters)
Queries a datasource.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.AbstractDataFactory
calculateQueryLimit, calculateQueryTimeOut, cancelRunningQuery, derive, getConfiguration, getContextKey, getDataFactoryContext, getDisplayConnectionName, getLocale, getMetaData, getQueryHash, getReferencedFields, getResourceBundleFactory, getResourceManager, initialize, queryDesignTimeStructure
-
-
-
-
Method Detail
-
queryData
public TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
Queries a datasource. The string 'query' defines the name of the query. The Parameterset given here may contain more data than actually needed for the query. The parameter-dataset may change between two calls, do not assume anything, and do not hold references to the parameter-dataset or the position of the columns in the dataset.- Parameters:
query
- the query stringparameters
- the parameters for the query- Returns:
- the result of the query as table model.
- Throws:
ReportDataFactoryException
- if an error occured while performing the query.
-
close
public void close()
Closes the data factory and frees all resources held by this instance.
-
isQueryExecutable
public boolean isQueryExecutable(String query, DataRow parameters)
Checks whether the query would be executable by this datafactory. This performs a rough check, not a full query.- Parameters:
query
-parameters
-- Returns:
-
getQueryNames
public String[] getQueryNames()
Description copied from interface:DataFactory
Returns all known query-names. A data-factory may accept more than the query-names returned here.- Returns:
- the known query names.
-
clone
public EmptyDataFactory clone()
- Specified by:
clone
in interfaceDataFactory
- Overrides:
clone
in classAbstractDataFactory
-
-