public class ParamLocationRecognizer extends Object implements ParameterParser.Recognizer
Modifier and Type | Class and Description |
---|---|
static class |
ParamLocationRecognizer.InFlightJpaOrdinalParameterState
Internal in-flight representation of a recognized named parameter
|
static class |
ParamLocationRecognizer.InFlightNamedParameterState
Internal in-flight representation of a recognized named parameter
|
static class |
ParamLocationRecognizer.InFlightOrdinalParameterState
Internal in-flight representation of a recognized named parameter
|
Constructor and Description |
---|
ParamLocationRecognizer(int jdbcStyleOrdinalCountBase) |
Modifier and Type | Method and Description |
---|---|
void |
complete() |
Map<String,NamedParameterDescriptor> |
getNamedParameterDescriptionMap() |
Map<Integer,OrdinalParameterDescriptor> |
getOrdinalParameterDescriptionMap() |
void |
jpaPositionalParameter(int name,
int position)
Called when a JPA-style named parameter is recognized
|
void |
namedParameter(String name,
int position)
Called when a named parameter is recognized
|
void |
ordinalParameter(int position)
Called when an ordinal parameter is recognized
|
void |
other(char character)
Called when a character that is not a parameter (or part of a parameter dfinition) is recognized.
|
void |
outParameter(int position)
Called when an output parameter is recognized
|
static ParamLocationRecognizer |
parseLocations(String query,
SessionFactoryImplementor sessionFactory)
Convenience method for creating a param location recognizer and
initiating the parse.
|
public ParamLocationRecognizer(int jdbcStyleOrdinalCountBase)
public static ParamLocationRecognizer parseLocations(String query, SessionFactoryImplementor sessionFactory)
query
- The query to be parsed for parameter locations.sessionFactory
- public void complete()
complete
in interface ParameterParser.Recognizer
public Map<String,NamedParameterDescriptor> getNamedParameterDescriptionMap()
public Map<Integer,OrdinalParameterDescriptor> getOrdinalParameterDescriptionMap()
public void ordinalParameter(int position)
ParameterParser.Recognizer
ordinalParameter
in interface ParameterParser.Recognizer
position
- The position within the querypublic void namedParameter(String name, int position)
ParameterParser.Recognizer
namedParameter
in interface ParameterParser.Recognizer
name
- The recognized parameter nameposition
- The position within the querypublic void jpaPositionalParameter(int name, int position)
ParameterParser.Recognizer
jpaPositionalParameter
in interface ParameterParser.Recognizer
name
- The identifier (name) of the JPA-style parameterposition
- The position within the querypublic void other(char character)
ParameterParser.Recognizer
other
in interface ParameterParser.Recognizer
character
- The recognized characterpublic void outParameter(int position)
ParameterParser.Recognizer
outParameter
in interface ParameterParser.Recognizer
position
- The position within the queryCopyright © 2019 JBoss by Red Hat. All rights reserved.