org.apache.jackrabbit.core.query
Class AbstractQueryImpl

java.lang.Object
  extended byorg.apache.jackrabbit.core.query.AbstractQueryImpl
All Implemented Interfaces:
Query
Direct Known Subclasses:
QueryImpl

public abstract class AbstractQueryImpl
extends Object
implements Query

Defines common initialization methods for all query implementations.


Field Summary
 
Fields inherited from interface javax.jcr.query.Query
SQL, XPATH
 
Constructor Summary
AbstractQueryImpl()
           
 
Method Summary
abstract  void init(SessionImpl session, ItemManager itemMgr, QueryHandler handler, Node node)
          Initializes a query instance from a nt:query node.
abstract  void init(SessionImpl session, ItemManager itemMgr, QueryHandler handler, String statement, String language)
          Initializes a query instance from a query string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.query.Query
execute, getLanguage, getStatement, getStoredQueryPath, storeAsNode
 

Constructor Detail

AbstractQueryImpl

public AbstractQueryImpl()
Method Detail

init

public abstract void init(SessionImpl session,
                          ItemManager itemMgr,
                          QueryHandler handler,
                          String statement,
                          String language)
                   throws InvalidQueryException
Initializes a 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.
handler - the query handler of the search index.
statement - the query statement.
language - the syntax of the query statement.
Throws:
InvalidQueryException - if the query statement is invalid according to the specified language.

init

public abstract void init(SessionImpl session,
                          ItemManager itemMgr,
                          QueryHandler handler,
                          Node node)
                   throws InvalidQueryException,
                          RepositoryException
Initializes a query instance from a nt:query node.

Parameters:
session - the session of the user executing this query.
itemMgr - the item manager of the session executing this query.
handler - the query handler of the search index.
node - a node of type nt:query.
Throws:
InvalidQueryException - If node is not a valid persisted query (that is, a node of type nt:query).
RepositoryException - if another error occurs


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