Interface QueryObjectModelBuilder

  • All Known Implementing Classes:
    SQL2QOMBuilder

    public interface QueryObjectModelBuilder
    QueryObjectModelBuilder defines an interface for building a query object model from a string based query statement and vice versa.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canHandle​(java.lang.String language)
      Returns true if this QOM builder can handle a statement in language.
      javax.jcr.query.qom.QueryObjectModel createQueryObjectModel​(java.lang.String statement, javax.jcr.query.qom.QueryObjectModelFactory qf, javax.jcr.ValueFactory vf)
      Creates a new query object model from the given statement using the passed QOM and value factory.
      java.lang.String[] getSupportedLanguages()
      Returns the set of query languages supported by this builder.
      java.lang.String toString​(javax.jcr.query.qom.QueryObjectModel qom)
      Creates a String representation of the query object model in the syntax this QueryObjectModelBuilder can handle.
    • Method Detail

      • createQueryObjectModel

        javax.jcr.query.qom.QueryObjectModel createQueryObjectModel​(java.lang.String statement,
                                                                    javax.jcr.query.qom.QueryObjectModelFactory qf,
                                                                    javax.jcr.ValueFactory vf)
                                                             throws javax.jcr.query.InvalidQueryException,
                                                                    javax.jcr.RepositoryException
        Creates a new query object model from the given statement using the passed QOM and value factory.
        Parameters:
        statement - the query statement.
        qf - the query object model factory.
        vf - the value factory.
        Returns:
        the query object model for the given statement.
        Throws:
        javax.jcr.query.InvalidQueryException - if the statement is invalid.
        javax.jcr.RepositoryException - if another error occurs.
      • canHandle

        boolean canHandle​(java.lang.String language)
        Returns true if this QOM builder can handle a statement in language.
        Parameters:
        language - the language of a query statement to build a QOM.
        Returns:
        true if this builder can handle language; false otherwise.
      • getSupportedLanguages

        java.lang.String[] getSupportedLanguages()
        Returns the set of query languages supported by this builder.
        Returns:
        String array containing the names of the supported languages.
      • toString

        java.lang.String toString​(javax.jcr.query.qom.QueryObjectModel qom)
                           throws javax.jcr.query.InvalidQueryException
        Creates a String representation of the query object model in the syntax this QueryObjectModelBuilder can handle.
        Parameters:
        qom - the query object model.
        Returns:
        a String representation of the QOM.
        Throws:
        javax.jcr.query.InvalidQueryException - if the query object model cannot be converted into a String representation due to restrictions in this syntax.