Package org.apache.jackrabbit.core.query
Class QOMQueryFactory
- java.lang.Object
-
- org.apache.jackrabbit.core.query.QOMQueryFactory
-
- All Implemented Interfaces:
QueryFactory
public class QOMQueryFactory extends Object implements QueryFactory
QOMQueryFactory
implements a query factory that creates QOM based queries.
-
-
Constructor Summary
Constructors Constructor Description QOMQueryFactory(QueryObjectModelFactory qf, ValueFactory vf)
Creates a new QOM base query factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Query
createQuery(String statement, String language)
Creates a JCR query instance from the givenstatement
in the givenlanguage
.List<String>
getSupportedLanguages()
-
-
-
Constructor Detail
-
QOMQueryFactory
public QOMQueryFactory(QueryObjectModelFactory qf, ValueFactory vf)
Creates a new QOM base query factory.- Parameters:
qf
- the QOM factory.vf
- the value factory.
-
-
Method Detail
-
getSupportedLanguages
public List<String> getSupportedLanguages()
- Specified by:
getSupportedLanguages
in interfaceQueryFactory
- 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 givenstatement
in the givenlanguage
.- Specified by:
createQuery
in interfaceQueryFactory
- 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.
-
-