Interface IDataExtractionTask
- All Superinterfaces:
IEngineTask
,IExtractionTask
an engine task that extracts data from a report. The task allows the return
of metadata and data from engine
User first creates the task from engine, then sets a report component ID, or
report component instance ID. If none is set, data extraction is assumed to
be based on all the data stored in the report. The user can call the
getMetaData method to retrieve metadata for each resultset. Based on the
metadata, he can select additional columns, add filter conditions, or specify
sorting conditions.
-
Field Summary
Fields inherited from interface org.eclipse.birt.report.engine.api.IEngineTask
CANCEL_ON_ERROR, CONTINUE_ON_ERROR, STATUS_CANCELLED, STATUS_FAILED, STATUS_NOT_STARTED, STATUS_RUNNING, STATUS_SUCCEEDED, TASK_DATAEXTRACTION, TASK_DATASETPREVIEW, TASK_GETPARAMETERDEFINITION, TASK_RENDER, TASK_RUN, TASK_RUNANDRENDER, TASK_UNKNOWN
-
Method Summary
Modifier and TypeMethodDescriptionextract()
Redeclare this method in order to return IExtractionResults.Deprecated.returns the metadata corresponding to the data stored in the report document, for the specific extraction level, i.e., report, daat set, report item, or report item instance levels.boolean
to indicate whether the cube export functionality should be enabled or not.void
selectColumns
(String[] columnNames) void
selectResultSet
(String resultSetName) select the result set from which to export data.void
setCubeExportEnabled
(boolean isCubeExportEnabled) to set the indicator whether to enable the cube export functionality.void
setDistinctValuesOnly
(boolean distinct) whether gets distinct valuesvoid
setInstanceID
(InstanceID iid) * @param iid identifies a report item instance that data extraction will happen onvoid
setMaxRows
(int maxRows) void
setStartRow
(int startRow) Sets start row of the result.Methods inherited from interface org.eclipse.birt.report.engine.api.IEngineTask
addScriptableJavaObject, cancel, cancel, close, getAppContext, getCancelFlag, getEngine, getErrors, getID, getLocale, getLogger, getParameterDisplayText, getParameterValue, getParameterValues, getReportRunnable, getStatus, getTaskType, getULocale, setAppContext, setDataSource, setDataSource, setErrorHandlingOption, setLocale, setLocale, setLogger, setParameter, setParameter, setParameterDisplayText, setParameterDisplayText, setParameterValue, setParameterValue, setParameterValues, setProgressMonitor, setStatusHandler, setTimeZone, setUserACL, validateParameters
Methods inherited from interface org.eclipse.birt.report.engine.api.IExtractionTask
extract, setFilters, setSorts, setSorts
-
Method Details
-
setCubeExportEnabled
void setCubeExportEnabled(boolean isCubeExportEnabled) to set the indicator whether to enable the cube export functionality. -
isCubeExportEnabled
boolean isCubeExportEnabled()to indicate whether the cube export functionality should be enabled or not. -
setInstanceID
* @param iid identifies a report item instance that data extraction will happen on -
getMetaData
Deprecated.returns the metadata corresponding to the data stored in the report document, for the specific extraction level, i.e., report, daat set, report item, or report item instance levels. To get the metadata for the extracted data, use the getResultMetaData method from the IDataIterator interface.- Returns:
- a List of IResultMetaData. The list usually has one result set meta data, but could have more if data extraction is based on the whole report
- Throws:
EngineException
-
getResultSetList
returns the metadata corresponding to the data stored in the report document, for the specific extraction level, i.e., report, daat set, report item, or report item instance levels. To get the metadata for the extracted data, use the getResultMetaData method from the IDataIterator interface.- Returns:
- a List of IResultSetItem.
- Throws:
EngineException
-
selectResultSet
select the result set from which to export data.- Parameters:
resultSetName
- the result set name
-
selectColumns
- Parameters:
columnName
- name of the column to be included in the data set
-
setMaxRows
void setMaxRows(int maxRows) - Parameters:
maxRows
- set the maximum rows that are returned from ResultSet
-
setStartRow
void setStartRow(int startRow) Sets start row of the result. -
setDistinctValuesOnly
void setDistinctValuesOnly(boolean distinct) whether gets distinct values -
extract
Redeclare this method in order to return IExtractionResults.- Specified by:
extract
in interfaceIExtractionTask
- Returns:
- the extraction result
- Throws:
EngineException
-