public abstract class AbstractQueryImpl extends Object implements ExecutableQuery
AbstractQueryImpl
provides a base class for executable queries
based on SearchIndex
.Modifier and Type | Field and Description |
---|---|
protected org.apache.jackrabbit.core.query.lucene.PerQueryCache |
cache |
protected SearchIndex |
index
The actual search index
|
protected PropertyTypeRegistry |
propReg
The property type registry for type lookup.
|
protected SessionContext |
sessionContext
Component context of the current session
|
Constructor and Description |
---|
AbstractQueryImpl(SessionContext sessionContext,
SearchIndex index,
PropertyTypeRegistry propReg)
Creates a new query instance from a query string.
|
Modifier and Type | Method and Description |
---|---|
protected QueryObjectModelFactory |
getQOMFactory() |
boolean |
getRespectDocumentOrder()
If set
true the result nodes will be in document order
per default (if no order by clause is specified). |
abstract boolean |
needsSystemTree()
Returns
true if this query node needs items under
/jcr:system to be queried. |
void |
setRespectDocumentOrder(boolean documentOrder)
Sets a new value for this property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
protected final SessionContext sessionContext
protected final SearchIndex index
protected final PropertyTypeRegistry propReg
protected final org.apache.jackrabbit.core.query.lucene.PerQueryCache cache
public AbstractQueryImpl(SessionContext sessionContext, SearchIndex index, PropertyTypeRegistry propReg)
sessionContext
- component context of the current sessionindex
- the search index.propReg
- the property type registry.public boolean getRespectDocumentOrder()
true
the result nodes will be in document order
per default (if no order by clause is specified). If set to
false
the 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
.
public void setRespectDocumentOrder(boolean documentOrder)
documentOrder
- if true
the result nodes are in
document order per default.getRespectDocumentOrder()
protected QueryObjectModelFactory getQOMFactory() throws RepositoryException
RepositoryException
- if an error occurs.public abstract boolean needsSystemTree()
true
if this query node needs items under
/jcr:system to be queried.true
if this query node needs content under
/jcr:system to be queried; false
otherwise.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.