org.apache.jackrabbit.core.query.lucene.join
Class SimpleQueryResult

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.join.SimpleQueryResult
All Implemented Interfaces:
QueryResult

public class SimpleQueryResult
extends Object
implements QueryResult

Simple query result implementation.


Constructor Summary
protected SimpleQueryResult(String[] columnNames, String[] selectorNames, RowIterator rowIterator)
          Creates a query result with the given column and selector names and row iterator.
 
Method Summary
 String[] getColumnNames()
          Returns the column names of this query.
 NodeIterator getNodes()
          Returns the nodes that match this query.
 RowIterator getRows()
          Returns the query result rows.
 String[] getSelectorNames()
          Returns the selector names of this query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleQueryResult

protected SimpleQueryResult(String[] columnNames,
                            String[] selectorNames,
                            RowIterator rowIterator)
Creates a query result with the given column and selector names and row iterator.

Parameters:
columnNames - column names
selectorNames - selector names
rowIterator - iterator over matching rows
Method Detail

getColumnNames

public String[] getColumnNames()
Returns the column names of this query. Note that the returned array is not protected against modification by the client application.

Specified by:
getColumnNames in interface QueryResult
Returns:
column names

getSelectorNames

public String[] getSelectorNames()
Returns the selector names of this query. Note that the returned array is not protected against modification by the client application.

Specified by:
getSelectorNames in interface QueryResult
Returns:
selector names

getRows

public RowIterator getRows()
                    throws RepositoryException
Returns the query result rows.

Specified by:
getRows in interface QueryResult
Returns:
query result rows
Throws:
RepositoryException - if the query results have already been iterated through

getNodes

public NodeIterator getNodes()
                      throws RepositoryException
Returns the nodes that match this query.

Specified by:
getNodes in interface QueryResult
Returns:
matching nodes
Throws:
RepositoryException - if this query has more than one selector, or if the query results have already been iterated through


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.