Package org.hibernate.engine.query.spi
Class ParamLocationRecognizer
- java.lang.Object
-
- org.hibernate.engine.query.spi.ParamLocationRecognizer
-
- All Implemented Interfaces:
ParameterRecognizer
public class ParamLocationRecognizer extends Object implements ParameterRecognizer
Implements a parameter parser recognizer specifically for the purpose of journaling parameter locations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParamLocationRecognizer.InFlightJpaOrdinalParameterState
Internal in-flight representation of a recognized named parameterstatic class
ParamLocationRecognizer.InFlightNamedParameterState
Internal in-flight representation of a recognized named parameterstatic class
ParamLocationRecognizer.InFlightOrdinalParameterState
Internal in-flight representation of a recognized named parameter
-
Constructor Summary
Constructors Constructor Description ParamLocationRecognizer(int jdbcStyleOrdinalCountBase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,NamedParameterDescriptor<?>>
getNamedParameterDescriptionMap()
Map<Integer,OrdinalParameterDescriptor<?>>
getOrdinalParameterDescriptionMap()
void
jpaPositionalParameter(int name, int position)
Called when a JPA-style named parameter is recognizedvoid
namedParameter(String name, int position)
Called when a named parameter is recognizedvoid
ordinalParameter(int position)
Called when an ordinal parameter is recognizedvoid
other(char character)
Called when a character that is not part of a parameter is recognized.void
validate()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.sql.spi.ParameterRecognizer
complete
-
-
-
-
Method Detail
-
validate
public void validate()
-
getNamedParameterDescriptionMap
public Map<String,NamedParameterDescriptor<?>> getNamedParameterDescriptionMap()
-
getOrdinalParameterDescriptionMap
public Map<Integer,OrdinalParameterDescriptor<?>> getOrdinalParameterDescriptionMap()
-
ordinalParameter
public void ordinalParameter(int position)
Description copied from interface:ParameterRecognizer
Called when an ordinal parameter is recognized- Specified by:
ordinalParameter
in interfaceParameterRecognizer
- Parameters:
position
- The position within the query
-
namedParameter
public void namedParameter(String name, int position)
Description copied from interface:ParameterRecognizer
Called when a named parameter is recognized- Specified by:
namedParameter
in interfaceParameterRecognizer
- Parameters:
name
- The recognized parameter nameposition
- The position within the query
-
jpaPositionalParameter
public void jpaPositionalParameter(int name, int position)
Description copied from interface:ParameterRecognizer
Called when a JPA-style named parameter is recognized- Specified by:
jpaPositionalParameter
in interfaceParameterRecognizer
- Parameters:
name
- The label (identifier) of the JPA-style parameter. e.g. for a parameter `?2`, the label is `2`position
- The position within the query
-
other
public void other(char character)
Description copied from interface:ParameterRecognizer
Called when a character that is not part of a parameter is recognized.- Specified by:
other
in interfaceParameterRecognizer
- Parameters:
character
- The recognized character
-
-