org.eclipse.birt.data.engine.api.querydefn
Class BaseQueryDefinition

java.lang.Object
  extended byorg.eclipse.birt.data.engine.api.querydefn.BaseTransform
      extended byorg.eclipse.birt.data.engine.api.querydefn.BaseQueryDefinition
All Implemented Interfaces:
IBaseQueryDefinition, IBaseTransform, IDataQueryDefinition
Direct Known Subclasses:
QueryDefinition, SubqueryDefinition

public abstract class BaseQueryDefinition
extends BaseTransform
implements IBaseQueryDefinition

Default implementation of the IBaseQueryDefinition interface.


Field Summary
protected  java.util.List groups
           
protected  boolean hasDetail
           
protected  int maxRowCount
           
protected  IBaseQueryDefinition parentQuery
           
 
Fields inherited from class org.eclipse.birt.data.engine.api.querydefn.BaseTransform
AFTER_LAST_ROW, afterExpressions, BEFORE_FIRST_ROW, beforeExpressions, filters, ON_EACH_ROW, rowExpressions, sorts, subqueries
 
Method Summary
 void addBinding(IBinding binding)
          Add a column binding instance to query definition.
 void addGroup(GroupDefinition group)
          Appends a group definition to the group list.
 void addResultSetExpression(java.lang.String name, IBaseExpression expression)
          Deprecated.  
 boolean cacheQueryResults()
          Indicates if the query need cache the result rows .
 java.util.Map getBindings()
          Get all column binding instance from query definition.
 java.util.List getGroups()
          Returns the group definitions as an ordered collection of GroupDefinition objects.
 int getMaxRows()
          Gets the maximum number of detail rows that can be retrieved by this report query
 IBaseQueryDefinition getParentQuery()
          Returns the parent query.
 java.util.Map getResultSetExpressions()
          Gets the expressions that needs to be available at the group/list, as an Map of bound colum name to IBaseExpression objects.
 void setCacheQueryResults(boolean cacheQueryResults)
           
 void setMaxRows(int maxRows)
          Sets the maximum number of detail rows that can be retrieved by this report query
 void setUsesDetails(boolean usesDetails)
           
 boolean usesDetails()
          Indicates if the report will use the detail rows.
 
Methods inherited from class org.eclipse.birt.data.engine.api.querydefn.BaseTransform
addFilter, addSort, addSubquery, getFilters, getSorts, getSubqueries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.birt.data.engine.api.IBaseTransform
getFilters, getSorts, getSubqueries
 

Field Detail

groups

protected java.util.List groups

hasDetail

protected boolean hasDetail

parentQuery

protected IBaseQueryDefinition parentQuery

maxRowCount

protected int maxRowCount
Method Detail

getGroups

public java.util.List getGroups()
Returns the group definitions as an ordered collection of GroupDefinition objects. Groups are organizations within the data that support aggregation, filtering and sorting. Reports use groups to trigger level breaks.

Specified by:
getGroups in interface IBaseQueryDefinition
Returns:
the list of groups. If no group is defined, null is returned.

addGroup

public void addGroup(GroupDefinition group)
Appends a group definition to the group list.

Parameters:
group - Group definition to add

usesDetails

public boolean usesDetails()
Indicates if the report will use the detail rows. Allows the data transform engine to optimize the query if the details are not used.

Specified by:
usesDetails in interface IBaseQueryDefinition
Returns:
true if the detail rows are used, false if not used

setUsesDetails

public void setUsesDetails(boolean usesDetails)
Parameters:
usesDetails - Whether detail rows are used in this query

getParentQuery

public IBaseQueryDefinition getParentQuery()
Returns the parent query. The parent query is the outer query which encloses this query

Specified by:
getParentQuery in interface IBaseQueryDefinition

getMaxRows

public int getMaxRows()
Gets the maximum number of detail rows that can be retrieved by this report query

Specified by:
getMaxRows in interface IBaseQueryDefinition
Returns:
Maximum number of rows. If 0, there is no limit on how many rows this query can retrieve.

setMaxRows

public void setMaxRows(int maxRows)
Sets the maximum number of detail rows that can be retrieved by this report query


addResultSetExpression

public void addResultSetExpression(java.lang.String name,
                                   IBaseExpression expression)
Deprecated.  

Parameters:
name -
expression -

addBinding

public void addBinding(IBinding binding)
                throws org.eclipse.birt.data.engine.core.DataException
Description copied from interface: IBaseQueryDefinition
Add a column binding instance to query definition.

Specified by:
addBinding in interface IBaseQueryDefinition
Parameters:
binding -
Throws:
org.eclipse.birt.data.engine.core.DataException

getBindings

public java.util.Map getBindings()
Description copied from interface: IBaseQueryDefinition
Get all column binding instance from query definition.

Specified by:
getBindings in interface IBaseQueryDefinition
Returns:

getResultSetExpressions

public java.util.Map getResultSetExpressions()
Description copied from interface: IBaseQueryDefinition
Gets the expressions that needs to be available at the group/list, as an Map of bound colum name to IBaseExpression objects.

Specified by:
getResultSetExpressions in interface IBaseQueryDefinition
Returns:

cacheQueryResults

public boolean cacheQueryResults()
Description copied from interface: IBaseQueryDefinition
Indicates if the query need cache the result rows . The query result can be reload form the cache if the cache is used.

Specified by:
cacheQueryResults in interface IBaseQueryDefinition
Returns:
true if cache is needed.

setCacheQueryResults

public void setCacheQueryResults(boolean cacheQueryResults)


Copyright © 2005 Actuate Corp. All rights reserved.