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 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 of getLanguages(). Use Query.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
      • getLanguages

        Set<String> getLanguages()
        Returns:
        supported languages.
      • hasLanguage

        boolean hasLanguage​(String language)
        Parameters:
        language - language to check.
        Returns:
        is language supported.