private int nameToOutputIndex(String parameterName) throws SQLException {
  for (int i=0; i < parameterMetadata.getParameterCount(); i++) {
    String name=parameterMetadata.getName(i);
    if (name != null && name.equalsIgnoreCase(parameterName)) {
      return i;
    }
  }
  throw new SQLException("there is no parameter with the name " + parameterName);
}

private int nameToOutputIndex ( String parameterName ) throws SQLException { for ( int i = 0 ; i < parameterMetadata . getParameterCount ( ) ; i ++ ) { String name = parameterMetadata . getName ( i ) ; if ( name != null && name . equalsIgnoreCase ( parameterName ) ) { return i ; } } throw new SQLException ( "there is no parameter with the name " + parameterName ) ; }
convert parameter name to output parameter index in the query .
