org.datanucleus.store.rdbms.query
Class JPQLParser

java.lang.Object
  extended by org.datanucleus.store.rdbms.query.Parser
      extended by org.datanucleus.store.rdbms.query.JPQLParser

public class JPQLParser
extends Parser

Parser for JPQL queries, extending the basic JDOQL parser for supporting the identifier ?1, ?2 syntax.

Version:
$Revision: 1.2 $

Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.query.Parser
ci, imports, input, LOCALISER
 
Constructor Summary
JPQLParser(java.lang.String input, org.datanucleus.util.Imports imports)
          Constructor.
 
Method Summary
 java.lang.Character parseCharacterLiteral()
          Parse a Character literal.
 java.lang.String parseIdentifier()
          Override the identifier parse to allow for ?1, ?2 syntax
 java.lang.String parseStringLiteral()
          Parse a String literal.
 
Methods inherited from class org.datanucleus.store.rdbms.query.Parser
getIndex, getInput, nextIsDot, nextIsSingleQuote, parseBooleanLiteral, parseCast, parseChar, parseChar, parseEOS, parseEscapedCharacter, parseFloatingPointLiteral, parseIntegerLiteral, parseMethod, parseName, parseNullLiteral, parseString, parseStringIgnoreCase, peekStringIgnoreCase, remaining, skipWS, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JPQLParser

public JPQLParser(java.lang.String input,
                  org.datanucleus.util.Imports imports)
Constructor.

Parameters:
input - Input string
imports - Any imports
Method Detail

parseIdentifier

public java.lang.String parseIdentifier()
Override the identifier parse to allow for ?1, ?2 syntax

Overrides:
parseIdentifier in class Parser
Returns:
The identifier

parseCharacterLiteral

public java.lang.Character parseCharacterLiteral()
Parse a Character literal.

Overrides:
parseCharacterLiteral in class Parser
Returns:
the Character parsed. null if single quotes is found
Throws:
org.datanucleus.exceptions.NucleusUserException - if an invalid character is found or the CharacterIterator is finished

parseStringLiteral

public java.lang.String parseStringLiteral()
Parse a String literal.

Overrides:
parseStringLiteral in class Parser
Returns:
the String parsed. null if single quotes or double quotes is found
Throws:
org.datanucleus.exceptions.NucleusUserException - if an invalid character is found or the CharacterIterator is finished


Copyright © 2009. All Rights Reserved.