org.apache.jackrabbit.core.query
Class QueryManagerImpl

java.lang.Object
  extended by org.apache.jackrabbit.core.query.QueryManagerImpl
All Implemented Interfaces:
QueryManager

public class QueryManagerImpl
extends Object
implements QueryManager

This class implements the QueryManager interface.


Constructor Summary
QueryManagerImpl(SessionImpl session, ItemManager itemMgr, SearchManager searchMgr)
          Creates a new QueryManagerImpl for the passed session
 
Method Summary
 PreparedQuery createPreparedQuery(String statement, String language)
          Creates a new prepared query by specifying the query statement itself and the language in which the query is stated.
 Query createQuery(String statement, String language)
          
 QueryObjectModelFactory getQOMFactory()
          Returns a QueryObjectModelFactory with which a JCR-JQOM query can be built programmatically.
 Query getQuery(Node node)
          
 String[] getSupportedQueryLanguages()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryManagerImpl

public QueryManagerImpl(SessionImpl session,
                        ItemManager itemMgr,
                        SearchManager searchMgr)
Creates a new QueryManagerImpl for the passed session

Parameters:
session -
itemMgr -
searchMgr -
Method Detail

createQuery

public Query createQuery(String statement,
                         String language)
                  throws InvalidQueryException,
                         RepositoryException

Specified by:
createQuery in interface QueryManager
Throws:
InvalidQueryException
RepositoryException

getQuery

public Query getQuery(Node node)
               throws InvalidQueryException,
                      RepositoryException

Specified by:
getQuery in interface QueryManager
Throws:
InvalidQueryException
RepositoryException

getSupportedQueryLanguages

public String[] getSupportedQueryLanguages()
                                    throws RepositoryException

Specified by:
getSupportedQueryLanguages in interface QueryManager
Throws:
RepositoryException

createPreparedQuery

public PreparedQuery createPreparedQuery(String statement,
                                         String language)
                                  throws InvalidQueryException,
                                         RepositoryException
Creates a new prepared query by specifying the query statement itself and the language in which the query is stated. If the query statement is syntactically invalid, given the language specified, an InvalidQueryException is thrown. The language parameter must be a string from among those returned by QueryManager.getSupportedQueryLanguages(); if it is not, then an InvalidQueryException is thrown.

Parameters:
statement - a String
language - a String
Returns:
a PreparedQuery object
Throws:
InvalidQueryException - if the query statement is syntactically invalid or the specified language is not supported
RepositoryException - if another error occurs
Since:
JCR 2.0

getQOMFactory

public QueryObjectModelFactory getQOMFactory()
Returns a QueryObjectModelFactory with which a JCR-JQOM query can be built programmatically.

Returns:
a QueryObjectModelFactory object
Since:
JCR 2.0


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