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

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

public class QueryImpl
extends AbstractQueryImpl

Implements the ExecutableQuery interface.


Field Summary
static Name DEFAULT_SELECTOR_NAME
          The default selector name 's'.
protected  QueryRootNode root
          The root node of the query tree
 
Fields inherited from class org.apache.jackrabbit.core.query.lucene.AbstractQueryImpl
index, itemMgr, propReg, session
 
Constructor Summary
QueryImpl(SessionImpl session, ItemManager itemMgr, SearchIndex index, PropertyTypeRegistry propReg, String statement, String language, QueryNodeFactory factory)
          Creates a new query instance from a query string.
 
Method Summary
 QueryResult execute(long offset, long limit)
          Executes this query and returns a QueryResult.
 Name[] getSelectorNames()
          
protected  Name[] getSelectProperties()
          Returns the select properties for this query.
 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
addVariableName, bindValue, getBindVariableValues, getRespectDocumentOrder, setRespectDocumentOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SELECTOR_NAME

public static final Name DEFAULT_SELECTOR_NAME
The default selector name 's'.


root

protected final QueryRootNode root
The root node of the query tree

Constructor Detail

QueryImpl

public QueryImpl(SessionImpl session,
                 ItemManager itemMgr,
                 SearchIndex index,
                 PropertyTypeRegistry propReg,
                 String statement,
                 String language,
                 QueryNodeFactory factory)
          throws InvalidQueryException
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.
statement - the query statement.
language - the syntax of the query statement.
factory - the query node factory.
Throws:
InvalidQueryException - if the query statement is invalid according to the specified language.
Method Detail

execute

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

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

getSelectProperties

protected Name[] getSelectProperties()
                              throws RepositoryException
Returns the select properties for this query.

Returns:
array of select property names.
Throws:
RepositoryException - if an error occurs.

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.

getSelectorNames

public Name[] getSelectorNames()

Specified by:
getSelectorNames in class AbstractQueryImpl
Returns:
the selector names for this query.


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