Class AbstractDataFactory
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.AbstractDataFactory
-
- All Implemented Interfaces:
Serializable
,Cloneable
,DataFactory
,DataFactoryDesignTimeSupport
,DataFactoryMetaProvider
- Direct Known Subclasses:
AbstractNamedDataFactory
,AbstractScriptableDataFactory
,CachingDataFactory
,CompoundDataFactory
,DesignTimeDataFactory
,EmptyDataFactory
,ExternalDataFactory
,SequenceDataFactory
,SimpleSQLReportDataFactory
,StaticDataFactory
,TableDataFactory
public abstract class AbstractDataFactory extends Object implements DataFactoryDesignTimeSupport, Cloneable, DataFactoryMetaProvider
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
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 AbstractDataFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
calculateQueryLimit(DataRow parameters)
protected int
calculateQueryTimeOut(DataRow parameters)
void
cancelRunningQuery()
Attempts to cancel the query process that is generating the data for this data factory.DataFactory
clone()
DataFactory
derive()
Returns a copy of the data factory that is not affected by its anchestor and holds no connection to the anchestor anymore.org.pentaho.reporting.libraries.base.config.Configuration
getConfiguration()
org.pentaho.reporting.libraries.resourceloader.ResourceKey
getContextKey()
DataFactoryContext
getDataFactoryContext()
String
getDisplayConnectionName()
Locale
getLocale()
DataFactoryMetaData
getMetaData()
Object
getQueryHash(String query, DataRow dataRow)
String[]
getReferencedFields(String query, DataRow dataRow)
ResourceBundleFactory
getResourceBundleFactory()
org.pentaho.reporting.libraries.resourceloader.ResourceManager
getResourceManager()
void
initialize(DataFactoryContext dataFactoryContext)
Initializes the data factory and provides new context information.TableModel
queryDesignTimeStructure(String query, DataRow parameter)
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.DataFactory
close, getQueryNames, isQueryExecutable, queryData
-
-
-
-
Method Detail
-
cancelRunningQuery
public void cancelRunningQuery()
Description copied from interface:DataFactory
Attempts to cancel the query process that is generating the data for this data factory. If it is not possible to cancel the query, this call should be ignored.- Specified by:
cancelRunningQuery
in interfaceDataFactory
-
calculateQueryLimit
protected int calculateQueryLimit(DataRow parameters)
-
calculateQueryTimeOut
protected int calculateQueryTimeOut(DataRow parameters)
-
initialize
public void initialize(DataFactoryContext dataFactoryContext) throws ReportDataFactoryException
Description copied from interface:DataFactory
Initializes the data factory and provides new context information. Initialize is always called before the datafactory has been opened by calling DataFactory#open.- Specified by:
initialize
in interfaceDataFactory
- Parameters:
dataFactoryContext
- the current data-factory context, holding the configuration, resource-manager, context-key and resource-bundle-factory.- Throws:
ReportDataFactoryException
-
queryDesignTimeStructure
public TableModel queryDesignTimeStructure(String query, DataRow parameter) throws ReportDataFactoryException
- Specified by:
queryDesignTimeStructure
in interfaceDataFactoryDesignTimeSupport
- Throws:
ReportDataFactoryException
-
getLocale
public Locale getLocale()
-
getDataFactoryContext
public DataFactoryContext getDataFactoryContext()
-
getConfiguration
public org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
-
getResourceManager
public org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
-
getContextKey
public org.pentaho.reporting.libraries.resourceloader.ResourceKey getContextKey()
-
getResourceBundleFactory
public ResourceBundleFactory getResourceBundleFactory()
-
clone
public DataFactory clone()
- Specified by:
clone
in interfaceDataFactory
- Overrides:
clone
in classObject
-
derive
public DataFactory derive()
Description copied from interface:DataFactory
Returns a copy of the data factory that is not affected by its anchestor and holds no connection to the anchestor anymore. A data-factory will be derived at the beginning of the report processing.- Specified by:
derive
in interfaceDataFactory
- Returns:
- a copy of the data factory.
-
getMetaData
public DataFactoryMetaData getMetaData()
- Specified by:
getMetaData
in interfaceDataFactory
- Returns:
- the metadata object for this dataFactory
-
getDisplayConnectionName
public String getDisplayConnectionName()
- Specified by:
getDisplayConnectionName
in interfaceDataFactoryMetaProvider
-
getQueryHash
public Object getQueryHash(String query, DataRow dataRow) throws ReportDataFactoryException
- Specified by:
getQueryHash
in interfaceDataFactoryMetaProvider
- Throws:
ReportDataFactoryException
-
getReferencedFields
public String[] getReferencedFields(String query, DataRow dataRow) throws ReportDataFactoryException
- Specified by:
getReferencedFields
in interfaceDataFactoryMetaProvider
- Throws:
ReportDataFactoryException
-
-