Top Description Fields Constructors Methods
org.hibernate.query.sql.internal

public Class ParameterParser

extends Object
Class Inheritance
Imports
java.util.BitSet, org.hibernate.QueryException, .QueryParameterException, org.hibernate.internal.util.StringHelper, org.hibernate.query.ParameterLabelException, org.hibernate.query.sql.spi.ParameterRecognizer

The single available method parse is responsible for parsing a native query string and recognizing tokens defining named of ordinal parameters and providing callbacks about each recognition.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private static final String
private static final BitSet

Constructor Summary

AccessConstructor and Description
private
ParameterParser()

Direct instantiation of ParameterParser disallowed.

Method Summary

Modifier and TypeMethod and Description
private static void
public static void
parse(String
The string to be parsed/tokenized.
sqlString
,
ParameterRecognizer
The thing which handles recognition events.
recognizer
,
boolean
Whether to ignore ordinal parameters in native queries or not.
nativeJdbcParametersIgnored
)

Performs the actual parsing and tokenizing of the query string making appropriate callbacks to the given recognizer upon recognition of the various tokens.

public static void
parse(String sqlString, ParameterRecognizer recognizer)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HQL_SEPARATORSback to summary
private static final String HQL_SEPARATORS
HQL_SEPARATORS_BITSETback to summary
private static final BitSet HQL_SEPARATORS_BITSET

Constructor Detail

ParameterParserback to summary
private ParameterParser()

Direct instantiation of ParameterParser disallowed.

Method Detail

checkIsNotAFunctionCallback to summary
private static void checkIsNotAFunctionCall(String sqlString)
parseback to summary
public static void parse(String sqlString, ParameterRecognizer recognizer, boolean nativeJdbcParametersIgnored) throws QueryException

Performs the actual parsing and tokenizing of the query string making appropriate callbacks to the given recognizer upon recognition of the various tokens.

Note that currently, this only knows how to deal with a single output parameter (for callable statements). If we later add support for multiple output params, this, obviously, needs to change.

Parameters
sqlString:String

The string to be parsed/tokenized.

recognizer:ParameterRecognizer

The thing which handles recognition events.

nativeJdbcParametersIgnored:boolean

Whether to ignore ordinal parameters in native queries or not.

Exceptions
QueryException:
Indicates unexpected parameter conditions.
parseback to summary
public static void parse(String sqlString, ParameterRecognizer recognizer) throws QueryException