|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.query.AbstractQueryHandler
public abstract class AbstractQueryHandler
Implements default behaviour for some methods of QueryHandler
.
Constructor Summary | |
---|---|
AbstractQueryHandler()
|
Method Summary | |
---|---|
ExecutablePreparedQuery |
createExecutablePreparedQuery(SessionImpl session,
ItemManager itemMgr,
QueryObjectModelTree qomTree)
Creates a new query by specifying the query object model. Throws UnsupportedOperationException . |
protected abstract void |
doInit()
This method must be implemented by concrete sub classes and will be called from init(org.apache.jackrabbit.core.query.QueryHandlerContext) . |
QueryHandlerContext |
getContext()
Returns the context for this query handler. |
void |
init(QueryHandlerContext context)
Initializes this query handler by setting all properties in this class with appropriate parameter values. |
void |
updateNodes(NodeIdIterator remove,
NodeStateIterator add)
This default implementation calls the individual QueryHandler.deleteNode(NodeId)
and QueryHandler.addNode(org.apache.jackrabbit.core.state.NodeState) methods
for each entry in the iterators. |
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.QueryHandler |
---|
addNode, close, createExecutableQuery, deleteNode |
Constructor Detail |
---|
public AbstractQueryHandler()
Method Detail |
---|
public final void init(QueryHandlerContext context) throws IOException
init
in interface QueryHandler
context
- the context for this query handler.
IOException
- if an error occurs during initialization.protected abstract void doInit() throws IOException
init(org.apache.jackrabbit.core.query.QueryHandlerContext)
.
IOException
public QueryHandlerContext getContext()
getContext
in interface QueryHandler
QueryHandlerContext
instance for this
QueryHandler
.public void updateNodes(NodeIdIterator remove, NodeStateIterator add) throws RepositoryException, IOException
QueryHandler.deleteNode(NodeId)
and QueryHandler.addNode(org.apache.jackrabbit.core.state.NodeState)
methods
for each entry in the iterators. First the nodes to remove are processed
then the nodes to add.
updateNodes
in interface QueryHandler
remove
- uuids of nodes to remove.add
- NodeStates to add.
RepositoryException
- if an error occurs while indexing a node.
IOException
- if an error occurs while updating the index.public ExecutablePreparedQuery createExecutablePreparedQuery(SessionImpl session, ItemManager itemMgr, QueryObjectModelTree qomTree) throws InvalidQueryException
UnsupportedOperationException
.
createExecutablePreparedQuery
in interface QueryHandler
session
- the session of the current user creating the query
object.itemMgr
- the item manager of the current user.qomTree
- query query object model tree.
Query
object.
InvalidQueryException
- if the query object model tree is invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |