Class Parser

  • Direct Known Subclasses:
    Parser

    public class Parser
    extends java.lang.Object
    The SQL2 parser can convert a JCR-SQL2 query to a QueryObjectModel.
    • Constructor Detail

      • Parser

        public Parser​(QueryObjectModelFactory factory,
                      ValueFactory valueFactory)
        Create a new parser. A parser can be re-used, but it is not thread safe.
        Parameters:
        factory - the query object model factory
        valueFactory - the value factory
    • Method Detail

      • createQueryObjectModel

        public QueryObjectModel createQueryObjectModel​(java.lang.String query)
                                                throws RepositoryException
        Parse a JCR-SQL2 query and return the query object model
        Parameters:
        query - the query string
        Returns:
        the query object model
        Throws:
        RepositoryException - if parsing failed