|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.data.engine.api.DataEngine
public abstract class DataEngine
Data Engine API class.
Provides methods to define data sources and data sets, and to prepare a
IQueryDefinition
. An application
typically needs only one instance of this class, which can be used to
prepare and execute multiple data queries.
User of this class must always call the shutdown
method when it is
done with an instance of this class to ensure release of all data source
connections and related resources.
Field Summary | |
---|---|
static java.lang.String |
CUBECURSOR_FETCH_LIMIT_ON_COLUMN_EDGE
The fetch size on column and row edge in cube cursor. |
static java.lang.String |
CUBECURSOR_FETCH_LIMIT_ON_LEVEL
Deprecated. use DataEngine.CUBECURSOR_FETCH_LIMIT_ON_COLUMN_EDGE and DataEngine.CUBECUSROR_FETCH_LIMIT_ON_ROW_EDGE instead |
static java.lang.String |
CUBECUSROR_FETCH_LIMIT_ON_ROW_EDGE
|
static java.lang.String |
DATA_SET_CACHE_DELTA_FILE
|
static java.lang.String |
DATA_SET_CACHE_ROW_LIMIT
Indicates whether data set cache function need to be used: Negative integer: Enable data set cache. |
static java.lang.String |
DATASET_CACHE_OPTION
Deprecated. |
static java.lang.String |
IN_MEMORY_CUBE_SIZE
The size of cube to be saved in memory rather than in disk. |
static java.lang.String |
INCREMENTAL_CACHE_CONFIG
data set incremental cache file URL. |
static java.lang.String |
MEMORY_BUFFER_SIZE
Indicate the size of data cached for each result set.We only accept positive integer as input, the unit of which would be MB. |
static java.lang.String |
MEMORY_DATA_SET_CACHE
Indicates whether memory data set cache function need to be used: Positive integer: Enable memory data set cache. |
Constructor Summary | |
---|---|
DataEngine()
|
Method Summary | |
---|---|
abstract void |
addShutdownListener(IShutdownListener listener)
Add a shut down listener. |
abstract void |
clearCache(IBaseDataSourceDesign dataSource,
IBaseDataSetDesign dataSet)
If user wants to use the latest data from data set rather than local cache, user needs to call this clearCache method to delete the cache content from update local environment. |
abstract void |
closeDataSource(java.lang.String dataSourceName)
Provides a hint to DtE that the consumer is done with the given data source, and that its resources can be safely released as appropriate. |
abstract void |
defineDataSet(IBaseDataSetDesign dataSet)
Provides the definition of a data set to Data Engine. |
abstract void |
defineDataSource(IBaseDataSourceDesign dataSource)
Provides the definition of a data source to Data Engine. |
abstract IResultMetaData |
getCachedDataSetMetaData(IBaseDataSourceDesign dataSource,
IBaseDataSetDesign dataSet)
This method will return NULL if the named data set is not cached. |
abstract IQueryResults |
getQueryResults(java.lang.String queryResultID)
If and only if current mode is DataEngineContext.MODE_PRESENTATION, query result can be retrieved from report document. |
static DataEngine |
newDataEngine(DataEngineContext context)
Creates a new instance of DataEngine, using the specified DataEngineContext as its running environment |
static DataEngine |
newDataEngine(org.eclipse.birt.core.framework.PlatformConfig platformConfig,
DataEngineContext dataContext)
|
static DataEngine |
newDataEngine(org.mozilla.javascript.Scriptable sharedScope)
Deprecated. use newDataEngine( DataEngineContext context ) instead |
static DataEngine |
newDataEngine(org.mozilla.javascript.Scriptable sharedScope,
java.io.File homeDir)
Deprecated. Use newDataEngine(Scriptable) instead. Home Dir is no longer used. |
abstract org.eclipse.birt.data.engine.olap.api.IPreparedCubeQuery |
prepare(org.eclipse.birt.data.engine.olap.api.query.ICubeQueryDefinition query,
java.util.Map appContext)
Prepare the cube query definition, return an IPreparedCubeQuery instance |
abstract IPreparedQuery |
prepare(IQueryDefinition querySpec)
Verifies the elements of a report query spec and provides a hint to the query to prepare and optimize an execution plan. |
abstract IPreparedQuery |
prepare(IQueryDefinition querySpec,
java.util.Map appContext)
Verifies the elements of a report query spec, and provides a hint and application context object(s) to the query to prepare and optimize an execution plan. |
abstract org.eclipse.birt.data.engine.olap.api.IPreparedCubeQuery |
prepare(org.eclipse.birt.data.engine.olap.api.query.ISubCubeQueryDefinition query,
java.util.Map appContext)
Prepare the sub cube query definition, return an IPreparedCubeQuery instance |
abstract void |
registerQueries(IDataQueryDefinition[] queryDefns)
Optimize query execution by analyze a list of query definitions. |
abstract void |
removeListener(IShutdownListener listener)
Remove a shut down listener. |
abstract void |
shutdown()
Shuts down this instance of data engine, and releases all associated resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String DATASET_CACHE_OPTION
org.eclipse.birt.data.engine.api.DataEngine.prepare(
IQueryDefinition querySpec, Map appContext)
public static java.lang.String DATA_SET_CACHE_ROW_LIMIT
public static java.lang.String MEMORY_BUFFER_SIZE
public static java.lang.String DATA_SET_CACHE_DELTA_FILE
public static java.lang.String MEMORY_DATA_SET_CACHE
public static java.lang.String INCREMENTAL_CACHE_CONFIG
public static java.lang.String CUBECURSOR_FETCH_LIMIT_ON_COLUMN_EDGE
public static java.lang.String CUBECUSROR_FETCH_LIMIT_ON_ROW_EDGE
public static java.lang.String CUBECURSOR_FETCH_LIMIT_ON_LEVEL
public static java.lang.String IN_MEMORY_CUBE_SIZE
Constructor Detail |
---|
public DataEngine()
Method Detail |
---|
public static DataEngine newDataEngine(DataEngineContext context)
context,
- When this value is null, a default context will be used. The
default context is DataEngineContext.MODE_DIRECTPRESENT.
public static DataEngine newDataEngine(org.eclipse.birt.core.framework.PlatformConfig platformConfig, DataEngineContext dataContext) throws org.eclipse.birt.core.exception.BirtException
context
-
org.eclipse.birt.core.exception.BirtException
public static DataEngine newDataEngine(org.mozilla.javascript.Scriptable sharedScope)
sharedScope
- a Javascript scope to be used as the "shared" scope to
evaluate Javascript expressions by the data engine.public static DataEngine newDataEngine(org.mozilla.javascript.Scriptable sharedScope, java.io.File homeDir)
public abstract IQueryResults getQueryResults(java.lang.String queryResultID) throws org.eclipse.birt.core.exception.BirtException
queryResultID
-
org.eclipse.birt.core.exception.BirtException
public abstract void defineDataSource(IBaseDataSourceDesign dataSource) throws org.eclipse.birt.core.exception.BirtException
org.eclipse.birt.core.exception.BirtException
public abstract void defineDataSet(IBaseDataSetDesign dataSet) throws org.eclipse.birt.core.exception.BirtException
org.eclipse.birt.core.exception.BirtException
public abstract IResultMetaData getCachedDataSetMetaData(IBaseDataSourceDesign dataSource, IBaseDataSetDesign dataSet) throws org.eclipse.birt.core.exception.BirtException
dataSource
- dataSet
- parameterHints
-
org.eclipse.birt.core.exception.BirtException
public abstract void clearCache(IBaseDataSourceDesign dataSource, IBaseDataSetDesign dataSet) throws org.eclipse.birt.core.exception.BirtException
dataSource,
- which is associated with the data setdataSet,
- which cache needs to be cleared
org.eclipse.birt.core.exception.BirtException
public abstract IPreparedQuery prepare(IQueryDefinition querySpec) throws org.eclipse.birt.core.exception.BirtException
IQueryDefinition
(raw data transform) spec
based on static definition found in a report design.
This report query spec could be further refined during engine execution after having resolved any related runtime condition. For example, a nested report item might not be rendered based on a runtime condition. Thus its associated data expression could be removed from the report query defn given to DtE to prepare.
During prepare, the DTE does not open a data set.
In other words, any beforeOpen
script on a data set will not be
evaluated at this stage.
querySpec
- Specifies
the data access and data transforms services
needed from DtE to produce a set of query results.
IPreparedQuery
object that contains a prepared
query ready for execution.
org.eclipse.birt.data.engine.core.DataException
- if error occurs during the preparation of querySpec
org.eclipse.birt.core.exception.BirtException
public abstract IPreparedQuery prepare(IQueryDefinition querySpec, java.util.Map appContext) throws org.eclipse.birt.core.exception.BirtException
querySpec
- Specifies
the data access and data transforms services
needed from DtE to produce a set of query results.appContext
- The application context map for
preparation and execution of the querySpec;
could be null.
IPreparedQuery
object that contains a prepared
query ready for execution.
org.eclipse.birt.core.exception.BirtException
- if error occurs during the preparation of querySpecpublic abstract void registerQueries(IDataQueryDefinition[] queryDefns) throws org.eclipse.birt.data.engine.core.DataException
queryDefns
-
org.eclipse.birt.data.engine.core.DataException
public abstract void closeDataSource(java.lang.String dataSourceName) throws org.eclipse.birt.core.exception.BirtException
dataSourceName
- The name of a data source. The named data source
must have been previously defined.
org.eclipse.birt.core.exception.BirtException
public abstract org.eclipse.birt.data.engine.olap.api.IPreparedCubeQuery prepare(org.eclipse.birt.data.engine.olap.api.query.ICubeQueryDefinition query, java.util.Map appContext) throws org.eclipse.birt.core.exception.BirtException
query
- appContext
-
org.eclipse.birt.core.exception.BirtException
public abstract org.eclipse.birt.data.engine.olap.api.IPreparedCubeQuery prepare(org.eclipse.birt.data.engine.olap.api.query.ISubCubeQueryDefinition query, java.util.Map appContext) throws org.eclipse.birt.core.exception.BirtException
query
- appContext
-
org.eclipse.birt.core.exception.BirtException
public abstract void addShutdownListener(IShutdownListener listener)
public abstract void removeListener(IShutdownListener listener)
listener
- public abstract void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |