org.apache.jackrabbit.core.query
Class CompoundQueryFactory

java.lang.Object
  extended by org.apache.jackrabbit.core.query.CompoundQueryFactory
All Implemented Interfaces:
QueryFactory

public class CompoundQueryFactory
extends Object
implements QueryFactory

CompoundQueryFactory implements a query factory that consists of multiple other query factories.


Constructor Summary
CompoundQueryFactory(List<QueryFactory> factories)
          Creates a compound query factory that consists of multiple other query factories.
 
Method Summary
 Query createQuery(String statement, String language)
          Creates a JCR query instance from the given statement in the given language.
 List<String> getSupportedLanguages()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundQueryFactory

public CompoundQueryFactory(List<QueryFactory> factories)
Creates a compound query factory that consists of multiple other query factories.

Parameters:
factories - the query factories.
Method Detail

getSupportedLanguages

public List<String> getSupportedLanguages()

Specified by:
getSupportedLanguages in interface QueryFactory
Returns:
supported query languages by this factory.

createQuery

public Query createQuery(String statement,
                         String language)
                  throws InvalidQueryException,
                         RepositoryException
Creates a JCR query instance from the given statement in the given language.

Specified by:
createQuery in interface QueryFactory
Parameters:
statement - the query statement.
language - the language of the query statement.
Returns:
the JCR query instance representing the query.
Throws:
InvalidQueryException - if the statement is malformed or the language is not supported.
RepositoryException - if another error occurs.


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