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
Interface IPreparedQuery

All Superinterfaces:
  IBasePreparedQuery

    public interface IPreparedQuery

extends IBasePreparedQuery

A prepared data engine query ready for execution. An instance of this class is compiled from the static definition of an `IQueryDefinition` object.

Method Summary
`IQueryResults` | `execute(IBaseQueryResults outerResults, org.mozilla.javascript.Scriptable scope)` Executes the prepared execution plan as an inner query that appears within the scope of another query.
`IQueryResults` | `execute(IQueryResults outerResults, org.mozilla.javascript.Scriptable queryScope)` Executes the prepared execution plan as an inner query that appears within the scope of another query.
`IQueryResults` | `execute(org.mozilla.javascript.Scriptable queryScope)` Executes the prepared execution plan.
`java.util.Collection` | `getParameterMetaData()` Returns a collection of `IParameterMetaData` that each describes the meta-data of a parameter defined in this query.
`IQueryDefinition` | `getReportQueryDefn()` Returns the same `IQueryDefinition` used to prepare this instance, without any changes.

Method Detail

### getReportQueryDefn

    IQueryDefinition getReportQueryDefn()

  Returns the same `IQueryDefinition` used to prepare this instance, without any changes.

### getParameterMetaData

    java.util.Collection getParameterMetaData()
                                              throws BirtException

  Returns a collection of `IParameterMetaData` that each describes the meta-data of a parameter defined in this query. The sequence in the collection has no implied meaning. A parameter's position value, if defined, is specified in a `IParameterMetaData`. Each parameter can be of input and/or output mode.

  Returns:
    The collection of `IParameterMetaData` to describe the meta-data of all parameters defined in this prepared query. Returns null if no parameters are defined, or if no parameter metadata is available.
  Throws:
    `BirtException`

### execute

    IQueryResults execute(org.mozilla.javascript.Scriptable queryScope)
                          throws BirtException

  Executes the prepared execution plan. This returns a `IQueryResults` object which can be used to obtain the result set metadata and the result iterator.

  The caller should create a separate Javascript scope, which uses the data engine's shared scope as its prototype, and pass that scope as a parameter to this method. The Data Engine is responsible for setting up necessary Javascript objects to facilitate evaluation of data related expressions (e.g., those that uses the Javascript "row" object).

  Parameters:
    `queryScope` - The Javascript scope for evaluating query's script expressions. This is expected to be a top-level scope with the Data Engine's global scope at its top prototype chain.
  Throws:
    `BirtException`

### execute

    IQueryResults execute(IQueryResults outerResults,
                          org.mozilla.javascript.Scriptable queryScope)
                          throws BirtException

  Executes the prepared execution plan as an inner query that appears within the scope of another query. The outer query must have been prepared and executed, and its results given as a parameter to this method.

  Parameters:
    `outerResults` - `IQueryResults` for the executed outer query
    `queryScope` - Javascript defined for this runtime instance of report query.
  Returns:
    The `IQueryResults` object for this report query
  Throws:
    `BirtException`

### execute

    IQueryResults execute(IBaseQueryResults outerResults,
                          org.mozilla.javascript.Scriptable scope)
                          throws org.eclipse.birt.data.engine.core.DataException

  Executes the prepared execution plan as an inner query that appears within the scope of another query. The outer query must have been prepared and executed, and its results given as a parameter to this method.

  Parameters:
    `outerResults` -
    `scope` -
  Returns:
  Throws:
    `org.eclipse.birt.data.engine.core.DataException`

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.