Top Description Inners Fields Constructors Methods
org.hibernate.engine.query

public Class ParamLocationRecognizer

extends Object
implements Recognizer
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.query.ParameterParser.Recognizer
Imports
org.hibernate.util.ArrayHelper, java.util.Map, .HashMap, .List, .ArrayList

Implements a parameter parser recognizer specifically for the purpose of journaling parameter locations.
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private Map<K, V>
private List<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Map<K, V>

Returns:

The map of named parameter locations.
getNamedParameterDescriptionMap
()

Returns the map of named parameter locations.

private ParamLocationRecognizer.NamedParameterDescription
public List<E>

Returns:

The list of ordinal parameter locations.
getOrdinalParameterLocationList
()

Returns the list of ordinal parameter locations.

public void
public void
public void
public void
public void
public static ParamLocationRecognizer

Returns:

The generated recognizer, with journaled location info.
parseLocations
(String
The query to be parsed for parameter locations.
query
)

Convenience method for creating a param location recognizer and initiating the parse.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

namedParameterDescriptionsback to summary
private Map<K, V> namedParameterDescriptions
ordinalParameterLocationListback to summary
private List<E> ordinalParameterLocationList

Constructor Detail

ParamLocationRecognizerback to summary
public ParamLocationRecognizer()

Method Detail

getNamedParameterDescriptionMapback to summary
public Map<K, V> getNamedParameterDescriptionMap()

Returns the map of named parameter locations. The map is keyed by parameter name; the corresponding value is a (@link NamedParameterDescription}.

Returns:Map<K, V>

The map of named parameter locations.

getOrBuildNamedParameterDescriptionback to summary
private ParamLocationRecognizer.NamedParameterDescription getOrBuildNamedParameterDescription(String name, boolean jpa)
getOrdinalParameterLocationListback to summary
public List<E> 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:List<E>

The list of ordinal parameter locations.

jpaPositionalParameterback to summary
public void jpaPositionalParameter(String name, int position)

Implements org.hibernate.engine.query.ParameterParser.Recognizer.jpaPositionalParameter.

namedParameterback to summary
public void namedParameter(String name, int position)

Implements org.hibernate.engine.query.ParameterParser.Recognizer.namedParameter.

ordinalParameterback to summary
public void ordinalParameter(int position)

Implements org.hibernate.engine.query.ParameterParser.Recognizer.ordinalParameter.

otherback to summary
public void other(char character)

Implements org.hibernate.engine.query.ParameterParser.Recognizer.other.

outParameterback to summary
public void outParameter(int position)

Implements org.hibernate.engine.query.ParameterParser.Recognizer.outParameter.

parseLocationsback to summary
public static ParamLocationRecognizer parseLocations(String query)

Convenience method for creating a param location recognizer and initiating the parse.

Parameters
query:String

The query to be parsed for parameter locations.

Returns:ParamLocationRecognizer

The generated recognizer, with journaled location info.

org.hibernate.engine.query back to summary

public Class ParamLocationRecognizer.NamedParameterDescription

extends Object
Class Inheritance
  • java.lang.Object
  • org.hibernate.engine.query.ParamLocationRecognizer.NamedParameterDescription

Field Summary

Modifier and TypeField and Description
private final boolean
private final List<E>

Constructor Summary

AccessConstructor and Description
public
NamedParameterDescription(boolean jpaStyle)

Method Summary

Modifier and TypeMethod and Description
private void
add(int position)

public int[]
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

jpaStyleback to summary
private final boolean jpaStyle
positionsback to summary
private final List<E> positions

Constructor Detail

NamedParameterDescriptionback to summary
public NamedParameterDescription(boolean jpaStyle)

Method Detail

addback to summary
private void add(int position)
buildPositionsArrayback to summary
public int[] buildPositionsArray()
isJpaStyleback to summary
public boolean isJpaStyle()