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 Summary

      Constructors 
      Constructor Description
      Parser​(javax.jcr.query.qom.QueryObjectModelFactory factory, javax.jcr.ValueFactory valueFactory)
      Create a new parser.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.jcr.query.qom.QueryObjectModel createQueryObjectModel​(java.lang.String query)
      Parse a JCR-SQL2 query and return the query object model
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Parser

        public Parser​(javax.jcr.query.qom.QueryObjectModelFactory factory,
                      javax.jcr.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 javax.jcr.query.qom.QueryObjectModel createQueryObjectModel​(java.lang.String query)
                                                                    throws javax.jcr.RepositoryException
        Parse a JCR-SQL2 query and return the query object model
        Parameters:
        query - the query string
        Returns:
        the query object model
        Throws:
        javax.jcr.RepositoryException - if parsing failed