Package org.xwiki.query
Interface QueryManager
-
@Role public interface QueryManager
This interface encapsulates methods for the management of search queries and is similar to JCR's QueryManager.- Since:
- 1.6M1
- Version:
- $Id: 12cef636e62db22f284c460935de9fd584139d93 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Query
createQuery(String statement, String language)
Create query for given statement and language.Set<String>
getLanguages()
Query
getNamedQuery(String queryName)
boolean
hasLanguage(String language)
-
-
-
Method Detail
-
createQuery
Query createQuery(String statement, String language) throws QueryException
Create query for given statement and language. Use createQuery("statement", Query.LANGUAGE). For example: createQuery("select doc.name from XWikiDocument doc", Query.HQL).- Parameters:
statement
- query statement.language
- language of the query. Must be one ofgetLanguages()
. UseQuery
.LANGUAGE for indication.- Returns:
- a Query object.
- Throws:
QueryException
- if language is not supported
-
getNamedQuery
Query getNamedQuery(String queryName) throws QueryException
- Parameters:
queryName
- name of named query.- Returns:
- Query object.
- Throws:
QueryException
- if there is no query with that name
-
hasLanguage
boolean hasLanguage(String language)
- Parameters:
language
- language to check.- Returns:
- is language supported.
-
-