Interface QueryManager


  • public interface QueryManager
    This interface encapsulates methods for the management of search queries. Provides methods for the creation and retrieval of search queries.
    • Method Detail

      • createQuery

        Query createQuery​(java.lang.String statement,
                          java.lang.String language)
                   throws InvalidQueryException,
                          RepositoryException
        Creates a new query by specifying the query statement itself and the language in which the query is stated. The language must be a string from among those returned by QueryManager.getSupportedQueryLanguages().
        Parameters:
        statement - a String
        language - a String
        Returns:
        a Query object
        Throws:
        InvalidQueryException - if the query statement is syntactically invalid or the specified language is not supported.
        RepositoryException - if another error occurs.
      • getQOMFactory

        QueryObjectModelFactory getQOMFactory()
        Returns a QueryObjectModelFactory with which a JCR-JQOM query can be built programmatically.
        Returns:
        a QueryObjectModelFactory object
        Since:
        JCR 2.0
      • getSupportedQueryLanguages

        java.lang.String[] getSupportedQueryLanguages()
                                               throws RepositoryException
        Returns an array of strings representing all query languages supported by this repository. This set must include at least the strings represented by the constants Query.JCR_SQL2 and Query.JCR_JQOM}. An implementation may also support other languages, including the deprecated languages of JCR 1.0: Query.XPATH and Query.SQL.
        Returns:
        A string array.
        Throws:
        RepositoryException - if an error occurs.