| Modifier and Type | Method and Description | 
|---|---|
| QueryResult | execute()Equivalent to  execute(false). | 
| OracleQueryResult | execute(boolean willClose)Executes this query. | 
getLanguage, getStatement, getStoredQueryPath, storeAsNodeQueryResult execute() throws RepositoryException
execute(false).execute in interface QueryRepositoryException - if the operation failsOracleQueryResult execute(boolean willClose) throws RepositoryException
A query can be executed in either of two modes:
If willClose is false, the query will be executed and all results will be immediately retrieved. The getRows and getNodes methods on the returned OracleQueryResult can be called repeatedly, and the getSize method on the RowIterator and NodeIterator objects returned by these methods will accurately report the number of query results.
willClose is true, the query will be executed but the results may not be retrieved until needed. This may both improve performance and decrease memory footprint. However, this mode requires the close method of the returned OracleQueryResult to be called to release resources held by the query. Also, the getRows and getNodes methods of the returned OracleQueryResult may be called no more than once and calling one precludes calling the other. Finally, calling getSize on the RowIterator and NodeIterator objects returned by these methods may return -1, meaning "unknown".willClose - if true, the caller must call close on the returned OracleQueryResult when finished processing query resultsRepositoryException - if the operation fails