org.apache.jackrabbit.core.query.lucene
Class LazyQueryResultImpl

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

public class LazyQueryResultImpl
extends Object
implements QueryResult

Implements the javax.jcr.query.QueryResult interface.


Field Summary
protected  QName[] orderProps
          The names of properties to use for ordering the result set.
protected  boolean[] orderSpecs
          The order specifier for each of the order properties.
protected  org.apache.lucene.search.Query query
          The lucene query to execute.
protected  QueryImpl queryImpl
          The query instance which created this query result.
protected  NamespaceResolver resolver
          The namespace resolver of the session executing the query
protected  QName[] selectProps
          The select properties
 
Constructor Summary
LazyQueryResultImpl(SearchIndex index, ItemManager itemMgr, NamespaceResolver resolver, AccessManager accessMgr, QueryImpl queryImpl, org.apache.lucene.search.Query query, QName[] selectProps, QName[] orderProps, boolean[] orderSpecs, boolean documentOrder)
          Creates a new query result.
 
Method Summary
protected  QueryHits executeQuery()
          Executes the query for this result and returns hits.
 String[] getColumnNames()
          
 NodeIterator getNodes()
          
 RowIterator getRows()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolver

protected final NamespaceResolver resolver
The namespace resolver of the session executing the query


queryImpl

protected final QueryImpl queryImpl
The query instance which created this query result.


query

protected final org.apache.lucene.search.Query query
The lucene query to execute.


selectProps

protected final QName[] selectProps
The select properties


orderProps

protected final QName[] orderProps
The names of properties to use for ordering the result set.


orderSpecs

protected final boolean[] orderSpecs
The order specifier for each of the order properties.

Constructor Detail

LazyQueryResultImpl

public LazyQueryResultImpl(SearchIndex index,
                           ItemManager itemMgr,
                           NamespaceResolver resolver,
                           AccessManager accessMgr,
                           QueryImpl queryImpl,
                           org.apache.lucene.search.Query query,
                           QName[] selectProps,
                           QName[] orderProps,
                           boolean[] orderSpecs,
                           boolean documentOrder)
                    throws RepositoryException
Creates a new query result.

Parameters:
index - the search index where the query is executed.
itemMgr - the item manager of the session executing the query.
resolver - the namespace resolver of the session executing the query.
accessMgr - the access manager of the session executiong the query.
queryImpl - the query instance which created this query result.
query - the lucene query to execute on the index.
selectProps - the select properties of the query.
orderProps - the names of the order properties.
orderSpecs - the order specs, one for each order property name.
documentOrder - if true the result is returned in document order.
Throws:
RepositoryException
Method Detail

getColumnNames

public String[] getColumnNames()
                        throws RepositoryException

Specified by:
getColumnNames in interface QueryResult
Throws:
RepositoryException

getNodes

public NodeIterator getNodes()
                      throws RepositoryException

Specified by:
getNodes in interface QueryResult
Throws:
RepositoryException

getRows

public RowIterator getRows()
                    throws RepositoryException

Specified by:
getRows in interface QueryResult
Throws:
RepositoryException

executeQuery

protected QueryHits executeQuery()
                          throws IOException
Executes the query for this result and returns hits. The caller must close the query hits when he is done using it.

Returns:
hits for this query result.
Throws:
IOException - if an error occurs while executing the query.


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