Class JPQLParser

  • All Implemented Interfaces:

    public class JPQLParser
    extends AbstractParser
    Implementation of a parser for JPQL query language. Generates Node tree(s) by use of the various parseXXX() methods.
    • Constructor Detail

      • JPQLParser

        public JPQLParser()
        Constructor for a JPQL Parser.
    • Method Detail

      • parse

        public Node parse​(String expression)
      • parseVariable

        public Node parseVariable​(String expression)
      • parseFrom

        public Node[] parseFrom​(String expression)
      • parseUpdate

        public Node[] parseUpdate​(String expression)
      • parseOrder

        public Node[] parseOrder​(String expression)
      • parseResult

        public Node[] parseResult​(String expression)
      • parseTuple

        public Node[] parseTuple​(String expression)
      • parseVariables

        public Node[][] parseVariables​(String expression)
      • parseParameters

        public Node[][] parseParameters​(String expression)
      • processAdditiveExpression

        protected void processAdditiveExpression()
      • processMultiplicativeExpression

        protected void processMultiplicativeExpression()
      • processUnaryExpression

        protected void processUnaryExpression()
      • processPrimary

        protected void processPrimary()
        Parses the primary. First look for a literal (e.g. "text"), then an identifier(e.g. variable). In the next step, call a function, if executing a function, on the literal or the identifier found.
      • processEntry

        protected boolean processEntry()
        Process an ENTRY construct. Puts the ENTRY Node on the stack.
        Whether a ENTRY construct was found by the lexer.
      • processKey

        protected boolean processKey()
        Process for a KEY construct. Puts the KEY Node on the stack if one is found.
        Whether a KEY construct was found by the lexer.
      • processValue

        protected boolean processValue()
        Process for a VALUE construct. Puts the VALUE Node on the stack if one is found.
        Whether a VALUE construct was found by the lexer.
      • processTreat

        protected boolean processTreat()
        Process a TREAT construct, and put the node on the stack.
        Whether TREAT was found by the lexer.
      • processLiteral

        protected boolean processLiteral()
        A literal is one value of any type. Supported literals are of types String, Floating Point, Integer, Character, Boolean and null e.g. 'J', "String", 1, 1.8, true, false, null. Also supports JDBC "escape syntax" for literals.
        The compiled literal