Home | History | Annotate | Download | only in sql
      1 /*
      2  * Licensed to the Apache Software Foundation (ASF) under one or more
      3  * contributor license agreements.  See the NOTICE file distributed with
      4  * this work for additional information regarding copyright ownership.
      5  * The ASF licenses this file to You under the Apache License, Version 2.0
      6  * (the "License"); you may not use this file except in compliance with
      7  * the License.  You may obtain a copy of the License at
      8  *
      9  *     http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  */
     17 
     18 package java.sql;
     19 
     20 import java.io.InputStream;
     21 import java.io.Reader;
     22 import java.math.BigDecimal;
     23 import java.net.URL;
     24 import java.util.Calendar;
     25 import java.util.Map;
     26 
     27 /**
     28  * An interface for an object which represents a database table entry, returned
     29  * as the result of the query to the database.
     30  * <p>
     31  * {@code ResultSet}s have a cursor which points to the current data table row.
     32  * When the {@code ResultSet} is created, the cursor's location is one position
     33  * ahead of the first row. To move the cursor to the first and consecutive rows,
     34  * use the {@code next} method. The {@code next} method returns {@code true} as
     35  * long as there are more rows in the {@code ResultSet}, otherwise it returns
     36  * {@code false}.
     37  * <p>
     38  * The default type of {@code ResultSet} can not be updated and its cursor can
     39  * only advance forward through the rows of data. This means that it is only
     40  * possible to read through it once. However, other kinds of {@code ResultSet}
     41  * are implemented: an <i>updatable</i> type and also types where the cursor can
     42  * be <i>scrolled</i> forward and backward through the rows of data. How such a
     43  * {@code ResultSet} is created is demonstrated in the following example:
     44  * <ul>
     45  * <dd>
     46  *         {@code Connection con;}</dd>
     47  * <dd>{@code Statement aStatement = con.createStatement(
     48  * ResultSet.TYPE_SCROLL_SENSITIVE,}{@code ResultSet.CONCUR_UPDATABLE );}</dd>
     49  * <dd>{@code ResultSet theResultSet =
     50  * theStatement.executeQuery("SELECT price, quantity FROM STOCKTABLE");}</dd>
     51  * <dd>{@code // theResultSet is both scrollable and updatable}</dd> </ul>
     52  * <p>
     53  * The {@code ResultSet} interface provides a series of methods for retrieving
     54  * data from columns in the current row, such as {@code getDate} and {@code
     55  * getFloat}. The columns are retrieved either by their index number (starting
     56  * at 1) or by their name - there are separate methods for both techniques of
     57  * column addressing. The column names are case insensitive. If several columns
     58  * have the same name, then the getter methods use the first matching column.
     59  * This means that if column names are used, it is not possible to guarantee
     60  * that the name will retrieve data from the intended column - for certainty it
     61  * is better to use column indexes. Ideally the columns should be read
     62  * left-to-right and read once only, since not all databases are optimized to
     63  * handle other techniques of reading the data.
     64  * <p>
     65  * When reading data via the appropriate getter methods, the JDBC driver maps
     66  * the SQL data retrieved from the database to the Java type implied by the
     67  * method invoked by the application. The JDBC specification has a table for the
     68  * mappings from SQL types to Java types.
     69  * <p>
     70  * There are also methods for writing data into the {@code ResultSet}, such as
     71  * {@code updateInt} and {@code updateString}. The update methods can be used
     72  * either to modify the data of an existing row or to insert new data rows into
     73  * the {@code ResultSet} . Modification of existing data involves moving the
     74  * cursor to the row which needs modification and then using the update methods
     75  * to modify the data, followed by calling the {@code ResultSet.updateRow}
     76  * method. For insertion of new rows, the cursor is first moved to a special row
     77  * called the <i>Insert Row</i>, data is added using the update methods,
     78  * followed by calling the {@code ResultSet.insertRow} method.
     79  * <p>
     80  * A {@code ResultSet} is closed if the statement which generated it closes, the
     81  * statement is executed again, or the same statement's next {@code ResultSet}
     82  * is retrieved (if the statement returned of multiple results).
     83  */
     84 public interface ResultSet extends Wrapper, AutoCloseable {
     85 
     86     /**
     87      * A constant used to indicate that a {@code ResultSet} object must be
     88      * closed when the method {@code Connection.commit} is invoked.
     89      */
     90     public static final int CLOSE_CURSORS_AT_COMMIT = 2;
     91 
     92     /**
     93      * A constant used to indicate that a {@code ResultSet} object must not be
     94      * closed when the method {@code Connection.commit} is invoked.
     95      */
     96     public static final int HOLD_CURSORS_OVER_COMMIT = 1;
     97 
     98     /**
     99      * A constant used to indicate the concurrency mode for a {@code ResultSet}
    100      * object that cannot be updated.
    101      */
    102     public static final int CONCUR_READ_ONLY = 1007;
    103 
    104     /**
    105      * A constant used to indicate the concurrency mode for a {@code ResultSet}
    106      * object that can be updated.
    107      */
    108     public static final int CONCUR_UPDATABLE = 1008;
    109 
    110     /**
    111      * A constant used to indicate processing of the rows of a {@code ResultSet}
    112      * in the forward direction, first to last.
    113      */
    114     public static final int FETCH_FORWARD = 1000;
    115 
    116     /**
    117      * A constant used to indicate processing of the rows of a {@code ResultSet}
    118      * in the reverse direction, last to first.
    119      */
    120     public static final int FETCH_REVERSE = 1001;
    121 
    122     /**
    123      * A constant used to indicate that the order of processing of the rows of a
    124      * {@code ResultSet} is unknown.
    125      */
    126     public static final int FETCH_UNKNOWN = 1002;
    127 
    128     /**
    129      * A constant used to indicate a {@code ResultSet} object whose cursor can
    130      * only move forward.
    131      */
    132     public static final int TYPE_FORWARD_ONLY = 1003;
    133 
    134     /**
    135      * A constant used to indicate a {@code ResultSet} object which is
    136      * scrollable but is insensitive to changes made by others.
    137      */
    138     public static final int TYPE_SCROLL_INSENSITIVE = 1004;
    139 
    140     /**
    141      * A constant used to indicate a {@code ResultSet} object which is
    142      * scrollable and sensitive to changes made by others.
    143      */
    144     public static final int TYPE_SCROLL_SENSITIVE = 1005;
    145 
    146     /**
    147      * Moves the cursor to a specified row number in the {@code ResultSet}.
    148      *
    149      * @param row
    150      *            the index of the row starting at index 1. Index {@code -1}
    151      *            returns the last row.
    152      * @return {@code true} if the new cursor position is on the {@code
    153      *         ResultSet}, {@code false} otherwise.
    154      * @throws SQLException
    155      *             if a database error happens.
    156      */
    157     public boolean absolute(int row) throws SQLException;
    158 
    159     /**
    160      * Moves the cursor to the end of the {@code ResultSet}, after the last row.
    161      *
    162      * @throws SQLException
    163      *             if a database error happens.
    164      */
    165     public void afterLast() throws SQLException;
    166 
    167     /**
    168      * Moves the cursor to the start of the {@code ResultSet}, before the first
    169      * row.
    170      *
    171      * @throws SQLException
    172      *             if a database error happens.
    173      */
    174     public void beforeFirst() throws SQLException;
    175 
    176     /**
    177      * Cancels any updates made to the current row in the {@code ResultSet}.
    178      *
    179      * @throws SQLException
    180      *             if a database error happens.
    181      */
    182     public void cancelRowUpdates() throws SQLException;
    183 
    184     /**
    185      * Clears all warnings related to this {@code ResultSet}.
    186      *
    187      * @throws SQLException
    188      *             if a database error happens.
    189      */
    190     public void clearWarnings() throws SQLException;
    191 
    192     /**
    193      * Releases this {@code ResultSet}'s database and JDBC resources. You are
    194      * strongly advised to use this method rather than relying on the release
    195      * being done when the {@code ResultSet}'s finalize method is called during
    196      * garbage collection process. Note that the {@code close()} method might
    197      * take some time to complete since it is dependent on the behavior of the
    198      * connection to the database and the database itself.
    199      *
    200      * @throws SQLException
    201      *             if a database error happens.
    202      */
    203     public void close() throws SQLException;
    204 
    205     /**
    206      * Deletes the current row from the {@code ResultSet} and from the
    207      * underlying database.
    208      *
    209      * @throws SQLException
    210      *             if a database error happens.
    211      */
    212     public void deleteRow() throws SQLException;
    213 
    214     /**
    215      * Gets the index number for a column in the {@code ResultSet} from the
    216      * provided column name.
    217      *
    218      * @param columnName
    219      *            the column name.
    220      * @return the column's index in the {@code ResultSet} identified by column
    221      *         name.
    222      * @throws SQLException
    223      *             if a database error happens.
    224      */
    225     public int findColumn(String columnName) throws SQLException;
    226 
    227     /**
    228      * Shifts the cursor position to the first row in the {@code ResultSet}.
    229      *
    230      * @return {@code true} if the position is in a legitimate row, {@code
    231      *         false} if the {@code ResultSet} contains no rows.
    232      * @throws SQLException
    233      *             if a database error happens.
    234      */
    235     public boolean first() throws SQLException;
    236 
    237     /**
    238      * Gets the content of a column specified by column index in the current row
    239      * of this {@code ResultSet} as a {@code java.sql.Array}.
    240      *
    241      * @param columnIndex
    242      *            the index of the column to read
    243      * @return a {@code java.sql.Array} with the data from the column.
    244      * @throws SQLException
    245      *             if a database error happens.
    246      */
    247     public Array getArray(int columnIndex) throws SQLException;
    248 
    249     /**
    250      * Gets the value of a column specified by column name as a {@code
    251      * java.sql.Array}.
    252      *
    253      * @param colName
    254      *            the name of the column to read.
    255      * @return a {@code java.sql.Array} with the data from the specified column.
    256      * @throws SQLException
    257      *             if a database error happens.
    258      */
    259     public Array getArray(String colName) throws SQLException;
    260 
    261     /**
    262      * Gets the value of a column specified by column index as an ASCII
    263      * character stream.
    264      *
    265      * @param columnIndex
    266      *            the index of the column to read.
    267      * @return an {@code InputStream} with the data from the column.
    268      * @throws SQLException
    269      *             if a database error happens.
    270      */
    271     public InputStream getAsciiStream(int columnIndex) throws SQLException;
    272 
    273     /**
    274      * Gets the value of a column specified by column name as an ASCII character
    275      * stream.
    276      *
    277      * @param columnName
    278      *            the name of the column to read
    279      * @return an {@code InputStream} with the data from the column.
    280      * @throws SQLException
    281      *             if a database error happens.
    282      */
    283     public InputStream getAsciiStream(String columnName) throws SQLException;
    284 
    285     /**
    286      * Gets the value of a column specified by column index as a {@code
    287      * java.math.BigDecimal}.
    288      *
    289      * @param columnIndex
    290      *            the index of the column to read.
    291      * @return a {@code BigDecimal} with the value of the column.
    292      * @throws SQLException
    293      *             if a database error happens.
    294      */
    295     public BigDecimal getBigDecimal(int columnIndex) throws SQLException;
    296 
    297     /**
    298      * Gets the value of a column specified by column index as a {@code
    299      * java.math.BigDecimal}.
    300      *
    301      * @deprecated use {@link #getBigDecimal(int)} or
    302      *             {@link #getBigDecimal(String)}
    303      * @param columnIndex
    304      *            the index of the column to read.
    305      * @param scale
    306      *            the number of digits after the decimal point
    307      * @return a {@code BigDecimal} with the value of the column.
    308      * @throws SQLException
    309      *             if a database error happens.
    310      */
    311     @Deprecated
    312     public BigDecimal getBigDecimal(int columnIndex, int scale)
    313             throws SQLException;
    314 
    315     /**
    316      * Gets the value of a column specified by column name, as a {@code
    317      * java.math.BigDecimal}.
    318      *
    319      * @param columnName
    320      *            the name of the column to read.
    321      * @return a BigDecimal with value of the column.
    322      * @throws SQLException
    323      *             if a database error happens.
    324      */
    325     public BigDecimal getBigDecimal(String columnName) throws SQLException;
    326 
    327     /**
    328      * Gets the value of a column specified by column name, as a {@code
    329      * java.math.BigDecimal}.
    330      *
    331      * @deprecated use {@link #getBigDecimal(int)} or
    332      *             {@link #getBigDecimal(String)}
    333      * @param columnName
    334      *            the name of the column to read.
    335      * @param scale
    336      *            the number of digits after the decimal point
    337      * @return a BigDecimal with value of the column.
    338      * @throws SQLException
    339      *             if a database error happens.
    340      */
    341     @Deprecated
    342     public BigDecimal getBigDecimal(String columnName, int scale)
    343             throws SQLException;
    344 
    345     /**
    346      * Gets the value of a column specified by column index as a binary
    347      * stream.
    348      * <p>
    349      * This method can be used to read {@code LONGVARBINARY} values. All of the
    350      * data in the {@code InputStream} should be read before getting data from
    351      * any other column. A further call to a getter method will implicitly close
    352      * the {@code InputStream}.
    353      *
    354      * @param columnIndex
    355      *            the index of the column to read.
    356      * @return an {@code InputStream} with the data from the column. If the
    357      *         column value is SQL {@code NULL}, {@code null} is returned.
    358      * @throws SQLException
    359      *             if a database error happens.
    360      */
    361     public InputStream getBinaryStream(int columnIndex) throws SQLException;
    362 
    363     /**
    364      * Gets the value of a column specified by column name as a binary stream.
    365      * <p>
    366      * This method can be used to read {@code LONGVARBINARY} values. All of the
    367      * data in the {@code InputStream} should be read before getting data from
    368      * any other column. A further call to a getter method will implicitly close
    369      * the {@code InputStream}.
    370      *
    371      * @param columnName
    372      *            the name of the column to read.
    373      * @return an {@code InputStream} with the data from the column if the
    374      *         column value is SQL {@code NULL}, {@code null} is returned.
    375      * @throws SQLException
    376      *             if a database error happens.
    377      */
    378     public InputStream getBinaryStream(String columnName) throws SQLException;
    379 
    380     /**
    381      * Gets the value of a column specified by column index as a {@code
    382      * java.sql.Blob} object.
    383      *
    384      * @param columnIndex
    385      *            the index of the column to read.
    386      * @return a {@code java.sql.Blob} with the value of the column.
    387      * @throws SQLException
    388      *             if a database error happens.
    389      */
    390     public Blob getBlob(int columnIndex) throws SQLException;
    391 
    392     /**
    393      * Gets the value of a column specified by column name, as a {@code
    394      * java.sql.Blob} object.
    395      *
    396      * @param columnName
    397      *            the name of the column to read.
    398      * @return a {@code java.sql.Blob} with the value of the column.
    399      * @throws SQLException
    400      *             if a database error happens.
    401      */
    402     public Blob getBlob(String columnName) throws SQLException;
    403 
    404     /**
    405      * Gets the value of a column specified by column index as a {@code boolean}
    406      * .
    407      *
    408      * @param columnIndex
    409      *            the index of the column to read.
    410      * @return a {@code boolean} value from the column. If the column is SQL
    411      *         {@code NULL}, {@code false} is returned.
    412      * @throws SQLException
    413      *             if a database error happens.
    414      */
    415     public boolean getBoolean(int columnIndex) throws SQLException;
    416 
    417     /**
    418      * Gets the value of a column specified by column name, as a {@code boolean}
    419      * .
    420      *
    421      * @param columnName
    422      *            the name of the column to read.
    423      * @return a {@code boolean} value from the column. If the column is SQL
    424      *         {@code NULL}, {@code false} is returned.
    425      * @throws SQLException
    426      *             if a database error happens.
    427      */
    428     public boolean getBoolean(String columnName) throws SQLException;
    429 
    430     /**
    431      * Gets the value of a column specified by column index as a {@code byte}.
    432      *
    433      * @param columnIndex
    434      *            the index of the column to read.
    435      * @return a {@code byte} equal to the value of the column. 0 if the value
    436      *         is SQL {@code NULL}.
    437      * @throws SQLException
    438      *             if a database error happens.
    439      */
    440     public byte getByte(int columnIndex) throws SQLException;
    441 
    442     /**
    443      * Gets the value of a column specified by column name as a {@code byte}.
    444      *
    445      * @param columnName
    446      *            the name of the column to read.
    447      * @return a {@code byte} equal to the value of the column. 0 if the value
    448      *         is SQL {@code NULL}.
    449      * @throws SQLException
    450      *             if a database error happens.
    451      */
    452     public byte getByte(String columnName) throws SQLException;
    453 
    454     /**
    455      * Gets the value of a column specified by column index as a byte array.
    456      *
    457      * @param columnIndex
    458      *            the index of the column to read.
    459      * @return a byte array containing the value of the column. {@code null} if
    460      *         the column contains SQL {@code NULL}.
    461      * @throws SQLException
    462      *             if a database error happens.
    463      */
    464     public byte[] getBytes(int columnIndex) throws SQLException;
    465 
    466     /**
    467      * Gets the value of a column specified by column name as a byte array.
    468      *
    469      * @param columnName
    470      *            the name of the column to read.
    471      * @return a byte array containing the value of the column. {@code null} if
    472      *         the column contains SQL {@code NULL}.
    473      * @throws SQLException
    474      *             if a database error happens.
    475      */
    476     public byte[] getBytes(String columnName) throws SQLException;
    477 
    478     /**
    479      * Gets the value of a column specified by column index as a {@code
    480      * java.io.Reader} object.
    481      *
    482      * @param columnIndex
    483      *            the index of the column to read.
    484      * @return a {@code Reader} holding the value of the column. {@code null} if
    485      *         the column value is SQL {@code NULL}.
    486      * @throws SQLException
    487      *             if a database error happens.
    488      * @see java.io.Reader
    489      */
    490     public Reader getCharacterStream(int columnIndex) throws SQLException;
    491 
    492     /**
    493      * Gets the value of a column specified by column name as a {@code
    494      * java.io.Reader} object.
    495      *
    496      * @param columnName
    497      *            the name of the column to read.
    498      * @return a {@code Reader} holding the value of the column. {@code null} if
    499      *         the column value is SQL {@code NULL}.
    500      * @throws SQLException
    501      *             if a database error happens.
    502      */
    503     public Reader getCharacterStream(String columnName) throws SQLException;
    504 
    505     /**
    506      * Gets the value of a column specified by column index as a {@code
    507      * java.sql.Clob}.
    508      *
    509      * @param columnIndex
    510      *            the index of the column to read.
    511      * @return a {@code Clob} object representing the value in the column.
    512      *         {@code null} if the value is SQL {@code NULL}.
    513      * @throws SQLException
    514      *             if a database error happens.
    515      */
    516     public Clob getClob(int columnIndex) throws SQLException;
    517 
    518     /**
    519      * Gets the value of a column specified by column name as a {@code
    520      * java.sql.Clob}.
    521      *
    522      * @param colName
    523      *            the name of the column to read.
    524      * @return a {@code Clob} object representing the value in the column.
    525      *         {@code null} if the value is SQL {@code NULL}.
    526      * @throws SQLException
    527      *             if a database error happens.
    528      */
    529     public Clob getClob(String colName) throws SQLException;
    530 
    531     /**
    532      * Gets the concurrency mode of this {@code ResultSet}.
    533      *
    534      * @return the concurrency mode - one of: {@code ResultSet.CONCUR_READ_ONLY}
    535      *         , {@code ResultSet.CONCUR_UPDATABLE}.
    536      * @throws SQLException
    537      *             if a database error happens.
    538      */
    539     public int getConcurrency() throws SQLException;
    540 
    541     /**
    542      * Gets the name of the SQL cursor of this {@code ResultSet}.
    543      *
    544      * @return the SQL cursor name.
    545      * @throws SQLException
    546      *             if a database error happens.
    547      */
    548     public String getCursorName() throws SQLException;
    549 
    550     /**
    551      * Gets the value of a column specified by column index as a {@code
    552      * java.sql.Date}.
    553      *
    554      * @param columnIndex
    555      *            the index of the column to read.
    556      * @return a {@code java.sql.Date} matching the column value. {@code null}
    557      *         if the column is SQL {@code NULL}.
    558      * @throws SQLException
    559      *             if a database error happens.
    560      */
    561     public Date getDate(int columnIndex) throws SQLException;
    562 
    563     /**
    564      * Gets the value of a column specified by column index as a {@code
    565      * java.sql.Date}. This method uses a supplied calendar to compute the Date.
    566      *
    567      * @param columnIndex
    568      *            the index of the column to read.
    569      * @param cal
    570      *            a {@code java.util.Calendar} to use in constructing the Date.
    571      * @return a {@code java.sql.Date} matching the column value. {@code null}
    572      *         if the column is SQL {@code NULL}.
    573      * @throws SQLException
    574      *             if a database error happens.
    575      */
    576     public Date getDate(int columnIndex, Calendar cal) throws SQLException;
    577 
    578     /**
    579      * Gets the value of a column specified by column name as a {@code
    580      * java.sql.Date}.
    581      *
    582      * @param columnName
    583      *            the name of the column to read.
    584      * @return a {@code java.sql.Date} matching the column value. {@code null}
    585      *         if the column is SQL {@code NULL}.
    586      * @throws SQLException
    587      *             if a database error happens.
    588      */
    589     public Date getDate(String columnName) throws SQLException;
    590 
    591     /**
    592      * Gets the value of a column specified by column name, as a {@code
    593      * java.sql.Date} object.
    594      *
    595      * @param columnName
    596      *            the name of the column to read.
    597      * @param cal
    598      *            {@code java.util.Calendar} to use in constructing the Date.
    599      * @return a {@code java.sql.Date} matching the column value. {@code null}
    600      *         if the column is SQL {@code NULL}.
    601      * @throws SQLException
    602      *             if a database error happens.
    603      */
    604     public Date getDate(String columnName, Calendar cal) throws SQLException;
    605 
    606     /**
    607      * Gets the value of a column specified by column index as a {@code double}
    608      * value.
    609      *
    610      * @param columnIndex
    611      *            the index of the column to read.
    612      * @return a {@code double} equal to the column value. {@code 0.0} if the
    613      *         column is SQL {@code NULL}.
    614      * @throws SQLException
    615      *             if a database error happens.
    616      */
    617     public double getDouble(int columnIndex) throws SQLException;
    618 
    619     /**
    620      * Gets the value of a column specified by column name as a {@code double}
    621      * value.
    622      *
    623      * @param columnName
    624      *            the name of the column to read.
    625      * @return a {@code double} equal to the column value. {@code 0.0} if the
    626      *         column is SQL {@code NULL}.
    627      * @throws SQLException
    628      *             if a database error happens.
    629      */
    630     public double getDouble(String columnName) throws SQLException;
    631 
    632     /**
    633      * Gets the direction in which rows are fetched for this {@code ResultSet}
    634      * object.
    635      *
    636      * @return the fetch direction. Will be one of:
    637      *         <ul>
    638      *         <li>ResultSet.FETCH_FORWARD</li><li>ResultSet.FETCH_REVERSE</li>
    639      *         <li>ResultSet.FETCH_UNKNOWN</li>
    640      *         </ul>
    641      * @throws SQLException
    642      *             if a database error happens.
    643      */
    644     public int getFetchDirection() throws SQLException;
    645 
    646     /**
    647      * Gets the fetch size (in number of rows) for this {@code ResultSet}.
    648      *
    649      * @return the fetch size as an int
    650      * @throws SQLException
    651      *             if a database error happens.
    652      */
    653     public int getFetchSize() throws SQLException;
    654 
    655     /**
    656      * Gets the value of a column specified by column index as a {@code float}
    657      * value.
    658      *
    659      * @param columnIndex
    660      *            the index of the column to read.
    661      * @return a {@code float} equal to the column value. {@code 0.0} if the
    662      *         column is SQL {@code NULL}.
    663      * @throws SQLException
    664      *             if a database error happens.
    665      */
    666     public float getFloat(int columnIndex) throws SQLException;
    667 
    668     /**
    669      * Gets the value of a column specified by column name as a {@code float}
    670      * value.
    671      *
    672      * @param columnName
    673      *            the name of the column to read.
    674      * @return a {@code float} equal to the column value. {@code 0.0} if the
    675      *         column is SQL {@code NULL}.
    676      * @throws SQLException
    677      *             if a database error happens.
    678      */
    679     public float getFloat(String columnName) throws SQLException;
    680 
    681     /**
    682      * Gets the value of a column specified by column index as an {@code int}
    683      * value.
    684      *
    685      * @param columnIndex
    686      *            the index of the column to read.
    687      * @return an {@code int} equal to the column value. {@code 0} if the
    688      *         column is SQL {@code NULL}.
    689      * @throws SQLException
    690      *             if a database error happens.
    691      */
    692     public int getInt(int columnIndex) throws SQLException;
    693 
    694     /**
    695      * Gets the value of a column specified by column name, as an {@code int}
    696      * value.
    697      *
    698      * @param columnName
    699      *            the name of the column to read.
    700      * @return an {@code int} equal to the column value. {@code 0} if the
    701      *         column is SQL {@code NULL}.
    702      * @throws SQLException
    703      *             if a database error happens.
    704      */
    705     public int getInt(String columnName) throws SQLException;
    706 
    707     /**
    708      * Gets the value of a column specified by column index as a {@code long}
    709      * value.
    710      *
    711      * @param columnIndex
    712      *            the index of the column to read.
    713      * @return a {@code long} equal to the column value. {@code 0} if the
    714      *         column is SQL {@code NULL}.
    715      * @throws SQLException
    716      *             if a database error happens.
    717      */
    718     public long getLong(int columnIndex) throws SQLException;
    719 
    720     /**
    721      * Gets the value of a column specified by column name, as a {@code long}
    722      * value.
    723      *
    724      * @param columnName
    725      *            the name of the column to read.
    726      * @return a {@code long} equal to the column value. {@code 0} if the
    727      *         column is SQL {@code NULL}.
    728      * @throws SQLException
    729      *             if a database error happens.
    730      */
    731     public long getLong(String columnName) throws SQLException;
    732 
    733     /**
    734      * Gets the metadata for this {@code ResultSet}. This defines the number,
    735      * types and properties of the columns in the {@code ResultSet}.
    736      *
    737      * @return a {@code ResultSetMetaData} object with information about this
    738      *         {@code ResultSet}.
    739      * @throws SQLException
    740      *             if a database error happens.
    741      */
    742     public ResultSetMetaData getMetaData() throws SQLException;
    743 
    744     /**
    745      * Gets the value of a specified column as a Java {@code Object}. The type
    746      * of the returned object will be the default according to the column's SQL
    747      * type, following the JDBC specification for built-in types.
    748      * <p>
    749      * For SQL User Defined Types, if a column value is Structured or Distinct,
    750      * this method behaves the same as a call to: {@code
    751      * getObject(columnIndex,this.getStatement().getConnection().getTypeMap())}
    752      *
    753      * @param columnIndex
    754      *            the index of the column to read.
    755      * @return an {@code Object} containing the value of the column. {@code
    756      *         null} if the column value is SQL {@code NULL}.
    757      * @throws SQLException
    758      *             if a database error happens.
    759      */
    760     public Object getObject(int columnIndex) throws SQLException;
    761 
    762     /**
    763      * Gets the value of a column specified by column index as a Java {@code
    764      * Object}.
    765      * <p>
    766      * The type of the Java object will be determined by the supplied Map to
    767      * perform the mapping of SQL {@code Struct} or Distinct types into Java
    768      * objects.
    769      *
    770      * @param columnIndex
    771      *            the index of the column to read.
    772      * @param map
    773      *            a {@code java.util.Map} containing a mapping from SQL Type
    774      *            names to Java classes.
    775      * @return an {@code Object} containing the value of the column. {@code
    776      *         null} if the column value is SQL {@code NULL}.
    777      * @throws SQLException
    778      *             if a database error happens.
    779      */
    780     public Object getObject(int columnIndex, Map<String, Class<?>> map)
    781             throws SQLException;
    782 
    783     /**
    784      * Gets the value of a specified column as a Java {@code Object}. The type
    785      * of the returned object will be the default according to the column's SQL
    786      * type, following the JDBC specification for built-in types.
    787      * <p>
    788      * For SQL User Defined Types, if a column value is structured or distinct,
    789      * this method behaves the same as a call to: {@code
    790      * getObject(columnIndex,this.getStatement().getConnection().getTypeMap())}
    791      *
    792      * @param columnName
    793      *            the name of the column to read.
    794      * @return an {@code Object} containing the value of the column. {@code
    795      *         null} if the column value is SQL {@code NULL}.
    796      * @throws SQLException
    797      *             if a database error happens.
    798      */
    799     public Object getObject(String columnName) throws SQLException;
    800 
    801     /**
    802      * Gets the value of a column specified by column name as a Java {@code
    803      * Object}.
    804      * <p>
    805      * The type of the Java object will be determined by the supplied Map to
    806      * perform the mapping of SQL Struct or Distinct types into Java objects.
    807      *
    808      * @param columnName
    809      *            the name of the column to read.
    810      * @param map
    811      *            a {@code java.util.Map} containing a mapping from SQL Type names to
    812      *            Java classes.
    813      * @return an {@code Object} containing the value of the column. {@code
    814      *         null} if the column value is SQL {@code NULL}.
    815      * @throws SQLException
    816      *             if a database error happens.
    817      */
    818     public Object getObject(String columnName, Map<String, Class<?>> map)
    819             throws SQLException;
    820 
    821     /**
    822      * Gets the value of a column specified by column index as a Java {@code
    823      * java.sql.Ref}.
    824      *
    825      * @param columnIndex
    826      *            the index of the column to read.
    827      * @return a Ref representing the value of the SQL REF in the column
    828      * @throws SQLException
    829      *             if a database error happens.
    830      */
    831     public Ref getRef(int columnIndex) throws SQLException;
    832 
    833     /**
    834      * Gets the value of a column specified by column name as a Java {@code
    835      * java.sql.Ref}.
    836      *
    837      * @param colName
    838      *            the name of the column to read.
    839      * @return a Ref representing the value of the SQL {@code REF} in the column
    840      * @throws SQLException
    841      *             if a database error happens.
    842      */
    843     public Ref getRef(String colName) throws SQLException;
    844 
    845     /**
    846      * Gets the number of the current row in the {@code ResultSet}. Row numbers
    847      * start at 1 for the first row.
    848      *
    849      * @return the index number of the current row. {@code 0} is returned if
    850      *         there is no current row.
    851      * @throws SQLException
    852      *             if a database error happens.
    853      */
    854     public int getRow() throws SQLException;
    855 
    856     /**
    857      * Gets the value of a column specified by column index as a short value.
    858      *
    859      * @param columnIndex
    860      *            the index of the column to read.
    861      * @return a short value equal to the value of the column. {@code 0} if
    862      *         the value is SQL {@code NULL}.
    863      * @throws SQLException
    864      *             if a database error happens.
    865      */
    866     public short getShort(int columnIndex) throws SQLException;
    867 
    868     /**
    869      * Gets the value of a column specified by column name, as a short value.
    870      *
    871      * @param columnName
    872      *            the name of the column to read.
    873      * @return a short value equal to the value of the column. {@code 0} if
    874      *         the value is SQL {@code NULL}.
    875      * @throws SQLException
    876      *             if a database error happens.
    877      */
    878     public short getShort(String columnName) throws SQLException;
    879 
    880     /**
    881      * Gets the statement that produced this {@code ResultSet}. If the {@code
    882      * ResultSet} was not created by a statement (i.e. because it was returned
    883      * from one of the {@link DatabaseMetaData} methods), {@code null} is
    884      * returned.
    885      *
    886      * @return the Statement which produced this {@code ResultSet}, or {@code
    887      *         null} if the {@code ResultSet} was not created by a Statement.
    888      * @throws SQLException
    889      *             if a database error happens.
    890      */
    891     public Statement getStatement() throws SQLException;
    892 
    893     /**
    894      * Gets the value of a column specified by column index as a String.
    895      *
    896      * @param columnIndex
    897      *            the index of the column to read.
    898      * @return the String representing the value of the column, {@code null} if
    899      *         the column is SQL {@code NULL}.
    900      * @throws SQLException
    901      *             if a database error happens.
    902      */
    903     public String getString(int columnIndex) throws SQLException;
    904 
    905     /**
    906      * Gets the value of a column specified by column name, as a String.
    907      *
    908      * @param columnName
    909      *            the name of the column to read.
    910      * @return the String representing the value of the column, {@code null} if
    911      *         the column is SQL {@code NULL}.
    912      * @throws SQLException
    913      *             if a database error happens.
    914      */
    915     public String getString(String columnName) throws SQLException;
    916 
    917     /**
    918      * Gets the value of a column specified by column index as a {@code
    919      * java.sql.Time} value.
    920      *
    921      * @param columnIndex
    922      *            the index of the column to read.
    923      * @return a Time representing the column value, {@code null} if the column
    924      *         value is SQL {@code NULL}.
    925      * @throws SQLException
    926      *             if a database error happens.
    927      */
    928     public Time getTime(int columnIndex) throws SQLException;
    929 
    930     /**
    931      * Gets the value of a column specified by column index as a {@code
    932      * java.sql.Time} value. The supplied {@code Calendar} is used to
    933      * map the SQL {@code Time} value to a Java Time value.
    934      *
    935      * @param columnIndex
    936      *            the index of the column to read.
    937      * @param cal
    938      *            a {@code Calendar} to use in creating the Java Time value.
    939      * @return a Time representing the column value, {@code null} if the column
    940      *         value is SQL {@code NULL}.
    941      * @throws SQLException
    942      *             if a database error happens.
    943      */
    944     public Time getTime(int columnIndex, Calendar cal) throws SQLException;
    945 
    946     /**
    947      * Gets the value of a column specified by column name, as a {@code
    948      * java.sql.Time} value.
    949      *
    950      * @param columnName
    951      *            the name of the column to read.
    952      * @return the column value, {@code null} if the column value is SQL {@code
    953      *         NULL}.
    954      * @throws SQLException
    955      *             if a database error happens.
    956      */
    957     public Time getTime(String columnName) throws SQLException;
    958 
    959     /**
    960      * Gets the value of a column specified by column index, as a {@code
    961      * java.sql.Time} value. The supplied {@code Calendar} is used to
    962      * map the SQL {@code Time} value to a Java Time value.
    963      *
    964      * @param columnName
    965      *            the name of the column to read.
    966      * @param cal
    967      *            a {@code Calendar} to use in creating the Java time value.
    968      * @return a Time representing the column value, {@code null} if the column
    969      *         value is SQL {@code NULL}.
    970      * @throws SQLException
    971      *             if a database error happens.
    972      */
    973     public Time getTime(String columnName, Calendar cal) throws SQLException;
    974 
    975     /**
    976      * Gets the value of a column specified by column index as a {@code
    977      * java.sql.Timestamp} value.
    978      *
    979      * @param columnIndex
    980      *            the index of the column to read.
    981      * @return a timestamp representing the column value, {@code null} if the
    982      *         column value is SQL {@code NULL}.
    983      * @throws SQLException
    984      *             if a database error happens.
    985      */
    986     public Timestamp getTimestamp(int columnIndex) throws SQLException;
    987 
    988     /**
    989      * Gets the value of a column specified by column index, as a {@code
    990      * java.sql.Timestamp} value. The supplied Calendar is used when mapping
    991      * the SQL {@code Timestamp} value to a Java {@code Timestamp} value.
    992      *
    993      * @param columnIndex
    994      *            the index of the column to read.
    995      * @param cal
    996      *            Calendar to use in creating the Java timestamp value.
    997      * @return a timestamp representing the column value, {@code null} if the
    998      *         column value is SQL NULL.
    999      * @throws SQLException
   1000      *             if a database error happens.
   1001      */
   1002     public Timestamp getTimestamp(int columnIndex, Calendar cal)
   1003             throws SQLException;
   1004 
   1005     /**
   1006      * Gets the value of a column specified by column name, as a {@code
   1007      * java.sql.Timestamp} value.
   1008      *
   1009      * @param columnName
   1010      *            the name of the column to read.
   1011      * @return a timestamp representing the column value, {@code null} if the
   1012      *         column value is SQL {@code NULL}.
   1013      * @throws SQLException
   1014      *             if a database error happens.
   1015      */
   1016     public Timestamp getTimestamp(String columnName) throws SQLException;
   1017 
   1018     /**
   1019      * Gets the value of a column specified by column name, as a {@code
   1020      * java.sql.Timestamp} value. The supplied Calendar is used when mapping
   1021      * the SQL {@code Timestamp} value to a Java {@code Timestamp} value.
   1022      *
   1023      * @param columnName
   1024      *            the name of the column to read.
   1025      * @param cal
   1026      *            Calendar to use in creating the Java {@code Timestamp} value.
   1027      * @return a timestamp representing the column value, {@code null} if the
   1028      *         column value is SQL {@code NULL}.
   1029      * @throws SQLException
   1030      *             if a database error happens.
   1031      */
   1032     public Timestamp getTimestamp(String columnName, Calendar cal)
   1033             throws SQLException;
   1034 
   1035     /**
   1036      * Gets the type of the {@code ResultSet}.
   1037      *
   1038      * @return The {@code ResultSet} type, one of:
   1039      *         <ul>
   1040      *         <li>{@code ResultSet.TYPE_FORWARD_ONLY}</li> <li>{@code
   1041      *         ResultSet.TYPE_SCROLL_INSENSITIVE}</li> <li>{@code
   1042      *         ResultSet.TYPE_SCROLL_SENSITIVE}</li>
   1043      *         </ul>
   1044      * @throws SQLException
   1045      *             if there is a database error.
   1046      */
   1047     public int getType() throws SQLException;
   1048 
   1049     /**
   1050      * Gets the value of the column as an {@code InputStream} of unicode
   1051      * characters.
   1052      *
   1053      * @deprecated Use {@link #getCharacterStream}.
   1054      * @param columnIndex
   1055      *            the index of the column to read.
   1056      * @return an {@code InputStream} holding the value of the column. {@code
   1057      *         null} if the column value is SQL {@code NULL}.
   1058      * @throws SQLException
   1059      *             if a database error happens.
   1060      */
   1061     @Deprecated
   1062     public InputStream getUnicodeStream(int columnIndex) throws SQLException;
   1063 
   1064     /**
   1065      * Gets the value of the column as an {@code InputStream} of Unicode
   1066      * characters.
   1067      *
   1068      * @deprecated Use {@link #getCharacterStream}
   1069      * @param columnName
   1070      *            the name of the column to read.
   1071      * @return an {@code InputStream} holding the value of the column. {@code
   1072      *         null} if the column value is SQL {@code NULL}.
   1073      * @throws SQLException
   1074      *             if a database error happens.
   1075      */
   1076     @Deprecated
   1077     public InputStream getUnicodeStream(String columnName) throws SQLException;
   1078 
   1079     /**
   1080      * Gets the value of a column specified by column index as a {@code
   1081      * java.net.URL}.
   1082      *
   1083      * @param columnIndex
   1084      *            the index of the column to read.
   1085      * @return a URL. {@code null} if the column value is SQL {@code NULL}.
   1086      * @throws SQLException
   1087      *             if a database error happens.
   1088      */
   1089     public URL getURL(int columnIndex) throws SQLException;
   1090 
   1091     /**
   1092      * Gets the value of a column specified by column name as a {@code
   1093      * java.net.URL} object.
   1094      *
   1095      * @param columnName
   1096      *            the name of the column to read.
   1097      * @return the column vaule as a URL. {@code null} if the column value is SQL {@code NULL}.
   1098      * @throws SQLException
   1099      *             if a database error happens.
   1100      */
   1101     public URL getURL(String columnName) throws SQLException;
   1102 
   1103     /**
   1104      * Gets the first warning generated by calls on this {@code ResultSet}.
   1105      * Subsequent warnings on this {@code ResultSet} are chained to the first
   1106      * one.
   1107      * <p>
   1108      * The warnings are cleared when a new Row is read from the {@code
   1109      * ResultSet}. The warnings returned by this method are only the warnings
   1110      * generated by {@code ResultSet} method calls - warnings generated by
   1111      * Statement methods are held by the Statement.
   1112      * <p>
   1113      * An {@code SQLException} is generated if this method is called on a closed
   1114      * {@code ResultSet}.
   1115      *
   1116      * @return an SQLWarning which is the first warning for this {@code
   1117      *         ResultSet}. {@code null} if there are no warnings.
   1118      * @throws SQLException
   1119      *             if a database error happens.
   1120      */
   1121     public SQLWarning getWarnings() throws SQLException;
   1122 
   1123     /**
   1124      * Insert the insert row into the {@code ResultSet} and into the underlying
   1125      * database. The cursor must be set to the Insert Row before this method is
   1126      * invoked.
   1127      *
   1128      * @throws SQLException
   1129      *             if a database error happens. Particular cases include the
   1130      *             cursor not being on the Insert Row or if any columns in the
   1131      *             row do not have a value where the column is declared as
   1132      *             not-nullable.
   1133      */
   1134     public void insertRow() throws SQLException;
   1135 
   1136     /**
   1137      * Gets if the cursor is after the last row of the {@code ResultSet}.
   1138      *
   1139      * @return {@code true} if the cursor is after the last row in the {@code
   1140      *         ResultSet}, {@code false} if the cursor is at any other position
   1141      *         in the {@code ResultSet}.
   1142      * @throws SQLException
   1143      *             if a database error happens.
   1144      */
   1145     public boolean isAfterLast() throws SQLException;
   1146 
   1147     /**
   1148      * Gets if the cursor is before the first row of the {@code ResultSet}.
   1149      *
   1150      * @return {@code true} if the cursor is before the first row in the {@code
   1151      *         ResultSet}, {@code false} if the cursor is at any other position
   1152      *         in the {@code ResultSet}.
   1153      * @throws SQLException
   1154      *             if a database error happens.
   1155      */
   1156     public boolean isBeforeFirst() throws SQLException;
   1157 
   1158     /**
   1159      * Gets if the cursor is on the first row of the {@code ResultSet}.
   1160      *
   1161      * @return {@code true} if the cursor is on the first row in the {@code
   1162      *         ResultSet}, {@code false} if the cursor is at any other position
   1163      *         in the {@code ResultSet}.
   1164      * @throws SQLException
   1165      *             if a database error happens.
   1166      */
   1167     public boolean isFirst() throws SQLException;
   1168 
   1169     /**
   1170      * Gets if the cursor is on the last row of the {@code ResultSet}
   1171      *
   1172      * @return {@code true} if the cursor is on the last row in the {@code
   1173      *         ResultSet}, {@code false} if the cursor is at any other position
   1174      *         in the {@code ResultSet}.
   1175      * @throws SQLException
   1176      *             if a database error happens.
   1177      */
   1178     public boolean isLast() throws SQLException;
   1179 
   1180     /**
   1181      * Shifts the cursor position to the last row of the {@code ResultSet}.
   1182      *
   1183      * @return {@code true} if the new position is in a legitimate row, {@code
   1184      *         false} if the {@code ResultSet} contains no rows.
   1185      * @throws SQLException
   1186      *             if there is a database error.
   1187      */
   1188     public boolean last() throws SQLException;
   1189 
   1190     /**
   1191      * Moves the cursor to the remembered position, namely the
   1192      * row that was the current row before a call to {@code moveToInsertRow}.
   1193      * This only applies if the cursor is on the Insert Row.
   1194      *
   1195      * @throws SQLException
   1196      *             if a database error happens.
   1197      */
   1198     public void moveToCurrentRow() throws SQLException;
   1199 
   1200     /**
   1201      * Moves the cursor position to the Insert Row. The current position is
   1202      * remembered and the cursor is positioned at the Insert Row. The columns in
   1203      * the Insert Row should be filled in with the appropriate update methods,
   1204      * before calling {@code insertRow} to insert the new row into the database.
   1205      *
   1206      * @throws SQLException
   1207      *             if a database error happens.
   1208      */
   1209     public void moveToInsertRow() throws SQLException;
   1210 
   1211     /**
   1212      * Shifts the cursor position down one row in this {@code ResultSet} object.
   1213      * <p>
   1214      * Any input streams associated with the current row are closed and any
   1215      * warnings are cleared.
   1216      *
   1217      * @return {@code true} if the updated cursor position is pointing to a
   1218      *         valid row, {@code false} otherwise (i.e. when the cursor is after
   1219      *         the last row in the {@code ResultSet}).
   1220      * @throws SQLException
   1221      *             if a database error happens.
   1222      */
   1223     public boolean next() throws SQLException;
   1224 
   1225     /**
   1226      * Relocates the cursor position to the preceding row in this {@code
   1227      * ResultSet}.
   1228      *
   1229      * @return {@code true} if the new position is in a legitimate row, {@code
   1230      *         false} if the cursor is now before the first row.
   1231      * @throws SQLException
   1232      *             if a database error happens.
   1233      */
   1234     public boolean previous() throws SQLException;
   1235 
   1236     /**
   1237      * Refreshes the current row with its most up to date value in the database.
   1238      * Must not be called when the cursor is on the Insert Row.
   1239      * <p>
   1240      * If any columns in the current row have been updated but the {@code
   1241      * updateRow} has not been called, then the updates are lost when this
   1242      * method is called.
   1243      *
   1244      * @throws SQLException
   1245      *             if a database error happens., including if the current row is
   1246      *             the Insert row.
   1247      */
   1248     public void refreshRow() throws SQLException;
   1249 
   1250     /**
   1251      * Moves the cursor position up or down by a specified number of rows. If
   1252      * the new position is beyond the start row (or end row), the cursor position is
   1253      * set before the first row (or, respectively, after the last row).
   1254      *
   1255      * @param rows
   1256      *            a number of rows to move the cursor - may be positive or
   1257      *            negative
   1258      * @return {@code true} if the new cursor position is on a row, {@code
   1259      *         false} otherwise
   1260      * @throws SQLException
   1261      *             if a database error happens.
   1262      */
   1263     public boolean relative(int rows) throws SQLException;
   1264 
   1265     /**
   1266      * Indicates whether a row has been deleted. This method depends on whether
   1267      * the JDBC driver and database can detect deletions.
   1268      *
   1269      * @return {@code true} if a row has been deleted and if deletions are
   1270      *         detected, {@code false} otherwise.
   1271      * @throws SQLException
   1272      *             if a database error happens.
   1273      */
   1274     public boolean rowDeleted() throws SQLException;
   1275 
   1276     /**
   1277      * Indicates whether the current row has had an insertion operation. This
   1278      * method depends on whether the JDBC driver and database can detect
   1279      * insertions.
   1280      *
   1281      * @return {@code true} if a row has been inserted and if insertions are
   1282      *         detected, {@code false} otherwise.
   1283      * @throws SQLException
   1284      *             if a database error happens.
   1285      */
   1286     public boolean rowInserted() throws SQLException;
   1287 
   1288     /**
   1289      * Indicates whether the current row has been updated. This method depends
   1290      * on whether the JDBC driver and database can detect updates.
   1291      *
   1292      * @return {@code true} if the current row has been updated and if updates
   1293      *         can be detected, {@code false} otherwise.
   1294      * @throws SQLException
   1295      *             if a database error happens.
   1296      */
   1297     public boolean rowUpdated() throws SQLException;
   1298 
   1299     /**
   1300      * Indicates which direction (forward/reverse) will be used to process the
   1301      * rows of this {@code ResultSet} object. This is treated as a hint by the
   1302      * JDBC driver.
   1303      *
   1304      * @param direction
   1305      *            can be {@code ResultSet.FETCH_FORWARD}, {@code
   1306      *            ResultSet.FETCH_REVERSE}, or {@code ResultSet.FETCH_UNKNOWN}
   1307      * @throws SQLException
   1308      *             if there is a database error.
   1309      */
   1310     public void setFetchDirection(int direction) throws SQLException;
   1311 
   1312     /**
   1313      * Indicates the number of rows to fetch from the database when extra rows
   1314      * are required for this {@code ResultSet}. This used as a hint to the JDBC
   1315      * driver.
   1316      *
   1317      * @param rows
   1318      *            the number of rows to fetch. {@code 0} implies that the JDBC
   1319      *            driver can make its own decision about the fetch size. The
   1320      *            number should not be greater than the maximum number of rows
   1321      *            established by the statement that generated the {@code
   1322      *            ResultSet}.
   1323      * @throws SQLException
   1324      *             if a database error happens.
   1325      */
   1326     public void setFetchSize(int rows) throws SQLException;
   1327 
   1328     /**
   1329      * Updates a column specified by a column index with a {@code
   1330      * java.sql.Array} value.
   1331      *
   1332      * @param columnIndex
   1333      *            the index of the column to update.
   1334      * @param x
   1335      *            the new value for the specified column.
   1336      * @throws SQLException
   1337      *             if a database error happens.
   1338      */
   1339     public void updateArray(int columnIndex, Array x) throws SQLException;
   1340 
   1341     /**
   1342      * Updates a column specified by a column name with a {@code java.sql.Array}
   1343      * value.
   1344      *
   1345      * @param columnName
   1346      *            the name of the column to update.
   1347      * @param x
   1348      *            the new value for the specified column.
   1349      * @throws SQLException
   1350      *             if a database error happens.
   1351      */
   1352     public void updateArray(String columnName, Array x) throws SQLException;
   1353 
   1354     /**
   1355      * Updates a column specified by a column index with an ASCII stream value.
   1356      *
   1357      * @param columnIndex
   1358      *            the index of the column to update.
   1359      * @param x
   1360      *            the new value for the specified column.
   1361      * @param length
   1362      *            the length of the data to write from the stream
   1363      * @throws SQLException
   1364      *             if a database error happens.
   1365      */
   1366     public void updateAsciiStream(int columnIndex, InputStream x, int length)
   1367             throws SQLException;
   1368 
   1369     /**
   1370      * Updates a column specified by a column name with an Ascii stream value.
   1371      *
   1372      * @param columnName
   1373      *            the name of the column to update.
   1374      * @param x
   1375      *            the new value for the specified column.
   1376      * @param length
   1377      *            the length of the data to write from the stream
   1378      * @throws SQLException
   1379      *             if a database error happens.
   1380      */
   1381     public void updateAsciiStream(String columnName, InputStream x, int length)
   1382             throws SQLException;
   1383 
   1384     /**
   1385      * Updates a column specified by a column index with a {@code
   1386      * java.sql.BigDecimal} value.
   1387      *
   1388      * @param columnIndex
   1389      *            the index of the column to update.
   1390      * @param x
   1391      *            the new value for the specified column.
   1392      * @throws SQLException
   1393      *             if a database error happens.
   1394      */
   1395     public void updateBigDecimal(int columnIndex, BigDecimal x)
   1396             throws SQLException;
   1397 
   1398     /**
   1399      * Updates a column specified by a column name with a {@code
   1400      * java.sql.BigDecimal} value.
   1401      *
   1402      * @param columnName
   1403      *            the name of the column to update.
   1404      * @param x
   1405      *            the new value for the specified column.
   1406      * @throws SQLException
   1407      *             if a database error happens.
   1408      */
   1409     public void updateBigDecimal(String columnName, BigDecimal x)
   1410             throws SQLException;
   1411 
   1412     /**
   1413      * Updates a column specified by a column index with a binary stream value.
   1414      *
   1415      * @param columnIndex
   1416      *            the index of the column to update.
   1417      * @param x
   1418      *            the new value for the specified column.
   1419      * @param length
   1420      *            the number of bytes to be read from the the stream.
   1421      * @throws SQLException
   1422      *             if a database error happens.
   1423      */
   1424     public void updateBinaryStream(int columnIndex, InputStream x, int length)
   1425             throws SQLException;
   1426 
   1427     /**
   1428      * Updates a column specified by a column name with a binary stream value.
   1429      *
   1430      * @param columnName
   1431      *            the name of the column to update.
   1432      * @param x
   1433      *            the new value for the specified column.
   1434      * @param length
   1435      *            he number of bytes to be read from the the stream.
   1436      * @throws SQLException
   1437      *             if a database error happens.
   1438      */
   1439     public void updateBinaryStream(String columnName, InputStream x, int length)
   1440             throws SQLException;
   1441 
   1442     /**
   1443      * Updates a column specified by a column index with a {@code java.sql.Blob}
   1444      * value.
   1445      *
   1446      * @param columnIndex
   1447      *            the index of the column to update.
   1448      * @param x
   1449      *            the new value for the specified column.
   1450      * @throws SQLException
   1451      *             if a database error happens.
   1452      */
   1453     public void updateBlob(int columnIndex, Blob x) throws SQLException;
   1454 
   1455     /**
   1456      * Updates a column specified by a column name with a {@code java.sql.Blob}
   1457      * value.
   1458      *
   1459      * @param columnName
   1460      *            the name of the column to update.
   1461      * @param x
   1462      *            the new value for the specified column.
   1463      * @throws SQLException
   1464      *             if a database error happens.
   1465      */
   1466     public void updateBlob(String columnName, Blob x) throws SQLException;
   1467 
   1468     /**
   1469      * Updates a column specified by a column index with a {@code boolean}
   1470      * value.
   1471      *
   1472      * @param columnIndex
   1473      *            the index of the column to update.
   1474      * @param x
   1475      *            the new value for the specified column.
   1476      * @throws SQLException
   1477      *             if a database error happens.
   1478      */
   1479     public void updateBoolean(int columnIndex, boolean x) throws SQLException;
   1480 
   1481     /**
   1482      * Updates a column specified by a column name with a {@code boolean} value.
   1483      *
   1484      * @param columnName
   1485      *            the name of the column to update.
   1486      * @param x
   1487      *            the new value for the specified column.
   1488      * @throws SQLException
   1489      *             if a database error happens.
   1490      */
   1491     public void updateBoolean(String columnName, boolean x) throws SQLException;
   1492 
   1493     /**
   1494      * Updates a column specified by a column index with a {@code byte} value.
   1495      *
   1496      * @param columnIndex
   1497      *            the index of the column to update.
   1498      * @param x
   1499      *            the new value for the specified column.
   1500      * @throws SQLException
   1501      *             if a database error happens.
   1502      */
   1503     public void updateByte(int columnIndex, byte x) throws SQLException;
   1504 
   1505     /**
   1506      * Updates a column specified by a column name with a {@code byte} value.
   1507      *
   1508      * @param columnName
   1509      *            the name of the column to update.
   1510      * @param x
   1511      *            the new value for the specified column.
   1512      * @throws SQLException
   1513      *             if a database error happens.
   1514      */
   1515     public void updateByte(String columnName, byte x) throws SQLException;
   1516 
   1517     /**
   1518      * Updates a column specified by a column index with a {@code byte} array
   1519      * value.
   1520      *
   1521      * @param columnIndex
   1522      *            the index of the column to update.
   1523      * @param x
   1524      *            the new value for the specified column.
   1525      * @throws SQLException
   1526      *             if a database error happens.
   1527      */
   1528     public void updateBytes(int columnIndex, byte[] x) throws SQLException;
   1529 
   1530     /**
   1531      * Updates a column specified by a column name with a byte array value.
   1532      *
   1533      * @param columnName
   1534      *            the name of the column to update.
   1535      * @param x
   1536      *            the new value for the specified column.
   1537      * @throws SQLException
   1538      *             if a database error happens.
   1539      */
   1540     public void updateBytes(String columnName, byte[] x) throws SQLException;
   1541 
   1542     /**
   1543      * Updates a column specified by a column index with a character stream
   1544      * value.
   1545      *
   1546      * @param columnIndex
   1547      *            the index of the column to update.
   1548      * @param x
   1549      *            the new value for the specified column.
   1550      * @param length
   1551      *            the length of data to write from the stream
   1552      * @throws SQLException
   1553      *             if a database error happens.
   1554      */
   1555     public void updateCharacterStream(int columnIndex, Reader x, int length)
   1556             throws SQLException;
   1557 
   1558     /**
   1559      * Updates a column specified by a column name with a character stream
   1560      * value.
   1561      *
   1562      * @param columnName
   1563      *            the name of the column to update.
   1564      * @param reader
   1565      *            the new value for the specified column.
   1566      * @param length
   1567      *            the length of data to write from the Reader
   1568      * @throws SQLException
   1569      *             if a database error happens.
   1570      */
   1571     public void updateCharacterStream(String columnName, Reader reader,
   1572             int length) throws SQLException;
   1573 
   1574     /**
   1575      * Updates a column specified by a column index with a {@code java.sql.Clob}
   1576      * value.
   1577      *
   1578      * @param columnIndex
   1579      *            the index of the column to update.
   1580      * @param x
   1581      *            the new value for the specified column.
   1582      * @throws SQLException
   1583      *             if a database error happens.
   1584      */
   1585     public void updateClob(int columnIndex, Clob x) throws SQLException;
   1586 
   1587     /**
   1588      * Updates a column specified by a column name with a {@code java.sql.Clob}
   1589      * value.
   1590      *
   1591      * @param columnName
   1592      *            the name of the column to update.
   1593      * @param x
   1594      *            the new value for the specified column.
   1595      * @throws SQLException
   1596      *             if a database error happens.
   1597      */
   1598     public void updateClob(String columnName, Clob x) throws SQLException;
   1599 
   1600     /**
   1601      * Updates a column specified by a column index with a {@code java.sql.Date}
   1602      * value.
   1603      *
   1604      * @param columnIndex
   1605      *            the index of the column to update.
   1606      * @param x
   1607      *            the new value for the specified column.
   1608      * @throws SQLException
   1609      *             if a database error happens.
   1610      */
   1611     public void updateDate(int columnIndex, Date x) throws SQLException;
   1612 
   1613     /**
   1614      * Updates a column specified by a column name with a {@code java.sql.Date}
   1615      * value.
   1616      *
   1617      * @param columnName
   1618      *            the name of the column to update.
   1619      * @param x
   1620      *            the new value for the specified column.
   1621      * @throws SQLException
   1622      *             if a database error happens.
   1623      */
   1624     public void updateDate(String columnName, Date x) throws SQLException;
   1625 
   1626     /**
   1627      * Updates a column specified by a column index with a {@code double} value.
   1628      *
   1629      * @param columnIndex
   1630      *            the index of the column to update.
   1631      * @param x
   1632      *            the new value for the specified column.
   1633      * @throws SQLException
   1634      *             if a database error happens.
   1635      */
   1636     public void updateDouble(int columnIndex, double x) throws SQLException;
   1637 
   1638     /**
   1639      * Updates a column specified by a column name with a {@code double} value.
   1640      *
   1641      * @param columnName
   1642      *            the name of the column to update.
   1643      * @param x
   1644      *            the new value for the specified column.
   1645      * @throws SQLException
   1646      *             if a database error happens.
   1647      */
   1648     public void updateDouble(String columnName, double x) throws SQLException;
   1649 
   1650     /**
   1651      * Updates a column specified by a column index with a {@code float} value.
   1652      *
   1653      * @param columnIndex
   1654      *            the index of the column to update.
   1655      * @param x
   1656      *            the new value for the specified column.
   1657      * @throws SQLException
   1658      *             if a database error happens.
   1659      */
   1660     public void updateFloat(int columnIndex, float x) throws SQLException;
   1661 
   1662     /**
   1663      * Updates a column specified by a column name with a {@code float} value.
   1664      *
   1665      * @param columnName
   1666      *            the name of the column to update.
   1667      * @param x
   1668      *            the new value for the specified column.
   1669      * @throws SQLException
   1670      *             if a database error happens.
   1671      */
   1672     public void updateFloat(String columnName, float x) throws SQLException;
   1673 
   1674     /**
   1675      * Updates a column specified by a column index with an {@code int} value.
   1676      *
   1677      * @param columnIndex
   1678      *            the index of the column to update.
   1679      * @param x
   1680      *            the new value for the specified column.
   1681      * @throws SQLException
   1682      *             if a database error happens.
   1683      */
   1684     public void updateInt(int columnIndex, int x) throws SQLException;
   1685 
   1686     /**
   1687      * Updates a column specified by a column name with an {@code int} value.
   1688      *
   1689      * @param columnName
   1690      *            the name of the column to update.
   1691      * @param x
   1692      *            the new value for the specified column.
   1693      * @throws SQLException
   1694      *             if a database error happens.
   1695      */
   1696     public void updateInt(String columnName, int x) throws SQLException;
   1697 
   1698     /**
   1699      * Updates a column specified by a column index with a {@code long} value.
   1700      *
   1701      * @param columnIndex
   1702      *            the index of the column to update.
   1703      * @param x
   1704      *            the new value for the specified column..
   1705      * @throws SQLException
   1706      *             if a database error happens.
   1707      */
   1708     public void updateLong(int columnIndex, long x) throws SQLException;
   1709 
   1710     /**
   1711      * Updates a column specified by a column name with a {@code long} value.
   1712      *
   1713      * @param columnName
   1714      *            the name of the column to update.
   1715      * @param x
   1716      *            the new value for the specified column.
   1717      * @throws SQLException
   1718      *             if a database error happens.
   1719      */
   1720     public void updateLong(String columnName, long x) throws SQLException;
   1721 
   1722     /**
   1723      * Updates a column specified by a column index with a {@code null} value.
   1724      *
   1725      * @param columnIndex
   1726      *            the index of the column to update.
   1727      * @throws SQLException
   1728      *             if a database error happens.
   1729      */
   1730     public void updateNull(int columnIndex) throws SQLException;
   1731 
   1732     /**
   1733      * Updates a column specified by a column name with a {@code null} value.
   1734      *
   1735      * @param columnName
   1736      *            the name of the column to update.
   1737      * @throws SQLException
   1738      *             if a database error happens.
   1739      */
   1740     public void updateNull(String columnName) throws SQLException;
   1741 
   1742     /**
   1743      * Updates a column specified by a column index with an {@code Object}
   1744      * value.
   1745      *
   1746      * @param columnIndex
   1747      *            the index of the column to update.
   1748      * @param x
   1749      *            the new value for the specified column.
   1750      * @throws SQLException
   1751      *             if a database error happens.
   1752      */
   1753     public void updateObject(int columnIndex, Object x) throws SQLException;
   1754 
   1755     /**
   1756      * Updates a column specified by a column index with an {@code Object}
   1757      * value.
   1758      *
   1759      * @param columnIndex
   1760      *            the index of the column to update.
   1761      * @param x
   1762      *            the new value for the specified column.
   1763      * @param scale
   1764      *            for the types {@code java.sql.Types.DECIMAL} or {@code
   1765      *            java.sql.Types.NUMERIC}, this specifies the number of digits
   1766      *            after the decimal point.
   1767      * @throws SQLException
   1768      *             if a database error happens.
   1769      */
   1770     public void updateObject(int columnIndex, Object x, int scale)
   1771             throws SQLException;
   1772 
   1773     /**
   1774      * Updates a column specified by a column name with an {@code Object} value.
   1775      *
   1776      * @param columnName
   1777      *            the name of the column to update.
   1778      * @param x
   1779      *            the new value for the specified column.
   1780      * @throws SQLException
   1781      *             if a database error happens.
   1782      */
   1783     public void updateObject(String columnName, Object x) throws SQLException;
   1784 
   1785     /**
   1786      * Updates a column specified by a column name with an {@code Object} value.
   1787      *
   1788      * @param columnName
   1789      *            the name of the column to update.
   1790      * @param x
   1791      *            the new value for the specified column.
   1792      * @param scale
   1793      *            for the types {@code java.sql.Types.DECIMAL} or {@code
   1794      *            java.sql.Types.NUMERIC}, this specifies the number of digits
   1795      *            after the decimal point.
   1796      * @throws SQLException
   1797      *             if a database error happens.
   1798      */
   1799     public void updateObject(String columnName, Object x, int scale)
   1800             throws SQLException;
   1801 
   1802     /**
   1803      * Updates a column specified by a column index with a {@code java.sql.Ref}
   1804      * value.
   1805      *
   1806      * @param columnIndex
   1807      *            the index of the column to update.
   1808      * @param x
   1809      *            the new value for the specified column.
   1810      * @throws SQLException
   1811      *             if a database error happens.
   1812      */
   1813     public void updateRef(int columnIndex, Ref x) throws SQLException;
   1814 
   1815     /**
   1816      * Updates a column specified by a column name with a {@code java.sql.Ref}
   1817      * value.
   1818      *
   1819      * @param columnName
   1820      *            the name of the column to update.
   1821      * @param x
   1822      *            the new value for the specified column.
   1823      * @throws SQLException
   1824      *             if a database error happens.
   1825      */
   1826     public void updateRef(String columnName, Ref x) throws SQLException;
   1827 
   1828     /**
   1829      * Updates the database with the new contents of the current row of this
   1830      * {@code ResultSet} object.
   1831      *
   1832      * @throws SQLException
   1833      *             if a database error happens.
   1834      */
   1835     public void updateRow() throws SQLException;
   1836 
   1837     /**
   1838      * Updates a column specified by a column index with a {@code short} value.
   1839      *
   1840      * @param columnIndex
   1841      *            the index of the column to update.
   1842      * @param x
   1843      *            the new value for the specified column.
   1844      * @throws SQLException
   1845      *             if a database error happens.
   1846      */
   1847     public void updateShort(int columnIndex, short x) throws SQLException;
   1848 
   1849     /**
   1850      * Updates a column specified by a column name with a {@code short} value.
   1851      *
   1852      * @param columnName
   1853      *            the name of the column to update.
   1854      * @param x
   1855      *            the new value for the specified column.
   1856      * @throws SQLException
   1857      *             if a database error happens.
   1858      */
   1859     public void updateShort(String columnName, short x) throws SQLException;
   1860 
   1861     /**
   1862      * Updates a column specified by a column index with a {@code String} value.
   1863      *
   1864      * @param columnIndex
   1865      *            the index of the column to update.
   1866      * @param x
   1867      *            the new value for the specified column.
   1868      * @throws SQLException
   1869      *             if a database error happens.
   1870      */
   1871     public void updateString(int columnIndex, String x) throws SQLException;
   1872 
   1873     /**
   1874      * Updates a column specified by a column name with a {@code String} value.
   1875      *
   1876      * @param columnName
   1877      *            the name of the column to update.
   1878      * @param x
   1879      *            the new value for the specified column.
   1880      * @throws SQLException
   1881      *             if a database error happens.
   1882      */
   1883     public void updateString(String columnName, String x) throws SQLException;
   1884 
   1885     /**
   1886      * Updates a column specified by a column index with a {@code Time} value.
   1887      *
   1888      * @param columnIndex
   1889      *            the index of the column to update.
   1890      * @param x
   1891      *            the new value for the specified column.
   1892      * @throws SQLException
   1893      *             if a database error happens.
   1894      */
   1895     public void updateTime(int columnIndex, Time x) throws SQLException;
   1896 
   1897     /**
   1898      * Updates a column specified by a column name with a {@code Time} value.
   1899      *
   1900      * @param columnName
   1901      *            the name of the column to update.
   1902      * @param x
   1903      *            the new value for the specified column.
   1904      * @throws SQLException
   1905      *             if a database error happens.
   1906      */
   1907     public void updateTime(String columnName, Time x) throws SQLException;
   1908 
   1909     /**
   1910      * Updates a column specified by a column index with a {@code Timestamp}
   1911      * value.
   1912      *
   1913      * @param columnIndex
   1914      *            the index of the column to update.
   1915      * @param x
   1916      *            the new timestamp value for the specified column.
   1917      * @throws SQLException
   1918      *             if a database error happens.
   1919      */
   1920     public void updateTimestamp(int columnIndex, Timestamp x)
   1921             throws SQLException;
   1922 
   1923     /**
   1924      * Updates a column specified by column name with a {@code Timestamp} value.
   1925      *
   1926      * @param columnName
   1927      *            the name of the column to update.
   1928      * @param x
   1929      *            the new timestamp value for the specified column.
   1930      * @throws SQLException
   1931      *             if a database error happens.
   1932      */
   1933     public void updateTimestamp(String columnName, Timestamp x)
   1934             throws SQLException;
   1935 
   1936     /**
   1937      * Determines whether the last column read from this {@code ResultSet}
   1938      * contained SQL {@code NULL}.
   1939      *
   1940      * @return {@code {@code true} if the last column contained SQL {@code
   1941      *         NULL}, {@code false} otherwise
   1942      * @throws SQLException
   1943      *             if a database error happens.
   1944      */
   1945     public boolean wasNull() throws SQLException;
   1946 
   1947     /**
   1948      * Returns a {@code RowId} corresponding to the SQL ROWID at the 1-based {@code columnIndex}.
   1949      * @throws SQLException
   1950      */
   1951     public RowId getRowId(int columnIndex) throws SQLException;
   1952 
   1953     /**
   1954      * Returns a {@code RowId} corresponding to the SQL ROWID at the named column.
   1955      * @throws SQLException
   1956      */
   1957     public RowId getRowId(String columnLabel) throws SQLException;
   1958 
   1959     /**
   1960      * Updates the value at the 1-based {@code columnIndex}.
   1961      * The underlying database isn't changed until the next row update or insert operation.
   1962      * @throws SQLException
   1963      */
   1964     public void updateRowId(int columnIndex, RowId value) throws SQLException;
   1965 
   1966     /**
   1967      * Updates the value in the named column.
   1968      * The underlying database isn't changed until the next row update or insert operation.
   1969      * @throws SQLException
   1970      */
   1971     public void updateRowId(String columnLabel, RowId value) throws SQLException;
   1972 
   1973     /**
   1974      * Returns the holdability of this result set: {@link #HOLD_CURSORS_OVER_COMMIT} or
   1975      * {@link #CLOSE_CURSORS_AT_COMMIT}.
   1976      * @throws SQLException
   1977      */
   1978     public int getHoldability() throws SQLException;
   1979 
   1980     /**
   1981      * Returns true if this result set has been closed, false otherwise.
   1982      * @throws SQLException
   1983      */
   1984     public boolean isClosed() throws SQLException;
   1985 
   1986     /**
   1987      * Updates the value at the 1-based {@code columnIndex}.
   1988      * The underlying database isn't changed until the next row update or insert operation.
   1989      * @throws SQLException
   1990      */
   1991     public void updateNString(int columnIndex, String nString) throws SQLException;
   1992 
   1993     /**
   1994      * Updates the value in the named column.
   1995      * The underlying database isn't changed until the next row update or insert operation.
   1996      * @throws SQLException
   1997      */
   1998     public void updateNString(String columnLabel, String nString) throws SQLException;
   1999 
   2000     /**
   2001      * Updates the value at the 1-based {@code columnIndex}.
   2002      * The underlying database isn't changed until the next row update or insert operation.
   2003      * @throws SQLException
   2004      */
   2005     public void updateNClob(int columnIndex, NClob nClob) throws SQLException;
   2006 
   2007     /**
   2008      * Updates the value in the named column.
   2009      * The underlying database isn't changed until the next row update or insert operation.
   2010      * @throws SQLException
   2011      */
   2012     public void updateNClob(String columnLabel, NClob nClob) throws SQLException;
   2013 
   2014     /**
   2015      * Returns an {@code NClob} corresponding to the value at the 1-based {@code columnIndex}.
   2016      * @throws SQLException
   2017      */
   2018     public NClob getNClob(int columnIndex) throws SQLException;
   2019 
   2020     /**
   2021      * Returns an {@code NClob} corresponding to the value in the named column.
   2022      * @throws SQLException
   2023      */
   2024     public NClob getNClob(String columnLabel) throws SQLException;
   2025 
   2026     /**
   2027      * Returns an {@code SQLXML} corresponding to the value at the 1-based {@code columnIndex}.
   2028      * @throws SQLException
   2029      */
   2030     public SQLXML getSQLXML(int columnIndex) throws SQLException;
   2031 
   2032     /**
   2033      * Returns an {@code SQLXML} corresponding to the value in the named column.
   2034      * @throws SQLException
   2035      */
   2036     public SQLXML getSQLXML(String columnLabel) throws SQLException;
   2037 
   2038     /**
   2039      * Updates the value at the 1-based {@code columnIndex}.
   2040      * The underlying database isn't changed until the next row update or insert operation.
   2041      * @throws SQLException
   2042      */
   2043     public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException;
   2044 
   2045     /**
   2046      * Updates the value in the named column.
   2047      * The underlying database isn't changed until the next row update or insert operation.
   2048      * @throws SQLException
   2049      */
   2050     public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException;
   2051 
   2052     /**
   2053      * Returns a {@code String} corresponding to the value at the 1-based {@code columnIndex}.
   2054      * @throws SQLException
   2055      */
   2056     public String getNString(int columnIndex) throws SQLException;
   2057 
   2058     /**
   2059      * Returns a {@code String} corresponding to the value in the named column.
   2060      * @throws SQLException
   2061      */
   2062     public String getNString(String columnLabel) throws SQLException;
   2063 
   2064     /**
   2065      * Returns a {@code Reader} corresponding to the value at the 1-based {@code columnIndex}.
   2066      * @throws SQLException
   2067      */
   2068     public Reader getNCharacterStream(int columnIndex) throws SQLException;
   2069 
   2070     /**
   2071      * Returns a {@code Reader} corresponding to the value in the named column.
   2072      * @throws SQLException
   2073      */
   2074     public Reader getNCharacterStream(String columnLabel) throws SQLException;
   2075 
   2076     /**
   2077      * Updates the value at the 1-based {@code columnIndex}.
   2078      * The underlying database isn't changed until the next row update or insert operation.
   2079      * @throws SQLException
   2080      */
   2081     public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException;
   2082 
   2083     /**
   2084      * Updates the value in the named column.
   2085      * The underlying database isn't changed until the next row update or insert operation.
   2086      * @throws SQLException
   2087      */
   2088     public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException;
   2089 
   2090     /**
   2091      * Updates the value at the 1-based {@code columnIndex}.
   2092      * The underlying database isn't changed until the next row update or insert operation.
   2093      * @throws SQLException
   2094      */
   2095     public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException;
   2096 
   2097     /**
   2098      * Updates the value at the 1-based {@code columnIndex}.
   2099      * The underlying database isn't changed until the next row update or insert operation.
   2100      * @throws SQLException
   2101      */
   2102     public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException;
   2103 
   2104     /**
   2105      * Updates the value at the 1-based {@code columnIndex}.
   2106      * The underlying database isn't changed until the next row update or insert operation.
   2107      * @throws SQLException
   2108      */
   2109     public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException;
   2110 
   2111     /**
   2112      * Updates the value in the named column.
   2113      * The underlying database isn't changed until the next row update or insert operation.
   2114      * @throws SQLException
   2115      */
   2116     public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException;
   2117 
   2118     /**
   2119      * Updates the value in the named column.
   2120      * The underlying database isn't changed until the next row update or insert operation.
   2121      * @throws SQLException
   2122      */
   2123     public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException;
   2124 
   2125     /**
   2126      * Updates the value in the named column.
   2127      * The underlying database isn't changed until the next row update or insert operation.
   2128      * @throws SQLException
   2129      */
   2130     public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException;
   2131 
   2132     /**
   2133      * Updates the value at the 1-based {@code columnIndex}.
   2134      * The underlying database isn't changed until the next row update or insert operation.
   2135      * @throws SQLException
   2136      */
   2137     public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException;
   2138 
   2139     /**
   2140      * Updates the value in the named column.
   2141      * The underlying database isn't changed until the next row update or insert operation.
   2142      * @throws SQLException
   2143      */
   2144     public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException;
   2145 
   2146     /**
   2147      * Updates the value at the 1-based {@code columnIndex}.
   2148      * The underlying database isn't changed until the next row update or insert operation.
   2149      * @throws SQLException
   2150      */
   2151     public void updateClob(int columnIndex, Reader reader, long length) throws SQLException;
   2152 
   2153     /**
   2154      * Updates the value in the named column.
   2155      * The underlying database isn't changed until the next row update or insert operation.
   2156      * @throws SQLException
   2157      */
   2158     public void updateClob(String columnLabel, Reader reader, long length) throws SQLException;
   2159 
   2160     /**
   2161      * Updates the value at the 1-based {@code columnIndex}.
   2162      * The underlying database isn't changed until the next row update or insert operation.
   2163      * @throws SQLException
   2164      */
   2165     public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException;
   2166 
   2167     /**
   2168      * Updates the value in the named column.
   2169      * The underlying database isn't changed until the next row update or insert operation.
   2170      * @throws SQLException
   2171      */
   2172     public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException;
   2173 
   2174     /**
   2175      * Updates the value at the 1-based {@code columnIndex}.
   2176      * The underlying database isn't changed until the next row update or insert operation.
   2177      * @throws SQLException
   2178      */
   2179     public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException;
   2180 
   2181     /**
   2182      * Updates the value in the named column.
   2183      * The underlying database isn't changed until the next row update or insert operation.
   2184      * @throws SQLException
   2185      */
   2186     public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException;
   2187 
   2188     /**
   2189      * Updates the value at the 1-based {@code columnIndex}.
   2190      * The underlying database isn't changed until the next row update or insert operation.
   2191      * @throws SQLException
   2192      */
   2193     public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException;
   2194 
   2195     /**
   2196      * Updates the value at the 1-based {@code columnIndex}.
   2197      * The underlying database isn't changed until the next row update or insert operation.
   2198      * @throws SQLException
   2199      */
   2200     public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException;
   2201 
   2202     /**
   2203      * Updates the value at the 1-based {@code columnIndex}.
   2204      * The underlying database isn't changed until the next row update or insert operation.
   2205      * @throws SQLException
   2206      */
   2207     public void updateCharacterStream(int columnIndex, Reader x) throws SQLException;
   2208 
   2209     /**
   2210      * Updates the value in the named column.
   2211      * The underlying database isn't changed until the next row update or insert operation.
   2212      * @throws SQLException
   2213      */
   2214     public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException;
   2215 
   2216     /**
   2217      * Updates the value in the named column.
   2218      * The underlying database isn't changed until the next row update or insert operation.
   2219      * @throws SQLException
   2220      */
   2221     public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException;
   2222 
   2223     /**
   2224      * Updates the value in the named column.
   2225      * The underlying database isn't changed until the next row update or insert operation.
   2226      * @throws SQLException
   2227      */
   2228     public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException;
   2229 
   2230     /**
   2231      * Updates the value at the 1-based {@code columnIndex}.
   2232      * The underlying database isn't changed until the next row update or insert operation.
   2233      * @throws SQLException
   2234      */
   2235     public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException;
   2236 
   2237     /**
   2238      * Updates the value in the named column.
   2239      * The underlying database isn't changed until the next row update or insert operation.
   2240      * @throws SQLException
   2241      */
   2242     public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException;
   2243 
   2244     /**
   2245      * Updates the value at the 1-based {@code columnIndex}.
   2246      * The underlying database isn't changed until the next row update or insert operation.
   2247      * @throws SQLException
   2248      */
   2249     public void updateClob(int columnIndex, Reader reader) throws SQLException;
   2250 
   2251     /**
   2252      * Updates the value in the named column.
   2253      * The underlying database isn't changed until the next row update or insert operation.
   2254      * @throws SQLException
   2255      */
   2256     public void updateClob(String columnLabel, Reader reader) throws SQLException;
   2257 
   2258     /**
   2259      * Updates the value at the 1-based {@code columnIndex}.
   2260      * The underlying database isn't changed until the next row update or insert operation.
   2261      * @throws SQLException
   2262      */
   2263     public void updateNClob(int columnIndex, Reader reader) throws SQLException;
   2264 
   2265     /**
   2266      * Updates the value in the named column.
   2267      * The underlying database isn't changed until the next row update or insert operation.
   2268      * @throws SQLException
   2269      */
   2270     public void updateNClob(String columnLabel, Reader reader) throws SQLException;
   2271 }
   2272