01: /*
02: * Copyright 2006 Day Management AG, Switzerland. All rights reserved.
03: */
04: package javax.jcr.query;
05:
06: import javax.jcr.*;
07:
08: /**
09: * A <code>QueryResult</code> object. Returned by {@link javax.jcr.query.Query#execute()}.
10: */
11: public interface QueryResult {
12:
13: /**
14: * Returns an array of all the column names in the table view of this
15: * result set.
16: *
17: * @return a <code>PropertyIterator</code>
18: * @throws RepositoryException if an error occurs.
19: */
20: public String[] getColumnNames() throws RepositoryException;
21:
22: /**
23: * Returns an iterator over the <code>Row</code>s of the result table.
24: * The rows are returned according to the ordering specified in the query.
25: *
26: * @return a <code>RowIterator</code>
27: * @throws RepositoryException if an error occurs.
28: */
29: public RowIterator getRows() throws RepositoryException;
30:
31: /**
32: * Returns an iterator over all nodes that match the query. The rows are
33: * returned according to the ordering specified in the query. If the query
34: * contains more than one selector, this method will throw a
35: * <code>RepositoryException</code>.
36: *
37: * @return a <code>NodeIterator</code>
38: * @throws RepositoryException if the query contains more than one selector
39: * or if another error occurs.
40: */
41: public NodeIterator getNodes() throws RepositoryException;
42: }
|