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(SessionContext sessionContext, SearchManager searchMgr)
          Creates a new QueryManagerImpl for the passed session
 
Method Summary
 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()
          
 Iterable<Node> getWeaklyReferringNodes(Node node)
          Returns the ids of the nodes that refer to the node by weak references.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryManagerImpl

public QueryManagerImpl(SessionContext sessionContext,
                        SearchManager searchMgr)
                 throws RepositoryException
Creates a new QueryManagerImpl for the passed session

Parameters:
sessionContext - component context of the current session
searchMgr - the search manager of this workspace.
Throws:
RepositoryException - if an error occurs while initializing the query manager.
Method Detail

createQuery

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

Specified by:
createQuery in interface QueryManager
Throws:
RepositoryException

getQuery

public Query getQuery(Node node)
               throws RepositoryException

Specified by:
getQuery in interface QueryManager
Throws:
RepositoryException

getSupportedQueryLanguages

public String[] getSupportedQueryLanguages()
                                    throws RepositoryException

Specified by:
getSupportedQueryLanguages in interface QueryManager
Throws:
RepositoryException

getQOMFactory

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

Specified by:
getQOMFactory in interface QueryManager
Returns:
a QueryObjectModelFactory object
Since:
JCR 2.0

getWeaklyReferringNodes

public Iterable<Node> getWeaklyReferringNodes(Node node)
                                       throws RepositoryException
Returns the ids of the nodes that refer to the node by weak references.

Parameters:
node - the target node.
Returns:
the referring nodes.
Throws:
RepositoryException - if an error occurs.


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