## org.hibernate.engine.query.spi
Class ParamLocationRecognizer

    java.lang.Object
      org.hibernate.engine.query.spi.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.

Nested Class Summary
`static class` `ParamLocationRecognizer.NamedParameterDescription`

Constructor Summary
`ParamLocationRecognizer()`

Method Summary
`Map` `getNamedParameterDescriptionMap()` Returns the map of named parameter locations.
`List` `getOrdinalParameterLocationList()` Returns the list of ordinal parameter locations.
`void` `jpaPositionalParameter(String name, int position)`
`void` `namedParameter(String name, int position)`
`void` `ordinalParameter(int position)`
`void` `other(char character)`
`void` `outParameter(int position)`
`static ParamLocationRecognizer` `parseLocations(String query)` Convenience method for creating a param location recognizer and initiating the parse.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParamLocationRecognizer

    public ParamLocationRecognizer()

Method Detail

### 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`

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.