Package org.hibernate.query.sql.spi
Interface ParameterRecognizer
-
- All Known Implementing Classes:
ParameterRecognizerImpl
,ParamLocationRecognizer
public interface ParameterRecognizer
Defines the "callback" the process of recognizing native query parameters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
complete()
Callback after all parsing is completevoid
jpaPositionalParameter(int label, int sourcePosition)
Called when a JPA-style named parameter is recognizedvoid
namedParameter(String name, int sourcePosition)
Called when a named parameter is recognizedvoid
ordinalParameter(int sourcePosition)
Called when an ordinal parameter is recognizedvoid
other(char character)
Called when a character that is not part of a parameter is recognized.
-
-
-
Method Detail
-
ordinalParameter
void ordinalParameter(int sourcePosition)
Called when an ordinal parameter is recognized- Parameters:
sourcePosition
- The position within the query
-
namedParameter
void namedParameter(String name, int sourcePosition)
Called when a named parameter is recognized- Parameters:
name
- The recognized parameter namesourcePosition
- The position within the query
-
jpaPositionalParameter
void jpaPositionalParameter(int label, int sourcePosition)
Called when a JPA-style named parameter is recognized- Parameters:
label
- The label (identifier) of the JPA-style parameter. e.g. for a parameter `?2`, the label is `2`sourcePosition
- The position within the query
-
other
void other(char character)
Called when a character that is not part of a parameter is recognized.- Parameters:
character
- The recognized character
-
complete
default void complete()
Callback after all parsing is complete
-
-