Iterator iter = namedParams.entrySet().iterator();
int result = 0;
while ( iter.hasNext() ) {
Map.Entry e = ( Map.Entry ) iter.next();
String name = ( String ) e.getKey();
TypedValue typedval = ( TypedValue ) e.getValue();
int[] locs = getNamedParameterLocs( name );
for ( int i = 0; i < locs.length; i++ ) {
if ( log.isDebugEnabled() ) {
log.debug(
"bindNamedParameters() " +
typedval.getValue() + " -> " + name +
" [" + ( locs[i] + startIndex ) + "]"
);
}
typedval.getType().nullSafeSet( statement, typedval.getValue(), locs[i] + startIndex, session );
}
result += locs.length;
}
return result;
}