org.eclipse.birt.data.engine.api
Interface IQueryDefinition

All Superinterfaces:
IBaseQueryDefinition, IBaseTransform, IDataQueryDefinition, INamedObject
All Known Implementing Classes:
QueryDefinition

public interface IQueryDefinition
extends IBaseQueryDefinition

Defines a data engine query: a set of data transforms that provides data for a list-like element in the report. The data engine query encapsulates three types of information:
1. A data set, including computed columns together with the parameter bindings.
2. Data transforms that are defined on report items, i.e., sorting, filtering, grouping, aggregation functions, and so on.
3. Subqueries that are contained in the current report query.


Method Summary
 java.lang.String[] getColumnProjection()
          Provides a column projection hint to the data engine.
 java.lang.String getDataSetName()
          Gets the name of the data set used by this query
 java.util.Collection getInputParamBindings()
          Returns the set of input parameter bindings as an unordered collection of IInputParameterBinding objects.
 java.lang.String getQueryResultsID()
          When this value is not null, the data set name will not be used, since it indicates query is running on the data of report document or local caching of QueryResults.
 IBaseQueryDefinition getSourceQuery()
          Return the source query of current query.
 boolean needAutoBinding()
          When user knows which columns are in data set and user likes to get the column value without explicitly binding a name to a data set row expression, this flag can be set as true to indicate it.
 
Methods inherited from interface org.eclipse.birt.data.engine.api.IBaseQueryDefinition
addBinding, cacheQueryResults, getBindings, getDistinctValue, getGroups, getMaxRows, getParentQuery, getQueryExecutionHints, getResultSetExpressions, getStartingRow, setMaxRows, usesDetails
 
Methods inherited from interface org.eclipse.birt.data.engine.api.IBaseTransform
getFilters, getSorts, getSubqueries
 
Methods inherited from interface org.eclipse.birt.data.engine.api.INamedObject
getName, setName
 

Method Detail

getDataSetName

java.lang.String getDataSetName()
Gets the name of the data set used by this query


getQueryResultsID

java.lang.String getQueryResultsID()
When this value is not null, the data set name will not be used, since it indicates query is running on the data of report document or local caching of QueryResults.

Returns:
associated queryResultID in query on report document/local caching

needAutoBinding

boolean needAutoBinding()
When user knows which columns are in data set and user likes to get the column value without explicitly binding a name to a data set row expression, this flag can be set as true to indicate it. For example, there is one column, COUNTRY. When this flag is false, if user wants to get the value of COUNTRY, user first needs to add a binding like , and then user can get the value by the name of COUNTRY. But if this flag is set, user does not need to add the binding, and then user can get the value directly. Currently only when there is data set defined, this flag will have effect.

Returns:
true, auto binding needs to be supported. false, auto binding is not supported, this is default behavior.

getInputParamBindings

java.util.Collection getInputParamBindings()
Returns the set of input parameter bindings as an unordered collection of IInputParameterBinding objects.

Returns:
the input parameter bindings. If no binding is defined, null is returned.

getColumnProjection

java.lang.String[] getColumnProjection()
Provides a column projection hint to the data engine. The caller informs the data engine that only a selected list of columns defined by the data set are used by this report query. The names of those columns (the "projected columns") are passed in as an array of string.
If a column projection is set, runtime error may occur if the report query uses columns that are not defined in the projected column list.


getSourceQuery

IBaseQueryDefinition getSourceQuery()
Return the source query of current query. If source query is provided, the execution result of it will be treated as the "data source" of current query definition. That is, the current query will be executed against the query results, rather then "data source/data set" settings.

Returns:


Copyright © 2008 Actuate Corp. All rights reserved.