Implements a parameter parser recognizer specifically for the purpose
of journaling parameter locations.
| Method from org.hibernate.engine.query.ParamLocationRecognizer Detail: |
public void ejb3PositionalParameter(String name,
int position) {
namedParameter( name, position );
}
|
public Map getNamedParameterLocationMap() {
return namedParameterLocationMap;
}
Returns the map of named parameter locations. The map is keyed by
parameter name; the corresponding value is an Integer list. |
public List getOrdinalParameterLocationList() {
return ordinalParameterLocationList;
}
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. |
public void namedParameter(String name,
int position) {
List locations = ( List ) namedParameterLocationMap.get( name );
if ( locations == null ) {
locations = new ArrayList();
namedParameterLocationMap.put( name, locations );
}
locations.add( new Integer( position ) );
}
|
public void ordinalParameter(int position) {
ordinalParameterLocationList.add( new Integer( position ) );
}
|
public void other(char character) {
// don't care...
}
|
public void outParameter(int position) {
// don't care...
}
|
public static ParamLocationRecognizer parseLocations(String query) {
ParamLocationRecognizer recognizer = new ParamLocationRecognizer();
ParameterParser.parse( query, recognizer );
return recognizer;
}
Convenience method for creating a param location recognizer and
initiating the parse. |