Interface JRQueryExecuter
-
- All Known Implementing Classes:
AbstractJsonQueryExecuter,AbstractXlsQueryExecuter,ExcelQueryExecuter,JaxenXPathQueryExecuter,JRAbstractQueryExecuter,JRCsvQueryExecuter,JREmptyQueryExecuter,JRHibernateQueryExecuter,JRJdbcQueryExecuter,JRJpaQueryExecuter,JRMondrianQueryExecuter,JRXlsxQueryExecuter,JRXmlaQueryExecuter,JRXPathQueryExecuter,JsonQLQueryExecuter,JsonQueryExecuter,Olap4jMondrianQueryExecuter,Olap4jXmlaQueryExecuter,XlsQueryExecuter
public interface JRQueryExecuterQuery 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 aJRDataSourcefrom the result. The query executers would usually be initialized by aQueryExecuterFactorywith the query and the parameter values.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
QueryExecuterFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancancelQuery()Cancels the query if it's currently running.voidclose()Closes resources kept open during the data source iteration.JRDataSourcecreateDatasource()Executes the query and creates aJRDataSourceout of the result.
-
-
-
Method Detail
-
createDatasource
JRDataSource createDatasource() throws JRException
Executes the query and creates aJRDataSourceout of the result.- Returns:
- a
JRDataSourcewrapping 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 ofcreateDatasource.
-
cancelQuery
boolean cancelQuery() throws JRExceptionCancels 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:
trueif and only if the query was running and it has been canceled- Throws:
JRException
-
-