org.apache.jackrabbit.core.query
Interface QueryFactory

All Known Implementing Classes:
AQTQueryFactory, CompoundQueryFactory, QOMQueryFactory

public interface QueryFactory

QueryFactory defines a simple interface for turning a statement in a given language into a JCR Query instance.


Method Summary
 Query createQuery(String statement, String language)
          Creates a JCR query instance from the given statement in the given language.
 List<String> getSupportedLanguages()
           
 

Method Detail

getSupportedLanguages

List<String> getSupportedLanguages()
Returns:
supported query languages by this factory.

createQuery

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

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.