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

## net.sf.jasperreports.engine.query
Interface JRQueryExecuter

All Known Implementing Classes:
  JRAbstractQueryExecuter, JREmptyQueryExecuter, JRHibernateQueryExecuter, JRJdbcQueryExecuter, JRJpaQueryExecuter, JRMondrianQueryExecuter, JRXmlaQueryExecuter, JRXPathQueryExecuter

    public interface JRQueryExecuter

Query executer interface.

An implementation of this interface is created when the input data of a report/dataset is specified by a query.

The implementation will run the query and create a `JRDataSource` from the result.

The query executers would usually be initialized by a `JRQueryExecuterFactory` with the query and the parameter values.

Version:
  $Id: JRQueryExecuter.java 3034 2009-08-27 11:58:04Z teodord $
Author:
  Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
  `JRQueryExecuterFactory`

Method Summary
`boolean` | `cancelQuery()` Cancels the query if it's currently running.
`void` | `close()` Closes resources kept open during the data source iteration.
`JRDataSource` | `createDatasource()` Executes the query and creates a `JRDataSource` out of the result.

Method Detail

### createDatasource

    JRDataSource createDatasource()
                                  throws JRException

  Executes the query and creates a `JRDataSource` out of the result.

  Returns:
    a `JRDataSource` wrapping the query execution result.
  Throws:
    `JRException`

### close

    void close()

  Closes resources kept open during the data source iteration.

  This method is called after the report is filled or the dataset is iterated. If a resource is not needed after the data source has been created, it should be released at the end of `createDatasource`.

### cancelQuery

    boolean cancelQuery()
                        throws JRException

  Cancels the query if it's currently running.

  This method will be called from a different thread if the client decides to cancel the filling process.

  Returns:
    `true` if and only if the query was running and it has been canceled
  Throws:
    `JRException`

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

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com