Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      org.eclipse.birt.data.engine.api.querydefn.BaseTransform
          org.eclipse.birt.data.engine.api.querydefn.BaseQueryDefinition

All Implemented Interfaces:
  IBaseQueryDefinition, IBaseTransform, IDataQueryDefinition, INamedObject

Direct Known Subclasses:
  QueryDefinition, SubqueryDefinition

    public abstract class BaseQueryDefinition

extends BaseTransform
implements IBaseQueryDefinition

Default implementation of the `IBaseQueryDefinition` interface.

Field Summary
`protected boolean` | `distinctValue`
`protected java.util.List` | `groups`
`protected boolean` | `hasDetail`
`protected int` | `maxRowCount`
`protected IBaseQueryDefinition` | `parentQuery`
`protected int` | `startingRow`

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.
`boolean` | `getDistinctValue()` If the flag is true this query will return the rows with distinct or unique column values.
`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
`java.lang.String` | `getName()` get the name of current object.
`IBaseQueryDefinition` | `getParentQuery()` Returns the parent query.
`IQueryExecutionHints` | `getQueryExecutionHints()` Return the Query Execution Hints information.
`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.
`int` | `getStartingRow()` Gets the starting row that will be retrieved by this query
`void` | `setCacheQueryResults(boolean cacheQueryResults)`
`void` | `setDistinctValue(boolean distinctValue)` Sets the distinct value flag.
`void` | `setMaxRows(int maxRows)` Sets the maximum number of detail rows that can be retrieved by this report query
`void` | `setName(java.lang.String name)` set the name of current object.
`void` | `setQueryExecutionHints(IQueryExecutionHints hints)` Set the query execution hints.
`void` | `setStartingRow(int startingRow)` Sets the starting row that will be retrieved by this 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

### startingRow

    protected int startingRow

### distinctValue

    protected boolean distinctValue

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

  Specified by:
    `setMaxRows` in interface `IBaseQueryDefinition`

### setStartingRow

    public void setStartingRow(int startingRow)

  Sets the starting row that will be retrieved by this query

  Parameters:
    `startingRow` -

### getStartingRow

    public int getStartingRow()

  Description copied from interface: `IBaseQueryDefinition`
  Gets the starting row that will be retrieved by this query

  Specified by:
    `getStartingRow` in interface `IBaseQueryDefinition`
  Returns:

### setDistinctValue

    public void setDistinctValue(boolean distinctValue)

  Sets the distinct value flag.

### getDistinctValue

    public boolean getDistinctValue()

  Description copied from interface: `IBaseQueryDefinition`
  If the flag is true this query will return the rows with distinct or unique column values. Currently this flag is valid only for the query which use another query as data source.

  Specified by:
    `getDistinctValue` in interface `IBaseQueryDefinition`
  Returns:

### 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`
  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)

### setQueryExecutionHints

    public void setQueryExecutionHints(IQueryExecutionHints hints)

  Set the query execution hints.

  Parameters:
    `hints` -

### getQueryExecutionHints

    public IQueryExecutionHints getQueryExecutionHints()

  Description copied from interface: `IBaseQueryDefinition`
  Return the Query Execution Hints information. The Query Execution Hints information defines hints info for Data engine to execution the query.

  Specified by:
    `getQueryExecutionHints` in interface `IBaseQueryDefinition`
  Returns:

### getName

    public java.lang.String getName()

  Description copied from interface: `INamedObject`
  get the name of current object.

  Specified by:
    `getName` in interface `INamedObject`
  Returns:

### setName

    public void setName(java.lang.String name)

  Description copied from interface: `INamedObject`
  set the name of current object.

  Specified by:
    `setName` in interface `INamedObject`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.