1 /*
   2  * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.sql;
  27 
  28 import java.math.BigDecimal;
  29 import java.util.Calendar;
  30 import java.io.Reader;
  31 import java.io.InputStream;
  32 
  33 /**
  34  * The interface used to execute SQL stored procedures.  The JDBC API
  35  * provides a stored procedure SQL escape syntax that allows stored procedures
  36  * to be called in a standard way for all RDBMSs. This escape syntax has one
  37  * form that includes a result parameter and one that does not. If used, the result
  38  * parameter must be registered as an OUT parameter. The other parameters
  39  * can be used for input, output or both. Parameters are referred to
  40  * sequentially, by number, with the first parameter being 1.
  41  * <PRE>
  42  *   {?= call &lt;procedure-name&gt;[(&lt;arg1&gt;,&lt;arg2&gt;, ...)]}
  43  *   {call &lt;procedure-name&gt;[(&lt;arg1&gt;,&lt;arg2&gt;, ...)]}
  44  * </PRE>
  45  * <P>
  46  * IN parameter values are set using the <code>set</code> methods inherited from
  47  * {@link PreparedStatement}.  The type of all OUT parameters must be
  48  * registered prior to executing the stored procedure; their values
  49  * are retrieved after execution via the <code>get</code> methods provided here.
  50  * <P>
  51  * A <code>CallableStatement</code> can return one {@link ResultSet} object or
  52  * multiple <code>ResultSet</code> objects.  Multiple
  53  * <code>ResultSet</code> objects are handled using operations
  54  * inherited from {@link Statement}.
  55  * <P>
  56  * For maximum portability, a call's <code>ResultSet</code> objects and
  57  * update counts should be processed prior to getting the values of output
  58  * parameters.
  59  *
  60  *
  61  * @see Connection#prepareCall
  62  * @see ResultSet
  63  */
  64 
  65 public interface CallableStatement extends PreparedStatement {
  66 
  67     /**
  68      * Registers the OUT parameter in ordinal position
  69      * <code>parameterIndex</code> to the JDBC type
  70      * <code>sqlType</code>.  All OUT parameters must be registered
  71      * before a stored procedure is executed.
  72      * <p>
  73      * The JDBC type specified by <code>sqlType</code> for an OUT
  74      * parameter determines the Java type that must be used
  75      * in the <code>get</code> method to read the value of that parameter.
  76      * <p>
  77      * If the JDBC type expected to be returned to this output parameter
  78      * is specific to this particular database, <code>sqlType</code>
  79      * should be <code>java.sql.Types.OTHER</code>.  The method
  80      * {@link #getObject} retrieves the value.
  81      *
  82      * @param parameterIndex the first parameter is 1, the second is 2,
  83      *        and so on
  84      * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>.
  85      *        If the parameter is of JDBC type <code>NUMERIC</code>
  86      *        or <code>DECIMAL</code>, the version of
  87      *        <code>registerOutParameter</code> that accepts a scale value
  88      *        should be used.
  89      *
  90      * @exception SQLException if the parameterIndex is not valid;
  91      * if a database access error occurs or
  92      * this method is called on a closed <code>CallableStatement</code>
  93      * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
  94      * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
  95      * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
  96      * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
  97      *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
  98      * or  <code>STRUCT</code> data type and the JDBC driver does not support
  99      * this data type
 100      * @see Types
 101      */
 102     void registerOutParameter(int parameterIndex, int sqlType)
 103         throws SQLException;
 104 
 105     /**
 106      * Registers the parameter in ordinal position
 107      * <code>parameterIndex</code> to be of JDBC type
 108      * <code>sqlType</code>. All OUT parameters must be registered
 109      * before a stored procedure is executed.
 110      * <p>
 111      * The JDBC type specified by <code>sqlType</code> for an OUT
 112      * parameter determines the Java type that must be used
 113      * in the <code>get</code> method to read the value of that parameter.
 114      * <p>
 115      * This version of <code>registerOutParameter</code> should be
 116      * used when the parameter is of JDBC type <code>NUMERIC</code>
 117      * or <code>DECIMAL</code>.
 118      *
 119      * @param parameterIndex the first parameter is 1, the second is 2,
 120      * and so on
 121      * @param sqlType the SQL type code defined by <code>java.sql.Types</code>.
 122      * @param scale the desired number of digits to the right of the
 123      * decimal point.  It must be greater than or equal to zero.
 124      * @exception SQLException if the parameterIndex is not valid;
 125      * if a database access error occurs or
 126      * this method is called on a closed <code>CallableStatement</code>
 127      * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
 128      * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
 129      * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
 130      * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
 131      *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
 132      * or  <code>STRUCT</code> data type and the JDBC driver does not support
 133      * this data type
 134      * @see Types
 135      */
 136     void registerOutParameter(int parameterIndex, int sqlType, int scale)
 137         throws SQLException;
 138 
 139     /**
 140      * Retrieves whether the last OUT parameter read had the value of
 141      * SQL <code>NULL</code>.  Note that this method should be called only after
 142      * calling a getter method; otherwise, there is no value to use in
 143      * determining whether it is <code>null</code> or not.
 144      *
 145      * @return <code>true</code> if the last parameter read was SQL
 146      * <code>NULL</code>; <code>false</code> otherwise
 147      * @exception SQLException if a database access error occurs or
 148      * this method is called on a closed <code>CallableStatement</code>
 149      */
 150     boolean wasNull() throws SQLException;
 151 
 152     /**
 153      * Retrieves the value of the designated JDBC <code>CHAR</code>,
 154      * <code>VARCHAR</code>, or <code>LONGVARCHAR</code> parameter as a
 155      * <code>String</code> in the Java programming language.
 156      * <p>
 157      * For the fixed-length type JDBC <code>CHAR</code>,
 158      * the <code>String</code> object
 159      * returned has exactly the same value the SQL
 160      * <code>CHAR</code> value had in the
 161      * database, including any padding added by the database.
 162      *
 163      * @param parameterIndex the first parameter is 1, the second is 2,
 164      * and so on
 165      * @return the parameter value. If the value is SQL <code>NULL</code>,
 166      *         the result
 167      *         is <code>null</code>.
 168      * @exception SQLException if the parameterIndex is not valid;
 169      * if a database access error occurs or
 170      * this method is called on a closed <code>CallableStatement</code>
 171      * @see #setString
 172      */
 173     String getString(int parameterIndex) throws SQLException;
 174 
 175     /**
 176      * Retrieves the value of the designated JDBC <code>BIT</code>
 177      * or <code>BOOLEAN</code> parameter as a
 178      * <code>boolean</code> in the Java programming language.
 179      *
 180      * @param parameterIndex the first parameter is 1, the second is 2,
 181      *        and so on
 182      * @return the parameter value.  If the value is SQL <code>NULL</code>,
 183      *         the result is <code>false</code>.
 184      * @exception SQLException if the parameterIndex is not valid;
 185      * if a database access error occurs or
 186      * this method is called on a closed <code>CallableStatement</code>
 187      * @see #setBoolean
 188      */
 189     boolean getBoolean(int parameterIndex) throws SQLException;
 190 
 191     /**
 192      * Retrieves the value of the designated JDBC <code>TINYINT</code> parameter
 193      * as a <code>byte</code> in the Java programming language.
 194      *
 195      * @param parameterIndex the first parameter is 1, the second is 2,
 196      * and so on
 197      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 198      * is <code>0</code>.
 199      * @exception SQLException if the parameterIndex is not valid;
 200      * if a database access error occurs or
 201      * this method is called on a closed <code>CallableStatement</code>
 202      * @see #setByte
 203      */
 204     byte getByte(int parameterIndex) throws SQLException;
 205 
 206     /**
 207      * Retrieves the value of the designated JDBC <code>SMALLINT</code> parameter
 208      * as a <code>short</code> in the Java programming language.
 209      *
 210      * @param parameterIndex the first parameter is 1, the second is 2,
 211      * and so on
 212      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 213      * is <code>0</code>.
 214      * @exception SQLException if the parameterIndex is not valid;
 215      * if a database access error occurs or
 216      * this method is called on a closed <code>CallableStatement</code>
 217      * @see #setShort
 218      */
 219     short getShort(int parameterIndex) throws SQLException;
 220 
 221     /**
 222      * Retrieves the value of the designated JDBC <code>INTEGER</code> parameter
 223      * as an <code>int</code> in the Java programming language.
 224      *
 225      * @param parameterIndex the first parameter is 1, the second is 2,
 226      * and so on
 227      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 228      * is <code>0</code>.
 229      * @exception SQLException if the parameterIndex is not valid;
 230      * if a database access error occurs or
 231      * this method is called on a closed <code>CallableStatement</code>
 232      * @see #setInt
 233      */
 234     int getInt(int parameterIndex) throws SQLException;
 235 
 236     /**
 237      * Retrieves the value of the designated JDBC <code>BIGINT</code> parameter
 238      * as a <code>long</code> in the Java programming language.
 239      *
 240      * @param parameterIndex the first parameter is 1, the second is 2,
 241      * and so on
 242      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 243      * is <code>0</code>.
 244      * @exception SQLException if the parameterIndex is not valid;
 245      * if a database access error occurs or
 246      * this method is called on a closed <code>CallableStatement</code>
 247      * @see #setLong
 248      */
 249     long getLong(int parameterIndex) throws SQLException;
 250 
 251     /**
 252      * Retrieves the value of the designated JDBC <code>FLOAT</code> parameter
 253      * as a <code>float</code> in the Java programming language.
 254      *
 255      * @param parameterIndex the first parameter is 1, the second is 2,
 256      *        and so on
 257      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 258      *         is <code>0</code>.
 259      * @exception SQLException if the parameterIndex is not valid;
 260      * if a database access error occurs or
 261      * this method is called on a closed <code>CallableStatement</code>
 262      * @see #setFloat
 263      */
 264     float getFloat(int parameterIndex) throws SQLException;
 265 
 266     /**
 267      * Retrieves the value of the designated JDBC <code>DOUBLE</code> parameter as a <code>double</code>
 268      * in the Java programming language.
 269      * @param parameterIndex the first parameter is 1, the second is 2,
 270      *        and so on
 271      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 272      *         is <code>0</code>.
 273      * @exception SQLException if the parameterIndex is not valid;
 274      * if a database access error occurs or
 275      * this method is called on a closed <code>CallableStatement</code>
 276      * @see #setDouble
 277      */
 278     double getDouble(int parameterIndex) throws SQLException;
 279 
 280     /**
 281      * Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter as a
 282      * <code>java.math.BigDecimal</code> object with <i>scale</i> digits to
 283      * the right of the decimal point.
 284      * @param parameterIndex the first parameter is 1, the second is 2,
 285      *        and so on
 286      * @param scale the number of digits to the right of the decimal point
 287      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 288      *         is <code>null</code>.
 289      * @exception SQLException if the parameterIndex is not valid;
 290      * if a database access error occurs or
 291      * this method is called on a closed <code>CallableStatement</code>
 292      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 293      * this method
 294      * @deprecated use <code>getBigDecimal(int parameterIndex)</code>
 295      *             or <code>getBigDecimal(String parameterName)</code>
 296      * @see #setBigDecimal
 297      */
 298     @Deprecated
 299     BigDecimal getBigDecimal(int parameterIndex, int scale)
 300         throws SQLException;
 301 
 302     /**
 303      * Retrieves the value of the designated JDBC <code>BINARY</code> or
 304      * <code>VARBINARY</code> parameter as an array of <code>byte</code>
 305      * values in the Java programming language.
 306      * @param parameterIndex the first parameter is 1, the second is 2,
 307      *        and so on
 308      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 309      *         is <code>null</code>.
 310      * @exception SQLException if the parameterIndex is not valid;
 311      * if a database access error occurs or
 312      * this method is called on a closed <code>CallableStatement</code>
 313      * @see #setBytes
 314      */
 315     byte[] getBytes(int parameterIndex) throws SQLException;
 316 
 317     /**
 318      * Retrieves the value of the designated JDBC <code>DATE</code> parameter as a
 319      * <code>java.sql.Date</code> object.
 320      * @param parameterIndex the first parameter is 1, the second is 2,
 321      *        and so on
 322      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 323      *         is <code>null</code>.
 324      * @exception SQLException if the parameterIndex is not valid;
 325      * if a database access error occurs or
 326      * this method is called on a closed <code>CallableStatement</code>
 327      * @see #setDate
 328      */
 329     java.sql.Date getDate(int parameterIndex) throws SQLException;
 330 
 331     /**
 332      * Retrieves the value of the designated JDBC <code>TIME</code> parameter as a
 333      * <code>java.sql.Time</code> object.
 334      *
 335      * @param parameterIndex the first parameter is 1, the second is 2,
 336      *        and so on
 337      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 338      *         is <code>null</code>.
 339      * @exception SQLException if the parameterIndex is not valid;
 340      * if a database access error occurs or
 341      * this method is called on a closed <code>CallableStatement</code>
 342      * @see #setTime
 343      */
 344     java.sql.Time getTime(int parameterIndex) throws SQLException;
 345 
 346     /**
 347      * Retrieves the value of the designated JDBC <code>TIMESTAMP</code> parameter as a
 348      * <code>java.sql.Timestamp</code> object.
 349      *
 350      * @param parameterIndex the first parameter is 1, the second is 2,
 351      *        and so on
 352      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 353      *         is <code>null</code>.
 354      * @exception SQLException if the parameterIndex is not valid;
 355      * if a database access error occurs or
 356      * this method is called on a closed <code>CallableStatement</code>
 357      * @see #setTimestamp
 358      */
 359     java.sql.Timestamp getTimestamp(int parameterIndex)
 360         throws SQLException;
 361 
 362     //----------------------------------------------------------------------
 363     // Advanced features:
 364 
 365 
 366     /**
 367      * Retrieves the value of the designated parameter as an <code>Object</code>
 368      * in the Java programming language. If the value is an SQL <code>NULL</code>,
 369      * the driver returns a Java <code>null</code>.
 370      * <p>
 371      * This method returns a Java object whose type corresponds to the JDBC
 372      * type that was registered for this parameter using the method
 373      * <code>registerOutParameter</code>.  By registering the target JDBC
 374      * type as <code>java.sql.Types.OTHER</code>, this method can be used
 375      * to read database-specific abstract data types.
 376      *
 377      * @param parameterIndex the first parameter is 1, the second is 2,
 378      *        and so on
 379      * @return A <code>java.lang.Object</code> holding the OUT parameter value
 380      * @exception SQLException if the parameterIndex is not valid;
 381      * if a database access error occurs or
 382      * this method is called on a closed <code>CallableStatement</code>
 383      * @see Types
 384      * @see #setObject
 385      */
 386     Object getObject(int parameterIndex) throws SQLException;
 387 
 388 
 389     //--------------------------JDBC 2.0-----------------------------
 390 
 391     /**
 392      * Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter as a
 393      * <code>java.math.BigDecimal</code> object with as many digits to the
 394      * right of the decimal point as the value contains.
 395      * @param parameterIndex the first parameter is 1, the second is 2,
 396      * and so on
 397      * @return the parameter value in full precision.  If the value is
 398      * SQL <code>NULL</code>, the result is <code>null</code>.
 399      * @exception SQLException if the parameterIndex is not valid;
 400      * if a database access error occurs or
 401      * this method is called on a closed <code>CallableStatement</code>
 402      * @see #setBigDecimal
 403      * @since 1.2
 404      */
 405     BigDecimal getBigDecimal(int parameterIndex) throws SQLException;
 406 
 407     /**
 408      * Returns an object representing the value of OUT parameter
 409      * <code>parameterIndex</code> and uses <code>map</code> for the custom
 410      * mapping of the parameter value.
 411      * <p>
 412      * This method returns a Java object whose type corresponds to the
 413      * JDBC type that was registered for this parameter using the method
 414      * <code>registerOutParameter</code>.  By registering the target
 415      * JDBC type as <code>java.sql.Types.OTHER</code>, this method can
 416      * be used to read database-specific abstract data types.
 417      * @param parameterIndex the first parameter is 1, the second is 2, and so on
 418      * @param map the mapping from SQL type names to Java classes
 419      * @return a <code>java.lang.Object</code> holding the OUT parameter value
 420      * @exception SQLException if the parameterIndex is not valid;
 421      * if a database access error occurs or
 422      * this method is called on a closed <code>CallableStatement</code>
 423      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 424      * this method
 425      * @see #setObject
 426      * @since 1.2
 427      */
 428     Object getObject(int parameterIndex, java.util.Map<String,Class<?>> map)
 429         throws SQLException;
 430 
 431     /**
 432      * Retrieves the value of the designated JDBC <code>REF(&lt;structured-type&gt;)</code>
 433      * parameter as a {@link java.sql.Ref} object in the Java programming language.
 434      * @param parameterIndex the first parameter is 1, the second is 2,
 435      * and so on
 436      * @return the parameter value as a <code>Ref</code> object in the
 437      * Java programming language.  If the value was SQL <code>NULL</code>, the value
 438      * <code>null</code> is returned.
 439      * @exception SQLException if the parameterIndex is not valid;
 440      * if a database access error occurs or
 441      * this method is called on a closed <code>CallableStatement</code>
 442      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 443      * this method
 444      * @since 1.2
 445      */
 446     Ref getRef (int parameterIndex) throws SQLException;
 447 
 448     /**
 449      * Retrieves the value of the designated JDBC <code>BLOB</code> parameter as a
 450      * {@link java.sql.Blob} object in the Java programming language.
 451      * @param parameterIndex the first parameter is 1, the second is 2, and so on
 452      * @return the parameter value as a <code>Blob</code> object in the
 453      * Java programming language.  If the value was SQL <code>NULL</code>, the value
 454      * <code>null</code> is returned.
 455      * @exception SQLException if the parameterIndex is not valid;
 456      * if a database access error occurs or
 457      * this method is called on a closed <code>CallableStatement</code>
 458      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 459      * this method
 460      * @since 1.2
 461      */
 462     Blob getBlob (int parameterIndex) throws SQLException;
 463 
 464     /**
 465      * Retrieves the value of the designated JDBC <code>CLOB</code> parameter as a
 466      * <code>java.sql.Clob</code> object in the Java programming language.
 467      * @param parameterIndex the first parameter is 1, the second is 2, and
 468      * so on
 469      * @return the parameter value as a <code>Clob</code> object in the
 470      * Java programming language.  If the value was SQL <code>NULL</code>, the
 471      * value <code>null</code> is returned.
 472      * @exception SQLException if the parameterIndex is not valid;
 473      * if a database access error occurs or
 474      * this method is called on a closed <code>CallableStatement</code>
 475      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 476      * this method
 477      * @since 1.2
 478      */
 479     Clob getClob (int parameterIndex) throws SQLException;
 480 
 481     /**
 482      *
 483      * Retrieves the value of the designated JDBC <code>ARRAY</code> parameter as an
 484      * {@link java.sql.Array} object in the Java programming language.
 485      * @param parameterIndex the first parameter is 1, the second is 2, and
 486      * so on
 487      * @return the parameter value as an <code>Array</code> object in
 488      * the Java programming language.  If the value was SQL <code>NULL</code>, the
 489      * value <code>null</code> is returned.
 490      * @exception SQLException if the parameterIndex is not valid;
 491      * if a database access error occurs or
 492      * this method is called on a closed <code>CallableStatement</code>
 493      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 494      * this method
 495      * @since 1.2
 496      */
 497     Array getArray (int parameterIndex) throws SQLException;
 498 
 499     /**
 500      * Retrieves the value of the designated JDBC <code>DATE</code> parameter as a
 501      * <code>java.sql.Date</code> object, using
 502      * the given <code>Calendar</code> object
 503      * to construct the date.
 504      * With a <code>Calendar</code> object, the driver
 505      * can calculate the date taking into account a custom timezone and locale.
 506      * If no <code>Calendar</code> object is specified, the driver uses the
 507      * default timezone and locale.
 508      *
 509      * @param parameterIndex the first parameter is 1, the second is 2,
 510      * and so on
 511      * @param cal the <code>Calendar</code> object the driver will use
 512      *            to construct the date
 513      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 514      *         is <code>null</code>.
 515      * @exception SQLException if the parameterIndex is not valid;
 516      * if a database access error occurs or
 517      * this method is called on a closed <code>CallableStatement</code>
 518      * @see #setDate
 519      * @since 1.2
 520      */
 521     java.sql.Date getDate(int parameterIndex, Calendar cal)
 522         throws SQLException;
 523 
 524     /**
 525      * Retrieves the value of the designated JDBC <code>TIME</code> parameter as a
 526      * <code>java.sql.Time</code> object, using
 527      * the given <code>Calendar</code> object
 528      * to construct the time.
 529      * With a <code>Calendar</code> object, the driver
 530      * can calculate the time taking into account a custom timezone and locale.
 531      * If no <code>Calendar</code> object is specified, the driver uses the
 532      * default timezone and locale.
 533      *
 534      * @param parameterIndex the first parameter is 1, the second is 2,
 535      * and so on
 536      * @param cal the <code>Calendar</code> object the driver will use
 537      *            to construct the time
 538      * @return the parameter value; if the value is SQL <code>NULL</code>, the result
 539      *         is <code>null</code>.
 540      * @exception SQLException if the parameterIndex is not valid;
 541      * if a database access error occurs or
 542      * this method is called on a closed <code>CallableStatement</code>
 543      * @see #setTime
 544      * @since 1.2
 545      */
 546     java.sql.Time getTime(int parameterIndex, Calendar cal)
 547         throws SQLException;
 548 
 549     /**
 550      * Retrieves the value of the designated JDBC <code>TIMESTAMP</code> parameter as a
 551      * <code>java.sql.Timestamp</code> object, using
 552      * the given <code>Calendar</code> object to construct
 553      * the <code>Timestamp</code> object.
 554      * With a <code>Calendar</code> object, the driver
 555      * can calculate the timestamp taking into account a custom timezone and locale.
 556      * If no <code>Calendar</code> object is specified, the driver uses the
 557      * default timezone and locale.
 558      *
 559      *
 560      * @param parameterIndex the first parameter is 1, the second is 2,
 561      * and so on
 562      * @param cal the <code>Calendar</code> object the driver will use
 563      *            to construct the timestamp
 564      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
 565      *         is <code>null</code>.
 566      * @exception SQLException if the parameterIndex is not valid;
 567      * if a database access error occurs or
 568      * this method is called on a closed <code>CallableStatement</code>
 569      * @see #setTimestamp
 570      * @since 1.2
 571      */
 572     java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal)
 573         throws SQLException;
 574 
 575 
 576     /**
 577      * Registers the designated output parameter.
 578      * This version of
 579      * the method <code>registerOutParameter</code>
 580      * should be used for a user-defined or <code>REF</code> output parameter.  Examples
 581      * of user-defined types include: <code>STRUCT</code>, <code>DISTINCT</code>,
 582      * <code>JAVA_OBJECT</code>, and named array types.
 583      *<p>
 584      * All OUT parameters must be registered
 585      * before a stored procedure is executed.
 586      * <p>  For a user-defined parameter, the fully-qualified SQL
 587      * type name of the parameter should also be given, while a <code>REF</code>
 588      * parameter requires that the fully-qualified type name of the
 589      * referenced type be given.  A JDBC driver that does not need the
 590      * type code and type name information may ignore it.   To be portable,
 591      * however, applications should always provide these values for
 592      * user-defined and <code>REF</code> parameters.
 593      *
 594      * Although it is intended for user-defined and <code>REF</code> parameters,
 595      * this method may be used to register a parameter of any JDBC type.
 596      * If the parameter does not have a user-defined or <code>REF</code> type, the
 597      * <i>typeName</i> parameter is ignored.
 598      *
 599      * <P><B>Note:</B> When reading the value of an out parameter, you
 600      * must use the getter method whose Java type corresponds to the
 601      * parameter's registered SQL type.
 602      *
 603      * @param parameterIndex the first parameter is 1, the second is 2,...
 604      * @param sqlType a value from {@link java.sql.Types}
 605      * @param typeName the fully-qualified name of an SQL structured type
 606      * @exception SQLException if the parameterIndex is not valid;
 607      * if a database access error occurs or
 608      * this method is called on a closed <code>CallableStatement</code>
 609      * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
 610      * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
 611      * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
 612      * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
 613      *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
 614      * or  <code>STRUCT</code> data type and the JDBC driver does not support
 615      * this data type
 616      * @see Types
 617      * @since 1.2
 618      */
 619     void registerOutParameter (int parameterIndex, int sqlType, String typeName)
 620         throws SQLException;
 621 
 622   //--------------------------JDBC 3.0-----------------------------
 623 
 624     /**
 625      * Registers the OUT parameter named
 626      * <code>parameterName</code> to the JDBC type
 627      * <code>sqlType</code>.  All OUT parameters must be registered
 628      * before a stored procedure is executed.
 629      * <p>
 630      * The JDBC type specified by <code>sqlType</code> for an OUT
 631      * parameter determines the Java type that must be used
 632      * in the <code>get</code> method to read the value of that parameter.
 633      * <p>
 634      * If the JDBC type expected to be returned to this output parameter
 635      * is specific to this particular database, <code>sqlType</code>
 636      * should be <code>java.sql.Types.OTHER</code>.  The method
 637      * {@link #getObject} retrieves the value.
 638      * @param parameterName the name of the parameter
 639      * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>.
 640      * If the parameter is of JDBC type <code>NUMERIC</code>
 641      * or <code>DECIMAL</code>, the version of
 642      * <code>registerOutParameter</code> that accepts a scale value
 643      * should be used.
 644      * @exception SQLException if parameterName does not correspond to a named
 645      * parameter; if a database access error occurs or
 646      * this method is called on a closed <code>CallableStatement</code>
 647      * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
 648      * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
 649      * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
 650      * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
 651      *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
 652      * or  <code>STRUCT</code> data type and the JDBC driver does not support
 653      * this data type or if the JDBC driver does not support
 654      * this method
 655      * @since 1.4
 656      * @see Types
 657      */
 658     void registerOutParameter(String parameterName, int sqlType)
 659         throws SQLException;
 660 
 661     /**
 662      * Registers the parameter named
 663      * <code>parameterName</code> to be of JDBC type
 664      * <code>sqlType</code>.  All OUT parameters must be registered
 665      * before a stored procedure is executed.
 666      * <p>
 667      * The JDBC type specified by <code>sqlType</code> for an OUT
 668      * parameter determines the Java type that must be used
 669      * in the <code>get</code> method to read the value of that parameter.
 670      * <p>
 671      * This version of <code>registerOutParameter</code> should be
 672      * used when the parameter is of JDBC type <code>NUMERIC</code>
 673      * or <code>DECIMAL</code>.
 674      *
 675      * @param parameterName the name of the parameter
 676      * @param sqlType SQL type code defined by <code>java.sql.Types</code>.
 677      * @param scale the desired number of digits to the right of the
 678      * decimal point.  It must be greater than or equal to zero.
 679      * @exception SQLException if parameterName does not correspond to a named
 680      * parameter; if a database access error occurs or
 681      * this method is called on a closed <code>CallableStatement</code>
 682      * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
 683      * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
 684      * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
 685      * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
 686      *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
 687      * or  <code>STRUCT</code> data type and the JDBC driver does not support
 688      * this data type or if the JDBC driver does not support
 689      * this method
 690      * @since 1.4
 691      * @see Types
 692      */
 693     void registerOutParameter(String parameterName, int sqlType, int scale)
 694         throws SQLException;
 695 
 696     /**
 697      * Registers the designated output parameter.  This version of
 698      * the method <code>registerOutParameter</code>
 699      * should be used for a user-named or REF output parameter.  Examples
 700      * of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and
 701      * named array types.
 702      *<p>
 703      * All OUT parameters must be registered
 704      * before a stored procedure is executed.
 705      * <p>
 706      * For a user-named parameter the fully-qualified SQL
 707      * type name of the parameter should also be given, while a REF
 708      * parameter requires that the fully-qualified type name of the
 709      * referenced type be given.  A JDBC driver that does not need the
 710      * type code and type name information may ignore it.   To be portable,
 711      * however, applications should always provide these values for
 712      * user-named and REF parameters.
 713      *
 714      * Although it is intended for user-named and REF parameters,
 715      * this method may be used to register a parameter of any JDBC type.
 716      * If the parameter does not have a user-named or REF type, the
 717      * typeName parameter is ignored.
 718      *
 719      * <P><B>Note:</B> When reading the value of an out parameter, you
 720      * must use the <code>getXXX</code> method whose Java type XXX corresponds to the
 721      * parameter's registered SQL type.
 722      *
 723      * @param parameterName the name of the parameter
 724      * @param sqlType a value from {@link java.sql.Types}
 725      * @param typeName the fully-qualified name of an SQL structured type
 726      * @exception SQLException if parameterName does not correspond to a named
 727      * parameter; if a database access error occurs or
 728      * this method is called on a closed <code>CallableStatement</code>
 729      * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
 730      * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
 731      * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
 732      * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
 733      *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
 734      * or  <code>STRUCT</code> data type and the JDBC driver does not support
 735      * this data type or if the JDBC driver does not support
 736      * this method
 737      * @see Types
 738      * @since 1.4
 739      */
 740     void registerOutParameter (String parameterName, int sqlType, String typeName)
 741         throws SQLException;
 742 
 743     /**
 744      * Retrieves the value of the designated JDBC <code>DATALINK</code> parameter as a
 745      * <code>java.net.URL</code> object.
 746      *
 747      * @param parameterIndex the first parameter is 1, the second is 2,...
 748      * @return a <code>java.net.URL</code> object that represents the
 749      *         JDBC <code>DATALINK</code> value used as the designated
 750      *         parameter
 751      * @exception SQLException if the parameterIndex is not valid;
 752      * if a database access error occurs,
 753      * this method is called on a closed <code>CallableStatement</code>,
 754      *            or if the URL being returned is
 755      *            not a valid URL on the Java platform
 756      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 757      * this method
 758      * @see #setURL
 759      * @since 1.4
 760      */
 761     java.net.URL getURL(int parameterIndex) throws SQLException;
 762 
 763     /**
 764      * Sets the designated parameter to the given <code>java.net.URL</code> object.
 765      * The driver converts this to an SQL <code>DATALINK</code> value when
 766      * it sends it to the database.
 767      *
 768      * @param parameterName the name of the parameter
 769      * @param val the parameter value
 770      * @exception SQLException if parameterName does not correspond to a named
 771      * parameter; if a database access error occurs;
 772      * this method is called on a closed <code>CallableStatement</code>
 773      *            or if a URL is malformed
 774      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 775      * this method
 776      * @see #getURL
 777      * @since 1.4
 778      */
 779     void setURL(String parameterName, java.net.URL val) throws SQLException;
 780 
 781     /**
 782      * Sets the designated parameter to SQL <code>NULL</code>.
 783      *
 784      * <P><B>Note:</B> You must specify the parameter's SQL type.
 785      *
 786      * @param parameterName the name of the parameter
 787      * @param sqlType the SQL type code defined in <code>java.sql.Types</code>
 788      * @exception SQLException if parameterName does not correspond to a named
 789      * parameter; if a database access error occurs or
 790      * this method is called on a closed <code>CallableStatement</code>
 791      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 792      * this method
 793      * @since 1.4
 794      */
 795     void setNull(String parameterName, int sqlType) throws SQLException;
 796 
 797     /**
 798      * Sets the designated parameter to the given Java <code>boolean</code> value.
 799      * The driver converts this
 800      * to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database.
 801      *
 802      * @param parameterName the name of the parameter
 803      * @param x the parameter value
 804      * @exception SQLException if parameterName does not correspond to a named
 805      * parameter; if a database access error occurs or
 806      * this method is called on a closed <code>CallableStatement</code>
 807      * @see #getBoolean
 808      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 809      * this method
 810      * @since 1.4
 811      */
 812     void setBoolean(String parameterName, boolean x) throws SQLException;
 813 
 814     /**
 815      * Sets the designated parameter to the given Java <code>byte</code> value.
 816      * The driver converts this
 817      * to an SQL <code>TINYINT</code> value when it sends it to the database.
 818      *
 819      * @param parameterName the name of the parameter
 820      * @param x the parameter value
 821      * @exception SQLException if parameterName does not correspond to a named
 822      * parameter; if a database access error occurs or
 823      * this method is called on a closed <code>CallableStatement</code>
 824      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 825      * this method
 826      * @see #getByte
 827      * @since 1.4
 828      */
 829     void setByte(String parameterName, byte x) throws SQLException;
 830 
 831     /**
 832      * Sets the designated parameter to the given Java <code>short</code> value.
 833      * The driver converts this
 834      * to an SQL <code>SMALLINT</code> value when it sends it to the database.
 835      *
 836      * @param parameterName the name of the parameter
 837      * @param x the parameter value
 838      * @exception SQLException if parameterName does not correspond to a named
 839      * parameter; if a database access error occurs or
 840      * this method is called on a closed <code>CallableStatement</code>
 841      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 842      * this method
 843      * @see #getShort
 844      * @since 1.4
 845      */
 846     void setShort(String parameterName, short x) throws SQLException;
 847 
 848     /**
 849      * Sets the designated parameter to the given Java <code>int</code> value.
 850      * The driver converts this
 851      * to an SQL <code>INTEGER</code> value when it sends it to the database.
 852      *
 853      * @param parameterName the name of the parameter
 854      * @param x the parameter value
 855      * @exception SQLException if parameterName does not correspond to a named
 856      * parameter; if a database access error occurs or
 857      * this method is called on a closed <code>CallableStatement</code>
 858      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 859      * this method
 860      * @see #getInt
 861      * @since 1.4
 862      */
 863     void setInt(String parameterName, int x) throws SQLException;
 864 
 865     /**
 866      * Sets the designated parameter to the given Java <code>long</code> value.
 867      * The driver converts this
 868      * to an SQL <code>BIGINT</code> value when it sends it to the database.
 869      *
 870      * @param parameterName the name of the parameter
 871      * @param x the parameter value
 872      * @exception SQLException if parameterName does not correspond to a named
 873      * parameter; if a database access error occurs or
 874      * this method is called on a closed <code>CallableStatement</code>
 875      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 876      * this method
 877      * @see #getLong
 878      * @since 1.4
 879      */
 880     void setLong(String parameterName, long x) throws SQLException;
 881 
 882     /**
 883      * Sets the designated parameter to the given Java <code>float</code> value.
 884      * The driver converts this
 885      * to an SQL <code>FLOAT</code> value when it sends it to the database.
 886      *
 887      * @param parameterName the name of the parameter
 888      * @param x the parameter value
 889      * @exception SQLException if parameterName does not correspond to a named
 890      * parameter; if a database access error occurs or
 891      * this method is called on a closed <code>CallableStatement</code>
 892      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 893      * this method
 894      * @see #getFloat
 895      * @since 1.4
 896      */
 897     void setFloat(String parameterName, float x) throws SQLException;
 898 
 899     /**
 900      * Sets the designated parameter to the given Java <code>double</code> value.
 901      * The driver converts this
 902      * to an SQL <code>DOUBLE</code> value when it sends it to the database.
 903      *
 904      * @param parameterName the name of the parameter
 905      * @param x the parameter value
 906      * @exception SQLException if parameterName does not correspond to a named
 907      * parameter; if a database access error occurs or
 908      * this method is called on a closed <code>CallableStatement</code>
 909      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 910      * this method
 911      * @see #getDouble
 912      * @since 1.4
 913      */
 914     void setDouble(String parameterName, double x) throws SQLException;
 915 
 916     /**
 917      * Sets the designated parameter to the given
 918      * <code>java.math.BigDecimal</code> value.
 919      * The driver converts this to an SQL <code>NUMERIC</code> value when
 920      * it sends it to the database.
 921      *
 922      * @param parameterName the name of the parameter
 923      * @param x the parameter value
 924      * @exception SQLException if parameterName does not correspond to a named
 925      * parameter; if a database access error occurs or
 926      * this method is called on a closed <code>CallableStatement</code>
 927      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 928      * this method
 929      * @see #getBigDecimal
 930      * @since 1.4
 931      */
 932     void setBigDecimal(String parameterName, BigDecimal x) throws SQLException;
 933 
 934     /**
 935      * Sets the designated parameter to the given Java <code>String</code> value.
 936      * The driver converts this
 937      * to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value
 938      * (depending on the argument's
 939      * size relative to the driver's limits on <code>VARCHAR</code> values)
 940      * when it sends it to the database.
 941      *
 942      * @param parameterName the name of the parameter
 943      * @param x the parameter value
 944      * @exception SQLException if parameterName does not correspond to a named
 945      * parameter; if a database access error occurs or
 946      * this method is called on a closed <code>CallableStatement</code>
 947      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 948      * this method
 949      * @see #getString
 950      * @since 1.4
 951      */
 952     void setString(String parameterName, String x) throws SQLException;
 953 
 954     /**
 955      * Sets the designated parameter to the given Java array of bytes.
 956      * The driver converts this to an SQL <code>VARBINARY</code> or
 957      * <code>LONGVARBINARY</code> (depending on the argument's size relative
 958      * to the driver's limits on <code>VARBINARY</code> values) when it sends
 959      * it to the database.
 960      *
 961      * @param parameterName the name of the parameter
 962      * @param x the parameter value
 963      * @exception SQLException if parameterName does not correspond to a named
 964      * parameter; if a database access error occurs or
 965      * this method is called on a closed <code>CallableStatement</code>
 966      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 967      * this method
 968      * @see #getBytes
 969      * @since 1.4
 970      */
 971     void setBytes(String parameterName, byte x[]) throws SQLException;
 972 
 973     /**
 974      * Sets the designated parameter to the given <code>java.sql.Date</code> value
 975      * using the default time zone of the virtual machine that is running
 976      * the application.
 977      * The driver converts this
 978      * to an SQL <code>DATE</code> value when it sends it to the database.
 979      *
 980      * @param parameterName the name of the parameter
 981      * @param x the parameter value
 982      * @exception SQLException if parameterName does not correspond to a named
 983      * parameter; if a database access error occurs or
 984      * this method is called on a closed <code>CallableStatement</code>
 985      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
 986      * this method
 987      * @see #getDate
 988      * @since 1.4
 989      */
 990     void setDate(String parameterName, java.sql.Date x)
 991         throws SQLException;
 992 
 993     /**
 994      * Sets the designated parameter to the given <code>java.sql.Time</code> value.
 995      * The driver converts this
 996      * to an SQL <code>TIME</code> value when it sends it to the database.
 997      *
 998      * @param parameterName the name of the parameter
 999      * @param x the parameter value
1000      * @exception SQLException if parameterName does not correspond to a named
1001      * parameter; if a database access error occurs or
1002      * this method is called on a closed <code>CallableStatement</code>
1003      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1004      * this method
1005      * @see #getTime
1006      * @since 1.4
1007      */
1008     void setTime(String parameterName, java.sql.Time x)
1009         throws SQLException;
1010 
1011     /**
1012      * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value.
1013      * The driver
1014      * converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the
1015      * database.
1016      *
1017      * @param parameterName the name of the parameter
1018      * @param x the parameter value
1019      * @exception SQLException if parameterName does not correspond to a named
1020      * parameter; if a database access error occurs or
1021      * this method is called on a closed <code>CallableStatement</code>
1022      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1023      * this method
1024      * @see #getTimestamp
1025      * @since 1.4
1026      */
1027     void setTimestamp(String parameterName, java.sql.Timestamp x)
1028         throws SQLException;
1029 
1030     /**
1031      * Sets the designated parameter to the given input stream, which will have
1032      * the specified number of bytes.
1033      * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
1034      * parameter, it may be more practical to send it via a
1035      * <code>java.io.InputStream</code>. Data will be read from the stream
1036      * as needed until end-of-file is reached.  The JDBC driver will
1037      * do any necessary conversion from ASCII to the database char format.
1038      *
1039      * <P><B>Note:</B> This stream object can either be a standard
1040      * Java stream object or your own subclass that implements the
1041      * standard interface.
1042      *
1043      * @param parameterName the name of the parameter
1044      * @param x the Java input stream that contains the ASCII parameter value
1045      * @param length the number of bytes in the stream
1046      * @exception SQLException if parameterName does not correspond to a named
1047      * parameter; if a database access error occurs or
1048      * this method is called on a closed <code>CallableStatement</code>
1049      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1050      * this method
1051      * @since 1.4
1052      */
1053     void setAsciiStream(String parameterName, java.io.InputStream x, int length)
1054         throws SQLException;
1055 
1056     /**
1057      * Sets the designated parameter to the given input stream, which will have
1058      * the specified number of bytes.
1059      * When a very large binary value is input to a <code>LONGVARBINARY</code>
1060      * parameter, it may be more practical to send it via a
1061      * <code>java.io.InputStream</code> object. The data will be read from the stream
1062      * as needed until end-of-file is reached.
1063      *
1064      * <P><B>Note:</B> This stream object can either be a standard
1065      * Java stream object or your own subclass that implements the
1066      * standard interface.
1067      *
1068      * @param parameterName the name of the parameter
1069      * @param x the java input stream which contains the binary parameter value
1070      * @param length the number of bytes in the stream
1071      * @exception SQLException if parameterName does not correspond to a named
1072      * parameter; if a database access error occurs or
1073      * this method is called on a closed <code>CallableStatement</code>
1074      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1075      * this method
1076      * @since 1.4
1077      */
1078     void setBinaryStream(String parameterName, java.io.InputStream x,
1079                          int length) throws SQLException;
1080 
1081     /**
1082      * Sets the value of the designated parameter with the given object.
1083      *
1084      * <p>The given Java object will be converted to the given targetSqlType
1085      * before being sent to the database.
1086      *
1087      * If the object has a custom mapping (is of a class implementing the
1088      * interface <code>SQLData</code>),
1089      * the JDBC driver should call the method <code>SQLData.writeSQL</code> to write it
1090      * to the SQL data stream.
1091      * If, on the other hand, the object is of a class implementing
1092      * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
1093      *  <code>Struct</code>, <code>java.net.URL</code>,
1094      * or <code>Array</code>, the driver should pass it to the database as a
1095      * value of the corresponding SQL type.
1096      * <P>
1097      * Note that this method may be used to pass datatabase-
1098      * specific abstract data types.
1099      *
1100      * @param parameterName the name of the parameter
1101      * @param x the object containing the input parameter value
1102      * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
1103      * sent to the database. The scale argument may further qualify this type.
1104      * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,
1105      *          this is the number of digits after the decimal point.  For all other
1106      *          types, this value will be ignored.
1107      * @exception SQLException if parameterName does not correspond to a named
1108      * parameter; if a database access error occurs or
1109      * this method is called on a closed <code>CallableStatement</code>
1110      * @exception SQLFeatureNotSupportedException if
1111      * the JDBC driver does not support the specified targetSqlType
1112      * @see Types
1113      * @see #getObject
1114      * @since 1.4
1115      */
1116     void setObject(String parameterName, Object x, int targetSqlType, int scale)
1117         throws SQLException;
1118 
1119     /**
1120      * Sets the value of the designated parameter with the given object.
1121      *
1122      * This method is similar to {@link #setObject(String parameterName,
1123      * Object x, int targetSqlType, int scaleOrLength)},
1124      * except that it assumes a scale of zero.
1125      *
1126      * @param parameterName the name of the parameter
1127      * @param x the object containing the input parameter value
1128      * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
1129      *                      sent to the database
1130      * @exception SQLException if parameterName does not correspond to a named
1131      * parameter; if a database access error occurs or
1132      * this method is called on a closed <code>CallableStatement</code>
1133      * @exception SQLFeatureNotSupportedException if
1134      * the JDBC driver does not support the specified targetSqlType
1135      * @see #getObject
1136      * @since 1.4
1137      */
1138     void setObject(String parameterName, Object x, int targetSqlType)
1139         throws SQLException;
1140 
1141     /**
1142      * Sets the value of the designated parameter with the given object.
1143      *
1144      * <p>The JDBC specification specifies a standard mapping from
1145      * Java <code>Object</code> types to SQL types.  The given argument
1146      * will be converted to the corresponding SQL type before being
1147      * sent to the database.
1148      * <p>Note that this method may be used to pass datatabase-
1149      * specific abstract data types, by using a driver-specific Java
1150      * type.
1151      *
1152      * If the object is of a class implementing the interface <code>SQLData</code>,
1153      * the JDBC driver should call the method <code>SQLData.writeSQL</code>
1154      * to write it to the SQL data stream.
1155      * If, on the other hand, the object is of a class implementing
1156      * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
1157      *  <code>Struct</code>, <code>java.net.URL</code>,
1158      * or <code>Array</code>, the driver should pass it to the database as a
1159      * value of the corresponding SQL type.
1160      * <P>
1161      * This method throws an exception if there is an ambiguity, for example, if the
1162      * object is of a class implementing more than one of the interfaces named above.
1163      * <p>
1164      *<b>Note:</b> Not all databases allow for a non-typed Null to be sent to
1165      * the backend. For maximum portability, the <code>setNull</code> or the
1166      * <code>setObject(String parameterName, Object x, int sqlType)</code>
1167      * method should be used
1168      * instead of <code>setObject(String parameterName, Object x)</code>.
1169      *
1170      * @param parameterName the name of the parameter
1171      * @param x the object containing the input parameter value
1172      * @exception SQLException if parameterName does not correspond to a named
1173      * parameter; if a database access error occurs,
1174      * this method is called on a closed <code>CallableStatement</code> or if the given
1175      *            <code>Object</code> parameter is ambiguous
1176      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1177      * this method
1178      * @see #getObject
1179      * @since 1.4
1180      */
1181     void setObject(String parameterName, Object x) throws SQLException;
1182 
1183 
1184     /**
1185      * Sets the designated parameter to the given <code>Reader</code>
1186      * object, which is the given number of characters long.
1187      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
1188      * parameter, it may be more practical to send it via a
1189      * <code>java.io.Reader</code> object. The data will be read from the stream
1190      * as needed until end-of-file is reached.  The JDBC driver will
1191      * do any necessary conversion from UNICODE to the database char format.
1192      *
1193      * <P><B>Note:</B> This stream object can either be a standard
1194      * Java stream object or your own subclass that implements the
1195      * standard interface.
1196      *
1197      * @param parameterName the name of the parameter
1198      * @param reader the <code>java.io.Reader</code> object that
1199      *        contains the UNICODE data used as the designated parameter
1200      * @param length the number of characters in the stream
1201      * @exception SQLException if parameterName does not correspond to a named
1202      * parameter; if a database access error occurs or
1203      * this method is called on a closed <code>CallableStatement</code>
1204      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1205      * this method
1206      * @since 1.4
1207      */
1208     void setCharacterStream(String parameterName,
1209                             java.io.Reader reader,
1210                             int length) throws SQLException;
1211 
1212     /**
1213      * Sets the designated parameter to the given <code>java.sql.Date</code> value,
1214      * using the given <code>Calendar</code> object.  The driver uses
1215      * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value,
1216      * which the driver then sends to the database.  With a
1217      * a <code>Calendar</code> object, the driver can calculate the date
1218      * taking into account a custom timezone.  If no
1219      * <code>Calendar</code> object is specified, the driver uses the default
1220      * timezone, which is that of the virtual machine running the application.
1221      *
1222      * @param parameterName the name of the parameter
1223      * @param x the parameter value
1224      * @param cal the <code>Calendar</code> object the driver will use
1225      *            to construct the date
1226      * @exception SQLException if parameterName does not correspond to a named
1227      * parameter; if a database access error occurs or
1228      * this method is called on a closed <code>CallableStatement</code>
1229      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1230      * this method
1231      * @see #getDate
1232      * @since 1.4
1233      */
1234     void setDate(String parameterName, java.sql.Date x, Calendar cal)
1235         throws SQLException;
1236 
1237     /**
1238      * Sets the designated parameter to the given <code>java.sql.Time</code> value,
1239      * using the given <code>Calendar</code> object.  The driver uses
1240      * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value,
1241      * which the driver then sends to the database.  With a
1242      * a <code>Calendar</code> object, the driver can calculate the time
1243      * taking into account a custom timezone.  If no
1244      * <code>Calendar</code> object is specified, the driver uses the default
1245      * timezone, which is that of the virtual machine running the application.
1246      *
1247      * @param parameterName the name of the parameter
1248      * @param x the parameter value
1249      * @param cal the <code>Calendar</code> object the driver will use
1250      *            to construct the time
1251      * @exception SQLException if parameterName does not correspond to a named
1252      * parameter; if a database access error occurs or
1253      * this method is called on a closed <code>CallableStatement</code>
1254      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1255      * this method
1256      * @see #getTime
1257      * @since 1.4
1258      */
1259     void setTime(String parameterName, java.sql.Time x, Calendar cal)
1260         throws SQLException;
1261 
1262     /**
1263      * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value,
1264      * using the given <code>Calendar</code> object.  The driver uses
1265      * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value,
1266      * which the driver then sends to the database.  With a
1267      * a <code>Calendar</code> object, the driver can calculate the timestamp
1268      * taking into account a custom timezone.  If no
1269      * <code>Calendar</code> object is specified, the driver uses the default
1270      * timezone, which is that of the virtual machine running the application.
1271      *
1272      * @param parameterName the name of the parameter
1273      * @param x the parameter value
1274      * @param cal the <code>Calendar</code> object the driver will use
1275      *            to construct the timestamp
1276      * @exception SQLException if parameterName does not correspond to a named
1277      * parameter; if a database access error occurs or
1278      * this method is called on a closed <code>CallableStatement</code>
1279      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1280      * this method
1281      * @see #getTimestamp
1282      * @since 1.4
1283      */
1284     void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal)
1285         throws SQLException;
1286 
1287     /**
1288      * Sets the designated parameter to SQL <code>NULL</code>.
1289      * This version of the method <code>setNull</code> should
1290      * be used for user-defined types and REF type parameters.  Examples
1291      * of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and
1292      * named array types.
1293      *
1294      * <P><B>Note:</B> To be portable, applications must give the
1295      * SQL type code and the fully-qualified SQL type name when specifying
1296      * a NULL user-defined or REF parameter.  In the case of a user-defined type
1297      * the name is the type name of the parameter itself.  For a REF
1298      * parameter, the name is the type name of the referenced type.
1299      * <p>
1300      * Although it is intended for user-defined and Ref parameters,
1301      * this method may be used to set a null parameter of any JDBC type.
1302      * If the parameter does not have a user-defined or REF type, the given
1303      * typeName is ignored.
1304      *
1305      *
1306      * @param parameterName the name of the parameter
1307      * @param sqlType a value from <code>java.sql.Types</code>
1308      * @param typeName the fully-qualified name of an SQL user-defined type;
1309      *        ignored if the parameter is not a user-defined type or
1310      *        SQL <code>REF</code> value
1311      * @exception SQLException if parameterName does not correspond to a named
1312      * parameter; if a database access error occurs or
1313      * this method is called on a closed <code>CallableStatement</code>
1314      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1315      * this method
1316      * @since 1.4
1317      */
1318     void setNull (String parameterName, int sqlType, String typeName)
1319         throws SQLException;
1320 
1321     /**
1322      * Retrieves the value of a JDBC <code>CHAR</code>, <code>VARCHAR</code>,
1323      * or <code>LONGVARCHAR</code> parameter as a <code>String</code> in
1324      * the Java programming language.
1325      * <p>
1326      * For the fixed-length type JDBC <code>CHAR</code>,
1327      * the <code>String</code> object
1328      * returned has exactly the same value the SQL
1329      * <code>CHAR</code> value had in the
1330      * database, including any padding added by the database.
1331      * @param parameterName the name of the parameter
1332      * @return the parameter value. If the value is SQL <code>NULL</code>, the result
1333      * is <code>null</code>.
1334      * @exception SQLException if parameterName does not correspond to a named
1335      * parameter; if a database access error occurs or
1336      * this method is called on a closed <code>CallableStatement</code>
1337      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1338      * this method
1339      * @see #setString
1340      * @since 1.4
1341      */
1342     String getString(String parameterName) throws SQLException;
1343 
1344     /**
1345      * Retrieves the value of a JDBC <code>BIT</code> or <code>BOOLEAN</code>
1346      * parameter as a
1347      * <code>boolean</code> in the Java programming language.
1348      * @param parameterName the name of the parameter
1349      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
1350      * is <code>false</code>.
1351      * @exception SQLException if parameterName does not correspond to a named
1352      * parameter; if a database access error occurs or
1353      * this method is called on a closed <code>CallableStatement</code>
1354      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1355      * this method
1356      * @see #setBoolean
1357      * @since 1.4
1358      */
1359     boolean getBoolean(String parameterName) throws SQLException;
1360 
1361     /**
1362      * Retrieves the value of a JDBC <code>TINYINT</code> parameter as a <code>byte</code>
1363      * in the Java programming language.
1364      * @param parameterName the name of the parameter
1365      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
1366      * is <code>0</code>.
1367      * @exception SQLException if parameterName does not correspond to a named
1368      * parameter; if a database access error occurs or
1369      * this method is called on a closed <code>CallableStatement</code>
1370      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1371      * this method
1372      * @see #setByte
1373      * @since 1.4
1374      */
1375     byte getByte(String parameterName) throws SQLException;
1376 
1377     /**
1378      * Retrieves the value of a JDBC <code>SMALLINT</code> parameter as a <code>short</code>
1379      * in the Java programming language.
1380      * @param parameterName the name of the parameter
1381      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
1382      * is <code>0</code>.
1383      * @exception SQLException if parameterName does not correspond to a named
1384      * parameter; if a database access error occurs or
1385      * this method is called on a closed <code>CallableStatement</code>
1386      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1387      * this method
1388      * @see #setShort
1389      * @since 1.4
1390      */
1391     short getShort(String parameterName) throws SQLException;
1392 
1393     /**
1394      * Retrieves the value of a JDBC <code>INTEGER</code> parameter as an <code>int</code>
1395      * in the Java programming language.
1396      *
1397      * @param parameterName the name of the parameter
1398      * @return the parameter value.  If the value is SQL <code>NULL</code>,
1399      *         the result is <code>0</code>.
1400      * @exception SQLException if parameterName does not correspond to a named
1401      * parameter; if a database access error occurs or
1402      * this method is called on a closed <code>CallableStatement</code>
1403      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1404      * this method
1405      * @see #setInt
1406      * @since 1.4
1407      */
1408     int getInt(String parameterName) throws SQLException;
1409 
1410     /**
1411      * Retrieves the value of a JDBC <code>BIGINT</code> parameter as a <code>long</code>
1412      * in the Java programming language.
1413      *
1414      * @param parameterName the name of the parameter
1415      * @return the parameter value.  If the value is SQL <code>NULL</code>,
1416      *         the result is <code>0</code>.
1417      * @exception SQLException if parameterName does not correspond to a named
1418      * parameter; if a database access error occurs or
1419      * this method is called on a closed <code>CallableStatement</code>
1420      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1421      * this method
1422      * @see #setLong
1423      * @since 1.4
1424      */
1425     long getLong(String parameterName) throws SQLException;
1426 
1427     /**
1428      * Retrieves the value of a JDBC <code>FLOAT</code> parameter as a <code>float</code>
1429      * in the Java programming language.
1430      * @param parameterName the name of the parameter
1431      * @return the parameter value.  If the value is SQL <code>NULL</code>,
1432      *         the result is <code>0</code>.
1433      * @exception SQLException if parameterName does not correspond to a named
1434      * parameter; if a database access error occurs or
1435      * this method is called on a closed <code>CallableStatement</code>
1436      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1437      * this method
1438      * @see #setFloat
1439      * @since 1.4
1440      */
1441     float getFloat(String parameterName) throws SQLException;
1442 
1443     /**
1444      * Retrieves the value of a JDBC <code>DOUBLE</code> parameter as a <code>double</code>
1445      * in the Java programming language.
1446      * @param parameterName the name of the parameter
1447      * @return the parameter value.  If the value is SQL <code>NULL</code>,
1448      *         the result is <code>0</code>.
1449      * @exception SQLException if parameterName does not correspond to a named
1450      * parameter; if a database access error occurs or
1451      * this method is called on a closed <code>CallableStatement</code>
1452      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1453      * this method
1454      * @see #setDouble
1455      * @since 1.4
1456      */
1457     double getDouble(String parameterName) throws SQLException;
1458 
1459     /**
1460      * Retrieves the value of a JDBC <code>BINARY</code> or <code>VARBINARY</code>
1461      * parameter as an array of <code>byte</code> values in the Java
1462      * programming language.
1463      * @param parameterName the name of the parameter
1464      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result is
1465      *  <code>null</code>.
1466      * @exception SQLException if parameterName does not correspond to a named
1467      * parameter; if a database access error occurs or
1468      * this method is called on a closed <code>CallableStatement</code>
1469      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1470      * this method
1471      * @see #setBytes
1472      * @since 1.4
1473      */
1474     byte[] getBytes(String parameterName) throws SQLException;
1475 
1476     /**
1477      * Retrieves the value of a JDBC <code>DATE</code> parameter as a
1478      * <code>java.sql.Date</code> object.
1479      * @param parameterName the name of the parameter
1480      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
1481      * is <code>null</code>.
1482      * @exception SQLException if parameterName does not correspond to a named
1483      * parameter; if a database access error occurs or
1484      * this method is called on a closed <code>CallableStatement</code>
1485      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1486      * this method
1487      * @see #setDate
1488      * @since 1.4
1489      */
1490     java.sql.Date getDate(String parameterName) throws SQLException;
1491 
1492     /**
1493      * Retrieves the value of a JDBC <code>TIME</code> parameter as a
1494      * <code>java.sql.Time</code> object.
1495      * @param parameterName the name of the parameter
1496      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
1497      * is <code>null</code>.
1498      * @exception SQLException if parameterName does not correspond to a named
1499      * parameter; if a database access error occurs or
1500      * this method is called on a closed <code>CallableStatement</code>
1501      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1502      * this method
1503      * @see #setTime
1504      * @since 1.4
1505      */
1506     java.sql.Time getTime(String parameterName) throws SQLException;
1507 
1508     /**
1509      * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a
1510      * <code>java.sql.Timestamp</code> object.
1511      * @param parameterName the name of the parameter
1512      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result
1513      * is <code>null</code>.
1514      * @exception SQLException if parameterName does not correspond to a named
1515      * parameter; if a database access error occurs or
1516      * this method is called on a closed <code>CallableStatement</code>
1517      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1518      * this method
1519      * @see #setTimestamp
1520      * @since 1.4
1521      */
1522     java.sql.Timestamp getTimestamp(String parameterName) throws SQLException;
1523 
1524     /**
1525      * Retrieves the value of a parameter as an <code>Object</code> in the Java
1526      * programming language. If the value is an SQL <code>NULL</code>, the
1527      * driver returns a Java <code>null</code>.
1528      * <p>
1529      * This method returns a Java object whose type corresponds to the JDBC
1530      * type that was registered for this parameter using the method
1531      * <code>registerOutParameter</code>.  By registering the target JDBC
1532      * type as <code>java.sql.Types.OTHER</code>, this method can be used
1533      * to read database-specific abstract data types.
1534      * @param parameterName the name of the parameter
1535      * @return A <code>java.lang.Object</code> holding the OUT parameter value.
1536      * @exception SQLException if parameterName does not correspond to a named
1537      * parameter; if a database access error occurs or
1538      * this method is called on a closed <code>CallableStatement</code>
1539      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1540      * this method
1541      * @see Types
1542      * @see #setObject
1543      * @since 1.4
1544      */
1545     Object getObject(String parameterName) throws SQLException;
1546 
1547     /**
1548      * Retrieves the value of a JDBC <code>NUMERIC</code> parameter as a
1549      * <code>java.math.BigDecimal</code> object with as many digits to the
1550      * right of the decimal point as the value contains.
1551      * @param parameterName the name of the parameter
1552      * @return the parameter value in full precision.  If the value is
1553      * SQL <code>NULL</code>, the result is <code>null</code>.
1554      * @exception SQLException if parameterName does not correspond to a named
1555      * parameter;  if a database access error occurs or
1556      * this method is called on a closed <code>CallableStatement</code>
1557      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1558      * this method
1559      * @see #setBigDecimal
1560      * @since 1.4
1561      */
1562     BigDecimal getBigDecimal(String parameterName) throws SQLException;
1563 
1564     /**
1565      * Returns an object representing the value of OUT parameter
1566      * <code>parameterName</code> and uses <code>map</code> for the custom
1567      * mapping of the parameter value.
1568      * <p>
1569      * This method returns a Java object whose type corresponds to the
1570      * JDBC type that was registered for this parameter using the method
1571      * <code>registerOutParameter</code>.  By registering the target
1572      * JDBC type as <code>java.sql.Types.OTHER</code>, this method can
1573      * be used to read database-specific abstract data types.
1574      * @param parameterName the name of the parameter
1575      * @param map the mapping from SQL type names to Java classes
1576      * @return a <code>java.lang.Object</code> holding the OUT parameter value
1577      * @exception SQLException if parameterName does not correspond to a named
1578      * parameter; if a database access error occurs or
1579      * this method is called on a closed <code>CallableStatement</code>
1580      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1581      * this method
1582      * @see #setObject
1583      * @since 1.4
1584      */
1585     Object getObject(String parameterName, java.util.Map<String,Class<?>> map)
1586       throws SQLException;
1587 
1588     /**
1589      * Retrieves the value of a JDBC <code>REF(&lt;structured-type&gt;)</code>
1590      * parameter as a {@link java.sql.Ref} object in the Java programming language.
1591      *
1592      * @param parameterName the name of the parameter
1593      * @return the parameter value as a <code>Ref</code> object in the
1594      *         Java programming language.  If the value was SQL <code>NULL</code>,
1595      *         the value <code>null</code> is returned.
1596      * @exception SQLException if parameterName does not correspond to a named
1597      * parameter; if a database access error occurs or
1598      * this method is called on a closed <code>CallableStatement</code>
1599      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1600      * this method
1601      * @since 1.4
1602      */
1603     Ref getRef (String parameterName) throws SQLException;
1604 
1605     /**
1606      * Retrieves the value of a JDBC <code>BLOB</code> parameter as a
1607      * {@link java.sql.Blob} object in the Java programming language.
1608      *
1609      * @param parameterName the name of the parameter
1610      * @return the parameter value as a <code>Blob</code> object in the
1611      *         Java programming language.  If the value was SQL <code>NULL</code>,
1612      *         the value <code>null</code> is returned.
1613      * @exception SQLException if parameterName does not correspond to a named
1614      * parameter; if a database access error occurs or
1615      * this method is called on a closed <code>CallableStatement</code>
1616      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1617      * this method
1618      * @since 1.4
1619      */
1620     Blob getBlob (String parameterName) throws SQLException;
1621 
1622     /**
1623      * Retrieves the value of a JDBC <code>CLOB</code> parameter as a
1624      * <code>java.sql.Clob</code> object in the Java programming language.
1625      * @param parameterName the name of the parameter
1626      * @return the parameter value as a <code>Clob</code> object in the
1627      *         Java programming language.  If the value was SQL <code>NULL</code>,
1628      *         the value <code>null</code> is returned.
1629      * @exception SQLException if parameterName does not correspond to a named
1630      * parameter; if a database access error occurs or
1631      * this method is called on a closed <code>CallableStatement</code>
1632      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1633      * this method
1634      * @since 1.4
1635      */
1636     Clob getClob (String parameterName) throws SQLException;
1637 
1638     /**
1639      * Retrieves the value of a JDBC <code>ARRAY</code> parameter as an
1640      * {@link java.sql.Array} object in the Java programming language.
1641      *
1642      * @param parameterName the name of the parameter
1643      * @return the parameter value as an <code>Array</code> object in
1644      *         Java programming language.  If the value was SQL <code>NULL</code>,
1645      *         the value <code>null</code> is returned.
1646      * @exception SQLException if parameterName does not correspond to a named
1647      * parameter; if a database access error occurs or
1648      * this method is called on a closed <code>CallableStatement</code>
1649      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1650      * this method
1651      * @since 1.4
1652      */
1653     Array getArray (String parameterName) throws SQLException;
1654 
1655     /**
1656      * Retrieves the value of a JDBC <code>DATE</code> parameter as a
1657      * <code>java.sql.Date</code> object, using
1658      * the given <code>Calendar</code> object
1659      * to construct the date.
1660      * With a <code>Calendar</code> object, the driver
1661      * can calculate the date taking into account a custom timezone and locale.
1662      * If no <code>Calendar</code> object is specified, the driver uses the
1663      * default timezone and locale.
1664      *
1665      * @param parameterName the name of the parameter
1666      * @param cal the <code>Calendar</code> object the driver will use
1667      *            to construct the date
1668      * @return the parameter value.  If the value is SQL <code>NULL</code>,
1669      * the result is <code>null</code>.
1670      * @exception SQLException if parameterName does not correspond to a named
1671      * parameter; if a database access error occurs or
1672      * this method is called on a closed <code>CallableStatement</code>
1673      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1674      * this method
1675      * @see #setDate
1676      * @since 1.4
1677      */
1678     java.sql.Date getDate(String parameterName, Calendar cal)
1679         throws SQLException;
1680 
1681     /**
1682      * Retrieves the value of a JDBC <code>TIME</code> parameter as a
1683      * <code>java.sql.Time</code> object, using
1684      * the given <code>Calendar</code> object
1685      * to construct the time.
1686      * With a <code>Calendar</code> object, the driver
1687      * can calculate the time taking into account a custom timezone and locale.
1688      * If no <code>Calendar</code> object is specified, the driver uses the
1689      * default timezone and locale.
1690      *
1691      * @param parameterName the name of the parameter
1692      * @param cal the <code>Calendar</code> object the driver will use
1693      *            to construct the time
1694      * @return the parameter value; if the value is SQL <code>NULL</code>, the result is
1695      * <code>null</code>.
1696      * @exception SQLException if parameterName does not correspond to a named
1697      * parameter; if a database access error occurs or
1698      * this method is called on a closed <code>CallableStatement</code>
1699      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1700      * this method
1701      * @see #setTime
1702      * @since 1.4
1703      */
1704     java.sql.Time getTime(String parameterName, Calendar cal)
1705         throws SQLException;
1706 
1707     /**
1708      * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a
1709      * <code>java.sql.Timestamp</code> object, using
1710      * the given <code>Calendar</code> object to construct
1711      * the <code>Timestamp</code> object.
1712      * With a <code>Calendar</code> object, the driver
1713      * can calculate the timestamp taking into account a custom timezone and locale.
1714      * If no <code>Calendar</code> object is specified, the driver uses the
1715      * default timezone and locale.
1716      *
1717      *
1718      * @param parameterName the name of the parameter
1719      * @param cal the <code>Calendar</code> object the driver will use
1720      *            to construct the timestamp
1721      * @return the parameter value.  If the value is SQL <code>NULL</code>, the result is
1722      * <code>null</code>.
1723      * @exception SQLException if parameterName does not correspond to a named
1724      * parameter; if a database access error occurs or
1725      * this method is called on a closed <code>CallableStatement</code>
1726      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1727      * this method
1728      * @see #setTimestamp
1729      * @since 1.4
1730      */
1731     java.sql.Timestamp getTimestamp(String parameterName, Calendar cal)
1732         throws SQLException;
1733 
1734     /**
1735      * Retrieves the value of a JDBC <code>DATALINK</code> parameter as a
1736      * <code>java.net.URL</code> object.
1737      *
1738      * @param parameterName the name of the parameter
1739      * @return the parameter value as a <code>java.net.URL</code> object in the
1740      * Java programming language.  If the value was SQL <code>NULL</code>, the
1741      * value <code>null</code> is returned.
1742      * @exception SQLException if parameterName does not correspond to a named
1743      * parameter; if a database access error occurs,
1744      * this method is called on a closed <code>CallableStatement</code>,
1745      *            or if there is a problem with the URL
1746      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1747      * this method
1748      * @see #setURL
1749      * @since 1.4
1750      */
1751     java.net.URL getURL(String parameterName) throws SQLException;
1752 
1753     //------------------------- JDBC 4.0 -----------------------------------
1754 
1755     /**
1756      * Retrieves the value of the designated JDBC <code>ROWID</code> parameter as a
1757      * <code>java.sql.RowId</code> object.
1758      *
1759      * @param parameterIndex the first parameter is 1, the second is 2,...
1760      * @return a <code>RowId</code> object that represents the JDBC <code>ROWID</code>
1761      *     value is used as the designated parameter. If the parameter contains
1762      * a SQL <code>NULL</code>, then a <code>null</code> value is returned.
1763      * @throws SQLException if the parameterIndex is not valid;
1764      * if a database access error occurs or
1765      * this method is called on a closed <code>CallableStatement</code>
1766      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1767      * this method
1768      * @since 1.6
1769      */
1770     RowId getRowId(int parameterIndex) throws SQLException;
1771 
1772     /**
1773      * Retrieves the value of the designated JDBC <code>ROWID</code> parameter as a
1774      * <code>java.sql.RowId</code> object.
1775      *
1776      * @param parameterName the name of the parameter
1777      * @return a <code>RowId</code> object that represents the JDBC <code>ROWID</code>
1778      *     value is used as the designated parameter. If the parameter contains
1779      * a SQL <code>NULL</code>, then a <code>null</code> value is returned.
1780      * @throws SQLException if parameterName does not correspond to a named
1781      * parameter; if a database access error occurs or
1782      * this method is called on a closed <code>CallableStatement</code>
1783      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1784      * this method
1785      * @since 1.6
1786      */
1787     RowId getRowId(String parameterName) throws SQLException;
1788 
1789      /**
1790      * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
1791      * driver converts this to a SQL <code>ROWID</code> when it sends it to the
1792      * database.
1793      *
1794      * @param parameterName the name of the parameter
1795      * @param x the parameter value
1796      * @throws SQLException if parameterName does not correspond to a named
1797      * parameter; if a database access error occurs or
1798      * this method is called on a closed <code>CallableStatement</code>
1799      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1800      * this method
1801      * @since 1.6
1802      */
1803     void setRowId(String parameterName, RowId x) throws SQLException;
1804 
1805     /**
1806      * Sets the designated parameter to the given <code>String</code> object.
1807      * The driver converts this to a SQL <code>NCHAR</code> or
1808      * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
1809      * @param parameterName the name of the parameter to be set
1810      * @param value the parameter value
1811      * @throws SQLException if parameterName does not correspond to a named
1812      * parameter; if the driver does not support national
1813      *         character sets;  if the driver can detect that a data conversion
1814      *  error could occur; if a database access error occurs or
1815      * this method is called on a closed <code>CallableStatement</code>
1816      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1817      * this method
1818      * @since 1.6
1819      */
1820     void setNString(String parameterName, String value)
1821             throws SQLException;
1822 
1823     /**
1824      * Sets the designated parameter to a <code>Reader</code> object. The
1825      * <code>Reader</code> reads the data till end-of-file is reached. The
1826      * driver does the necessary conversion from Java character format to
1827      * the national character set in the database.
1828      * @param parameterName the name of the parameter to be set
1829      * @param value the parameter value
1830      * @param length the number of characters in the parameter data.
1831      * @throws SQLException if parameterName does not correspond to a named
1832      * parameter; if the driver does not support national
1833      *         character sets;  if the driver can detect that a data conversion
1834      *  error could occur; if a database access error occurs or
1835      * this method is called on a closed <code>CallableStatement</code>
1836      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1837      * this method
1838      * @since 1.6
1839      */
1840     void setNCharacterStream(String parameterName, Reader value, long length)
1841             throws SQLException;
1842 
1843      /**
1844      * Sets the designated parameter to a <code>java.sql.NClob</code> object. The object
1845      * implements the <code>java.sql.NClob</code> interface. This <code>NClob</code>
1846      * object maps to a SQL <code>NCLOB</code>.
1847      * @param parameterName the name of the parameter to be set
1848      * @param value the parameter value
1849      * @throws SQLException if parameterName does not correspond to a named
1850      * parameter; if the driver does not support national
1851      *         character sets;  if the driver can detect that a data conversion
1852      *  error could occur; if a database access error occurs or
1853      * this method is called on a closed <code>CallableStatement</code>
1854      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1855      * this method
1856      * @since 1.6
1857      */
1858      void setNClob(String parameterName, NClob value) throws SQLException;
1859 
1860     /**
1861      * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain  the number
1862      * of characters specified by length otherwise a <code>SQLException</code> will be
1863      * generated when the <code>CallableStatement</code> is executed.
1864      * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
1865      * because it informs the driver that the parameter value should be sent to
1866      * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
1867      * driver may have to do extra work to determine whether the parameter
1868      * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
1869      * @param parameterName the name of the parameter to be set
1870      * @param reader An object that contains the data to set the parameter value to.
1871      * @param length the number of characters in the parameter data.
1872      * @throws SQLException if parameterName does not correspond to a named
1873      * parameter; if the length specified is less than zero;
1874      * a database access error occurs or
1875      * this method is called on a closed <code>CallableStatement</code>
1876      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1877      * this method
1878      *
1879      * @since 1.6
1880      */
1881      void setClob(String parameterName, Reader reader, long length)
1882        throws SQLException;
1883 
1884     /**
1885      * Sets the designated parameter to a <code>InputStream</code> object.  The <code>inputstream</code> must contain  the number
1886      * of characters specified by length, otherwise a <code>SQLException</code> will be
1887      * generated when the <code>CallableStatement</code> is executed.
1888      * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
1889      * method because it informs the driver that the parameter value should be
1890      * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
1891      * the driver may have to do extra work to determine whether the parameter
1892      * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
1893      *
1894      * @param parameterName the name of the parameter to be set
1895      * the second is 2, ...
1896      *
1897      * @param inputStream An object that contains the data to set the parameter
1898      * value to.
1899      * @param length the number of bytes in the parameter data.
1900      * @throws SQLException  if parameterName does not correspond to a named
1901      * parameter; if the length specified
1902      * is less than zero; if the number of bytes in the inputstream does not match
1903      * the specified length; if a database access error occurs or
1904      * this method is called on a closed <code>CallableStatement</code>
1905      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1906      * this method
1907      *
1908      * @since 1.6
1909      */
1910      void setBlob(String parameterName, InputStream inputStream, long length)
1911         throws SQLException;
1912     /**
1913      * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain  the number
1914      * of characters specified by length otherwise a <code>SQLException</code> will be
1915      * generated when the <code>CallableStatement</code> is executed.
1916      * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
1917      * because it informs the driver that the parameter value should be sent to
1918      * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
1919      * driver may have to do extra work to determine whether the parameter
1920      * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
1921      *
1922      * @param parameterName the name of the parameter to be set
1923      * @param reader An object that contains the data to set the parameter value to.
1924      * @param length the number of characters in the parameter data.
1925      * @throws SQLException if parameterName does not correspond to a named
1926      * parameter; if the length specified is less than zero;
1927      * if the driver does not support national
1928      *         character sets;  if the driver can detect that a data conversion
1929      *  error could occur; if a database access error occurs or
1930      * this method is called on a closed <code>CallableStatement</code>
1931      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1932      * this method
1933      * @since 1.6
1934      */
1935      void setNClob(String parameterName, Reader reader, long length)
1936        throws SQLException;
1937 
1938     /**
1939      * Retrieves the value of the designated JDBC <code>NCLOB</code> parameter as a
1940      * <code>java.sql.NClob</code> object in the Java programming language.
1941      *
1942      * @param parameterIndex the first parameter is 1, the second is 2, and
1943      * so on
1944      * @return the parameter value as a <code>NClob</code> object in the
1945      * Java programming language.  If the value was SQL <code>NULL</code>, the
1946      * value <code>null</code> is returned.
1947      * @exception SQLException if the parameterIndex is not valid;
1948      * if the driver does not support national
1949      *         character sets;  if the driver can detect that a data conversion
1950      *  error could occur; if a database access error occurs or
1951      * this method is called on a closed <code>CallableStatement</code>
1952      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1953      * this method
1954      * @since 1.6
1955      */
1956     NClob getNClob (int parameterIndex) throws SQLException;
1957 
1958 
1959     /**
1960      * Retrieves the value of a JDBC <code>NCLOB</code> parameter as a
1961      * <code>java.sql.NClob</code> object in the Java programming language.
1962      * @param parameterName the name of the parameter
1963      * @return the parameter value as a <code>NClob</code> object in the
1964      *         Java programming language.  If the value was SQL <code>NULL</code>,
1965      *         the value <code>null</code> is returned.
1966      * @exception SQLException if parameterName does not correspond to a named
1967      * parameter; if the driver does not support national
1968      *         character sets;  if the driver can detect that a data conversion
1969      *  error could occur; if a database access error occurs or
1970      * this method is called on a closed <code>CallableStatement</code>
1971      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1972      * this method
1973      * @since 1.6
1974      */
1975     NClob getNClob (String parameterName) throws SQLException;
1976 
1977     /**
1978      * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
1979      * <code>SQL XML</code> value when it sends it to the database.
1980      *
1981      * @param parameterName the name of the parameter
1982      * @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
1983      * @throws SQLException if parameterName does not correspond to a named
1984      * parameter; if a database access error occurs;
1985      * this method is called on a closed <code>CallableStatement</code> or
1986      * the <code>java.xml.transform.Result</code>,
1987    *  <code>Writer</code> or <code>OutputStream</code> has not been closed for the <code>SQLXML</code> object
1988      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
1989      * this method
1990      *
1991      * @since 1.6
1992      */
1993     void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException;
1994 
1995     /**
1996      * Retrieves the value of the designated <code>SQL XML</code> parameter as a
1997      * <code>java.sql.SQLXML</code> object in the Java programming language.
1998      * @param parameterIndex index of the first parameter is 1, the second is 2, ...
1999      * @return a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
2000      * @throws SQLException if the parameterIndex is not valid;
2001      * if a database access error occurs or
2002      * this method is called on a closed <code>CallableStatement</code>
2003      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2004      * this method
2005      * @since 1.6
2006      */
2007     SQLXML getSQLXML(int parameterIndex) throws SQLException;
2008 
2009     /**
2010      * Retrieves the value of the designated <code>SQL XML</code> parameter as a
2011      * <code>java.sql.SQLXML</code> object in the Java programming language.
2012      * @param parameterName the name of the parameter
2013      * @return a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
2014      * @throws SQLException if parameterName does not correspond to a named
2015      * parameter; if a database access error occurs or
2016      * this method is called on a closed <code>CallableStatement</code>
2017      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2018      * this method
2019      * @since 1.6
2020      */
2021     SQLXML getSQLXML(String parameterName) throws SQLException;
2022 
2023     /**
2024      * Retrieves the value of the designated <code>NCHAR</code>,
2025      * <code>NVARCHAR</code>
2026      * or <code>LONGNVARCHAR</code> parameter as
2027      * a <code>String</code> in the Java programming language.
2028      * <p>
2029      * For the fixed-length type JDBC <code>NCHAR</code>,
2030      * the <code>String</code> object
2031      * returned has exactly the same value the SQL
2032      * <code>NCHAR</code> value had in the
2033      * database, including any padding added by the database.
2034      *
2035      * @param parameterIndex index of the first parameter is 1, the second is 2, ...
2036      * @return a <code>String</code> object that maps an
2037      * <code>NCHAR</code>, <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
2038      * @exception SQLException if the parameterIndex is not valid;
2039      * if a database access error occurs or
2040      * this method is called on a closed <code>CallableStatement</code>
2041      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2042      * this method
2043      * @since 1.6
2044      * @see #setNString
2045      */
2046     String getNString(int parameterIndex) throws SQLException;
2047 
2048 
2049     /**
2050      *  Retrieves the value of the designated <code>NCHAR</code>,
2051      * <code>NVARCHAR</code>
2052      * or <code>LONGNVARCHAR</code> parameter as
2053      * a <code>String</code> in the Java programming language.
2054      * <p>
2055      * For the fixed-length type JDBC <code>NCHAR</code>,
2056      * the <code>String</code> object
2057      * returned has exactly the same value the SQL
2058      * <code>NCHAR</code> value had in the
2059      * database, including any padding added by the database.
2060      *
2061      * @param parameterName the name of the parameter
2062      * @return a <code>String</code> object that maps an
2063      * <code>NCHAR</code>, <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
2064      * @exception SQLException if parameterName does not correspond to a named
2065      * parameter;
2066      * if a database access error occurs or
2067      * this method is called on a closed <code>CallableStatement</code>
2068      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2069      * this method
2070      * @since 1.6
2071      * @see #setNString
2072      */
2073     String getNString(String parameterName) throws SQLException;
2074 
2075     /**
2076      * Retrieves the value of the designated parameter as a
2077      * <code>java.io.Reader</code> object in the Java programming language.
2078      * It is intended for use when
2079      * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
2080      * and <code>LONGNVARCHAR</code> parameters.
2081      *
2082      * @return a <code>java.io.Reader</code> object that contains the parameter
2083      * value; if the value is SQL <code>NULL</code>, the value returned is
2084      * <code>null</code> in the Java programming language.
2085      * @param parameterIndex the first parameter is 1, the second is 2, ...
2086      * @exception SQLException if the parameterIndex is not valid;
2087      * if a database access error occurs or
2088      * this method is called on a closed <code>CallableStatement</code>
2089      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2090      * this method
2091      * @since 1.6
2092      */
2093     java.io.Reader getNCharacterStream(int parameterIndex) throws SQLException;
2094 
2095     /**
2096      * Retrieves the value of the designated parameter as a
2097      * <code>java.io.Reader</code> object in the Java programming language.
2098      * It is intended for use when
2099      * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
2100      * and <code>LONGNVARCHAR</code> parameters.
2101      *
2102      * @param parameterName the name of the parameter
2103      * @return a <code>java.io.Reader</code> object that contains the parameter
2104      * value; if the value is SQL <code>NULL</code>, the value returned is
2105      * <code>null</code> in the Java programming language
2106      * @exception SQLException if parameterName does not correspond to a named
2107      * parameter; if a database access error occurs or
2108      * this method is called on a closed <code>CallableStatement</code>
2109      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2110      * this method
2111      * @since 1.6
2112      */
2113     java.io.Reader getNCharacterStream(String parameterName) throws SQLException;
2114 
2115     /**
2116      * Retrieves the value of the designated parameter as a
2117      * <code>java.io.Reader</code> object in the Java programming language.
2118      *
2119      * @return a <code>java.io.Reader</code> object that contains the parameter
2120      * value; if the value is SQL <code>NULL</code>, the value returned is
2121      * <code>null</code> in the Java programming language.
2122      * @param parameterIndex the first parameter is 1, the second is 2, ...
2123      * @exception SQLException if the parameterIndex is not valid; if a database access error occurs or
2124      * this method is called on a closed <code>CallableStatement</code>
2125      * @since 1.6
2126      */
2127     java.io.Reader getCharacterStream(int parameterIndex) throws SQLException;
2128 
2129     /**
2130      * Retrieves the value of the designated parameter as a
2131      * <code>java.io.Reader</code> object in the Java programming language.
2132      *
2133      * @param parameterName the name of the parameter
2134      * @return a <code>java.io.Reader</code> object that contains the parameter
2135      * value; if the value is SQL <code>NULL</code>, the value returned is
2136      * <code>null</code> in the Java programming language
2137      * @exception SQLException if parameterName does not correspond to a named
2138      * parameter; if a database access error occurs or
2139      * this method is called on a closed <code>CallableStatement</code>
2140      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2141      * this method
2142      * @since 1.6
2143      */
2144     java.io.Reader getCharacterStream(String parameterName) throws SQLException;
2145 
2146     /**
2147      * Sets the designated parameter to the given <code>java.sql.Blob</code> object.
2148      * The driver converts this to an SQL <code>BLOB</code> value when it
2149      * sends it to the database.
2150      *
2151      * @param parameterName the name of the parameter
2152      * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value
2153      * @exception SQLException if parameterName does not correspond to a named
2154      * parameter; if a database access error occurs or
2155      * this method is called on a closed <code>CallableStatement</code>
2156      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2157      * this method
2158      * @since 1.6
2159      */
2160     void setBlob (String parameterName, Blob x) throws SQLException;
2161 
2162     /**
2163      * Sets the designated parameter to the given <code>java.sql.Clob</code> object.
2164      * The driver converts this to an SQL <code>CLOB</code> value when it
2165      * sends it to the database.
2166      *
2167      * @param parameterName the name of the parameter
2168      * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value
2169      * @exception SQLException if parameterName does not correspond to a named
2170      * parameter; if a database access error occurs or
2171      * this method is called on a closed <code>CallableStatement</code>
2172      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2173      * this method
2174      * @since 1.6
2175      */
2176     void setClob (String parameterName, Clob x) throws SQLException;
2177     /**
2178      * Sets the designated parameter to the given input stream, which will have
2179      * the specified number of bytes.
2180      * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
2181      * parameter, it may be more practical to send it via a
2182      * <code>java.io.InputStream</code>. Data will be read from the stream
2183      * as needed until end-of-file is reached.  The JDBC driver will
2184      * do any necessary conversion from ASCII to the database char format.
2185      *
2186      * <P><B>Note:</B> This stream object can either be a standard
2187      * Java stream object or your own subclass that implements the
2188      * standard interface.
2189      *
2190      * @param parameterName the name of the parameter
2191      * @param x the Java input stream that contains the ASCII parameter value
2192      * @param length the number of bytes in the stream
2193      * @exception SQLException if parameterName does not correspond to a named
2194      * parameter; if a database access error occurs or
2195      * this method is called on a closed <code>CallableStatement</code>
2196      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2197      * this method
2198      * @since 1.6
2199      */
2200     void setAsciiStream(String parameterName, java.io.InputStream x, long length)
2201         throws SQLException;
2202 
2203     /**
2204      * Sets the designated parameter to the given input stream, which will have
2205      * the specified number of bytes.
2206      * When a very large binary value is input to a <code>LONGVARBINARY</code>
2207      * parameter, it may be more practical to send it via a
2208      * <code>java.io.InputStream</code> object. The data will be read from the stream
2209      * as needed until end-of-file is reached.
2210      *
2211      * <P><B>Note:</B> This stream object can either be a standard
2212      * Java stream object or your own subclass that implements the
2213      * standard interface.
2214      *
2215      * @param parameterName the name of the parameter
2216      * @param x the java input stream which contains the binary parameter value
2217      * @param length the number of bytes in the stream
2218      * @exception SQLException if parameterName does not correspond to a named
2219      * parameter; if a database access error occurs or
2220      * this method is called on a closed <code>CallableStatement</code>
2221      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2222      * this method
2223      * @since 1.6
2224      */
2225     void setBinaryStream(String parameterName, java.io.InputStream x,
2226                          long length) throws SQLException;
2227         /**
2228      * Sets the designated parameter to the given <code>Reader</code>
2229      * object, which is the given number of characters long.
2230      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
2231      * parameter, it may be more practical to send it via a
2232      * <code>java.io.Reader</code> object. The data will be read from the stream
2233      * as needed until end-of-file is reached.  The JDBC driver will
2234      * do any necessary conversion from UNICODE to the database char format.
2235      *
2236      * <P><B>Note:</B> This stream object can either be a standard
2237      * Java stream object or your own subclass that implements the
2238      * standard interface.
2239      *
2240      * @param parameterName the name of the parameter
2241      * @param reader the <code>java.io.Reader</code> object that
2242      *        contains the UNICODE data used as the designated parameter
2243      * @param length the number of characters in the stream
2244      * @exception SQLException if parameterName does not correspond to a named
2245      * parameter; if a database access error occurs or
2246      * this method is called on a closed <code>CallableStatement</code>
2247      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
2248      * this method
2249      * @since 1.6
2250      */
2251     void setCharacterStream(String parameterName,
2252                             java.io.Reader reader,
2253                             long length) throws SQLException;
2254      //--
2255     /**
2256      * Sets the designated parameter to the given input stream.
2257      * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
2258      * parameter, it may be more practical to send it via a
2259      * <code>java.io.InputStream</code>. Data will be read from the stream
2260      * as needed until end-of-file is reached.  The JDBC driver will
2261      * do any necessary conversion from ASCII to the database char format.
2262      *
2263      * <P><B>Note:</B> This stream object can either be a standard
2264      * Java stream object or your own subclass that implements the
2265      * standard interface.
2266      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2267      * it might be more efficient to use a version of
2268      * <code>setAsciiStream</code> which takes a length parameter.
2269      *
2270      * @param parameterName the name of the parameter
2271      * @param x the Java input stream that contains the ASCII parameter value
2272      * @exception SQLException if parameterName does not correspond to a named
2273      * parameter; if a database access error occurs or
2274      * this method is called on a closed <code>CallableStatement</code>
2275      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
2276        * @since 1.6
2277     */
2278     void setAsciiStream(String parameterName, java.io.InputStream x)
2279             throws SQLException;
2280     /**
2281      * Sets the designated parameter to the given input stream.
2282      * When a very large binary value is input to a <code>LONGVARBINARY</code>
2283      * parameter, it may be more practical to send it via a
2284      * <code>java.io.InputStream</code> object. The data will be read from the
2285      * stream as needed until end-of-file is reached.
2286      *
2287      * <P><B>Note:</B> This stream object can either be a standard
2288      * Java stream object or your own subclass that implements the
2289      * standard interface.
2290      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2291      * it might be more efficient to use a version of
2292      * <code>setBinaryStream</code> which takes a length parameter.
2293      *
2294      * @param parameterName the name of the parameter
2295      * @param x the java input stream which contains the binary parameter value
2296      * @exception SQLException if parameterName does not correspond to a named
2297      * parameter; if a database access error occurs or
2298      * this method is called on a closed <code>CallableStatement</code>
2299      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
2300      * @since 1.6
2301      */
2302     void setBinaryStream(String parameterName, java.io.InputStream x)
2303     throws SQLException;
2304     /**
2305      * Sets the designated parameter to the given <code>Reader</code>
2306      * object.
2307      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
2308      * parameter, it may be more practical to send it via a
2309      * <code>java.io.Reader</code> object. The data will be read from the stream
2310      * as needed until end-of-file is reached.  The JDBC driver will
2311      * do any necessary conversion from UNICODE to the database char format.
2312      *
2313      * <P><B>Note:</B> This stream object can either be a standard
2314      * Java stream object or your own subclass that implements the
2315      * standard interface.
2316      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2317      * it might be more efficient to use a version of
2318      * <code>setCharacterStream</code> which takes a length parameter.
2319      *
2320      * @param parameterName the name of the parameter
2321      * @param reader the <code>java.io.Reader</code> object that contains the
2322      *        Unicode data
2323      * @exception SQLException if parameterName does not correspond to a named
2324      * parameter; if a database access error occurs or
2325      * this method is called on a closed <code>CallableStatement</code>
2326      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
2327      * @since 1.6
2328      */
2329     void setCharacterStream(String parameterName,
2330                           java.io.Reader reader) throws SQLException;
2331   /**
2332      * Sets the designated parameter to a <code>Reader</code> object. The
2333      * <code>Reader</code> reads the data till end-of-file is reached. The
2334      * driver does the necessary conversion from Java character format to
2335      * the national character set in the database.
2336 
2337      * <P><B>Note:</B> This stream object can either be a standard
2338      * Java stream object or your own subclass that implements the
2339      * standard interface.
2340      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2341      * it might be more efficient to use a version of
2342      * <code>setNCharacterStream</code> which takes a length parameter.
2343      *
2344      * @param parameterName the name of the parameter
2345      * @param value the parameter value
2346      * @throws SQLException if parameterName does not correspond to a named
2347      * parameter; if the driver does not support national
2348      *         character sets;  if the driver can detect that a data conversion
2349      *  error could occur; if a database access error occurs; or
2350      * this method is called on a closed <code>CallableStatement</code>
2351      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
2352      * @since 1.6
2353      */
2354      void setNCharacterStream(String parameterName, Reader value) throws SQLException;
2355 
2356     /**
2357      * Sets the designated parameter to a <code>Reader</code> object.
2358      * This method differs from the <code>setCharacterStream (int, Reader)</code> method
2359      * because it informs the driver that the parameter value should be sent to
2360      * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
2361      * driver may have to do extra work to determine whether the parameter
2362      * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
2363      *
2364      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2365      * it might be more efficient to use a version of
2366      * <code>setClob</code> which takes a length parameter.
2367      *
2368      * @param parameterName the name of the parameter
2369      * @param reader An object that contains the data to set the parameter value to.
2370      * @throws SQLException if parameterName does not correspond to a named
2371      * parameter; if a database access error occurs or this method is called on
2372      * a closed <code>CallableStatement</code>
2373      *
2374      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
2375      * @since 1.6
2376      */
2377      void setClob(String parameterName, Reader reader)
2378        throws SQLException;
2379 
2380     /**
2381      * Sets the designated parameter to a <code>InputStream</code> object.
2382      * This method differs from the <code>setBinaryStream (int, InputStream)</code>
2383      * method because it informs the driver that the parameter value should be
2384      * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
2385      * the driver may have to do extra work to determine whether the parameter
2386      * data should be send to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
2387      *
2388      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2389      * it might be more efficient to use a version of
2390      * <code>setBlob</code> which takes a length parameter.
2391      *
2392      * @param parameterName the name of the parameter
2393      * @param inputStream An object that contains the data to set the parameter
2394      * value to.
2395      * @throws SQLException if parameterName does not correspond to a named
2396      * parameter; if a database access error occurs or
2397      * this method is called on a closed <code>CallableStatement</code>
2398      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
2399      *
2400      * @since 1.6
2401      */
2402      void setBlob(String parameterName, InputStream inputStream)
2403         throws SQLException;
2404     /**
2405      * Sets the designated parameter to a <code>Reader</code> object.
2406      * This method differs from the <code>setCharacterStream (int, Reader)</code> method
2407      * because it informs the driver that the parameter value should be sent to
2408      * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
2409      * driver may have to do extra work to determine whether the parameter
2410      * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
2411      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2412      * it might be more efficient to use a version of
2413      * <code>setNClob</code> which takes a length parameter.
2414      *
2415      * @param parameterName the name of the parameter
2416      * @param reader An object that contains the data to set the parameter value to.
2417      * @throws SQLException if parameterName does not correspond to a named
2418      * parameter; if the driver does not support national character sets;
2419      * if the driver can detect that a data conversion
2420      *  error could occur;  if a database access error occurs or
2421      * this method is called on a closed <code>CallableStatement</code>
2422      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
2423      *
2424      * @since 1.6
2425      */
2426      void setNClob(String parameterName, Reader reader)
2427        throws SQLException;
2428 
2429     //------------------------- JDBC 4.1 -----------------------------------
2430 
2431 
2432     /**
2433      *<p>Returns an object representing the value of OUT parameter
2434      * {@code parameterIndex} and will convert from the
2435      * SQL type of the parameter to the requested Java data type, if the
2436      * conversion is supported. If the conversion is not
2437      * supported or null is specified for the type, a
2438      * <code>SQLException</code> is thrown.
2439      *<p>
2440      * At a minimum, an implementation must support the conversions defined in
2441      * Appendix B, Table B-3 and conversion of appropriate user defined SQL
2442      * types to a Java type which implements {@code SQLData}, or {@code Struct}.
2443      * Additional conversions may be supported and are vendor defined.
2444      *
2445      * @param parameterIndex the first parameter is 1, the second is 2, and so on
2446      * @param type Class representing the Java data type to convert the
2447      * designated parameter to.
2448      * @param <T> the type of the class modeled by this Class object
2449      * @return an instance of {@code type} holding the OUT parameter value
2450      * @throws SQLException if conversion is not supported, type is null or
2451      *         another error occurs. The getCause() method of the
2452      * exception may provide a more detailed exception, for example, if
2453      * a conversion error occurs
2454      * @throws SQLFeatureNotSupportedException if the JDBC driver does not support
2455      * this method
2456      * @since 1.7
2457      */
2458      public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException;
2459 
2460 
2461     /**
2462      *<p>Returns an object representing the value of OUT parameter
2463      * {@code parameterName} and will convert from the
2464      * SQL type of the parameter to the requested Java data type, if the
2465      * conversion is supported. If the conversion is not
2466      * supported  or null is specified for the type, a
2467      * <code>SQLException</code> is thrown.
2468      *<p>
2469      * At a minimum, an implementation must support the conversions defined in
2470      * Appendix B, Table B-3 and conversion of appropriate user defined SQL
2471      * types to a Java type which implements {@code SQLData}, or {@code Struct}.
2472      * Additional conversions may be supported and are vendor defined.
2473      *
2474      * @param parameterName the name of the parameter
2475      * @param type Class representing the Java data type to convert
2476      * the designated parameter to.
2477      * @param <T> the type of the class modeled by this Class object
2478      * @return an instance of {@code type} holding the OUT parameter
2479      * value
2480      * @throws SQLException if conversion is not supported, type is null or
2481      *         another error occurs. The getCause() method of the
2482      * exception may provide a more detailed exception, for example, if
2483      * a conversion error occurs
2484      * @throws SQLFeatureNotSupportedException if the JDBC driver does not support
2485      * this method
2486      * @since 1.7
2487      */
2488      public <T> T getObject(String parameterName, Class<T> type) throws SQLException;
2489 
2490      //------------------------- JDBC 4.2 -----------------------------------
2491 
2492      /**
2493      * <p>Sets the value of the designated parameter with the given object.
2494      *
2495      * If the second argument is an {@code InputStream} then the stream
2496      * must contain the number of bytes specified by scaleOrLength.
2497      * If the second argument is a {@code Reader} then the reader must
2498      * contain the number of characters specified
2499      * by scaleOrLength. If these conditions are not true the driver
2500      * will generate a
2501      * {@code SQLException} when the prepared statement is executed.
2502      *
2503      * <p>The given Java object will be converted to the given targetSqlType
2504      * before being sent to the database.
2505      *
2506      * If the object has a custom mapping (is of a class implementing the
2507      * interface {@code SQLData}),
2508      * the JDBC driver should call the method {@code SQLData.writeSQL} to
2509      * write it to the SQL data stream.
2510      * If, on the other hand, the object is of a class implementing
2511      * {@code Ref}, {@code Blob}, {@code Clob},  {@code NClob},
2512      *  {@code Struct}, {@code java.net.URL},
2513      * or {@code Array}, the driver should pass it to the database as a
2514      * value of the corresponding SQL type.
2515      *
2516      * <p>Note that this method may be used to pass database-specific
2517      * abstract data types.
2518      *<P>
2519      * The default implementation will throw {@code SQLFeatureNotSupportedException}
2520      *
2521      * @param parameterName the name of the parameter
2522      * @param x the object containing the input parameter value
2523      * @param targetSqlType the SQL type to be
2524      * sent to the database. The scale argument may further qualify this type.
2525      * @param scaleOrLength for {@code java.sql.JDBCType.DECIMAL}
2526      *          or {@code java.sql.JDBCType.NUMERIC types},
2527      *          this is the number of digits after the decimal point. For
2528      *          Java Object types {@code InputStream} and {@code Reader},
2529      *          this is the length
2530      *          of the data in the stream or reader.  For all other types,
2531      *          this value will be ignored.
2532      * @exception SQLException if parameterName does not correspond to a named
2533      * parameter; if a database access error occurs
2534      * or this method is called on a closed {@code CallableStatement}  or
2535      *            if the Java Object specified by x is an InputStream
2536      *            or Reader object and the value of the scale parameter is less
2537      *            than zero
2538      * @exception SQLFeatureNotSupportedException if
2539      * the JDBC driver does not support the specified targetSqlType
2540      * @see JDBCType
2541      * @see SQLType
2542      *
2543      * @since 1.8
2544      */
2545      default void setObject(String parameterName, Object x, SQLType targetSqlType,
2546              int scaleOrLength) throws SQLException {
2547         throw new SQLFeatureNotSupportedException("setObject not implemented");
2548     }
2549     /**
2550      * Sets the value of the designated parameter with the given object.
2551      *
2552      * This method is similar to {@link #setObject(String parameterName,
2553      * Object x, SQLType targetSqlType, int scaleOrLength)},
2554      * except that it assumes a scale of zero.
2555      *<P>
2556      * The default implementation will throw {@code SQLFeatureNotSupportedException}
2557      *
2558      * @param parameterName the name of the parameter
2559      * @param x the object containing the input parameter value
2560      * @param targetSqlType the SQL type to be sent to the database
2561      * @exception SQLException if parameterName does not correspond to a named
2562      * parameter; if a database access error occurs
2563      * or this method is called on a closed {@code CallableStatement}
2564      * @exception SQLFeatureNotSupportedException if
2565      * the JDBC driver does not support the specified targetSqlType
2566      * @see JDBCType
2567      * @see SQLType
2568      * @since 1.8
2569      */
2570      default void setObject(String parameterName, Object x, SQLType targetSqlType)
2571         throws SQLException {
2572         throw new SQLFeatureNotSupportedException("setObject not implemented");
2573     }
2574 
2575     /**
2576      * Registers the OUT parameter in ordinal position
2577      * {@code parameterIndex} to the JDBC type
2578      * {@code sqlType}.  All OUT parameters must be registered
2579      * before a stored procedure is executed.
2580      * <p>
2581      * The JDBC type specified by {@code sqlType} for an OUT
2582      * parameter determines the Java type that must be used
2583      * in the {@code get} method to read the value of that parameter.
2584      * <p>
2585      * If the JDBC type expected to be returned to this output parameter
2586      * is specific to this particular database, {@code sqlType}
2587      * may be {@code JDBCType.OTHER} or a {@code SQLType} that is supported by
2588      * the JDBC driver.  The method
2589      * {@link #getObject} retrieves the value.
2590      *<P>
2591      * The default implementation will throw {@code SQLFeatureNotSupportedException}
2592      *
2593      * @param parameterIndex the first parameter is 1, the second is 2,
2594      *        and so on
2595      * @param sqlType the JDBC type code defined by {@code SQLType} to use to
2596      * register the OUT Parameter.
2597      *        If the parameter is of JDBC type {@code JDBCType.NUMERIC}
2598      *        or {@code JDBCType.DECIMAL}, the version of
2599      *        {@code registerOutParameter} that accepts a scale value
2600      *        should be used.
2601      *
2602      * @exception SQLException if the parameterIndex is not valid;
2603      * if a database access error occurs or
2604      * this method is called on a closed {@code CallableStatement}
2605      * @exception SQLFeatureNotSupportedException if
2606      * the JDBC driver does not support the specified sqlType
2607      * @see JDBCType
2608      * @see SQLType
2609      * @since 1.8
2610      */
2611     default void registerOutParameter(int parameterIndex, SQLType sqlType)
2612         throws SQLException {
2613         throw new SQLFeatureNotSupportedException("registerOutParameter not implemented");
2614     }
2615 
2616     /**
2617      * Registers the parameter in ordinal position
2618      * {@code parameterIndex} to be of JDBC type
2619      * {@code sqlType}. All OUT parameters must be registered
2620      * before a stored procedure is executed.
2621      * <p>
2622      * The JDBC type specified by {@code sqlType} for an OUT
2623      * parameter determines the Java type that must be used
2624      * in the {@code get} method to read the value of that parameter.
2625      * <p>
2626      * This version of {@code  registerOutParameter} should be
2627      * used when the parameter is of JDBC type {@code JDBCType.NUMERIC}
2628      * or {@code JDBCType.DECIMAL}.
2629      *<P>
2630      * The default implementation will throw {@code SQLFeatureNotSupportedException}
2631      *
2632      * @param parameterIndex the first parameter is 1, the second is 2,
2633      * and so on
2634      * @param sqlType the JDBC type code defined by {@code SQLType} to use to
2635      * register the OUT Parameter.
2636      * @param scale the desired number of digits to the right of the
2637      * decimal point.  It must be greater than or equal to zero.
2638      * @exception SQLException if the parameterIndex is not valid;
2639      * if a database access error occurs or
2640      * this method is called on a closed {@code CallableStatement}
2641      * @exception SQLFeatureNotSupportedException if
2642      * the JDBC driver does not support the specified sqlType
2643      * @see JDBCType
2644      * @see SQLType
2645      * @since 1.8
2646      */
2647     default void registerOutParameter(int parameterIndex, SQLType sqlType,
2648             int scale) throws SQLException {
2649         throw new SQLFeatureNotSupportedException("registerOutParameter not implemented");
2650     }
2651     /**
2652      * Registers the designated output parameter.
2653      * This version of
2654      * the method {@code  registerOutParameter}
2655      * should be used for a user-defined or {@code REF} output parameter.
2656      * Examples
2657      * of user-defined types include: {@code STRUCT}, {@code DISTINCT},
2658      * {@code JAVA_OBJECT}, and named array types.
2659      *<p>
2660      * All OUT parameters must be registered
2661      * before a stored procedure is executed.
2662      * <p>  For a user-defined parameter, the fully-qualified SQL
2663      * type name of the parameter should also be given, while a {@code REF}
2664      * parameter requires that the fully-qualified type name of the
2665      * referenced type be given.  A JDBC driver that does not need the
2666      * type code and type name information may ignore it.   To be portable,
2667      * however, applications should always provide these values for
2668      * user-defined and {@code REF} parameters.
2669      *
2670      * Although it is intended for user-defined and {@code REF} parameters,
2671      * this method may be used to register a parameter of any JDBC type.
2672      * If the parameter does not have a user-defined or {@code REF} type, the
2673      * <i>typeName</i> parameter is ignored.
2674      *
2675      * <P><B>Note:</B> When reading the value of an out parameter, you
2676      * must use the getter method whose Java type corresponds to the
2677      * parameter's registered SQL type.
2678      *<P>
2679      * The default implementation will throw {@code SQLFeatureNotSupportedException}
2680      *
2681      * @param parameterIndex the first parameter is 1, the second is 2,...
2682      * @param sqlType the JDBC type code defined by {@code SQLType} to use to
2683      * register the OUT Parameter.
2684      * @param typeName the fully-qualified name of an SQL structured type
2685      * @exception SQLException if the parameterIndex is not valid;
2686      * if a database access error occurs or
2687      * this method is called on a closed {@code CallableStatement}
2688      * @exception SQLFeatureNotSupportedException if
2689      * the JDBC driver does not support the specified sqlType
2690      * @see JDBCType
2691      * @see SQLType
2692      * @since 1.8
2693      */
2694     default void registerOutParameter (int parameterIndex, SQLType sqlType,
2695             String typeName) throws SQLException {
2696         throw new SQLFeatureNotSupportedException("registerOutParameter not implemented");
2697     }
2698 
2699     /**
2700      * Registers the OUT parameter named
2701      * <code>parameterName</code> to the JDBC type
2702      * {@code sqlType}.  All OUT parameters must be registered
2703      * before a stored procedure is executed.
2704      * <p>
2705      * The JDBC type specified by {@code sqlType} for an OUT
2706      * parameter determines the Java type that must be used
2707      * in the {@code get} method to read the value of that parameter.
2708      * <p>
2709      * If the JDBC type expected to be returned to this output parameter
2710      * is specific to this particular database, {@code sqlType}
2711      * should be {@code JDBCType.OTHER} or a {@code SQLType} that is supported
2712      * by the JDBC driver..  The method
2713      * {@link #getObject} retrieves the value.
2714      *<P>
2715      * The default implementation will throw {@code SQLFeatureNotSupportedException}
2716      *
2717      * @param parameterName the name of the parameter
2718      * @param sqlType the JDBC type code defined by {@code SQLType} to use to
2719      * register the OUT Parameter.
2720      * If the parameter is of JDBC type {@code JDBCType.NUMERIC}
2721      * or {@code JDBCType.DECIMAL}, the version of
2722      * {@code  registerOutParameter} that accepts a scale value
2723      * should be used.
2724      * @exception SQLException if parameterName does not correspond to a named
2725      * parameter; if a database access error occurs or
2726      * this method is called on a closed {@code CallableStatement}
2727      * @exception SQLFeatureNotSupportedException if
2728      * the JDBC driver does not support the specified sqlType
2729      * or if the JDBC driver does not support
2730      * this method
2731      * @since 1.8
2732      * @see JDBCType
2733      * @see SQLType
2734      */
2735     default void registerOutParameter(String parameterName, SQLType sqlType)
2736         throws SQLException {
2737         throw new SQLFeatureNotSupportedException("registerOutParameter not implemented");
2738     }
2739 
2740     /**
2741      * Registers the parameter named
2742      * <code>parameterName</code> to be of JDBC type
2743      * {@code sqlType}.  All OUT parameters must be registered
2744      * before a stored procedure is executed.
2745      * <p>
2746      * The JDBC type specified by {@code sqlType} for an OUT
2747      * parameter determines the Java type that must be used
2748      * in the {@code get} method to read the value of that parameter.
2749      * <p>
2750      * This version of {@code  registerOutParameter} should be
2751      * used when the parameter is of JDBC type {@code JDBCType.NUMERIC}
2752      * or {@code JDBCType.DECIMAL}.
2753      *<P>
2754      * The default implementation will throw {@code SQLFeatureNotSupportedException}
2755      *
2756      * @param parameterName the name of the parameter
2757      * @param sqlType the JDBC type code defined by {@code SQLType} to use to
2758      * register the OUT Parameter.
2759      * @param scale the desired number of digits to the right of the
2760      * decimal point.  It must be greater than or equal to zero.
2761      * @exception SQLException if parameterName does not correspond to a named
2762      * parameter; if a database access error occurs or
2763      * this method is called on a closed {@code CallableStatement}
2764      * @exception SQLFeatureNotSupportedException if
2765      * the JDBC driver does not support the specified sqlType
2766      * or if the JDBC driver does not support
2767      * this method
2768      * @since 1.8
2769      * @see JDBCType
2770      * @see SQLType
2771      */
2772     default void registerOutParameter(String parameterName, SQLType sqlType,
2773             int scale) throws SQLException {
2774         throw new SQLFeatureNotSupportedException("registerOutParameter not implemented");
2775     }
2776 
2777     /**
2778      * Registers the designated output parameter.  This version of
2779      * the method {@code  registerOutParameter}
2780      * should be used for a user-named or REF output parameter.  Examples
2781      * of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and
2782      * named array types.
2783      *<p>
2784      * All OUT parameters must be registered
2785      * before a stored procedure is executed.
2786      * </p>
2787      * For a user-named parameter the fully-qualified SQL
2788      * type name of the parameter should also be given, while a REF
2789      * parameter requires that the fully-qualified type name of the
2790      * referenced type be given.  A JDBC driver that does not need the
2791      * type code and type name information may ignore it.   To be portable,
2792      * however, applications should always provide these values for
2793      * user-named and REF parameters.
2794      *
2795      * Although it is intended for user-named and REF parameters,
2796      * this method may be used to register a parameter of any JDBC type.
2797      * If the parameter does not have a user-named or REF type, the
2798      * typeName parameter is ignored.
2799      *
2800      * <P><B>Note:</B> When reading the value of an out parameter, you
2801      * must use the {@code getXXX} method whose Java type XXX corresponds to the
2802      * parameter's registered SQL type.
2803      *<P>
2804      * The default implementation will throw {@code SQLFeatureNotSupportedException}
2805      *
2806      * @param parameterName the name of the parameter
2807      * @param sqlType the JDBC type code defined by {@code SQLType} to use to
2808      * register the OUT Parameter.
2809      * @param typeName the fully-qualified name of an SQL structured type
2810      * @exception SQLException if parameterName does not correspond to a named
2811      * parameter; if a database access error occurs or
2812      * this method is called on a closed {@code CallableStatement}
2813      * @exception SQLFeatureNotSupportedException if
2814      * the JDBC driver does not support the specified sqlType
2815      * or if the JDBC driver does not support this method
2816      * @see JDBCType
2817      * @see SQLType
2818      * @since 1.8
2819      */
2820     default void registerOutParameter (String parameterName, SQLType sqlType,
2821             String typeName) throws SQLException {
2822         throw new SQLFeatureNotSupportedException("registerOutParameter not implemented");
2823     }
2824 }