oracle.jcr.query

## Interface OracleQuery

All Superinterfaces:
  Query

    public interface OracleQuery
    extends Query

OracleQuery is a parsed JCR query.

### Field Summary

### Fields inherited from interface javax.jcr.query.Query

`SQL, XPATH`

### Method Summary

All Methods Instance Methods Abstract Methods
`QueryResult` `execute()` Equivalent to `execute(false)`.
`OracleQueryResult` `execute(boolean willClose)` Executes this query.

### Methods inherited from interface javax.jcr.query.Query

`getLanguage, getStatement, getStoredQueryPath, storeAsNode`

### Method Detail

#### execute

    QueryResult execute()
                 throws RepositoryException

Equivalent to `execute(false)`.

Specified by:
  `execute` in interface `Query`
Returns:
  the query results
Throws:
  `RepositoryException` - if the operation fails

#### execute

    OracleQueryResult execute(boolean willClose)
                       throws RepositoryException

Executes this query.

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.

If `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".

Parameters:
  `willClose` - if `true`, the caller must call `close` on the returned `OracleQueryResult` when finished processing query results
Returns:
  the query results
Throws:
  `RepositoryException` - if the operation fails

Copyright © 2003, 2018, Oracle and/or its affiliates. All rights reserved.