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

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.AbstractQueryImpl
      extended by org.apache.jackrabbit.core.query.lucene.PreparedQueryImpl
All Implemented Interfaces:
ExecutablePreparedQuery, ExecutableQuery

public class PreparedQueryImpl
extends AbstractQueryImpl
implements ExecutablePreparedQuery

PreparedQueryImpl...


Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.query.lucene.AbstractQueryImpl
index, itemMgr, propReg, session
 
Constructor Summary
PreparedQueryImpl(SessionImpl session, ItemManager itemMgr, SearchIndex index, PropertyTypeRegistry propReg, QueryObjectModelTree qomTree)
          Creates a new query instance from a query string.
 
Method Summary
 void bindValue(Name varName, Value value)
          Binds the given value to the variable named varName.
 QueryResult execute(long offset, long limit)
          Executes this query and returns a QueryResult.
 boolean needsSystemTree()
          Returns true if this query node needs items under /jcr:system to be queried.
 
Methods inherited from class org.apache.jackrabbit.core.query.lucene.AbstractQueryImpl
getRespectDocumentOrder, setRespectDocumentOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreparedQueryImpl

public PreparedQueryImpl(SessionImpl session,
                         ItemManager itemMgr,
                         SearchIndex index,
                         PropertyTypeRegistry propReg,
                         QueryObjectModelTree qomTree)
Creates a new query instance from a query string.

Parameters:
session - the session of the user executing this query.
itemMgr - the item manager of the session executing this query.
index - the search index.
propReg - the property type registry.
qomTree - the query object model tree.
Method Detail

needsSystemTree

public boolean needsSystemTree()
Returns true if this query node needs items under /jcr:system to be queried.

Specified by:
needsSystemTree in class AbstractQueryImpl
Returns:
true if this query node needs content under /jcr:system to be queried; false otherwise.

execute

public QueryResult execute(long offset,
                           long limit)
                    throws RepositoryException
Executes this query and returns a QueryResult.

Specified by:
execute in interface ExecutableQuery
Parameters:
offset - the offset in the total result set
limit - the maximum result size
Returns:
a QueryResult
Throws:
RepositoryException - if an error occurs

bindValue

public void bindValue(Name varName,
                      Value value)
               throws IllegalArgumentException,
                      RepositoryException
Binds the given value to the variable named varName.

Specified by:
bindValue in interface ExecutablePreparedQuery
Parameters:
varName - name of variable in query
value - value to bind
Throws:
IllegalArgumentException - if varName is not a valid variable in this query.
RepositoryException - if an error occurs.


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