Class AbstractQueryImpl
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.AbstractQueryImpl
-
- All Implemented Interfaces:
ExecutableQuery
- Direct Known Subclasses:
QueryImpl
public abstract class AbstractQueryImpl extends Object implements ExecutableQuery
AbstractQueryImplprovides a base class for executable queries based onSearchIndex.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.jackrabbit.core.query.lucene.PerQueryCachecacheprotected SearchIndexindexThe actual search indexprotected PropertyTypeRegistrypropRegThe property type registry for type lookup.protected SessionContextsessionContextComponent context of the current session
-
Constructor Summary
Constructors Constructor Description AbstractQueryImpl(SessionContext sessionContext, SearchIndex index, PropertyTypeRegistry propReg)Creates a new query instance from a query string.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected QueryObjectModelFactorygetQOMFactory()booleangetRespectDocumentOrder()If settruethe result nodes will be in document order per default (if no order by clause is specified).abstract booleanneedsSystemTree()Returnstrueif this query node needs items under /jcr:system to be queried.voidsetRespectDocumentOrder(boolean documentOrder)Sets a new value for this property.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.core.query.ExecutableQuery
execute
-
-
-
-
Field Detail
-
sessionContext
protected final SessionContext sessionContext
Component context of the current session
-
index
protected final SearchIndex index
The actual search index
-
propReg
protected final PropertyTypeRegistry propReg
The property type registry for type lookup.
-
cache
protected final org.apache.jackrabbit.core.query.lucene.PerQueryCache cache
-
-
Constructor Detail
-
AbstractQueryImpl
public AbstractQueryImpl(SessionContext sessionContext, SearchIndex index, PropertyTypeRegistry propReg)
Creates a new query instance from a query string.- Parameters:
sessionContext- component context of the current sessionindex- the search index.propReg- the property type registry.
-
-
Method Detail
-
getRespectDocumentOrder
public boolean getRespectDocumentOrder()
If settruethe result nodes will be in document order per default (if no order by clause is specified). If set tofalsethe result nodes are returned in whatever sequence the index has stored the nodes. That sequence is stable over multiple invocations of the same query, but will change when nodes get added or removed from the index.The default value for this property is
true.- Returns:
- the current value of this property.
-
setRespectDocumentOrder
public void setRespectDocumentOrder(boolean documentOrder)
Sets a new value for this property.- Parameters:
documentOrder- iftruethe result nodes are in document order per default.- See Also:
getRespectDocumentOrder()
-
getQOMFactory
protected QueryObjectModelFactory getQOMFactory() throws RepositoryException
- Returns:
- the query object model factory.
- Throws:
RepositoryException- if an error occurs.
-
needsSystemTree
public abstract boolean needsSystemTree()
Returnstrueif this query node needs items under /jcr:system to be queried.- Returns:
trueif this query node needs content under /jcr:system to be queried;falseotherwise.
-
-