Class ParamLocationRecognizer

java.lang.Object
org.hibernate.engine.query.ParamLocationRecognizer
All Implemented Interfaces:
ParameterParser.Recognizer

public class ParamLocationRecognizer extends Object implements ParameterParser.Recognizer
Implements a parameter parser recognizer specifically for the purpose of journaling parameter locations.
  • Constructor Details

    • ParamLocationRecognizer

      public ParamLocationRecognizer()
  • Method Details

    • parseLocations

      public static ParamLocationRecognizer parseLocations(String query)
      Convenience method for creating a param location recognizer and initiating the parse.
      Parameters:
      query - The query to be parsed for parameter locations.
      Returns:
      The generated recognizer, with journaled location info.
    • getNamedParameterDescriptionMap

      public Map getNamedParameterDescriptionMap()
      Returns the map of named parameter locations. The map is keyed by parameter name; the corresponding value is a (@link NamedParameterDescription}.
      Returns:
      The map of named parameter locations.
    • getOrdinalParameterLocationList

      public List getOrdinalParameterLocationList()
      Returns the list of ordinal parameter locations. The list elements are Integers, representing the location for that given ordinal. Thus getOrdinalParameterLocationList().elementAt(n) represents the location for the nth parameter.
      Returns:
      The list of ordinal parameter locations.
    • ordinalParameter

      public void ordinalParameter(int position)
      Specified by:
      ordinalParameter in interface ParameterParser.Recognizer
    • namedParameter

      public void namedParameter(String name, int position)
      Specified by:
      namedParameter in interface ParameterParser.Recognizer
    • jpaPositionalParameter

      public void jpaPositionalParameter(String name, int position)
      Specified by:
      jpaPositionalParameter in interface ParameterParser.Recognizer
    • other

      public void other(char character)
      Specified by:
      other in interface ParameterParser.Recognizer
    • outParameter

      public void outParameter(int position)
      Specified by:
      outParameter in interface ParameterParser.Recognizer