javax.jcr.query
Interface QueryResult


public interface QueryResult

A QueryResult object. Returned by Query.execute().


Method Summary
 java.lang.String[] getColumnNames()
          Returns an array of all the column names in the table view of this result set.
 NodeIterator getNodes()
          Returns an iterator over all nodes that match the query.
 RowIterator getRows()
          Returns an iterator over the Rows of the result table.
 java.lang.String[] getSelectorNames()
          Returns an array of all the selector names that were used in the query that created this result.
 

Method Detail

getColumnNames

java.lang.String[] getColumnNames()
                                  throws RepositoryException
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

RowIterator getRows()
                    throws RepositoryException
Returns an iterator over the Rows 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 either getRows or getNodes has been called on the same QueryResult object or if another error occurs.

getNodes

NodeIterator getNodes()
                      throws RepositoryException
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 either getRows or getNodes has been called on the same QueryResult object or if another error occurs.

getSelectorNames

java.lang.String[] getSelectorNames()
                                    throws RepositoryException
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.


Copyright © 2009 Day Software. All Rights Reserved.