Class JPQLSingleStringParser.Parser

java.lang.Object
org.datanucleus.store.query.JPQLSingleStringParser.Parser
Enclosing class:
JPQLSingleStringParser

private static class JPQLSingleStringParser.Parser extends Object
Tokenizer that provides access to current token.
  • Field Details

    • queryString

      final String queryString
    • queryStringPos

      int queryStringPos
    • tokens

      final String[] tokens
      tokens
    • keywords

      final String[] keywords
      keywords
    • tokenIndex

      int tokenIndex
      current token cursor position
    • allowRange

      boolean allowRange
  • Constructor Details

    • Parser

      public Parser(String str, boolean allowRange)
      Constructor
      Parameters:
      str - Query string
  • Method Details

    • parseContent

      public String parseContent(String keywordToIgnore, boolean allowSubentries)
      Parse the content until a keyword is found.
      Parameters:
      keywordToIgnore - Ignore this keyword if found first
      allowSubentries - Whether to permit subentries (in parentheses) in this next block
      Returns:
      the content
    • parseKeywordIgnoreCase

      public boolean parseKeywordIgnoreCase(String keyword)
      Parse the next token looking for a keyword. The cursor position is skipped in one tick if a keyword is found
      Parameters:
      keyword - the searched keyword
      Returns:
      true if the keyword
    • parseKeyword

      public String parseKeyword()
      Parse the next token looking for a keyword. The cursor position is skipped in one tick if a keyword is found
      Returns:
      the parsed keyword or null