Package javax.jcr.query
Interface QueryResult
- All Known Subinterfaces:
JackrabbitQueryResult
public interface QueryResult
A
QueryResult
object. Returned by Query.execute()
.-
Method Summary
Modifier and TypeMethodDescriptionString[]
Returns an array of all the column names in the table view of this result set.getNodes()
Returns an iterator over all nodes that match the query.getRows()
Returns an iterator over theRow
s of the result table.String[]
Returns an array of all the selector names that were used in the query that created this result.
-
Method Details
-
getColumnNames
Returns an array of all the column names in the table view of this result set.- Returns:
- a
String
array holding the column names. - Throws:
RepositoryException
- if an error occurs.
-
getRows
Returns an iterator over theRow
s of the result table. The rows are returned according to the ordering specified in the query.- Returns:
- a
RowIterator
- Throws:
RepositoryException
- if this call is the second time eithergetRows
or getNodes has been called on the sameQueryResult
object or if another error occurs.
-
getNodes
Returns an iterator over all nodes that match the query. The nodes are returned according to the ordering specified in the query.- Returns:
- a
NodeIterator
- Throws:
RepositoryException
- if the query contains more than one selector, if this call is the second time eithergetRows
or getNodes has been called on the sameQueryResult
object or if another error occurs.
-
getSelectorNames
Returns an array of all the selector names that were used in the query that created this result. If the query did not have a selector name then an empty array is returned.- Returns:
- a
String
array holding the selector names. - Throws:
RepositoryException
- if an error occurs.
-