1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. Oracle designates this 9 * particular file as subject to the "Classpath" exception as provided 10 * by Oracle in the LICENSE file that accompanied this code. 11 * 12 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 * version 2 for more details (a copy is included in the LICENSE file that 16 * accompanied this code). 17 * 18 * You should have received a copy of the GNU General Public License version 19 * 2 along with this work; if not, write to the Free Software Foundation, 20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 * 22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 23 * or visit www.oracle.com if you need additional information or have any 24 * questions. 25 */ 26 27 package java.sql; 28 29 import java.math.BigDecimal; 30 import java.util.Calendar; 31 import java.io.Reader; 32 import java.io.InputStream; 33 34 /** 35 * A table of data representing a database result set, which 36 * is usually generated by executing a statement that queries the database. 37 * 38 * <P>A <code>ResultSet</code> object maintains a cursor pointing 39 * to its current row of data. Initially the cursor is positioned 40 * before the first row. The <code>next</code> method moves the 41 * cursor to the next row, and because it returns <code>false</code> 42 * when there are no more rows in the <code>ResultSet</code> object, 43 * it can be used in a <code>while</code> loop to iterate through 44 * the result set. 45 * <P> 46 * A default <code>ResultSet</code> object is not updatable and 47 * has a cursor that moves forward only. Thus, you can 48 * iterate through it only once and only from the first row to the 49 * last row. It is possible to 50 * produce <code>ResultSet</code> objects that are scrollable and/or 51 * updatable. The following code fragment, in which <code>con</code> 52 * is a valid <code>Connection</code> object, illustrates how to make 53 * a result set that is scrollable and insensitive to updates by others, and 54 * that is updatable. See <code>ResultSet</code> fields for other 55 * options. 56 * <PRE> 57 * 58 * Statement stmt = con.createStatement( 59 * ResultSet.TYPE_SCROLL_INSENSITIVE, 60 * ResultSet.CONCUR_UPDATABLE); 61 * ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2"); 62 * // rs will be scrollable, will not show changes made by others, 63 * // and will be updatable 64 * 65 * </PRE> 66 * The <code>ResultSet</code> interface provides 67 * <i>getter</i> methods (<code>getBoolean</code>, <code>getLong</code>, and so on) 68 * for retrieving column values from the current row. 69 * Values can be retrieved using either the index number of the 70 * column or the name of the column. In general, using the 71 * column index will be more efficient. Columns are numbered from 1. 72 * For maximum portability, result set columns within each row should be 73 * read in left-to-right order, and each column should be read only once. 74 * 75 * <P>For the getter methods, a JDBC driver attempts 76 * to convert the underlying data to the Java type specified in the 77 * getter method and returns a suitable Java value. The JDBC specification 78 * has a table showing the allowable mappings from SQL types to Java types 79 * that can be used by the <code>ResultSet</code> getter methods. 80 * <P> 81 * <P>Column names used as input to getter methods are case 82 * insensitive. When a getter method is called with 83 * a column name and several columns have the same name, 84 * the value of the first matching column will be returned. 85 * The column name option is 86 * designed to be used when column names are used in the SQL 87 * query that generated the result set. 88 * For columns that are NOT explicitly named in the query, it 89 * is best to use column numbers. If column names are used, the 90 * programmer should take care to guarantee that they uniquely refer to 91 * the intended columns, which can be assured with the SQL <i>AS</i> clause. 92 * <P> 93 * A set of updater methods were added to this interface 94 * in the JDBC 2.0 API (Java<sup><font size=-2>TM</font></sup> 2 SDK, 95 * Standard Edition, version 1.2). The comments regarding parameters 96 * to the getter methods also apply to parameters to the 97 * updater methods. 98 *<P> 99 * The updater methods may be used in two ways: 100 * <ol> 101 * <LI>to update a column value in the current row. In a scrollable 102 * <code>ResultSet</code> object, the cursor can be moved backwards 103 * and forwards, to an absolute position, or to a position 104 * relative to the current row. 105 * The following code fragment updates the <code>NAME</code> column 106 * in the fifth row of the <code>ResultSet</code> object 107 * <code>rs</code> and then uses the method <code>updateRow</code> 108 * to update the data source table from which <code>rs</code> was derived. 109 * <PRE> 110 * 111 * rs.absolute(5); // moves the cursor to the fifth row of rs 112 * rs.updateString("NAME", "AINSWORTH"); // updates the 113 * // <code>NAME</code> column of row 5 to be <code>AINSWORTH</code> 114 * rs.updateRow(); // updates the row in the data source 115 * 116 * </PRE> 117 * <LI>to insert column values into the insert row. An updatable 118 * <code>ResultSet</code> object has a special row associated with 119 * it that serves as a staging area for building a row to be inserted. 120 * The following code fragment moves the cursor to the insert row, builds 121 * a three-column row, and inserts it into <code>rs</code> and into 122 * the data source table using the method <code>insertRow</code>. 123 * <PRE> 124 * 125 * rs.moveToInsertRow(); // moves cursor to the insert row 126 * rs.updateString(1, "AINSWORTH"); // updates the 127 * // first column of the insert row to be <code>AINSWORTH</code> 128 * rs.updateInt(2,35); // updates the second column to be <code>35</code> 129 * rs.updateBoolean(3, true); // updates the third column to <code>true</code> 130 * rs.insertRow(); 131 * rs.moveToCurrentRow(); 132 * 133 * </PRE> 134 * </ol> 135 * <P>A <code>ResultSet</code> object is automatically closed when the 136 * <code>Statement</code> object that 137 * generated it is closed, re-executed, or used 138 * to retrieve the next result from a sequence of multiple results. 139 * 140 * <P>The number, types and properties of a <code>ResultSet</code> 141 * object's columns are provided by the <code>ResultSetMetaData</code> 142 * object returned by the <code>ResultSet.getMetaData</code> method. 143 * 144 * @see Statement#executeQuery 145 * @see Statement#getResultSet 146 * @see ResultSetMetaData 147 */ 148 149 public interface ResultSet extends Wrapper, AutoCloseable { 150 151 /** 152 * Moves the cursor froward one row from its current position. 153 * A <code>ResultSet</code> cursor is initially positioned 154 * before the first row; the first call to the method 155 * <code>next</code> makes the first row the current row; the 156 * second call makes the second row the current row, and so on. 157 * <p> 158 * When a call to the <code>next</code> method returns <code>false</code>, 159 * the cursor is positioned after the last row. Any 160 * invocation of a <code>ResultSet</code> method which requires a 161 * current row will result in a <code>SQLException</code> being thrown. 162 * If the result set type is <code>TYPE_FORWARD_ONLY</code>, it is vendor specified 163 * whether their JDBC driver implementation will return <code>false</code> or 164 * throw an <code>SQLException</code> on a 165 * subsequent call to <code>next</code>. 166 * 167 * <P>If an input stream is open for the current row, a call 168 * to the method <code>next</code> will 169 * implicitly close it. A <code>ResultSet</code> object's 170 * warning chain is cleared when a new row is read. 171 * 172 * @return <code>true</code> if the new current row is valid; 173 * <code>false</code> if there are no more rows 174 * @exception SQLException if a database access error occurs or this method is 175 * called on a closed result set 176 */ next()177 boolean next() throws SQLException; 178 179 180 /** 181 * Releases this <code>ResultSet</code> object's database and 182 * JDBC resources immediately instead of waiting for 183 * this to happen when it is automatically closed. 184 * 185 * <P>The closing of a <code>ResultSet</code> object does <strong>not</strong> close the <code>Blob</code>, 186 * <code>Clob</code> or <code>NClob</code> objects created by the <code>ResultSet</code>. <code>Blob</code>, 187 * <code>Clob</code> or <code>NClob</code> objects remain valid for at least the duration of the 188 * transaction in which they are creataed, unless their <code>free</code> method is invoked. 189 *<p> 190 * When a <code>ResultSet</code> is closed, any <code>ResultSetMetaData</code> 191 * instances that were created by calling the <code>getMetaData</code> 192 * method remain accessible. 193 * 194 * <P><B>Note:</B> A <code>ResultSet</code> object 195 * is automatically closed by the 196 * <code>Statement</code> object that generated it when 197 * that <code>Statement</code> object is closed, 198 * re-executed, or is used to retrieve the next result from a 199 * sequence of multiple results. 200 *<p> 201 * Calling the method <code>close</code> on a <code>ResultSet</code> 202 * object that is already closed is a no-op. 203 * <P> 204 * <p> 205 * 206 * @exception SQLException if a database access error occurs 207 */ close()208 void close() throws SQLException; 209 210 /** 211 * Reports whether 212 * the last column read had a value of SQL <code>NULL</code>. 213 * Note that you must first call one of the getter methods 214 * on a column to try to read its value and then call 215 * the method <code>wasNull</code> to see if the value read was 216 * SQL <code>NULL</code>. 217 * 218 * @return <code>true</code> if the last column value read was SQL 219 * <code>NULL</code> and <code>false</code> otherwise 220 * @exception SQLException if a database access error occurs or this method is 221 * called on a closed result set 222 */ wasNull()223 boolean wasNull() throws SQLException; 224 225 // Methods for accessing results by column index 226 227 /** 228 * Retrieves the value of the designated column in the current row 229 * of this <code>ResultSet</code> object as 230 * a <code>String</code> in the Java programming language. 231 * 232 * @param columnIndex the first column is 1, the second is 2, ... 233 * @return the column value; if the value is SQL <code>NULL</code>, the 234 * value returned is <code>null</code> 235 * @exception SQLException if the columnIndex is not valid; 236 * if a database access error occurs or this method is 237 * called on a closed result set 238 */ getString(int columnIndex)239 String getString(int columnIndex) throws SQLException; 240 241 /** 242 * Retrieves the value of the designated column in the current row 243 * of this <code>ResultSet</code> object as 244 * a <code>boolean</code> in the Java programming language. 245 * 246 * <P>If the designated column has a datatype of CHAR or VARCHAR 247 * and contains a "0" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT 248 * and contains a 0, a value of <code>false</code> is returned. If the designated column has a datatype 249 * of CHAR or VARCHAR 250 * and contains a "1" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT 251 * and contains a 1, a value of <code>true</code> is returned. 252 * 253 * @param columnIndex the first column is 1, the second is 2, ... 254 * @return the column value; if the value is SQL <code>NULL</code>, the 255 * value returned is <code>false</code> 256 * @exception SQLException if the columnIndex is not valid; 257 * if a database access error occurs or this method is 258 * called on a closed result set 259 */ getBoolean(int columnIndex)260 boolean getBoolean(int columnIndex) throws SQLException; 261 262 /** 263 * Retrieves the value of the designated column in the current row 264 * of this <code>ResultSet</code> object as 265 * a <code>byte</code> in the Java programming language. 266 * 267 * @param columnIndex the first column is 1, the second is 2, ... 268 * @return the column value; if the value is SQL <code>NULL</code>, the 269 * value returned is <code>0</code> 270 * @exception SQLException if the columnIndex is not valid; 271 * if a database access error occurs or this method is 272 * called on a closed result set 273 */ getByte(int columnIndex)274 byte getByte(int columnIndex) throws SQLException; 275 276 /** 277 * Retrieves the value of the designated column in the current row 278 * of this <code>ResultSet</code> object as 279 * a <code>short</code> in the Java programming language. 280 * 281 * @param columnIndex the first column is 1, the second is 2, ... 282 * @return the column value; if the value is SQL <code>NULL</code>, the 283 * value returned is <code>0</code> 284 * @exception SQLException if the columnIndex is not valid; 285 * if a database access error occurs or this method is 286 * called on a closed result set 287 */ getShort(int columnIndex)288 short getShort(int columnIndex) throws SQLException; 289 290 /** 291 * Retrieves the value of the designated column in the current row 292 * of this <code>ResultSet</code> object as 293 * an <code>int</code> in the Java programming language. 294 * 295 * @param columnIndex the first column is 1, the second is 2, ... 296 * @return the column value; if the value is SQL <code>NULL</code>, the 297 * value returned is <code>0</code> 298 * @exception SQLException if the columnIndex is not valid; 299 * if a database access error occurs or this method is 300 * called on a closed result set 301 */ getInt(int columnIndex)302 int getInt(int columnIndex) throws SQLException; 303 304 /** 305 * Retrieves the value of the designated column in the current row 306 * of this <code>ResultSet</code> object as 307 * a <code>long</code> in the Java programming language. 308 * 309 * @param columnIndex the first column is 1, the second is 2, ... 310 * @return the column value; if the value is SQL <code>NULL</code>, the 311 * value returned is <code>0</code> 312 * @exception SQLException if the columnIndex is not valid; 313 * if a database access error occurs or this method is 314 * called on a closed result set 315 */ getLong(int columnIndex)316 long getLong(int columnIndex) throws SQLException; 317 318 /** 319 * Retrieves the value of the designated column in the current row 320 * of this <code>ResultSet</code> object as 321 * a <code>float</code> in the Java programming language. 322 * 323 * @param columnIndex the first column is 1, the second is 2, ... 324 * @return the column value; if the value is SQL <code>NULL</code>, the 325 * value returned is <code>0</code> 326 * @exception SQLException if the columnIndex is not valid; 327 * if a database access error occurs or this method is 328 * called on a closed result set 329 */ getFloat(int columnIndex)330 float getFloat(int columnIndex) throws SQLException; 331 332 /** 333 * Retrieves the value of the designated column in the current row 334 * of this <code>ResultSet</code> object as 335 * a <code>double</code> in the Java programming language. 336 * 337 * @param columnIndex the first column is 1, the second is 2, ... 338 * @return the column value; if the value is SQL <code>NULL</code>, the 339 * value returned is <code>0</code> 340 * @exception SQLException if the columnIndex is not valid; 341 * if a database access error occurs or this method is 342 * called on a closed result set 343 */ getDouble(int columnIndex)344 double getDouble(int columnIndex) throws SQLException; 345 346 /** 347 * Retrieves the value of the designated column in the current row 348 * of this <code>ResultSet</code> object as 349 * a <code>java.sql.BigDecimal</code> in the Java programming language. 350 * 351 * @param columnIndex the first column is 1, the second is 2, ... 352 * @param scale the number of digits to the right of the decimal point 353 * @return the column value; if the value is SQL <code>NULL</code>, the 354 * value returned is <code>null</code> 355 * @exception SQLException if the columnIndex is not valid; 356 * if a database access error occurs or this method is 357 * called on a closed result set 358 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 359 * this method 360 * @deprecated Use {@code getBigDecimal(int columnIndex)} 361 * or {@code getBigDecimal(String columnLabel)} 362 */ 363 @Deprecated getBigDecimal(int columnIndex, int scale)364 BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException; 365 366 /** 367 * Retrieves the value of the designated column in the current row 368 * of this <code>ResultSet</code> object as 369 * a <code>byte</code> array in the Java programming language. 370 * The bytes represent the raw values returned by the driver. 371 * 372 * @param columnIndex the first column is 1, the second is 2, ... 373 * @return the column value; if the value is SQL <code>NULL</code>, the 374 * value returned is <code>null</code> 375 * @exception SQLException if the columnIndex is not valid; 376 * if a database access error occurs or this method is 377 * called on a closed result set 378 */ getBytes(int columnIndex)379 byte[] getBytes(int columnIndex) throws SQLException; 380 381 /** 382 * Retrieves the value of the designated column in the current row 383 * of this <code>ResultSet</code> object as 384 * a <code>java.sql.Date</code> object in the Java programming language. 385 * 386 * @param columnIndex the first column is 1, the second is 2, ... 387 * @return the column value; if the value is SQL <code>NULL</code>, the 388 * value returned is <code>null</code> 389 * @exception SQLException if the columnIndex is not valid; 390 * if a database access error occurs or this method is 391 * called on a closed result set 392 */ getDate(int columnIndex)393 java.sql.Date getDate(int columnIndex) throws SQLException; 394 395 /** 396 * Retrieves the value of the designated column in the current row 397 * of this <code>ResultSet</code> object as 398 * a <code>java.sql.Time</code> object in the Java programming language. 399 * 400 * @param columnIndex the first column is 1, the second is 2, ... 401 * @return the column value; if the value is SQL <code>NULL</code>, the 402 * value returned is <code>null</code> 403 * @exception SQLException if the columnIndex is not valid; 404 * if a database access error occurs or this method is 405 * called on a closed result set 406 */ getTime(int columnIndex)407 java.sql.Time getTime(int columnIndex) throws SQLException; 408 409 /** 410 * Retrieves the value of the designated column in the current row 411 * of this <code>ResultSet</code> object as 412 * a <code>java.sql.Timestamp</code> object in the Java programming language. 413 * 414 * @param columnIndex the first column is 1, the second is 2, ... 415 * @return the column value; if the value is SQL <code>NULL</code>, the 416 * value returned is <code>null</code> 417 * @exception SQLException if the columnIndex is not valid; 418 * if a database access error occurs or this method is 419 * called on a closed result set 420 */ getTimestamp(int columnIndex)421 java.sql.Timestamp getTimestamp(int columnIndex) throws SQLException; 422 423 /** 424 * Retrieves the value of the designated column in the current row 425 * of this <code>ResultSet</code> object as 426 * a stream of ASCII characters. The value can then be read in chunks from the 427 * stream. This method is particularly 428 * suitable for retrieving large <code>LONGVARCHAR</code> values. 429 * The JDBC driver will 430 * do any necessary conversion from the database format into ASCII. 431 * 432 * <P><B>Note:</B> All the data in the returned stream must be 433 * read prior to getting the value of any other column. The next 434 * call to a getter method implicitly closes the stream. Also, a 435 * stream may return <code>0</code> when the method 436 * <code>InputStream.available</code> 437 * is called whether there is data available or not. 438 * 439 * @param columnIndex the first column is 1, the second is 2, ... 440 * @return a Java input stream that delivers the database column value 441 * as a stream of one-byte ASCII characters; 442 * if the value is SQL <code>NULL</code>, the 443 * value returned is <code>null</code> 444 * @exception SQLException if the columnIndex is not valid; 445 * if a database access error occurs or this method is 446 * called on a closed result set 447 */ getAsciiStream(int columnIndex)448 java.io.InputStream getAsciiStream(int columnIndex) throws SQLException; 449 450 /** 451 * Retrieves the value of the designated column in the current row 452 * of this <code>ResultSet</code> object as 453 * as a stream of two-byte 3 characters. The first byte is 454 * the high byte; the second byte is the low byte. 455 * 456 * The value can then be read in chunks from the 457 * stream. This method is particularly 458 * suitable for retrieving large <code>LONGVARCHAR</code>values. The 459 * JDBC driver will do any necessary conversion from the database 460 * format into Unicode. 461 * 462 * <P><B>Note:</B> All the data in the returned stream must be 463 * read prior to getting the value of any other column. The next 464 * call to a getter method implicitly closes the stream. 465 * Also, a stream may return <code>0</code> when the method 466 * <code>InputStream.available</code> 467 * is called, whether there is data available or not. 468 * 469 * @param columnIndex the first column is 1, the second is 2, ... 470 * @return a Java input stream that delivers the database column value 471 * as a stream of two-byte Unicode characters; 472 * if the value is SQL <code>NULL</code>, the value returned is 473 * <code>null</code> 474 * 475 * @exception SQLException if the columnIndex is not valid; 476 * if a database access error occurs or this method is 477 * called on a closed result set 478 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 479 * this method 480 * @deprecated use <code>getCharacterStream</code> in place of 481 * <code>getUnicodeStream</code> 482 */ 483 @Deprecated getUnicodeStream(int columnIndex)484 java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException; 485 486 /** 487 * Retrieves the value of the designated column in the current row 488 * of this <code>ResultSet</code> object as a stream of 489 * uninterpreted bytes. The value can then be read in chunks from the 490 * stream. This method is particularly 491 * suitable for retrieving large <code>LONGVARBINARY</code> values. 492 * 493 * <P><B>Note:</B> All the data in the returned stream must be 494 * read prior to getting the value of any other column. The next 495 * call to a getter method implicitly closes the stream. Also, a 496 * stream may return <code>0</code> when the method 497 * <code>InputStream.available</code> 498 * is called whether there is data available or not. 499 * 500 * @param columnIndex the first column is 1, the second is 2, ... 501 * @return a Java input stream that delivers the database column value 502 * as a stream of uninterpreted bytes; 503 * if the value is SQL <code>NULL</code>, the value returned is 504 * <code>null</code> 505 * @exception SQLException if the columnIndex is not valid; 506 * if a database access error occurs or this method is 507 * called on a closed result set 508 */ getBinaryStream(int columnIndex)509 java.io.InputStream getBinaryStream(int columnIndex) 510 throws SQLException; 511 512 513 // Methods for accessing results by column label 514 515 /** 516 * Retrieves the value of the designated column in the current row 517 * of this <code>ResultSet</code> object as 518 * a <code>String</code> in the Java programming language. 519 * 520 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 521 * @return the column value; if the value is SQL <code>NULL</code>, the 522 * value returned is <code>null</code> 523 * @exception SQLException if the columnLabel is not valid; 524 * if a database access error occurs or this method is 525 * called on a closed result set 526 */ getString(String columnLabel)527 String getString(String columnLabel) throws SQLException; 528 529 /** 530 * Retrieves the value of the designated column in the current row 531 * of this <code>ResultSet</code> object as 532 * a <code>boolean</code> in the Java programming language. 533 * 534 * <P>If the designated column has a datatype of CHAR or VARCHAR 535 * and contains a "0" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT 536 * and contains a 0, a value of <code>false</code> is returned. If the designated column has a datatype 537 * of CHAR or VARCHAR 538 * and contains a "1" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT 539 * and contains a 1, a value of <code>true</code> is returned. 540 * 541 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 542 * @return the column value; if the value is SQL <code>NULL</code>, the 543 * value returned is <code>false</code> 544 * @exception SQLException if the columnLabel is not valid; 545 * if a database access error occurs or this method is 546 * called on a closed result set 547 */ getBoolean(String columnLabel)548 boolean getBoolean(String columnLabel) throws SQLException; 549 550 /** 551 * Retrieves the value of the designated column in the current row 552 * of this <code>ResultSet</code> object as 553 * a <code>byte</code> in the Java programming language. 554 * 555 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 556 * @return the column value; if the value is SQL <code>NULL</code>, the 557 * value returned is <code>0</code> 558 * @exception SQLException if the columnLabel is not valid; 559 * if a database access error occurs or this method is 560 * called on a closed result set 561 */ getByte(String columnLabel)562 byte getByte(String columnLabel) throws SQLException; 563 564 /** 565 * Retrieves the value of the designated column in the current row 566 * of this <code>ResultSet</code> object as 567 * a <code>short</code> in the Java programming language. 568 * 569 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 570 * @return the column value; if the value is SQL <code>NULL</code>, the 571 * value returned is <code>0</code> 572 * @exception SQLException if the columnLabel is not valid; 573 * if a database access error occurs or this method is 574 * called on a closed result set 575 */ getShort(String columnLabel)576 short getShort(String columnLabel) throws SQLException; 577 578 /** 579 * Retrieves the value of the designated column in the current row 580 * of this <code>ResultSet</code> object as 581 * an <code>int</code> in the Java programming language. 582 * 583 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 584 * @return the column value; if the value is SQL <code>NULL</code>, the 585 * value returned is <code>0</code> 586 * @exception SQLException if the columnLabel is not valid; 587 * if a database access error occurs or this method is 588 * called on a closed result set 589 */ getInt(String columnLabel)590 int getInt(String columnLabel) throws SQLException; 591 592 /** 593 * Retrieves the value of the designated column in the current row 594 * of this <code>ResultSet</code> object as 595 * a <code>long</code> in the Java programming language. 596 * 597 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 598 * @return the column value; if the value is SQL <code>NULL</code>, the 599 * value returned is <code>0</code> 600 * @exception SQLException if the columnLabel is not valid; 601 * if a database access error occurs or this method is 602 * called on a closed result set 603 */ getLong(String columnLabel)604 long getLong(String columnLabel) throws SQLException; 605 606 /** 607 * Retrieves the value of the designated column in the current row 608 * of this <code>ResultSet</code> object as 609 * a <code>float</code> in the Java programming language. 610 * 611 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 612 * @return the column value; if the value is SQL <code>NULL</code>, the 613 * value returned is <code>0</code> 614 * @exception SQLException if the columnLabel is not valid; 615 * if a database access error occurs or this method is 616 * called on a closed result set 617 */ getFloat(String columnLabel)618 float getFloat(String columnLabel) throws SQLException; 619 620 /** 621 * Retrieves the value of the designated column in the current row 622 * of this <code>ResultSet</code> object as 623 * a <code>double</code> in the Java programming language. 624 * 625 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 626 * @return the column value; if the value is SQL <code>NULL</code>, the 627 * value returned is <code>0</code> 628 * @exception SQLException if the columnLabel is not valid; 629 * if a database access error occurs or this method is 630 * called on a closed result set 631 */ getDouble(String columnLabel)632 double getDouble(String columnLabel) throws SQLException; 633 634 /** 635 * Retrieves the value of the designated column in the current row 636 * of this <code>ResultSet</code> object as 637 * a <code>java.math.BigDecimal</code> in the Java programming language. 638 * 639 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 640 * @param scale the number of digits to the right of the decimal point 641 * @return the column value; if the value is SQL <code>NULL</code>, the 642 * value returned is <code>null</code> 643 * @exception SQLException if the columnLabel is not valid; 644 * if a database access error occurs or this method is 645 * called on a closed result set 646 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 647 * this method 648 * @deprecated Use {@code getBigDecimal(int columnIndex)} 649 * or {@code getBigDecimal(String columnLabel)} 650 */ 651 @Deprecated getBigDecimal(String columnLabel, int scale)652 BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException; 653 654 /** 655 * Retrieves the value of the designated column in the current row 656 * of this <code>ResultSet</code> object as 657 * a <code>byte</code> array in the Java programming language. 658 * The bytes represent the raw values returned by the driver. 659 * 660 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 661 * @return the column value; if the value is SQL <code>NULL</code>, the 662 * value returned is <code>null</code> 663 * @exception SQLException if the columnLabel is not valid; 664 * if a database access error occurs or this method is 665 * called on a closed result set 666 */ getBytes(String columnLabel)667 byte[] getBytes(String columnLabel) throws SQLException; 668 669 /** 670 * Retrieves the value of the designated column in the current row 671 * of this <code>ResultSet</code> object as 672 * a <code>java.sql.Date</code> object in the Java programming language. 673 * 674 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 675 * @return the column value; if the value is SQL <code>NULL</code>, the 676 * value returned is <code>null</code> 677 * @exception SQLException if the columnLabel is not valid; 678 * if a database access error occurs or this method is 679 * called on a closed result set 680 */ getDate(String columnLabel)681 java.sql.Date getDate(String columnLabel) throws SQLException; 682 683 /** 684 * Retrieves the value of the designated column in the current row 685 * of this <code>ResultSet</code> object as 686 * a <code>java.sql.Time</code> object in the Java programming language. 687 * 688 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 689 * @return the column value; 690 * if the value is SQL <code>NULL</code>, 691 * the value returned is <code>null</code> 692 * @exception SQLException if the columnLabel is not valid; 693 * if a database access error occurs or this method is 694 * called on a closed result set 695 */ getTime(String columnLabel)696 java.sql.Time getTime(String columnLabel) throws SQLException; 697 698 /** 699 * Retrieves the value of the designated column in the current row 700 * of this <code>ResultSet</code> object as 701 * a <code>java.sql.Timestamp</code> object in the Java programming language. 702 * 703 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 704 * @return the column value; if the value is SQL <code>NULL</code>, the 705 * value returned is <code>null</code> 706 * @exception SQLException if the columnLabel is not valid; 707 * if a database access error occurs or this method is 708 * called on a closed result set 709 */ getTimestamp(String columnLabel)710 java.sql.Timestamp getTimestamp(String columnLabel) throws SQLException; 711 712 /** 713 * Retrieves the value of the designated column in the current row 714 * of this <code>ResultSet</code> object as a stream of 715 * ASCII characters. The value can then be read in chunks from the 716 * stream. This method is particularly 717 * suitable for retrieving large <code>LONGVARCHAR</code> values. 718 * The JDBC driver will 719 * do any necessary conversion from the database format into ASCII. 720 * 721 * <P><B>Note:</B> All the data in the returned stream must be 722 * read prior to getting the value of any other column. The next 723 * call to a getter method implicitly closes the stream. Also, a 724 * stream may return <code>0</code> when the method <code>available</code> 725 * is called whether there is data available or not. 726 * 727 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 728 * @return a Java input stream that delivers the database column value 729 * as a stream of one-byte ASCII characters. 730 * If the value is SQL <code>NULL</code>, 731 * the value returned is <code>null</code>. 732 * @exception SQLException if the columnLabel is not valid; 733 * if a database access error occurs or this method is 734 * called on a closed result set 735 */ getAsciiStream(String columnLabel)736 java.io.InputStream getAsciiStream(String columnLabel) throws SQLException; 737 738 /** 739 * Retrieves the value of the designated column in the current row 740 * of this <code>ResultSet</code> object as a stream of two-byte 741 * Unicode characters. The first byte is the high byte; the second 742 * byte is the low byte. 743 * 744 * The value can then be read in chunks from the 745 * stream. This method is particularly 746 * suitable for retrieving large <code>LONGVARCHAR</code> values. 747 * The JDBC technology-enabled driver will 748 * do any necessary conversion from the database format into Unicode. 749 * 750 * <P><B>Note:</B> All the data in the returned stream must be 751 * read prior to getting the value of any other column. The next 752 * call to a getter method implicitly closes the stream. 753 * Also, a stream may return <code>0</code> when the method 754 * <code>InputStream.available</code> is called, whether there 755 * is data available or not. 756 * 757 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 758 * @return a Java input stream that delivers the database column value 759 * as a stream of two-byte Unicode characters. 760 * If the value is SQL <code>NULL</code>, the value returned 761 * is <code>null</code>. 762 * @exception SQLException if the columnLabel is not valid; 763 * if a database access error occurs or this method is 764 * called on a closed result set 765 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 766 * this method 767 * @deprecated use <code>getCharacterStream</code> instead 768 */ 769 @Deprecated getUnicodeStream(String columnLabel)770 java.io.InputStream getUnicodeStream(String columnLabel) throws SQLException; 771 772 /** 773 * Retrieves the value of the designated column in the current row 774 * of this <code>ResultSet</code> object as a stream of uninterpreted 775 * <code>byte</code>s. 776 * The value can then be read in chunks from the 777 * stream. This method is particularly 778 * suitable for retrieving large <code>LONGVARBINARY</code> 779 * values. 780 * 781 * <P><B>Note:</B> All the data in the returned stream must be 782 * read prior to getting the value of any other column. The next 783 * call to a getter method implicitly closes the stream. Also, a 784 * stream may return <code>0</code> when the method <code>available</code> 785 * is called whether there is data available or not. 786 * 787 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 788 * @return a Java input stream that delivers the database column value 789 * as a stream of uninterpreted bytes; 790 * if the value is SQL <code>NULL</code>, the result is <code>null</code> 791 * @exception SQLException if the columnLabel is not valid; 792 * if a database access error occurs or this method is 793 * called on a closed result set 794 */ getBinaryStream(String columnLabel)795 java.io.InputStream getBinaryStream(String columnLabel) 796 throws SQLException; 797 798 799 // Advanced features: 800 801 /** 802 * Retrieves the first warning reported by calls on this 803 * <code>ResultSet</code> object. 804 * Subsequent warnings on this <code>ResultSet</code> object 805 * will be chained to the <code>SQLWarning</code> object that 806 * this method returns. 807 * 808 * <P>The warning chain is automatically cleared each time a new 809 * row is read. This method may not be called on a <code>ResultSet</code> 810 * object that has been closed; doing so will cause an 811 * <code>SQLException</code> to be thrown. 812 * <P> 813 * <B>Note:</B> This warning chain only covers warnings caused 814 * by <code>ResultSet</code> methods. Any warning caused by 815 * <code>Statement</code> methods 816 * (such as reading OUT parameters) will be chained on the 817 * <code>Statement</code> object. 818 * 819 * @return the first <code>SQLWarning</code> object reported or 820 * <code>null</code> if there are none 821 * @exception SQLException if a database access error occurs or this method is 822 * called on a closed result set 823 */ getWarnings()824 SQLWarning getWarnings() throws SQLException; 825 826 /** 827 * Clears all warnings reported on this <code>ResultSet</code> object. 828 * After this method is called, the method <code>getWarnings</code> 829 * returns <code>null</code> until a new warning is 830 * reported for this <code>ResultSet</code> object. 831 * 832 * @exception SQLException if a database access error occurs or this method is 833 * called on a closed result set 834 */ clearWarnings()835 void clearWarnings() throws SQLException; 836 837 /** 838 * Retrieves the name of the SQL cursor used by this <code>ResultSet</code> 839 * object. 840 * 841 * <P>In SQL, a result table is retrieved through a cursor that is 842 * named. The current row of a result set can be updated or deleted 843 * using a positioned update/delete statement that references the 844 * cursor name. To insure that the cursor has the proper isolation 845 * level to support update, the cursor's <code>SELECT</code> statement 846 * should be of the form <code>SELECT FOR UPDATE</code>. If 847 * <code>FOR UPDATE</code> is omitted, the positioned updates may fail. 848 * 849 * <P>The JDBC API supports this SQL feature by providing the name of the 850 * SQL cursor used by a <code>ResultSet</code> object. 851 * The current row of a <code>ResultSet</code> object 852 * is also the current row of this SQL cursor. 853 * 854 * @return the SQL name for this <code>ResultSet</code> object's cursor 855 * @exception SQLException if a database access error occurs or this method is called on a closed result set 856 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 857 * this method 858 */ getCursorName()859 String getCursorName() throws SQLException; 860 861 /** 862 * Retrieves the number, types and properties of 863 * this <code>ResultSet</code> object's columns. 864 * 865 * @return the description of this <code>ResultSet</code> object's columns 866 * @exception SQLException if a database access error occurs or this method is 867 * called on a closed result set 868 */ getMetaData()869 ResultSetMetaData getMetaData() throws SQLException; 870 871 /** 872 * <p>Gets the value of the designated column in the current row 873 * of this <code>ResultSet</code> object as 874 * an <code>Object</code> in the Java programming language. 875 * 876 * <p>This method will return the value of the given column as a 877 * Java object. The type of the Java object will be the default 878 * Java object type corresponding to the column's SQL type, 879 * following the mapping for built-in types specified in the JDBC 880 * specification. If the value is an SQL <code>NULL</code>, 881 * the driver returns a Java <code>null</code>. 882 * 883 * <p>This method may also be used to read database-specific 884 * abstract data types. 885 * 886 * In the JDBC 2.0 API, the behavior of method 887 * <code>getObject</code> is extended to materialize 888 * data of SQL user-defined types. 889 * <p> 890 * If <code>Connection.getTypeMap</code> does not throw a 891 * <code>SQLFeatureNotSupportedException</code>, 892 * then when a column contains a structured or distinct value, 893 * the behavior of this method is as 894 * if it were a call to: <code>getObject(columnIndex, 895 * this.getStatement().getConnection().getTypeMap())</code>. 896 * 897 * If <code>Connection.getTypeMap</code> does throw a 898 * <code>SQLFeatureNotSupportedException</code>, 899 * then structured values are not supported, and distinct values 900 * are mapped to the default Java class as determined by the 901 * underlying SQL type of the DISTINCT type. 902 * 903 * @param columnIndex the first column is 1, the second is 2, ... 904 * @return a <code>java.lang.Object</code> holding the column value 905 * @exception SQLException if the columnIndex is not valid; 906 * if a database access error occurs or this method is 907 * called on a closed result set 908 */ getObject(int columnIndex)909 Object getObject(int columnIndex) throws SQLException; 910 911 /** 912 * <p>Gets the value of the designated column in the current row 913 * of this <code>ResultSet</code> object as 914 * an <code>Object</code> in the Java programming language. 915 * 916 * <p>This method will return the value of the given column as a 917 * Java object. The type of the Java object will be the default 918 * Java object type corresponding to the column's SQL type, 919 * following the mapping for built-in types specified in the JDBC 920 * specification. If the value is an SQL <code>NULL</code>, 921 * the driver returns a Java <code>null</code>. 922 * <P> 923 * This method may also be used to read database-specific 924 * abstract data types. 925 * <P> 926 * In the JDBC 2.0 API, the behavior of the method 927 * <code>getObject</code> is extended to materialize 928 * data of SQL user-defined types. When a column contains 929 * a structured or distinct value, the behavior of this method is as 930 * if it were a call to: <code>getObject(columnIndex, 931 * this.getStatement().getConnection().getTypeMap())</code>. 932 * 933 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 934 * @return a <code>java.lang.Object</code> holding the column value 935 * @exception SQLException if the columnLabel is not valid; 936 * if a database access error occurs or this method is 937 * called on a closed result set 938 */ getObject(String columnLabel)939 Object getObject(String columnLabel) throws SQLException; 940 941 //---------------------------------------------------------------- 942 943 /** 944 * Maps the given <code>ResultSet</code> column label to its 945 * <code>ResultSet</code> column index. 946 * 947 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 948 * @return the column index of the given column name 949 * @exception SQLException if the <code>ResultSet</code> object 950 * does not contain a column labeled <code>columnLabel</code>, a database access error occurs 951 * or this method is called on a closed result set 952 */ findColumn(String columnLabel)953 int findColumn(String columnLabel) throws SQLException; 954 955 956 //--------------------------JDBC 2.0----------------------------------- 957 958 //--------------------------------------------------------------------- 959 // Getters and Setters 960 //--------------------------------------------------------------------- 961 962 /** 963 * Retrieves the value of the designated column in the current row 964 * of this <code>ResultSet</code> object as a 965 * <code>java.io.Reader</code> object. 966 * @return a <code>java.io.Reader</code> object that contains the column 967 * value; if the value is SQL <code>NULL</code>, the value returned is 968 * <code>null</code> in the Java programming language. 969 * @param columnIndex the first column is 1, the second is 2, ... 970 * @exception SQLException if the columnIndex is not valid; 971 * if a database access error occurs or this method is 972 * called on a closed result set 973 * @since 1.2 974 */ getCharacterStream(int columnIndex)975 java.io.Reader getCharacterStream(int columnIndex) throws SQLException; 976 977 /** 978 * Retrieves the value of the designated column in the current row 979 * of this <code>ResultSet</code> object as a 980 * <code>java.io.Reader</code> object. 981 * 982 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 983 * @return a <code>java.io.Reader</code> object that contains the column 984 * value; if the value is SQL <code>NULL</code>, the value returned is 985 * <code>null</code> in the Java programming language 986 * @exception SQLException if the columnLabel is not valid; 987 * if a database access error occurs or this method is 988 * called on a closed result set 989 * @since 1.2 990 */ getCharacterStream(String columnLabel)991 java.io.Reader getCharacterStream(String columnLabel) throws SQLException; 992 993 /** 994 * Retrieves the value of the designated column in the current row 995 * of this <code>ResultSet</code> object as a 996 * <code>java.math.BigDecimal</code> with full precision. 997 * 998 * @param columnIndex the first column is 1, the second is 2, ... 999 * @return the column value (full precision); 1000 * if the value is SQL <code>NULL</code>, the value returned is 1001 * <code>null</code> in the Java programming language. 1002 * @exception SQLException if the columnIndex is not valid; 1003 * if a database access error occurs or this method is 1004 * called on a closed result set 1005 * @since 1.2 1006 */ getBigDecimal(int columnIndex)1007 BigDecimal getBigDecimal(int columnIndex) throws SQLException; 1008 1009 /** 1010 * Retrieves the value of the designated column in the current row 1011 * of this <code>ResultSet</code> object as a 1012 * <code>java.math.BigDecimal</code> with full precision. 1013 * 1014 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 1015 * @return the column value (full precision); 1016 * if the value is SQL <code>NULL</code>, the value returned is 1017 * <code>null</code> in the Java programming language. 1018 * @exception SQLException if the columnLabel is not valid; 1019 * if a database access error occurs or this method is 1020 * called on a closed result set 1021 * @since 1.2 1022 * 1023 */ getBigDecimal(String columnLabel)1024 BigDecimal getBigDecimal(String columnLabel) throws SQLException; 1025 1026 //--------------------------------------------------------------------- 1027 // Traversal/Positioning 1028 //--------------------------------------------------------------------- 1029 1030 /** 1031 * Retrieves whether the cursor is before the first row in 1032 * this <code>ResultSet</code> object. 1033 * <p> 1034 * <strong>Note:</strong>Support for the <code>isBeforeFirst</code> method 1035 * is optional for <code>ResultSet</code>s with a result 1036 * set type of <code>TYPE_FORWARD_ONLY</code> 1037 * 1038 * @return <code>true</code> if the cursor is before the first row; 1039 * <code>false</code> if the cursor is at any other position or the 1040 * result set contains no rows 1041 * @exception SQLException if a database access error occurs or this method is 1042 * called on a closed result set 1043 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1044 * this method 1045 * @since 1.2 1046 */ isBeforeFirst()1047 boolean isBeforeFirst() throws SQLException; 1048 1049 /** 1050 * Retrieves whether the cursor is after the last row in 1051 * this <code>ResultSet</code> object. 1052 * <p> 1053 * <strong>Note:</strong>Support for the <code>isAfterLast</code> method 1054 * is optional for <code>ResultSet</code>s with a result 1055 * set type of <code>TYPE_FORWARD_ONLY</code> 1056 * 1057 * @return <code>true</code> if the cursor is after the last row; 1058 * <code>false</code> if the cursor is at any other position or the 1059 * result set contains no rows 1060 * @exception SQLException if a database access error occurs or this method is 1061 * called on a closed result set 1062 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1063 * this method 1064 * @since 1.2 1065 */ isAfterLast()1066 boolean isAfterLast() throws SQLException; 1067 1068 /** 1069 * Retrieves whether the cursor is on the first row of 1070 * this <code>ResultSet</code> object. 1071 * <p> 1072 * <strong>Note:</strong>Support for the <code>isFirst</code> method 1073 * is optional for <code>ResultSet</code>s with a result 1074 * set type of <code>TYPE_FORWARD_ONLY</code> 1075 * 1076 * @return <code>true</code> if the cursor is on the first row; 1077 * <code>false</code> otherwise 1078 * @exception SQLException if a database access error occurs or this method is 1079 * called on a closed result set 1080 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1081 * this method 1082 * @since 1.2 1083 */ isFirst()1084 boolean isFirst() throws SQLException; 1085 1086 /** 1087 * Retrieves whether the cursor is on the last row of 1088 * this <code>ResultSet</code> object. 1089 * <strong>Note:</strong> Calling the method <code>isLast</code> may be expensive 1090 * because the JDBC driver 1091 * might need to fetch ahead one row in order to determine 1092 * whether the current row is the last row in the result set. 1093 * <p> 1094 * <strong>Note:</strong> Support for the <code>isLast</code> method 1095 * is optional for <code>ResultSet</code>s with a result 1096 * set type of <code>TYPE_FORWARD_ONLY</code> 1097 * @return <code>true</code> if the cursor is on the last row; 1098 * <code>false</code> otherwise 1099 * @exception SQLException if a database access error occurs or this method is 1100 * called on a closed result set 1101 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1102 * this method 1103 * @since 1.2 1104 */ isLast()1105 boolean isLast() throws SQLException; 1106 1107 /** 1108 * Moves the cursor to the front of 1109 * this <code>ResultSet</code> object, just before the 1110 * first row. This method has no effect if the result set contains no rows. 1111 * 1112 * @exception SQLException if a database access error 1113 * occurs; this method is called on a closed result set or the 1114 * result set type is <code>TYPE_FORWARD_ONLY</code> 1115 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1116 * this method 1117 * @since 1.2 1118 */ beforeFirst()1119 void beforeFirst() throws SQLException; 1120 1121 /** 1122 * Moves the cursor to the end of 1123 * this <code>ResultSet</code> object, just after the 1124 * last row. This method has no effect if the result set contains no rows. 1125 * @exception SQLException if a database access error 1126 * occurs; this method is called on a closed result set 1127 * or the result set type is <code>TYPE_FORWARD_ONLY</code> 1128 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1129 * this method 1130 * @since 1.2 1131 */ afterLast()1132 void afterLast() throws SQLException; 1133 1134 /** 1135 * Moves the cursor to the first row in 1136 * this <code>ResultSet</code> object. 1137 * 1138 * @return <code>true</code> if the cursor is on a valid row; 1139 * <code>false</code> if there are no rows in the result set 1140 * @exception SQLException if a database access error 1141 * occurs; this method is called on a closed result set 1142 * or the result set type is <code>TYPE_FORWARD_ONLY</code> 1143 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1144 * this method 1145 * @since 1.2 1146 */ first()1147 boolean first() throws SQLException; 1148 1149 /** 1150 * Moves the cursor to the last row in 1151 * this <code>ResultSet</code> object. 1152 * 1153 * @return <code>true</code> if the cursor is on a valid row; 1154 * <code>false</code> if there are no rows in the result set 1155 * @exception SQLException if a database access error 1156 * occurs; this method is called on a closed result set 1157 * or the result set type is <code>TYPE_FORWARD_ONLY</code> 1158 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1159 * this method 1160 * @since 1.2 1161 */ last()1162 boolean last() throws SQLException; 1163 1164 /** 1165 * Retrieves the current row number. The first row is number 1, the 1166 * second number 2, and so on. 1167 * <p> 1168 * <strong>Note:</strong>Support for the <code>getRow</code> method 1169 * is optional for <code>ResultSet</code>s with a result 1170 * set type of <code>TYPE_FORWARD_ONLY</code> 1171 * 1172 * @return the current row number; <code>0</code> if there is no current row 1173 * @exception SQLException if a database access error occurs 1174 * or this method is called on a closed result set 1175 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1176 * this method 1177 * @since 1.2 1178 */ getRow()1179 int getRow() throws SQLException; 1180 1181 /** 1182 * Moves the cursor to the given row number in 1183 * this <code>ResultSet</code> object. 1184 * 1185 * <p>If the row number is positive, the cursor moves to 1186 * the given row number with respect to the 1187 * beginning of the result set. The first row is row 1, the second 1188 * is row 2, and so on. 1189 * 1190 * <p>If the given row number is negative, the cursor moves to 1191 * an absolute row position with respect to 1192 * the end of the result set. For example, calling the method 1193 * <code>absolute(-1)</code> positions the 1194 * cursor on the last row; calling the method <code>absolute(-2)</code> 1195 * moves the cursor to the next-to-last row, and so on. 1196 * 1197 * <p>If the row number specified is zero, the cursor is moved to 1198 * before the first row. 1199 * 1200 * <p>An attempt to position the cursor beyond the first/last row in 1201 * the result set leaves the cursor before the first row or after 1202 * the last row. 1203 * 1204 * <p><B>Note:</B> Calling <code>absolute(1)</code> is the same 1205 * as calling <code>first()</code>. Calling <code>absolute(-1)</code> 1206 * is the same as calling <code>last()</code>. 1207 * 1208 * @param row the number of the row to which the cursor should move. 1209 * A value of zero indicates that the cursor will be positioned 1210 * before the first row; a positive number indicates the row number 1211 * counting from the beginning of the result set; a negative number 1212 * indicates the row number counting from the end of the result set 1213 * @return <code>true</code> if the cursor is moved to a position in this 1214 * <code>ResultSet</code> object; 1215 * <code>false</code> if the cursor is before the first row or after the 1216 * last row 1217 * @exception SQLException if a database access error 1218 * occurs; this method is called on a closed result set 1219 * or the result set type is <code>TYPE_FORWARD_ONLY</code> 1220 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1221 * this method 1222 * @since 1.2 1223 */ absolute( int row )1224 boolean absolute( int row ) throws SQLException; 1225 1226 /** 1227 * Moves the cursor a relative number of rows, either positive or negative. 1228 * Attempting to move beyond the first/last row in the 1229 * result set positions the cursor before/after the 1230 * the first/last row. Calling <code>relative(0)</code> is valid, but does 1231 * not change the cursor position. 1232 * 1233 * <p>Note: Calling the method <code>relative(1)</code> 1234 * is identical to calling the method <code>next()</code> and 1235 * calling the method <code>relative(-1)</code> is identical 1236 * to calling the method <code>previous()</code>. 1237 * 1238 * @param rows an <code>int</code> specifying the number of rows to 1239 * move from the current row; a positive number moves the cursor 1240 * forward; a negative number moves the cursor backward 1241 * @return <code>true</code> if the cursor is on a row; 1242 * <code>false</code> otherwise 1243 * @exception SQLException if a database access error occurs; this method 1244 * is called on a closed result set or the result set type is 1245 * <code>TYPE_FORWARD_ONLY</code> 1246 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1247 * this method 1248 * @since 1.2 1249 */ relative( int rows )1250 boolean relative( int rows ) throws SQLException; 1251 1252 /** 1253 * Moves the cursor to the previous row in this 1254 * <code>ResultSet</code> object. 1255 *<p> 1256 * When a call to the <code>previous</code> method returns <code>false</code>, 1257 * the cursor is positioned before the first row. Any invocation of a 1258 * <code>ResultSet</code> method which requires a current row will result in a 1259 * <code>SQLException</code> being thrown. 1260 *<p> 1261 * If an input stream is open for the current row, a call to the method 1262 * <code>previous</code> will implicitly close it. A <code>ResultSet</code> 1263 * object's warning change is cleared when a new row is read. 1264 *<p> 1265 * 1266 * @return <code>true</code> if the cursor is now positioned on a valid row; 1267 * <code>false</code> if the cursor is positioned before the first row 1268 * @exception SQLException if a database access error 1269 * occurs; this method is called on a closed result set 1270 * or the result set type is <code>TYPE_FORWARD_ONLY</code> 1271 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1272 * this method 1273 * @since 1.2 1274 */ previous()1275 boolean previous() throws SQLException; 1276 1277 //--------------------------------------------------------------------- 1278 // Properties 1279 //--------------------------------------------------------------------- 1280 1281 /** 1282 * The constant indicating that the rows in a result set will be 1283 * processed in a forward direction; first-to-last. 1284 * This constant is used by the method <code>setFetchDirection</code> 1285 * as a hint to the driver, which the driver may ignore. 1286 * @since 1.2 1287 */ 1288 int FETCH_FORWARD = 1000; 1289 1290 /** 1291 * The constant indicating that the rows in a result set will be 1292 * processed in a reverse direction; last-to-first. 1293 * This constant is used by the method <code>setFetchDirection</code> 1294 * as a hint to the driver, which the driver may ignore. 1295 * @since 1.2 1296 */ 1297 int FETCH_REVERSE = 1001; 1298 1299 /** 1300 * The constant indicating that the order in which rows in a 1301 * result set will be processed is unknown. 1302 * This constant is used by the method <code>setFetchDirection</code> 1303 * as a hint to the driver, which the driver may ignore. 1304 */ 1305 int FETCH_UNKNOWN = 1002; 1306 1307 /** 1308 * Gives a hint as to the direction in which the rows in this 1309 * <code>ResultSet</code> object will be processed. 1310 * The initial value is determined by the 1311 * <code>Statement</code> object 1312 * that produced this <code>ResultSet</code> object. 1313 * The fetch direction may be changed at any time. 1314 * 1315 * @param direction an <code>int</code> specifying the suggested 1316 * fetch direction; one of <code>ResultSet.FETCH_FORWARD</code>, 1317 * <code>ResultSet.FETCH_REVERSE</code>, or 1318 * <code>ResultSet.FETCH_UNKNOWN</code> 1319 * @exception SQLException if a database access error occurs; this 1320 * method is called on a closed result set or 1321 * the result set type is <code>TYPE_FORWARD_ONLY</code> and the fetch 1322 * direction is not <code>FETCH_FORWARD</code> 1323 * @since 1.2 1324 * @see Statement#setFetchDirection 1325 * @see #getFetchDirection 1326 */ setFetchDirection(int direction)1327 void setFetchDirection(int direction) throws SQLException; 1328 1329 /** 1330 * Retrieves the fetch direction for this 1331 * <code>ResultSet</code> object. 1332 * 1333 * @return the current fetch direction for this <code>ResultSet</code> object 1334 * @exception SQLException if a database access error occurs 1335 * or this method is called on a closed result set 1336 * @since 1.2 1337 * @see #setFetchDirection 1338 */ getFetchDirection()1339 int getFetchDirection() throws SQLException; 1340 1341 /** 1342 * Gives the JDBC driver a hint as to the number of rows that should 1343 * be fetched from the database when more rows are needed for this 1344 * <code>ResultSet</code> object. 1345 * If the fetch size specified is zero, the JDBC driver 1346 * ignores the value and is free to make its own best guess as to what 1347 * the fetch size should be. The default value is set by the 1348 * <code>Statement</code> object 1349 * that created the result set. The fetch size may be changed at any time. 1350 * 1351 * @param rows the number of rows to fetch 1352 * @exception SQLException if a database access error occurs; this method 1353 * is called on a closed result set or the 1354 * condition <code>rows >= 0 </code> is not satisfied 1355 * @since 1.2 1356 * @see #getFetchSize 1357 */ setFetchSize(int rows)1358 void setFetchSize(int rows) throws SQLException; 1359 1360 /** 1361 * Retrieves the fetch size for this 1362 * <code>ResultSet</code> object. 1363 * 1364 * @return the current fetch size for this <code>ResultSet</code> object 1365 * @exception SQLException if a database access error occurs 1366 * or this method is called on a closed result set 1367 * @since 1.2 1368 * @see #setFetchSize 1369 */ getFetchSize()1370 int getFetchSize() throws SQLException; 1371 1372 /** 1373 * The constant indicating the type for a <code>ResultSet</code> object 1374 * whose cursor may move only forward. 1375 * @since 1.2 1376 */ 1377 int TYPE_FORWARD_ONLY = 1003; 1378 1379 /** 1380 * The constant indicating the type for a <code>ResultSet</code> object 1381 * that is scrollable but generally not sensitive to changes to the data 1382 * that underlies the <code>ResultSet</code>. 1383 * @since 1.2 1384 */ 1385 int TYPE_SCROLL_INSENSITIVE = 1004; 1386 1387 /** 1388 * The constant indicating the type for a <code>ResultSet</code> object 1389 * that is scrollable and generally sensitive to changes to the data 1390 * that underlies the <code>ResultSet</code>. 1391 * @since 1.2 1392 */ 1393 int TYPE_SCROLL_SENSITIVE = 1005; 1394 1395 /** 1396 * Retrieves the type of this <code>ResultSet</code> object. 1397 * The type is determined by the <code>Statement</code> object 1398 * that created the result set. 1399 * 1400 * @return <code>ResultSet.TYPE_FORWARD_ONLY</code>, 1401 * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, 1402 * or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> 1403 * @exception SQLException if a database access error occurs 1404 * or this method is called on a closed result set 1405 * @since 1.2 1406 */ getType()1407 int getType() throws SQLException; 1408 1409 /** 1410 * The constant indicating the concurrency mode for a 1411 * <code>ResultSet</code> object that may NOT be updated. 1412 * @since 1.2 1413 */ 1414 int CONCUR_READ_ONLY = 1007; 1415 1416 /** 1417 * The constant indicating the concurrency mode for a 1418 * <code>ResultSet</code> object that may be updated. 1419 * @since 1.2 1420 */ 1421 int CONCUR_UPDATABLE = 1008; 1422 1423 /** 1424 * Retrieves the concurrency mode of this <code>ResultSet</code> object. 1425 * The concurrency used is determined by the 1426 * <code>Statement</code> object that created the result set. 1427 * 1428 * @return the concurrency type, either 1429 * <code>ResultSet.CONCUR_READ_ONLY</code> 1430 * or <code>ResultSet.CONCUR_UPDATABLE</code> 1431 * @exception SQLException if a database access error occurs 1432 * or this method is called on a closed result set 1433 * @since 1.2 1434 */ getConcurrency()1435 int getConcurrency() throws SQLException; 1436 1437 //--------------------------------------------------------------------- 1438 // Updates 1439 //--------------------------------------------------------------------- 1440 1441 /** 1442 * Retrieves whether the current row has been updated. The value returned 1443 * depends on whether or not the result set can detect updates. 1444 * <p> 1445 * <strong>Note:</strong> Support for the <code>rowUpdated</code> method is optional with a result set 1446 * concurrency of <code>CONCUR_READ_ONLY</code> 1447 * @return <code>true</code> if the current row is detected to 1448 * have been visibly updated by the owner or another; <code>false</code> otherwise 1449 * @exception SQLException if a database access error occurs 1450 * or this method is called on a closed result set 1451 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1452 * this method 1453 * @see DatabaseMetaData#updatesAreDetected 1454 * @since 1.2 1455 */ rowUpdated()1456 boolean rowUpdated() throws SQLException; 1457 1458 /** 1459 * Retrieves whether the current row has had an insertion. 1460 * The value returned depends on whether or not this 1461 * <code>ResultSet</code> object can detect visible inserts. 1462 * <p> 1463 * <strong>Note:</strong> Support for the <code>rowInserted</code> method is optional with a result set 1464 * concurrency of <code>CONCUR_READ_ONLY</code> 1465 * @return <code>true</code> if the current row is detected to 1466 * have been inserted; <code>false</code> otherwise 1467 * @exception SQLException if a database access error occurs 1468 * or this method is called on a closed result set 1469 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1470 * this method 1471 * 1472 * @see DatabaseMetaData#insertsAreDetected 1473 * @since 1.2 1474 */ rowInserted()1475 boolean rowInserted() throws SQLException; 1476 1477 /** 1478 * Retrieves whether a row has been deleted. A deleted row may leave 1479 * a visible "hole" in a result set. This method can be used to 1480 * detect holes in a result set. The value returned depends on whether 1481 * or not this <code>ResultSet</code> object can detect deletions. 1482 * <p> 1483 * <strong>Note:</strong> Support for the <code>rowDeleted</code> method is optional with a result set 1484 * concurrency of <code>CONCUR_READ_ONLY</code> 1485 * @return <code>true</code> if the current row is detected to 1486 * have been deleted by the owner or another; <code>false</code> otherwise 1487 * @exception SQLException if a database access error occurs 1488 * or this method is called on a closed result set 1489 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1490 * this method 1491 * 1492 * @see DatabaseMetaData#deletesAreDetected 1493 * @since 1.2 1494 */ rowDeleted()1495 boolean rowDeleted() throws SQLException; 1496 1497 /** 1498 * Updates the designated column with a <code>null</code> value. 1499 * 1500 * The updater methods are used to update column values in the 1501 * current row or the insert row. The updater methods do not 1502 * update the underlying database; instead the <code>updateRow</code> 1503 * or <code>insertRow</code> methods are called to update the database. 1504 * 1505 * @param columnIndex the first column is 1, the second is 2, ... 1506 * @exception SQLException if the columnIndex is not valid; 1507 * if a database access error occurs; 1508 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1509 * or this method is called on a closed result set 1510 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1511 * this method 1512 * @since 1.2 1513 */ updateNull(int columnIndex)1514 void updateNull(int columnIndex) throws SQLException; 1515 1516 /** 1517 * Updates the designated column with a <code>boolean</code> value. 1518 * The updater methods are used to update column values in the 1519 * current row or the insert row. The updater methods do not 1520 * update the underlying database; instead the <code>updateRow</code> or 1521 * <code>insertRow</code> methods are called to update the database. 1522 * 1523 * @param columnIndex the first column is 1, the second is 2, ... 1524 * @param x the new column value 1525 * @exception SQLException if the columnIndex is not valid; 1526 * if a database access error occurs; 1527 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1528 * or this method is called on a closed result set 1529 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1530 * this method 1531 * @since 1.2 1532 */ updateBoolean(int columnIndex, boolean x)1533 void updateBoolean(int columnIndex, boolean x) throws SQLException; 1534 1535 /** 1536 * Updates the designated column with a <code>byte</code> value. 1537 * The updater methods are used to update column values in the 1538 * current row or the insert row. The updater methods do not 1539 * update the underlying database; instead the <code>updateRow</code> or 1540 * <code>insertRow</code> methods are called to update the database. 1541 * 1542 * 1543 * @param columnIndex the first column is 1, the second is 2, ... 1544 * @param x the new column value 1545 * @exception SQLException if the columnIndex is not valid; 1546 * if a database access error occurs; 1547 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1548 * or this method is called on a closed result set 1549 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1550 * this method 1551 * @since 1.2 1552 */ updateByte(int columnIndex, byte x)1553 void updateByte(int columnIndex, byte x) throws SQLException; 1554 1555 /** 1556 * Updates the designated column with a <code>short</code> value. 1557 * The updater methods are used to update column values in the 1558 * current row or the insert row. The updater methods do not 1559 * update the underlying database; instead the <code>updateRow</code> or 1560 * <code>insertRow</code> methods are called to update the database. 1561 * 1562 * @param columnIndex the first column is 1, the second is 2, ... 1563 * @param x the new column value 1564 * @exception SQLException if the columnIndex is not valid; 1565 * if a database access error occurs; 1566 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1567 * or this method is called on a closed result set 1568 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1569 * this method 1570 * @since 1.2 1571 */ updateShort(int columnIndex, short x)1572 void updateShort(int columnIndex, short x) throws SQLException; 1573 1574 /** 1575 * Updates the designated column with an <code>int</code> value. 1576 * The updater methods are used to update column values in the 1577 * current row or the insert row. The updater methods do not 1578 * update the underlying database; instead the <code>updateRow</code> or 1579 * <code>insertRow</code> methods are called to update the database. 1580 * 1581 * @param columnIndex the first column is 1, the second is 2, ... 1582 * @param x the new column value 1583 * @exception SQLException if the columnIndex is not valid; 1584 * if a database access error occurs; 1585 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1586 * or this method is called on a closed result set 1587 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1588 * this method 1589 * @since 1.2 1590 */ updateInt(int columnIndex, int x)1591 void updateInt(int columnIndex, int x) throws SQLException; 1592 1593 /** 1594 * Updates the designated column with a <code>long</code> value. 1595 * The updater methods are used to update column values in the 1596 * current row or the insert row. The updater methods do not 1597 * update the underlying database; instead the <code>updateRow</code> or 1598 * <code>insertRow</code> methods are called to update the database. 1599 * 1600 * @param columnIndex the first column is 1, the second is 2, ... 1601 * @param x the new column value 1602 * @exception SQLException if the columnIndex is not valid; 1603 * if a database access error occurs; 1604 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1605 * or this method is called on a closed result set 1606 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1607 * this method 1608 * @since 1.2 1609 */ updateLong(int columnIndex, long x)1610 void updateLong(int columnIndex, long x) throws SQLException; 1611 1612 /** 1613 * Updates the designated column with a <code>float</code> value. 1614 * The updater methods are used to update column values in the 1615 * current row or the insert row. The updater methods do not 1616 * update the underlying database; instead the <code>updateRow</code> or 1617 * <code>insertRow</code> methods are called to update the database. 1618 * 1619 * @param columnIndex the first column is 1, the second is 2, ... 1620 * @param x the new column value 1621 * @exception SQLException if the columnIndex is not valid; 1622 * if a database access error occurs; 1623 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1624 * or this method is called on a closed result set 1625 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1626 * this method 1627 * @since 1.2 1628 */ updateFloat(int columnIndex, float x)1629 void updateFloat(int columnIndex, float x) throws SQLException; 1630 1631 /** 1632 * Updates the designated column with a <code>double</code> value. 1633 * The updater methods are used to update column values in the 1634 * current row or the insert row. The updater methods do not 1635 * update the underlying database; instead the <code>updateRow</code> or 1636 * <code>insertRow</code> methods are called to update the database. 1637 * 1638 * @param columnIndex the first column is 1, the second is 2, ... 1639 * @param x the new column value 1640 * @exception SQLException if the columnIndex is not valid; 1641 * if a database access error occurs; 1642 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1643 * or this method is called on a closed result set 1644 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1645 * this method 1646 * @since 1.2 1647 */ updateDouble(int columnIndex, double x)1648 void updateDouble(int columnIndex, double x) throws SQLException; 1649 1650 /** 1651 * Updates the designated column with a <code>java.math.BigDecimal</code> 1652 * value. 1653 * The updater methods are used to update column values in the 1654 * current row or the insert row. The updater methods do not 1655 * update the underlying database; instead the <code>updateRow</code> or 1656 * <code>insertRow</code> methods are called to update the database. 1657 * 1658 * @param columnIndex the first column is 1, the second is 2, ... 1659 * @param x the new column value 1660 * @exception SQLException if the columnIndex is not valid; 1661 * if a database access error occurs; 1662 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1663 * or this method is called on a closed result set 1664 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1665 * this method 1666 * @since 1.2 1667 */ updateBigDecimal(int columnIndex, BigDecimal x)1668 void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException; 1669 1670 /** 1671 * Updates the designated column with a <code>String</code> value. 1672 * The updater methods are used to update column values in the 1673 * current row or the insert row. The updater methods do not 1674 * update the underlying database; instead the <code>updateRow</code> or 1675 * <code>insertRow</code> methods are called to update the database. 1676 * 1677 * @param columnIndex the first column is 1, the second is 2, ... 1678 * @param x the new column value 1679 * @exception SQLException if the columnIndex is not valid; 1680 * if a database access error occurs; 1681 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1682 * or this method is called on a closed result set 1683 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1684 * this method 1685 * @since 1.2 1686 */ updateString(int columnIndex, String x)1687 void updateString(int columnIndex, String x) throws SQLException; 1688 1689 /** 1690 * Updates the designated column with a <code>byte</code> array value. 1691 * The updater methods are used to update column values in the 1692 * current row or the insert row. The updater methods do not 1693 * update the underlying database; instead the <code>updateRow</code> or 1694 * <code>insertRow</code> methods are called to update the database. 1695 * 1696 * @param columnIndex the first column is 1, the second is 2, ... 1697 * @param x the new column value 1698 * @exception SQLException if the columnIndex is not valid; 1699 * if a database access error occurs; 1700 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1701 * or this method is called on a closed result set 1702 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1703 * this method 1704 * @since 1.2 1705 */ updateBytes(int columnIndex, byte x[])1706 void updateBytes(int columnIndex, byte x[]) throws SQLException; 1707 1708 /** 1709 * Updates the designated column with a <code>java.sql.Date</code> value. 1710 * The updater methods are used to update column values in the 1711 * current row or the insert row. The updater methods do not 1712 * update the underlying database; instead the <code>updateRow</code> or 1713 * <code>insertRow</code> methods are called to update the database. 1714 * 1715 * @param columnIndex the first column is 1, the second is 2, ... 1716 * @param x the new column value 1717 * @exception SQLException if the columnIndex is not valid; 1718 * if a database access error occurs; 1719 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1720 * or this method is called on a closed result set 1721 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1722 * this method 1723 * @since 1.2 1724 */ updateDate(int columnIndex, java.sql.Date x)1725 void updateDate(int columnIndex, java.sql.Date x) throws SQLException; 1726 1727 /** 1728 * Updates the designated column with a <code>java.sql.Time</code> value. 1729 * The updater methods are used to update column values in the 1730 * current row or the insert row. The updater methods do not 1731 * update the underlying database; instead the <code>updateRow</code> or 1732 * <code>insertRow</code> methods are called to update the database. 1733 * 1734 * @param columnIndex the first column is 1, the second is 2, ... 1735 * @param x the new column value 1736 * @exception SQLException if the columnIndex is not valid; 1737 * if a database access error occurs; 1738 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1739 * or this method is called on a closed result set 1740 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1741 * this method 1742 * @since 1.2 1743 */ updateTime(int columnIndex, java.sql.Time x)1744 void updateTime(int columnIndex, java.sql.Time x) throws SQLException; 1745 1746 /** 1747 * Updates the designated column with a <code>java.sql.Timestamp</code> 1748 * value. 1749 * The updater methods are used to update column values in the 1750 * current row or the insert row. The updater methods do not 1751 * update the underlying database; instead the <code>updateRow</code> or 1752 * <code>insertRow</code> methods are called to update the database. 1753 * 1754 * @param columnIndex the first column is 1, the second is 2, ... 1755 * @param x the new column value 1756 * @exception SQLException if the columnIndex is not valid; 1757 * if a database access error occurs; 1758 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1759 * or this method is called on a closed result set 1760 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1761 * this method 1762 * @since 1.2 1763 */ updateTimestamp(int columnIndex, java.sql.Timestamp x)1764 void updateTimestamp(int columnIndex, java.sql.Timestamp x) 1765 throws SQLException; 1766 1767 /** 1768 * Updates the designated column with an ascii stream value, which will have 1769 * the specified number of bytes. 1770 * The updater methods are used to update column values in the 1771 * current row or the insert row. The updater methods do not 1772 * update the underlying database; instead the <code>updateRow</code> or 1773 * <code>insertRow</code> methods are called to update the database. 1774 * 1775 * @param columnIndex the first column is 1, the second is 2, ... 1776 * @param x the new column value 1777 * @param length the length of the stream 1778 * @exception SQLException if the columnIndex is not valid; 1779 * if a database access error occurs; 1780 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1781 * or this method is called on a closed result set 1782 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1783 * this method 1784 * @since 1.2 1785 */ updateAsciiStream(int columnIndex, java.io.InputStream x, int length)1786 void updateAsciiStream(int columnIndex, 1787 java.io.InputStream x, 1788 int length) throws SQLException; 1789 1790 /** 1791 * Updates the designated column with a binary stream value, which will have 1792 * the specified number of bytes. 1793 * The updater methods are used to update column values in the 1794 * current row or the insert row. The updater methods do not 1795 * update the underlying database; instead the <code>updateRow</code> or 1796 * <code>insertRow</code> methods are called to update the database. 1797 * 1798 * @param columnIndex the first column is 1, the second is 2, ... 1799 * @param x the new column value 1800 * @param length the length of the stream 1801 * @exception SQLException if the columnIndex is not valid; 1802 * if a database access error occurs; 1803 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1804 * or this method is called on a closed result set 1805 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1806 * this method 1807 * @since 1.2 1808 */ updateBinaryStream(int columnIndex, java.io.InputStream x, int length)1809 void updateBinaryStream(int columnIndex, 1810 java.io.InputStream x, 1811 int length) throws SQLException; 1812 1813 /** 1814 * Updates the designated column with a character stream value, which will have 1815 * the specified number of bytes. 1816 * The updater methods are used to update column values in the 1817 * current row or the insert row. The updater methods do not 1818 * update the underlying database; instead the <code>updateRow</code> or 1819 * <code>insertRow</code> methods are called to update the database. 1820 * 1821 * @param columnIndex the first column is 1, the second is 2, ... 1822 * @param x the new column value 1823 * @param length the length of the stream 1824 * @exception SQLException if the columnIndex is not valid; 1825 * if a database access error occurs; 1826 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1827 * or this method is called on a closed result set 1828 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1829 * this method 1830 * @since 1.2 1831 */ updateCharacterStream(int columnIndex, java.io.Reader x, int length)1832 void updateCharacterStream(int columnIndex, 1833 java.io.Reader x, 1834 int length) throws SQLException; 1835 1836 /** 1837 * Updates the designated column with an <code>Object</code> value. 1838 * The updater methods are used to update column values in the 1839 * current row or the insert row. The updater methods do not 1840 * update the underlying database; instead the <code>updateRow</code> or 1841 * <code>insertRow</code> methods are called to update the database. 1842 *<p> 1843 * If the second argument is an <code>InputStream</code> then the stream must contain 1844 * the number of bytes specified by scaleOrLength. If the second argument is a 1845 * <code>Reader</code> then the reader must contain the number of characters specified 1846 * by scaleOrLength. If these conditions are not true the driver will generate a 1847 * <code>SQLException</code> when the statement is executed. 1848 * 1849 * @param columnIndex the first column is 1, the second is 2, ... 1850 * @param x the new column value 1851 * @param scaleOrLength for an object of <code>java.math.BigDecimal</code> , 1852 * this is the number of digits after the decimal point. For 1853 * Java Object types <code>InputStream</code> and <code>Reader</code>, 1854 * this is the length 1855 * of the data in the stream or reader. For all other types, 1856 * this value will be ignored. 1857 * @exception SQLException if the columnIndex is not valid; 1858 * if a database access error occurs; 1859 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1860 * or this method is called on a closed result set 1861 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1862 * this method 1863 * @since 1.2 1864 */ updateObject(int columnIndex, Object x, int scaleOrLength)1865 void updateObject(int columnIndex, Object x, int scaleOrLength) 1866 throws SQLException; 1867 1868 /** 1869 * Updates the designated column with an <code>Object</code> value. 1870 * The updater methods are used to update column values in the 1871 * current row or the insert row. The updater methods do not 1872 * update the underlying database; instead the <code>updateRow</code> or 1873 * <code>insertRow</code> methods are called to update the database. 1874 * 1875 * @param columnIndex the first column is 1, the second is 2, ... 1876 * @param x the new column value 1877 * @exception SQLException if the columnIndex is not valid; 1878 * if a database access error occurs; 1879 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1880 * or this method is called on a closed result set 1881 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1882 * this method 1883 * @since 1.2 1884 */ updateObject(int columnIndex, Object x)1885 void updateObject(int columnIndex, Object x) throws SQLException; 1886 1887 /** 1888 * Updates the designated column with a <code>null</code> value. 1889 * The updater methods are used to update column values in the 1890 * current row or the insert row. The updater methods do not 1891 * update the underlying database; instead the <code>updateRow</code> or 1892 * <code>insertRow</code> methods are called to update the database. 1893 * 1894 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 1895 * @exception SQLException if the columnLabel is not valid; 1896 * if a database access error occurs; 1897 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1898 * or this method is called on a closed result set 1899 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1900 * this method 1901 * @since 1.2 1902 */ updateNull(String columnLabel)1903 void updateNull(String columnLabel) throws SQLException; 1904 1905 /** 1906 * Updates the designated column with a <code>boolean</code> value. 1907 * The updater methods are used to update column values in the 1908 * current row or the insert row. The updater methods do not 1909 * update the underlying database; instead the <code>updateRow</code> or 1910 * <code>insertRow</code> methods are called to update the database. 1911 * 1912 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 1913 * @param x the new column value 1914 * @exception SQLException if the columnLabel is not valid; 1915 * if a database access error occurs; 1916 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1917 * or this method is called on a closed result set 1918 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1919 * this method 1920 * @since 1.2 1921 */ updateBoolean(String columnLabel, boolean x)1922 void updateBoolean(String columnLabel, boolean x) throws SQLException; 1923 1924 /** 1925 * Updates the designated column with a <code>byte</code> value. 1926 * The updater methods are used to update column values in the 1927 * current row or the insert row. The updater methods do not 1928 * update the underlying database; instead the <code>updateRow</code> or 1929 * <code>insertRow</code> methods are called to update the database. 1930 * 1931 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 1932 * @param x the new column value 1933 * @exception SQLException if the columnLabel is not valid; 1934 * if a database access error occurs; 1935 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1936 * or this method is called on a closed result set 1937 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1938 * this method 1939 * @since 1.2 1940 */ updateByte(String columnLabel, byte x)1941 void updateByte(String columnLabel, byte x) throws SQLException; 1942 1943 /** 1944 * Updates the designated column with a <code>short</code> value. 1945 * The updater methods are used to update column values in the 1946 * current row or the insert row. The updater methods do not 1947 * update the underlying database; instead the <code>updateRow</code> or 1948 * <code>insertRow</code> methods are called to update the database. 1949 * 1950 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 1951 * @param x the new column value 1952 * @exception SQLException if the columnLabel is not valid; 1953 * if a database access error occurs; 1954 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1955 * or this method is called on a closed result set 1956 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1957 * this method 1958 * @since 1.2 1959 */ updateShort(String columnLabel, short x)1960 void updateShort(String columnLabel, short x) throws SQLException; 1961 1962 /** 1963 * Updates the designated column with an <code>int</code> value. 1964 * The updater methods are used to update column values in the 1965 * current row or the insert row. The updater methods do not 1966 * update the underlying database; instead the <code>updateRow</code> or 1967 * <code>insertRow</code> methods are called to update the database. 1968 * 1969 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 1970 * @param x the new column value 1971 * @exception SQLException if the columnLabel is not valid; 1972 * if a database access error occurs; 1973 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1974 * or this method is called on a closed result set 1975 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1976 * this method 1977 * @since 1.2 1978 */ updateInt(String columnLabel, int x)1979 void updateInt(String columnLabel, int x) throws SQLException; 1980 1981 /** 1982 * Updates the designated column with a <code>long</code> value. 1983 * The updater methods are used to update column values in the 1984 * current row or the insert row. The updater methods do not 1985 * update the underlying database; instead the <code>updateRow</code> or 1986 * <code>insertRow</code> methods are called to update the database. 1987 * 1988 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 1989 * @param x the new column value 1990 * @exception SQLException if the columnLabel is not valid; 1991 * if a database access error occurs; 1992 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 1993 * or this method is called on a closed result set 1994 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 1995 * this method 1996 * @since 1.2 1997 */ updateLong(String columnLabel, long x)1998 void updateLong(String columnLabel, long x) throws SQLException; 1999 2000 /** 2001 * Updates the designated column with a <code>float </code> value. 2002 * The updater methods are used to update column values in the 2003 * current row or the insert row. The updater methods do not 2004 * update the underlying database; instead the <code>updateRow</code> or 2005 * <code>insertRow</code> methods are called to update the database. 2006 * 2007 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2008 * @param x the new column value 2009 * @exception SQLException if the columnLabel is not valid; 2010 * if a database access error occurs; 2011 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2012 * or this method is called on a closed result set 2013 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2014 * this method 2015 * @since 1.2 2016 */ updateFloat(String columnLabel, float x)2017 void updateFloat(String columnLabel, float x) throws SQLException; 2018 2019 /** 2020 * Updates the designated column with a <code>double</code> value. 2021 * The updater methods are used to update column values in the 2022 * current row or the insert row. The updater methods do not 2023 * update the underlying database; instead the <code>updateRow</code> or 2024 * <code>insertRow</code> methods are called to update the database. 2025 * 2026 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2027 * @param x the new column value 2028 * @exception SQLException if the columnLabel is not valid; 2029 * if a database access error occurs; 2030 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2031 * or this method is called on a closed result set 2032 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2033 * this method 2034 * @since 1.2 2035 */ updateDouble(String columnLabel, double x)2036 void updateDouble(String columnLabel, double x) throws SQLException; 2037 2038 /** 2039 * Updates the designated column with a <code>java.sql.BigDecimal</code> 2040 * value. 2041 * The updater methods are used to update column values in the 2042 * current row or the insert row. The updater methods do not 2043 * update the underlying database; instead the <code>updateRow</code> or 2044 * <code>insertRow</code> methods are called to update the database. 2045 * 2046 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2047 * @param x the new column value 2048 * @exception SQLException if the columnLabel is not valid; 2049 * if a database access error occurs; 2050 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2051 * or this method is called on a closed result set 2052 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2053 * this method 2054 * @since 1.2 2055 */ updateBigDecimal(String columnLabel, BigDecimal x)2056 void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException; 2057 2058 /** 2059 * Updates the designated column with a <code>String</code> value. 2060 * The updater methods are used to update column values in the 2061 * current row or the insert row. The updater methods do not 2062 * update the underlying database; instead the <code>updateRow</code> or 2063 * <code>insertRow</code> methods are called to update the database. 2064 * 2065 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2066 * @param x the new column value 2067 * @exception SQLException if the columnLabel is not valid; 2068 * if a database access error occurs; 2069 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2070 * or this method is called on a closed result set 2071 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2072 * this method 2073 * @since 1.2 2074 */ updateString(String columnLabel, String x)2075 void updateString(String columnLabel, String x) throws SQLException; 2076 2077 /** 2078 * Updates the designated column with a byte array value. 2079 * 2080 * The updater methods are used to update column values in the 2081 * current row or the insert row. The updater methods do not 2082 * update the underlying database; instead the <code>updateRow</code> 2083 * or <code>insertRow</code> methods are called to update the database. 2084 * 2085 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2086 * @param x the new column value 2087 * @exception SQLException if the columnLabel is not valid; 2088 * if a database access error occurs; 2089 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2090 * or this method is called on a closed result set 2091 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2092 * this method 2093 * @since 1.2 2094 */ updateBytes(String columnLabel, byte x[])2095 void updateBytes(String columnLabel, byte x[]) throws SQLException; 2096 2097 /** 2098 * Updates the designated column with a <code>java.sql.Date</code> value. 2099 * The updater methods are used to update column values in the 2100 * current row or the insert row. The updater methods do not 2101 * update the underlying database; instead the <code>updateRow</code> or 2102 * <code>insertRow</code> methods are called to update the database. 2103 * 2104 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2105 * @param x the new column value 2106 * @exception SQLException if the columnLabel is not valid; 2107 * if a database access error occurs; 2108 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2109 * or this method is called on a closed result set 2110 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2111 * this method 2112 * @since 1.2 2113 */ updateDate(String columnLabel, java.sql.Date x)2114 void updateDate(String columnLabel, java.sql.Date x) throws SQLException; 2115 2116 /** 2117 * Updates the designated column with a <code>java.sql.Time</code> value. 2118 * The updater methods are used to update column values in the 2119 * current row or the insert row. The updater methods do not 2120 * update the underlying database; instead the <code>updateRow</code> or 2121 * <code>insertRow</code> methods are called to update the database. 2122 * 2123 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2124 * @param x the new column value 2125 * @exception SQLException if the columnLabel is not valid; 2126 * if a database access error occurs; 2127 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2128 * or this method is called on a closed result set 2129 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2130 * this method 2131 * @since 1.2 2132 */ updateTime(String columnLabel, java.sql.Time x)2133 void updateTime(String columnLabel, java.sql.Time x) throws SQLException; 2134 2135 /** 2136 * Updates the designated column with a <code>java.sql.Timestamp</code> 2137 * value. 2138 * The updater methods are used to update column values in the 2139 * current row or the insert row. The updater methods do not 2140 * update the underlying database; instead the <code>updateRow</code> or 2141 * <code>insertRow</code> methods are called to update the database. 2142 * 2143 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2144 * @param x the new column value 2145 * @exception SQLException if the columnLabel is not valid; 2146 * if a database access error occurs; 2147 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2148 * or this method is called on a closed result set 2149 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2150 * this method 2151 * @since 1.2 2152 */ updateTimestamp(String columnLabel, java.sql.Timestamp x)2153 void updateTimestamp(String columnLabel, java.sql.Timestamp x) 2154 throws SQLException; 2155 2156 /** 2157 * Updates the designated column with an ascii stream value, which will have 2158 * the specified number of bytes. 2159 * The updater methods are used to update column values in the 2160 * current row or the insert row. The updater methods do not 2161 * update the underlying database; instead the <code>updateRow</code> or 2162 * <code>insertRow</code> methods are called to update the database. 2163 * 2164 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2165 * @param x the new column value 2166 * @param length the length of the stream 2167 * @exception SQLException if the columnLabel is not valid; 2168 * if a database access error occurs; 2169 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2170 * or this method is called on a closed result set 2171 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2172 * this method 2173 * @since 1.2 2174 */ updateAsciiStream(String columnLabel, java.io.InputStream x, int length)2175 void updateAsciiStream(String columnLabel, 2176 java.io.InputStream x, 2177 int length) throws SQLException; 2178 2179 /** 2180 * Updates the designated column with a binary stream value, which will have 2181 * the specified number of bytes. 2182 * The updater methods are used to update column values in the 2183 * current row or the insert row. The updater methods do not 2184 * update the underlying database; instead the <code>updateRow</code> or 2185 * <code>insertRow</code> methods are called to update the database. 2186 * 2187 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2188 * @param x the new column value 2189 * @param length the length of the stream 2190 * @exception SQLException if the columnLabel is not valid; 2191 * if a database access error occurs; 2192 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2193 * or this method is called on a closed result set 2194 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2195 * this method 2196 * @since 1.2 2197 */ updateBinaryStream(String columnLabel, java.io.InputStream x, int length)2198 void updateBinaryStream(String columnLabel, 2199 java.io.InputStream x, 2200 int length) throws SQLException; 2201 2202 /** 2203 * Updates the designated column with a character stream value, which will have 2204 * the specified number of bytes. 2205 * The updater methods are used to update column values in the 2206 * current row or the insert row. The updater methods do not 2207 * update the underlying database; instead the <code>updateRow</code> or 2208 * <code>insertRow</code> methods are called to update the database. 2209 * 2210 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2211 * @param reader the <code>java.io.Reader</code> object containing 2212 * the new column value 2213 * @param length the length of the stream 2214 * @exception SQLException if the columnLabel is not valid; 2215 * if a database access error occurs; 2216 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2217 * or this method is called on a closed result set 2218 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2219 * this method 2220 * @since 1.2 2221 */ updateCharacterStream(String columnLabel, java.io.Reader reader, int length)2222 void updateCharacterStream(String columnLabel, 2223 java.io.Reader reader, 2224 int length) throws SQLException; 2225 2226 /** 2227 * Updates the designated column with an <code>Object</code> value. 2228 * The updater methods are used to update column values in the 2229 * current row or the insert row. The updater methods do not 2230 * update the underlying database; instead the <code>updateRow</code> or 2231 * <code>insertRow</code> methods are called to update the database. 2232 *<p> 2233 * If the second argument is an <code>InputStream</code> then the stream must contain 2234 * the number of bytes specified by scaleOrLength. If the second argument is a 2235 * <code>Reader</code> then the reader must contain the number of characters specified 2236 * by scaleOrLength. If these conditions are not true the driver will generate a 2237 * <code>SQLException</code> when the statement is executed. 2238 * 2239 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2240 * @param x the new column value 2241 * @param scaleOrLength for an object of <code>java.math.BigDecimal</code> , 2242 * this is the number of digits after the decimal point. For 2243 * Java Object types <code>InputStream</code> and <code>Reader</code>, 2244 * this is the length 2245 * of the data in the stream or reader. For all other types, 2246 * this value will be ignored. 2247 * @exception SQLException if the columnLabel is not valid; 2248 * if a database access error occurs; 2249 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2250 * or this method is called on a closed result set 2251 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2252 * this method 2253 * @since 1.2 2254 */ updateObject(String columnLabel, Object x, int scaleOrLength)2255 void updateObject(String columnLabel, Object x, int scaleOrLength) 2256 throws SQLException; 2257 2258 /** 2259 * Updates the designated column with an <code>Object</code> value. 2260 * The updater methods are used to update column values in the 2261 * current row or the insert row. The updater methods do not 2262 * update the underlying database; instead the <code>updateRow</code> or 2263 * <code>insertRow</code> methods are called to update the database. 2264 * 2265 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2266 * @param x the new column value 2267 * @exception SQLException if the columnLabel is not valid; 2268 * if a database access error occurs; 2269 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2270 * or this method is called on a closed result set 2271 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2272 * this method 2273 * @since 1.2 2274 */ updateObject(String columnLabel, Object x)2275 void updateObject(String columnLabel, Object x) throws SQLException; 2276 2277 /** 2278 * Inserts the contents of the insert row into this 2279 * <code>ResultSet</code> object and into the database. 2280 * The cursor must be on the insert row when this method is called. 2281 * 2282 * @exception SQLException if a database access error occurs; 2283 * the result set concurrency is <code>CONCUR_READ_ONLY</code>, 2284 * this method is called on a closed result set, 2285 * if this method is called when the cursor is not on the insert row, 2286 * or if not all of non-nullable columns in 2287 * the insert row have been given a non-null value 2288 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2289 * this method 2290 * @since 1.2 2291 */ insertRow()2292 void insertRow() throws SQLException; 2293 2294 /** 2295 * Updates the underlying database with the new contents of the 2296 * current row of this <code>ResultSet</code> object. 2297 * This method cannot be called when the cursor is on the insert row. 2298 * 2299 * @exception SQLException if a database access error occurs; 2300 * the result set concurrency is <code>CONCUR_READ_ONLY</code>; 2301 * this method is called on a closed result set or 2302 * if this method is called when the cursor is on the insert row 2303 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2304 * this method 2305 * @since 1.2 2306 */ updateRow()2307 void updateRow() throws SQLException; 2308 2309 /** 2310 * Deletes the current row from this <code>ResultSet</code> object 2311 * and from the underlying database. This method cannot be called when 2312 * the cursor is on the insert row. 2313 * 2314 * @exception SQLException if a database access error occurs; 2315 * the result set concurrency is <code>CONCUR_READ_ONLY</code>; 2316 * this method is called on a closed result set 2317 * or if this method is called when the cursor is on the insert row 2318 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2319 * this method 2320 * @since 1.2 2321 */ deleteRow()2322 void deleteRow() throws SQLException; 2323 2324 /** 2325 * Refreshes the current row with its most recent value in 2326 * the database. This method cannot be called when 2327 * the cursor is on the insert row. 2328 * 2329 * <P>The <code>refreshRow</code> method provides a way for an 2330 * application to 2331 * explicitly tell the JDBC driver to refetch a row(s) from the 2332 * database. An application may want to call <code>refreshRow</code> when 2333 * caching or prefetching is being done by the JDBC driver to 2334 * fetch the latest value of a row from the database. The JDBC driver 2335 * may actually refresh multiple rows at once if the fetch size is 2336 * greater than one. 2337 * 2338 * <P> All values are refetched subject to the transaction isolation 2339 * level and cursor sensitivity. If <code>refreshRow</code> is called after 2340 * calling an updater method, but before calling 2341 * the method <code>updateRow</code>, then the 2342 * updates made to the row are lost. Calling the method 2343 * <code>refreshRow</code> frequently will likely slow performance. 2344 * 2345 * @exception SQLException if a database access error 2346 * occurs; this method is called on a closed result set; 2347 * the result set type is <code>TYPE_FORWARD_ONLY</code> or if this 2348 * method is called when the cursor is on the insert row 2349 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2350 * this method or this method is not supported for the specified result 2351 * set type and result set concurrency. 2352 * @since 1.2 2353 */ refreshRow()2354 void refreshRow() throws SQLException; 2355 2356 /** 2357 * Cancels the updates made to the current row in this 2358 * <code>ResultSet</code> object. 2359 * This method may be called after calling an 2360 * updater method(s) and before calling 2361 * the method <code>updateRow</code> to roll back 2362 * the updates made to a row. If no updates have been made or 2363 * <code>updateRow</code> has already been called, this method has no 2364 * effect. 2365 * 2366 * @exception SQLException if a database access error 2367 * occurs; this method is called on a closed result set; 2368 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2369 * or if this method is called when the cursor is 2370 * on the insert row 2371 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2372 * this method 2373 * @since 1.2 2374 */ cancelRowUpdates()2375 void cancelRowUpdates() throws SQLException; 2376 2377 /** 2378 * Moves the cursor to the insert row. The current cursor position is 2379 * remembered while the cursor is positioned on the insert row. 2380 * 2381 * The insert row is a special row associated with an updatable 2382 * result set. It is essentially a buffer where a new row may 2383 * be constructed by calling the updater methods prior to 2384 * inserting the row into the result set. 2385 * 2386 * Only the updater, getter, 2387 * and <code>insertRow</code> methods may be 2388 * called when the cursor is on the insert row. All of the columns in 2389 * a result set must be given a value each time this method is 2390 * called before calling <code>insertRow</code>. 2391 * An updater method must be called before a 2392 * getter method can be called on a column value. 2393 * 2394 * @exception SQLException if a database access error occurs; this 2395 * method is called on a closed result set 2396 * or the result set concurrency is <code>CONCUR_READ_ONLY</code> 2397 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2398 * this method 2399 * @since 1.2 2400 */ moveToInsertRow()2401 void moveToInsertRow() throws SQLException; 2402 2403 /** 2404 * Moves the cursor to the remembered cursor position, usually the 2405 * current row. This method has no effect if the cursor is not on 2406 * the insert row. 2407 * 2408 * @exception SQLException if a database access error occurs; this 2409 * method is called on a closed result set 2410 * or the result set concurrency is <code>CONCUR_READ_ONLY</code> 2411 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2412 * this method 2413 * @since 1.2 2414 */ moveToCurrentRow()2415 void moveToCurrentRow() throws SQLException; 2416 2417 /** 2418 * Retrieves the <code>Statement</code> object that produced this 2419 * <code>ResultSet</code> object. 2420 * If the result set was generated some other way, such as by a 2421 * <code>DatabaseMetaData</code> method, this method may return 2422 * <code>null</code>. 2423 * 2424 * @return the <code>Statment</code> object that produced 2425 * this <code>ResultSet</code> object or <code>null</code> 2426 * if the result set was produced some other way 2427 * @exception SQLException if a database access error occurs 2428 * or this method is called on a closed result set 2429 * @since 1.2 2430 */ getStatement()2431 Statement getStatement() throws SQLException; 2432 2433 /** 2434 * Retrieves the value of the designated column in the current row 2435 * of this <code>ResultSet</code> object as an <code>Object</code> 2436 * in the Java programming language. 2437 * If the value is an SQL <code>NULL</code>, 2438 * the driver returns a Java <code>null</code>. 2439 * This method uses the given <code>Map</code> object 2440 * for the custom mapping of the 2441 * SQL structured or distinct type that is being retrieved. 2442 * 2443 * @param columnIndex the first column is 1, the second is 2, ... 2444 * @param map a <code>java.util.Map</code> object that contains the mapping 2445 * from SQL type names to classes in the Java programming language 2446 * @return an <code>Object</code> in the Java programming language 2447 * representing the SQL value 2448 * @exception SQLException if the columnIndex is not valid; 2449 * if a database access error occurs 2450 * or this method is called on a closed result set 2451 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2452 * this method 2453 * @since 1.2 2454 */ getObject(int columnIndex, java.util.Map<String,Class<?>> map)2455 Object getObject(int columnIndex, java.util.Map<String,Class<?>> map) 2456 throws SQLException; 2457 2458 /** 2459 * Retrieves the value of the designated column in the current row 2460 * of this <code>ResultSet</code> object as a <code>Ref</code> object 2461 * in the Java programming language. 2462 * 2463 * @param columnIndex the first column is 1, the second is 2, ... 2464 * @return a <code>Ref</code> object representing an SQL <code>REF</code> 2465 * value 2466 * @exception SQLException if the columnIndex is not valid; 2467 * if a database access error occurs 2468 * or this method is called on a closed result set 2469 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2470 * this method 2471 * @since 1.2 2472 */ getRef(int columnIndex)2473 Ref getRef(int columnIndex) throws SQLException; 2474 2475 /** 2476 * Retrieves the value of the designated column in the current row 2477 * of this <code>ResultSet</code> object as a <code>Blob</code> object 2478 * in the Java programming language. 2479 * 2480 * @param columnIndex the first column is 1, the second is 2, ... 2481 * @return a <code>Blob</code> object representing the SQL 2482 * <code>BLOB</code> value in the specified column 2483 * @exception SQLException if the columnIndex is not valid; 2484 * if a database access error occurs 2485 * or this method is called on a closed result set 2486 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2487 * this method 2488 * @since 1.2 2489 */ getBlob(int columnIndex)2490 Blob getBlob(int columnIndex) throws SQLException; 2491 2492 /** 2493 * Retrieves the value of the designated column in the current row 2494 * of this <code>ResultSet</code> object as a <code>Clob</code> object 2495 * in the Java programming language. 2496 * 2497 * @param columnIndex the first column is 1, the second is 2, ... 2498 * @return a <code>Clob</code> object representing the SQL 2499 * <code>CLOB</code> value in the specified column 2500 * @exception SQLException if the columnIndex is not valid; 2501 * if a database access error occurs 2502 * or this method is called on a closed result set 2503 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2504 * this method 2505 * @since 1.2 2506 */ getClob(int columnIndex)2507 Clob getClob(int columnIndex) throws SQLException; 2508 2509 /** 2510 * Retrieves the value of the designated column in the current row 2511 * of this <code>ResultSet</code> object as an <code>Array</code> object 2512 * in the Java programming language. 2513 * 2514 * @param columnIndex the first column is 1, the second is 2, ... 2515 * @return an <code>Array</code> object representing the SQL 2516 * <code>ARRAY</code> value in the specified column 2517 * @exception SQLException if the columnIndex is not valid; 2518 * if a database access error occurs 2519 * or this method is called on a closed result set 2520 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2521 * this method 2522 * @since 1.2 2523 */ getArray(int columnIndex)2524 Array getArray(int columnIndex) throws SQLException; 2525 2526 /** 2527 * Retrieves the value of the designated column in the current row 2528 * of this <code>ResultSet</code> object as an <code>Object</code> 2529 * in the Java programming language. 2530 * If the value is an SQL <code>NULL</code>, 2531 * the driver returns a Java <code>null</code>. 2532 * This method uses the specified <code>Map</code> object for 2533 * custom mapping if appropriate. 2534 * 2535 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2536 * @param map a <code>java.util.Map</code> object that contains the mapping 2537 * from SQL type names to classes in the Java programming language 2538 * @return an <code>Object</code> representing the SQL value in the 2539 * specified column 2540 * @exception SQLException if the columnLabel is not valid; 2541 * if a database access error occurs 2542 * or this method is called on a closed result set 2543 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2544 * this method 2545 * @since 1.2 2546 */ getObject(String columnLabel, java.util.Map<String,Class<?>> map)2547 Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) 2548 throws SQLException; 2549 2550 /** 2551 * Retrieves the value of the designated column in the current row 2552 * of this <code>ResultSet</code> object as a <code>Ref</code> object 2553 * in the Java programming language. 2554 * 2555 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2556 * @return a <code>Ref</code> object representing the SQL <code>REF</code> 2557 * value in the specified column 2558 * @exception SQLException if the columnLabel is not valid; 2559 * if a database access error occurs 2560 * or this method is called on a closed result set 2561 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2562 * this method 2563 * @since 1.2 2564 */ getRef(String columnLabel)2565 Ref getRef(String columnLabel) throws SQLException; 2566 2567 /** 2568 * Retrieves the value of the designated column in the current row 2569 * of this <code>ResultSet</code> object as a <code>Blob</code> object 2570 * in the Java programming language. 2571 * 2572 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2573 * @return a <code>Blob</code> object representing the SQL <code>BLOB</code> 2574 * value in the specified column 2575 * @exception SQLException if the columnLabel is not valid; 2576 * if a database access error occurs 2577 * or this method is called on a closed result set 2578 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2579 * this method 2580 * @since 1.2 2581 */ getBlob(String columnLabel)2582 Blob getBlob(String columnLabel) throws SQLException; 2583 2584 /** 2585 * Retrieves the value of the designated column in the current row 2586 * of this <code>ResultSet</code> object as a <code>Clob</code> object 2587 * in the Java programming language. 2588 * 2589 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2590 * @return a <code>Clob</code> object representing the SQL <code>CLOB</code> 2591 * value in the specified column 2592 * @exception SQLException if the columnLabel is not valid; 2593 * if a database access error occurs 2594 * or this method is called on a closed result set 2595 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2596 * this method 2597 * @since 1.2 2598 */ getClob(String columnLabel)2599 Clob getClob(String columnLabel) throws SQLException; 2600 2601 /** 2602 * Retrieves the value of the designated column in the current row 2603 * of this <code>ResultSet</code> object as an <code>Array</code> object 2604 * in the Java programming language. 2605 * 2606 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2607 * @return an <code>Array</code> object representing the SQL <code>ARRAY</code> value in 2608 * the specified column 2609 * @exception SQLException if the columnLabel is not valid; 2610 * if a database access error occurs 2611 * or this method is called on a closed result set 2612 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2613 * this method 2614 * @since 1.2 2615 */ getArray(String columnLabel)2616 Array getArray(String columnLabel) throws SQLException; 2617 2618 /** 2619 * Retrieves the value of the designated column in the current row 2620 * of this <code>ResultSet</code> object as a <code>java.sql.Date</code> object 2621 * in the Java programming language. 2622 * This method uses the given calendar to construct an appropriate millisecond 2623 * value for the date if the underlying database does not store 2624 * timezone information. 2625 * 2626 * @param columnIndex the first column is 1, the second is 2, ... 2627 * @param cal the <code>java.util.Calendar</code> object 2628 * to use in constructing the date 2629 * @return the column value as a <code>java.sql.Date</code> object; 2630 * if the value is SQL <code>NULL</code>, 2631 * the value returned is <code>null</code> in the Java programming language 2632 * @exception SQLException if the columnIndex is not valid; 2633 * if a database access error occurs 2634 * or this method is called on a closed result set 2635 * @since 1.2 2636 */ getDate(int columnIndex, Calendar cal)2637 java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException; 2638 2639 /** 2640 * Retrieves the value of the designated column in the current row 2641 * of this <code>ResultSet</code> object as a <code>java.sql.Date</code> object 2642 * in the Java programming language. 2643 * This method uses the given calendar to construct an appropriate millisecond 2644 * value for the date if the underlying database does not store 2645 * timezone information. 2646 * 2647 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2648 * @param cal the <code>java.util.Calendar</code> object 2649 * to use in constructing the date 2650 * @return the column value as a <code>java.sql.Date</code> object; 2651 * if the value is SQL <code>NULL</code>, 2652 * the value returned is <code>null</code> in the Java programming language 2653 * @exception SQLException if the columnLabel is not valid; 2654 * if a database access error occurs 2655 * or this method is called on a closed result set 2656 * @since 1.2 2657 */ getDate(String columnLabel, Calendar cal)2658 java.sql.Date getDate(String columnLabel, Calendar cal) throws SQLException; 2659 2660 /** 2661 * Retrieves the value of the designated column in the current row 2662 * of this <code>ResultSet</code> object as a <code>java.sql.Time</code> object 2663 * in the Java programming language. 2664 * This method uses the given calendar to construct an appropriate millisecond 2665 * value for the time if the underlying database does not store 2666 * timezone information. 2667 * 2668 * @param columnIndex the first column is 1, the second is 2, ... 2669 * @param cal the <code>java.util.Calendar</code> object 2670 * to use in constructing the time 2671 * @return the column value as a <code>java.sql.Time</code> object; 2672 * if the value is SQL <code>NULL</code>, 2673 * the value returned is <code>null</code> in the Java programming language 2674 * @exception SQLException if the columnIndex is not valid; 2675 * if a database access error occurs 2676 * or this method is called on a closed result set 2677 * @since 1.2 2678 */ getTime(int columnIndex, Calendar cal)2679 java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException; 2680 2681 /** 2682 * Retrieves the value of the designated column in the current row 2683 * of this <code>ResultSet</code> object as a <code>java.sql.Time</code> object 2684 * in the Java programming language. 2685 * This method uses the given calendar to construct an appropriate millisecond 2686 * value for the time if the underlying database does not store 2687 * timezone information. 2688 * 2689 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2690 * @param cal the <code>java.util.Calendar</code> object 2691 * to use in constructing the time 2692 * @return the column value as a <code>java.sql.Time</code> object; 2693 * if the value is SQL <code>NULL</code>, 2694 * the value returned is <code>null</code> in the Java programming language 2695 * @exception SQLException if the columnLabel is not valid; 2696 * if a database access error occurs 2697 * or this method is called on a closed result set 2698 * @since 1.2 2699 */ getTime(String columnLabel, Calendar cal)2700 java.sql.Time getTime(String columnLabel, Calendar cal) throws SQLException; 2701 2702 /** 2703 * Retrieves the value of the designated column in the current row 2704 * of this <code>ResultSet</code> object as a <code>java.sql.Timestamp</code> object 2705 * in the Java programming language. 2706 * This method uses the given calendar to construct an appropriate millisecond 2707 * value for the timestamp if the underlying database does not store 2708 * timezone information. 2709 * 2710 * @param columnIndex the first column is 1, the second is 2, ... 2711 * @param cal the <code>java.util.Calendar</code> object 2712 * to use in constructing the timestamp 2713 * @return the column value as a <code>java.sql.Timestamp</code> object; 2714 * if the value is SQL <code>NULL</code>, 2715 * the value returned is <code>null</code> in the Java programming language 2716 * @exception SQLException if the columnIndex is not valid; 2717 * if a database access error occurs 2718 * or this method is called on a closed result set 2719 * @since 1.2 2720 */ getTimestamp(int columnIndex, Calendar cal)2721 java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) 2722 throws SQLException; 2723 2724 /** 2725 * Retrieves the value of the designated column in the current row 2726 * of this <code>ResultSet</code> object as a <code>java.sql.Timestamp</code> object 2727 * in the Java programming language. 2728 * This method uses the given calendar to construct an appropriate millisecond 2729 * value for the timestamp if the underlying database does not store 2730 * timezone information. 2731 * 2732 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2733 * @param cal the <code>java.util.Calendar</code> object 2734 * to use in constructing the date 2735 * @return the column value as a <code>java.sql.Timestamp</code> object; 2736 * if the value is SQL <code>NULL</code>, 2737 * the value returned is <code>null</code> in the Java programming language 2738 * @exception SQLException if the columnLabel is not valid or 2739 * if a database access error occurs 2740 * or this method is called on a closed result set 2741 * @since 1.2 2742 */ getTimestamp(String columnLabel, Calendar cal)2743 java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) 2744 throws SQLException; 2745 2746 //-------------------------- JDBC 3.0 ---------------------------------------- 2747 2748 /** 2749 * The constant indicating that open <code>ResultSet</code> objects with this 2750 * holdability will remain open when the current transaction is commited. 2751 * 2752 * @since 1.4 2753 */ 2754 int HOLD_CURSORS_OVER_COMMIT = 1; 2755 2756 /** 2757 * The constant indicating that open <code>ResultSet</code> objects with this 2758 * holdability will be closed when the current transaction is commited. 2759 * 2760 * @since 1.4 2761 */ 2762 int CLOSE_CURSORS_AT_COMMIT = 2; 2763 2764 /** 2765 * Retrieves the value of the designated column in the current row 2766 * of this <code>ResultSet</code> object as a <code>java.net.URL</code> 2767 * object in the Java programming language. 2768 * 2769 * @param columnIndex the index of the column 1 is the first, 2 is the second,... 2770 * @return the column value as a <code>java.net.URL</code> object; 2771 * if the value is SQL <code>NULL</code>, 2772 * the value returned is <code>null</code> in the Java programming language 2773 * @exception SQLException if the columnIndex is not valid; 2774 * if a database access error occurs; this method 2775 * is called on a closed result set or if a URL is malformed 2776 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2777 * this method 2778 * @since 1.4 2779 */ getURL(int columnIndex)2780 java.net.URL getURL(int columnIndex) throws SQLException; 2781 2782 /** 2783 * Retrieves the value of the designated column in the current row 2784 * of this <code>ResultSet</code> object as a <code>java.net.URL</code> 2785 * object in the Java programming language. 2786 * 2787 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2788 * @return the column value as a <code>java.net.URL</code> object; 2789 * if the value is SQL <code>NULL</code>, 2790 * the value returned is <code>null</code> in the Java programming language 2791 * @exception SQLException if the columnLabel is not valid; 2792 * if a database access error occurs; this method 2793 * is called on a closed result set or if a URL is malformed 2794 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2795 * this method 2796 * @since 1.4 2797 */ getURL(String columnLabel)2798 java.net.URL getURL(String columnLabel) throws SQLException; 2799 2800 /** 2801 * Updates the designated column with a <code>java.sql.Ref</code> value. 2802 * The updater methods are used to update column values in the 2803 * current row or the insert row. The updater methods do not 2804 * update the underlying database; instead the <code>updateRow</code> or 2805 * <code>insertRow</code> methods are called to update the database. 2806 * 2807 * @param columnIndex the first column is 1, the second is 2, ... 2808 * @param x the new column value 2809 * @exception SQLException if the columnIndex is not valid; 2810 * if a database access error occurs; 2811 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2812 * or this method is called on a closed result set 2813 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2814 * this method 2815 * @since 1.4 2816 */ updateRef(int columnIndex, java.sql.Ref x)2817 void updateRef(int columnIndex, java.sql.Ref x) throws SQLException; 2818 2819 /** 2820 * Updates the designated column with a <code>java.sql.Ref</code> value. 2821 * The updater methods are used to update column values in the 2822 * current row or the insert row. The updater methods do not 2823 * update the underlying database; instead the <code>updateRow</code> or 2824 * <code>insertRow</code> methods are called to update the database. 2825 * 2826 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2827 * @param x the new column value 2828 * @exception SQLException if the columnLabel is not valid; 2829 * if a database access error occurs; 2830 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2831 * or this method is called on a closed result set 2832 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2833 * this method 2834 * @since 1.4 2835 */ updateRef(String columnLabel, java.sql.Ref x)2836 void updateRef(String columnLabel, java.sql.Ref x) throws SQLException; 2837 2838 /** 2839 * Updates the designated column with a <code>java.sql.Blob</code> value. 2840 * The updater methods are used to update column values in the 2841 * current row or the insert row. The updater methods do not 2842 * update the underlying database; instead the <code>updateRow</code> or 2843 * <code>insertRow</code> methods are called to update the database. 2844 * 2845 * @param columnIndex the first column is 1, the second is 2, ... 2846 * @param x the new column value 2847 * @exception SQLException if the columnIndex is not valid; 2848 * if a database access error occurs; 2849 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2850 * or this method is called on a closed result set 2851 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2852 * this method 2853 * @since 1.4 2854 */ updateBlob(int columnIndex, java.sql.Blob x)2855 void updateBlob(int columnIndex, java.sql.Blob x) throws SQLException; 2856 2857 /** 2858 * Updates the designated column with a <code>java.sql.Blob</code> value. 2859 * The updater methods are used to update column values in the 2860 * current row or the insert row. The updater methods do not 2861 * update the underlying database; instead the <code>updateRow</code> or 2862 * <code>insertRow</code> methods are called to update the database. 2863 * 2864 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2865 * @param x the new column value 2866 * @exception SQLException if the columnLabel is not valid; 2867 * if a database access error occurs; 2868 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2869 * or this method is called on a closed result set 2870 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2871 * this method 2872 * @since 1.4 2873 */ updateBlob(String columnLabel, java.sql.Blob x)2874 void updateBlob(String columnLabel, java.sql.Blob x) throws SQLException; 2875 2876 /** 2877 * Updates the designated column with a <code>java.sql.Clob</code> value. 2878 * The updater methods are used to update column values in the 2879 * current row or the insert row. The updater methods do not 2880 * update the underlying database; instead the <code>updateRow</code> or 2881 * <code>insertRow</code> methods are called to update the database. 2882 * 2883 * @param columnIndex the first column is 1, the second is 2, ... 2884 * @param x the new column value 2885 * @exception SQLException if the columnIndex is not valid; 2886 * if a database access error occurs; 2887 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2888 * or this method is called on a closed result set 2889 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2890 * this method 2891 * @since 1.4 2892 */ updateClob(int columnIndex, java.sql.Clob x)2893 void updateClob(int columnIndex, java.sql.Clob x) throws SQLException; 2894 2895 /** 2896 * Updates the designated column with a <code>java.sql.Clob</code> value. 2897 * The updater methods are used to update column values in the 2898 * current row or the insert row. The updater methods do not 2899 * update the underlying database; instead the <code>updateRow</code> or 2900 * <code>insertRow</code> methods are called to update the database. 2901 * 2902 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2903 * @param x the new column value 2904 * @exception SQLException if the columnLabel is not valid; 2905 * if a database access error occurs; 2906 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2907 * or this method is called on a closed result set 2908 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2909 * this method 2910 * @since 1.4 2911 */ updateClob(String columnLabel, java.sql.Clob x)2912 void updateClob(String columnLabel, java.sql.Clob x) throws SQLException; 2913 2914 /** 2915 * Updates the designated column with a <code>java.sql.Array</code> value. 2916 * The updater methods are used to update column values in the 2917 * current row or the insert row. The updater methods do not 2918 * update the underlying database; instead the <code>updateRow</code> or 2919 * <code>insertRow</code> methods are called to update the database. 2920 * 2921 * @param columnIndex the first column is 1, the second is 2, ... 2922 * @param x the new column value 2923 * @exception SQLException if the columnIndex is not valid; 2924 * if a database access error occurs; 2925 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2926 * or this method is called on a closed result set 2927 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2928 * this method 2929 * @since 1.4 2930 */ updateArray(int columnIndex, java.sql.Array x)2931 void updateArray(int columnIndex, java.sql.Array x) throws SQLException; 2932 2933 /** 2934 * Updates the designated column with a <code>java.sql.Array</code> value. 2935 * The updater methods are used to update column values in the 2936 * current row or the insert row. The updater methods do not 2937 * update the underlying database; instead the <code>updateRow</code> or 2938 * <code>insertRow</code> methods are called to update the database. 2939 * 2940 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2941 * @param x the new column value 2942 * @exception SQLException if the columnLabel is not valid; 2943 * if a database access error occurs; 2944 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 2945 * or this method is called on a closed result set 2946 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2947 * this method 2948 * @since 1.4 2949 */ updateArray(String columnLabel, java.sql.Array x)2950 void updateArray(String columnLabel, java.sql.Array x) throws SQLException; 2951 2952 //------------------------- JDBC 4.0 ----------------------------------- 2953 2954 /** 2955 * Retrieves the value of the designated column in the current row of this 2956 * <code>ResultSet</code> object as a <code>java.sql.RowId</code> object in the Java 2957 * programming language. 2958 * 2959 * @param columnIndex the first column is 1, the second 2, ... 2960 * @return the column value; if the value is a SQL <code>NULL</code> the 2961 * value returned is <code>null</code> 2962 * @throws SQLException if the columnIndex is not valid; 2963 * if a database access error occurs 2964 * or this method is called on a closed result set 2965 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2966 * this method 2967 * @since 1.6 2968 */ getRowId(int columnIndex)2969 RowId getRowId(int columnIndex) throws SQLException; 2970 2971 /** 2972 * Retrieves the value of the designated column in the current row of this 2973 * <code>ResultSet</code> object as a <code>java.sql.RowId</code> object in the Java 2974 * programming language. 2975 * 2976 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 2977 * @return the column value ; if the value is a SQL <code>NULL</code> the 2978 * value returned is <code>null</code> 2979 * @throws SQLException if the columnLabel is not valid; 2980 * if a database access error occurs 2981 * or this method is called on a closed result set 2982 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 2983 * this method 2984 * @since 1.6 2985 */ getRowId(String columnLabel)2986 RowId getRowId(String columnLabel) throws SQLException; 2987 2988 /** 2989 * Updates the designated column with a <code>RowId</code> value. The updater 2990 * methods are used to update column values in the current row or the insert 2991 * row. The updater methods do not update the underlying database; instead 2992 * the <code>updateRow</code> or <code>insertRow</code> methods are called 2993 * to update the database. 2994 * 2995 * @param columnIndex the first column is 1, the second 2, ... 2996 * @param x the column value 2997 * @exception SQLException if the columnIndex is not valid; 2998 * if a database access error occurs; 2999 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3000 * or this method is called on a closed result set 3001 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3002 * this method 3003 * @since 1.6 3004 */ updateRowId(int columnIndex, RowId x)3005 void updateRowId(int columnIndex, RowId x) throws SQLException; 3006 3007 /** 3008 * Updates the designated column with a <code>RowId</code> value. The updater 3009 * methods are used to update column values in the current row or the insert 3010 * row. The updater methods do not update the underlying database; instead 3011 * the <code>updateRow</code> or <code>insertRow</code> methods are called 3012 * to update the database. 3013 * 3014 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3015 * @param x the column value 3016 * @exception SQLException if the columnLabel is not valid; 3017 * if a database access error occurs; 3018 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3019 * or this method is called on a closed result set 3020 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3021 * this method 3022 * @since 1.6 3023 */ updateRowId(String columnLabel, RowId x)3024 void updateRowId(String columnLabel, RowId x) throws SQLException; 3025 3026 /** 3027 * Retrieves the holdability of this <code>ResultSet</code> object 3028 * @return either <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> 3029 * @throws SQLException if a database access error occurs 3030 * or this method is called on a closed result set 3031 * @since 1.6 3032 */ getHoldability()3033 int getHoldability() throws SQLException; 3034 3035 /** 3036 * Retrieves whether this <code>ResultSet</code> object has been closed. A <code>ResultSet</code> is closed if the 3037 * method close has been called on it, or if it is automatically closed. 3038 * 3039 * @return true if this <code>ResultSet</code> object is closed; false if it is still open 3040 * @throws SQLException if a database access error occurs 3041 * @since 1.6 3042 */ isClosed()3043 boolean isClosed() throws SQLException; 3044 3045 /** 3046 * Updates the designated column with a <code>String</code> value. 3047 * It is intended for use when updating <code>NCHAR</code>,<code>NVARCHAR</code> 3048 * and <code>LONGNVARCHAR</code> columns. 3049 * The updater methods are used to update column values in the 3050 * current row or the insert row. The updater methods do not 3051 * update the underlying database; instead the <code>updateRow</code> or 3052 * <code>insertRow</code> methods are called to update the database. 3053 * 3054 * @param columnIndex the first column is 1, the second 2, ... 3055 * @param nString the value for the column to be updated 3056 * @throws SQLException if the columnIndex is not valid; 3057 * if the driver does not support national 3058 * character sets; if the driver can detect that a data conversion 3059 * error could occur; this method is called on a closed result set; 3060 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3061 * or if a database access error occurs 3062 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3063 * this method 3064 * @since 1.6 3065 */ updateNString(int columnIndex, String nString)3066 void updateNString(int columnIndex, String nString) throws SQLException; 3067 3068 /** 3069 * Updates the designated column with a <code>String</code> value. 3070 * It is intended for use when updating <code>NCHAR</code>,<code>NVARCHAR</code> 3071 * and <code>LONGNVARCHAR</code> columns. 3072 * The updater methods are used to update column values in the 3073 * current row or the insert row. The updater methods do not 3074 * update the underlying database; instead the <code>updateRow</code> or 3075 * <code>insertRow</code> methods are called to update the database. 3076 * 3077 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3078 * @param nString the value for the column to be updated 3079 * @throws SQLException if the columnLabel is not valid; 3080 * if the driver does not support national 3081 * character sets; if the driver can detect that a data conversion 3082 * error could occur; this method is called on a closed result set; 3083 * the result set concurrency is <CODE>CONCUR_READ_ONLY</code> 3084 * or if a database access error occurs 3085 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3086 * this method 3087 * @since 1.6 3088 */ updateNString(String columnLabel, String nString)3089 void updateNString(String columnLabel, String nString) throws SQLException; 3090 3091 /** 3092 * Updates the designated column with a <code>java.sql.NClob</code> value. 3093 * The updater methods are used to update column values in the 3094 * current row or the insert row. The updater methods do not 3095 * update the underlying database; instead the <code>updateRow</code> or 3096 * <code>insertRow</code> methods are called to update the database. 3097 * 3098 * @param columnIndex the first column is 1, the second 2, ... 3099 * @param nClob the value for the column to be updated 3100 * @throws SQLException if the columnIndex is not valid; 3101 * if the driver does not support national 3102 * character sets; if the driver can detect that a data conversion 3103 * error could occur; this method is called on a closed result set; 3104 * if a database access error occurs or 3105 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3106 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3107 * this method 3108 * @since 1.6 3109 */ updateNClob(int columnIndex, NClob nClob)3110 void updateNClob(int columnIndex, NClob nClob) throws SQLException; 3111 3112 /** 3113 * Updates the designated column with a <code>java.sql.NClob</code> value. 3114 * The updater methods are used to update column values in the 3115 * current row or the insert row. The updater methods do not 3116 * update the underlying database; instead the <code>updateRow</code> or 3117 * <code>insertRow</code> methods are called to update the database. 3118 * 3119 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3120 * @param nClob the value for the column to be updated 3121 * @throws SQLException if the columnLabel is not valid; 3122 * if the driver does not support national 3123 * character sets; if the driver can detect that a data conversion 3124 * error could occur; this method is called on a closed result set; 3125 * if a database access error occurs or 3126 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3127 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3128 * this method 3129 * @since 1.6 3130 */ updateNClob(String columnLabel, NClob nClob)3131 void updateNClob(String columnLabel, NClob nClob) throws SQLException; 3132 3133 /** 3134 * Retrieves the value of the designated column in the current row 3135 * of this <code>ResultSet</code> object as a <code>NClob</code> object 3136 * in the Java programming language. 3137 * 3138 * @param columnIndex the first column is 1, the second is 2, ... 3139 * @return a <code>NClob</code> object representing the SQL 3140 * <code>NCLOB</code> value in the specified column 3141 * @exception SQLException if the columnIndex is not valid; 3142 * if the driver does not support national 3143 * character sets; if the driver can detect that a data conversion 3144 * error could occur; this method is called on a closed result set 3145 * or if a database access error occurs 3146 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3147 * this method 3148 * @since 1.6 3149 */ getNClob(int columnIndex)3150 NClob getNClob(int columnIndex) throws SQLException; 3151 3152 /** 3153 * Retrieves the value of the designated column in the current row 3154 * of this <code>ResultSet</code> object as a <code>NClob</code> object 3155 * in the Java programming language. 3156 * 3157 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3158 * @return a <code>NClob</code> object representing the SQL <code>NCLOB</code> 3159 * value in the specified column 3160 * @exception SQLException if the columnLabel is not valid; 3161 * if the driver does not support national 3162 * character sets; if the driver can detect that a data conversion 3163 * error could occur; this method is called on a closed result set 3164 * or if a database access error occurs 3165 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3166 * this method 3167 * @since 1.6 3168 */ getNClob(String columnLabel)3169 NClob getNClob(String columnLabel) throws SQLException; 3170 3171 /** 3172 * Retrieves the value of the designated column in the current row of 3173 * this <code>ResultSet</code> as a 3174 * <code>java.sql.SQLXML</code> object in the Java programming language. 3175 * @param columnIndex the first column is 1, the second is 2, ... 3176 * @return a <code>SQLXML</code> object that maps an <code>SQL XML</code> value 3177 * @throws SQLException if the columnIndex is not valid; 3178 * if a database access error occurs 3179 * or this method is called on a closed result set 3180 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3181 * this method 3182 * @since 1.6 3183 */ getSQLXML(int columnIndex)3184 SQLXML getSQLXML(int columnIndex) throws SQLException; 3185 3186 /** 3187 * Retrieves the value of the designated column in the current row of 3188 * this <code>ResultSet</code> as a 3189 * <code>java.sql.SQLXML</code> object in the Java programming language. 3190 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3191 * @return a <code>SQLXML</code> object that maps an <code>SQL XML</code> value 3192 * @throws SQLException if the columnLabel is not valid; 3193 * if a database access error occurs 3194 * or this method is called on a closed result set 3195 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3196 * this method 3197 * @since 1.6 3198 */ getSQLXML(String columnLabel)3199 SQLXML getSQLXML(String columnLabel) throws SQLException; 3200 /** 3201 * Updates the designated column with a <code>java.sql.SQLXML</code> value. 3202 * The updater 3203 * methods are used to update column values in the current row or the insert 3204 * row. The updater methods do not update the underlying database; instead 3205 * the <code>updateRow</code> or <code>insertRow</code> methods are called 3206 * to update the database. 3207 * <p> 3208 * 3209 * @param columnIndex the first column is 1, the second 2, ... 3210 * @param xmlObject the value for the column to be updated 3211 * @throws SQLException if the columnIndex is not valid; 3212 * if a database access error occurs; this method 3213 * is called on a closed result set; 3214 * the <code>java.xml.transform.Result</code>, 3215 * <code>Writer</code> or <code>OutputStream</code> has not been closed 3216 * for the <code>SQLXML</code> object; 3217 * if there is an error processing the XML value or 3218 * the result set concurrency is <code>CONCUR_READ_ONLY</code>. The <code>getCause</code> method 3219 * of the exception may provide a more detailed exception, for example, if the 3220 * stream does not contain valid XML. 3221 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3222 * this method 3223 * @since 1.6 3224 */ updateSQLXML(int columnIndex, SQLXML xmlObject)3225 void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException; 3226 /** 3227 * Updates the designated column with a <code>java.sql.SQLXML</code> value. 3228 * The updater 3229 * methods are used to update column values in the current row or the insert 3230 * row. The updater methods do not update the underlying database; instead 3231 * the <code>updateRow</code> or <code>insertRow</code> methods are called 3232 * to update the database. 3233 * <p> 3234 * 3235 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3236 * @param xmlObject the column value 3237 * @throws SQLException if the columnLabel is not valid; 3238 * if a database access error occurs; this method 3239 * is called on a closed result set; 3240 * the <code>java.xml.transform.Result</code>, 3241 * <code>Writer</code> or <code>OutputStream</code> has not been closed 3242 * for the <code>SQLXML</code> object; 3243 * if there is an error processing the XML value or 3244 * the result set concurrency is <code>CONCUR_READ_ONLY</code>. The <code>getCause</code> method 3245 * of the exception may provide a more detailed exception, for example, if the 3246 * stream does not contain valid XML. 3247 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3248 * this method 3249 * @since 1.6 3250 */ updateSQLXML(String columnLabel, SQLXML xmlObject)3251 void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException; 3252 3253 /** 3254 * Retrieves the value of the designated column in the current row 3255 * of this <code>ResultSet</code> object as 3256 * a <code>String</code> in the Java programming language. 3257 * It is intended for use when 3258 * accessing <code>NCHAR</code>,<code>NVARCHAR</code> 3259 * and <code>LONGNVARCHAR</code> columns. 3260 * 3261 * @param columnIndex the first column is 1, the second is 2, ... 3262 * @return the column value; if the value is SQL <code>NULL</code>, the 3263 * value returned is <code>null</code> 3264 * @exception SQLException if the columnIndex is not valid; 3265 * if a database access error occurs 3266 * or this method is called on a closed result set 3267 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3268 * this method 3269 * @since 1.6 3270 */ getNString(int columnIndex)3271 String getNString(int columnIndex) throws SQLException; 3272 3273 3274 /** 3275 * Retrieves the value of the designated column in the current row 3276 * of this <code>ResultSet</code> object as 3277 * a <code>String</code> in the Java programming language. 3278 * It is intended for use when 3279 * accessing <code>NCHAR</code>,<code>NVARCHAR</code> 3280 * and <code>LONGNVARCHAR</code> columns. 3281 * 3282 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3283 * @return the column value; if the value is SQL <code>NULL</code>, the 3284 * value returned is <code>null</code> 3285 * @exception SQLException if the columnLabel is not valid; 3286 * if a database access error occurs 3287 * or this method is called on a closed result set 3288 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3289 * this method 3290 * @since 1.6 3291 */ getNString(String columnLabel)3292 String getNString(String columnLabel) throws SQLException; 3293 3294 3295 /** 3296 * Retrieves the value of the designated column in the current row 3297 * of this <code>ResultSet</code> object as a 3298 * <code>java.io.Reader</code> object. 3299 * It is intended for use when 3300 * accessing <code>NCHAR</code>,<code>NVARCHAR</code> 3301 * and <code>LONGNVARCHAR</code> columns. 3302 * 3303 * @return a <code>java.io.Reader</code> object that contains the column 3304 * value; if the value is SQL <code>NULL</code>, the value returned is 3305 * <code>null</code> in the Java programming language. 3306 * @param columnIndex the first column is 1, the second is 2, ... 3307 * @exception SQLException if the columnIndex is not valid; 3308 * if a database access error occurs 3309 * or this method is called on a closed result set 3310 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3311 * this method 3312 * @since 1.6 3313 */ getNCharacterStream(int columnIndex)3314 java.io.Reader getNCharacterStream(int columnIndex) throws SQLException; 3315 3316 /** 3317 * Retrieves the value of the designated column in the current row 3318 * of this <code>ResultSet</code> object as a 3319 * <code>java.io.Reader</code> object. 3320 * It is intended for use when 3321 * accessing <code>NCHAR</code>,<code>NVARCHAR</code> 3322 * and <code>LONGNVARCHAR</code> columns. 3323 * 3324 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3325 * @return a <code>java.io.Reader</code> object that contains the column 3326 * value; if the value is SQL <code>NULL</code>, the value returned is 3327 * <code>null</code> in the Java programming language 3328 * @exception SQLException if the columnLabel is not valid; 3329 * if a database access error occurs 3330 * or this method is called on a closed result set 3331 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3332 * this method 3333 * @since 1.6 3334 */ getNCharacterStream(String columnLabel)3335 java.io.Reader getNCharacterStream(String columnLabel) throws SQLException; 3336 3337 /** 3338 * Updates the designated column with a character stream value, which will have 3339 * the specified number of bytes. The 3340 * driver does the necessary conversion from Java character format to 3341 * the national character set in the database. 3342 * It is intended for use when 3343 * updating <code>NCHAR</code>,<code>NVARCHAR</code> 3344 * and <code>LONGNVARCHAR</code> columns. 3345 * <p> 3346 * The updater methods are used to update column values in the 3347 * current row or the insert row. The updater methods do not 3348 * update the underlying database; instead the <code>updateRow</code> or 3349 * <code>insertRow</code> methods are called to update the database. 3350 * 3351 * @param columnIndex the first column is 1, the second is 2, ... 3352 * @param x the new column value 3353 * @param length the length of the stream 3354 * @exception SQLException if the columnIndex is not valid; 3355 * if a database access error occurs; 3356 * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set 3357 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3358 * this method 3359 * @since 1.6 3360 */ updateNCharacterStream(int columnIndex, java.io.Reader x, long length)3361 void updateNCharacterStream(int columnIndex, 3362 java.io.Reader x, 3363 long length) throws SQLException; 3364 3365 /** 3366 * Updates the designated column with a character stream value, which will have 3367 * the specified number of bytes. The 3368 * driver does the necessary conversion from Java character format to 3369 * the national character set in the database. 3370 * It is intended for use when 3371 * updating <code>NCHAR</code>,<code>NVARCHAR</code> 3372 * and <code>LONGNVARCHAR</code> columns. 3373 * <p> 3374 * The updater methods are used to update column values in the 3375 * current row or the insert row. The updater methods do not 3376 * update the underlying database; instead the <code>updateRow</code> or 3377 * <code>insertRow</code> methods are called to update the database. 3378 * 3379 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3380 * @param reader the <code>java.io.Reader</code> object containing 3381 * the new column value 3382 * @param length the length of the stream 3383 * @exception SQLException if the columnLabel is not valid; 3384 * if a database access error occurs; 3385 * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set 3386 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3387 * this method 3388 * @since 1.6 3389 */ updateNCharacterStream(String columnLabel, java.io.Reader reader, long length)3390 void updateNCharacterStream(String columnLabel, 3391 java.io.Reader reader, 3392 long length) throws SQLException; 3393 /** 3394 * Updates the designated column with an ascii stream value, which will have 3395 * the specified number of bytes. 3396 * <p> 3397 * The updater methods are used to update column values in the 3398 * current row or the insert row. The updater methods do not 3399 * update the underlying database; instead the <code>updateRow</code> or 3400 * <code>insertRow</code> methods are called to update the database. 3401 * 3402 * @param columnIndex the first column is 1, the second is 2, ... 3403 * @param x the new column value 3404 * @param length the length of the stream 3405 * @exception SQLException if the columnIndex is not valid; 3406 * if a database access error occurs; 3407 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3408 * or this method is called on a closed result set 3409 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3410 * this method 3411 * @since 1.6 3412 */ updateAsciiStream(int columnIndex, java.io.InputStream x, long length)3413 void updateAsciiStream(int columnIndex, 3414 java.io.InputStream x, 3415 long length) throws SQLException; 3416 3417 /** 3418 * Updates the designated column with a binary stream value, which will have 3419 * the specified number of bytes. 3420 * <p> 3421 * The updater methods are used to update column values in the 3422 * current row or the insert row. The updater methods do not 3423 * update the underlying database; instead the <code>updateRow</code> or 3424 * <code>insertRow</code> methods are called to update the database. 3425 * 3426 * @param columnIndex the first column is 1, the second is 2, ... 3427 * @param x the new column value 3428 * @param length the length of the stream 3429 * @exception SQLException if the columnIndex is not valid; 3430 * if a database access error occurs; 3431 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3432 * or this method is called on a closed result set 3433 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3434 * this method 3435 * @since 1.6 3436 */ updateBinaryStream(int columnIndex, java.io.InputStream x, long length)3437 void updateBinaryStream(int columnIndex, 3438 java.io.InputStream x, 3439 long length) throws SQLException; 3440 3441 /** 3442 * Updates the designated column with a character stream value, which will have 3443 * the specified number of bytes. 3444 * <p> 3445 * The updater methods are used to update column values in the 3446 * current row or the insert row. The updater methods do not 3447 * update the underlying database; instead the <code>updateRow</code> or 3448 * <code>insertRow</code> methods are called to update the database. 3449 * 3450 * @param columnIndex the first column is 1, the second is 2, ... 3451 * @param x the new column value 3452 * @param length the length of the stream 3453 * @exception SQLException if the columnIndex is not valid; 3454 * if a database access error occurs; 3455 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3456 * or this method is called on a closed result set 3457 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3458 * this method 3459 * @since 1.6 3460 */ updateCharacterStream(int columnIndex, java.io.Reader x, long length)3461 void updateCharacterStream(int columnIndex, 3462 java.io.Reader x, 3463 long length) throws SQLException; 3464 /** 3465 * Updates the designated column with an ascii stream value, which will have 3466 * the specified number of bytes. 3467 * <p> 3468 * The updater methods are used to update column values in the 3469 * current row or the insert row. The updater methods do not 3470 * update the underlying database; instead the <code>updateRow</code> or 3471 * <code>insertRow</code> methods are called to update the database. 3472 * 3473 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3474 * @param x the new column value 3475 * @param length the length of the stream 3476 * @exception SQLException if the columnLabel is not valid; 3477 * if a database access error occurs; 3478 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3479 * or this method is called on a closed result set 3480 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3481 * this method 3482 * @since 1.6 3483 */ updateAsciiStream(String columnLabel, java.io.InputStream x, long length)3484 void updateAsciiStream(String columnLabel, 3485 java.io.InputStream x, 3486 long length) throws SQLException; 3487 3488 /** 3489 * Updates the designated column with a binary stream value, which will have 3490 * the specified number of bytes. 3491 * <p> 3492 * The updater methods are used to update column values in the 3493 * current row or the insert row. The updater methods do not 3494 * update the underlying database; instead the <code>updateRow</code> or 3495 * <code>insertRow</code> methods are called to update the database. 3496 * 3497 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3498 * @param x the new column value 3499 * @param length the length of the stream 3500 * @exception SQLException if the columnLabel is not valid; 3501 * if a database access error occurs; 3502 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3503 * or this method is called on a closed result set 3504 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3505 * this method 3506 * @since 1.6 3507 */ updateBinaryStream(String columnLabel, java.io.InputStream x, long length)3508 void updateBinaryStream(String columnLabel, 3509 java.io.InputStream x, 3510 long length) throws SQLException; 3511 3512 /** 3513 * Updates the designated column with a character stream value, which will have 3514 * the specified number of bytes. 3515 * <p> 3516 * The updater methods are used to update column values in the 3517 * current row or the insert row. The updater methods do not 3518 * update the underlying database; instead the <code>updateRow</code> or 3519 * <code>insertRow</code> methods are called to update the database. 3520 * 3521 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3522 * @param reader the <code>java.io.Reader</code> object containing 3523 * the new column value 3524 * @param length the length of the stream 3525 * @exception SQLException if the columnLabel is not valid; 3526 * if a database access error occurs; 3527 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3528 * or this method is called on a closed result set 3529 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3530 * this method 3531 * @since 1.6 3532 */ updateCharacterStream(String columnLabel, java.io.Reader reader, long length)3533 void updateCharacterStream(String columnLabel, 3534 java.io.Reader reader, 3535 long length) throws SQLException; 3536 /** 3537 * Updates the designated column using the given input stream, which 3538 * will have the specified number of bytes. 3539 * 3540 * <p> 3541 * The updater methods are used to update column values in the 3542 * current row or the insert row. The updater methods do not 3543 * update the underlying database; instead the <code>updateRow</code> or 3544 * <code>insertRow</code> methods are called to update the database. 3545 * 3546 * @param columnIndex the first column is 1, the second is 2, ... 3547 * @param inputStream An object that contains the data to set the parameter 3548 * value to. 3549 * @param length the number of bytes in the parameter data. 3550 * @exception SQLException if the columnIndex is not valid; 3551 * if a database access error occurs; 3552 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3553 * or this method is called on a closed result set 3554 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3555 * this method 3556 * @since 1.6 3557 */ updateBlob(int columnIndex, InputStream inputStream, long length)3558 void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException; 3559 3560 /** 3561 * Updates the designated column using the given input stream, which 3562 * will have the specified number of bytes. 3563 * 3564 * <p> 3565 * The updater methods are used to update column values in the 3566 * current row or the insert row. The updater methods do not 3567 * update the underlying database; instead the <code>updateRow</code> or 3568 * <code>insertRow</code> methods are called to update the database. 3569 * 3570 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3571 * @param inputStream An object that contains the data to set the parameter 3572 * value to. 3573 * @param length the number of bytes in the parameter data. 3574 * @exception SQLException if the columnLabel is not valid; 3575 * if a database access error occurs; 3576 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3577 * or this method is called on a closed result set 3578 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3579 * this method 3580 * @since 1.6 3581 */ updateBlob(String columnLabel, InputStream inputStream, long length)3582 void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException; 3583 3584 /** 3585 * Updates the designated column using the given <code>Reader</code> 3586 * object, which is the given number of characters long. 3587 * When a very large UNICODE value is input to a <code>LONGVARCHAR</code> 3588 * parameter, it may be more practical to send it via a 3589 * <code>java.io.Reader</code> object. The JDBC driver will 3590 * do any necessary conversion from UNICODE to the database char format. 3591 * 3592 * <p> 3593 * The updater methods are used to update column values in the 3594 * current row or the insert row. The updater methods do not 3595 * update the underlying database; instead the <code>updateRow</code> or 3596 * <code>insertRow</code> methods are called to update the database. 3597 * 3598 * @param columnIndex the first column is 1, the second is 2, ... 3599 * @param reader An object that contains the data to set the parameter value to. 3600 * @param length the number of characters in the parameter data. 3601 * @exception SQLException if the columnIndex is not valid; 3602 * if a database access error occurs; 3603 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3604 * or this method is called on a closed result set 3605 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3606 * this method 3607 * @since 1.6 3608 */ updateClob(int columnIndex, Reader reader, long length)3609 void updateClob(int columnIndex, Reader reader, long length) throws SQLException; 3610 3611 /** 3612 * Updates the designated column using the given <code>Reader</code> 3613 * object, which is the given number of characters long. 3614 * When a very large UNICODE value is input to a <code>LONGVARCHAR</code> 3615 * parameter, it may be more practical to send it via a 3616 * <code>java.io.Reader</code> object. The JDBC driver will 3617 * do any necessary conversion from UNICODE to the database char format. 3618 * 3619 * <p> 3620 * The updater methods are used to update column values in the 3621 * current row or the insert row. The updater methods do not 3622 * update the underlying database; instead the <code>updateRow</code> or 3623 * <code>insertRow</code> methods are called to update the database. 3624 * 3625 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3626 * @param reader An object that contains the data to set the parameter value to. 3627 * @param length the number of characters in the parameter data. 3628 * @exception SQLException if the columnLabel is not valid; 3629 * if a database access error occurs; 3630 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3631 * or this method is called on a closed result set 3632 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3633 * this method 3634 * @since 1.6 3635 */ updateClob(String columnLabel, Reader reader, long length)3636 void updateClob(String columnLabel, Reader reader, long length) throws SQLException; 3637 /** 3638 * Updates the designated column using the given <code>Reader</code> 3639 * object, which is the given number of characters long. 3640 * When a very large UNICODE value is input to a <code>LONGVARCHAR</code> 3641 * parameter, it may be more practical to send it via a 3642 * <code>java.io.Reader</code> object. The JDBC driver will 3643 * do any necessary conversion from UNICODE to the database char format. 3644 * 3645 * <p> 3646 * The updater methods are used to update column values in the 3647 * current row or the insert row. The updater methods do not 3648 * update the underlying database; instead the <code>updateRow</code> or 3649 * <code>insertRow</code> methods are called to update the database. 3650 * 3651 * @param columnIndex the first column is 1, the second 2, ... 3652 * @param reader An object that contains the data to set the parameter value to. 3653 * @param length the number of characters in the parameter data. 3654 * @throws SQLException if the columnIndex is not valid; 3655 * if the driver does not support national 3656 * character sets; if the driver can detect that a data conversion 3657 * error could occur; this method is called on a closed result set, 3658 * if a database access error occurs or 3659 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3660 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3661 * this method 3662 * @since 1.6 3663 */ updateNClob(int columnIndex, Reader reader, long length)3664 void updateNClob(int columnIndex, Reader reader, long length) throws SQLException; 3665 3666 /** 3667 * Updates the designated column using the given <code>Reader</code> 3668 * object, which is the given number of characters long. 3669 * When a very large UNICODE value is input to a <code>LONGVARCHAR</code> 3670 * parameter, it may be more practical to send it via a 3671 * <code>java.io.Reader</code> object. The JDBC driver will 3672 * do any necessary conversion from UNICODE to the database char format. 3673 * 3674 * <p> 3675 * The updater methods are used to update column values in the 3676 * current row or the insert row. The updater methods do not 3677 * update the underlying database; instead the <code>updateRow</code> or 3678 * <code>insertRow</code> methods are called to update the database. 3679 * 3680 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3681 * @param reader An object that contains the data to set the parameter value to. 3682 * @param length the number of characters in the parameter data. 3683 * @throws SQLException if the columnLabel is not valid; 3684 * if the driver does not support national 3685 * character sets; if the driver can detect that a data conversion 3686 * error could occur; this method is called on a closed result set; 3687 * if a database access error occurs or 3688 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3689 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3690 * this method 3691 * @since 1.6 3692 */ updateNClob(String columnLabel, Reader reader, long length)3693 void updateNClob(String columnLabel, Reader reader, long length) throws SQLException; 3694 3695 //--- 3696 3697 /** 3698 * Updates the designated column with a character stream value. 3699 * The data will be read from the stream 3700 * as needed until end-of-stream is reached. The 3701 * driver does the necessary conversion from Java character format to 3702 * the national character set in the database. 3703 * It is intended for use when 3704 * updating <code>NCHAR</code>,<code>NVARCHAR</code> 3705 * and <code>LONGNVARCHAR</code> columns. 3706 * <p> 3707 * The updater methods are used to update column values in the 3708 * current row or the insert row. The updater methods do not 3709 * update the underlying database; instead the <code>updateRow</code> or 3710 * <code>insertRow</code> methods are called to update the database. 3711 * 3712 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3713 * it might be more efficient to use a version of 3714 * <code>updateNCharacterStream</code> which takes a length parameter. 3715 * 3716 * @param columnIndex the first column is 1, the second is 2, ... 3717 * @param x the new column value 3718 * @exception SQLException if the columnIndex is not valid; 3719 * if a database access error occurs; 3720 * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set 3721 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3722 * this method 3723 * @since 1.6 3724 */ updateNCharacterStream(int columnIndex, java.io.Reader x)3725 void updateNCharacterStream(int columnIndex, 3726 java.io.Reader x) throws SQLException; 3727 3728 /** 3729 * Updates the designated column with a character stream value. 3730 * The data will be read from the stream 3731 * as needed until end-of-stream is reached. The 3732 * driver does the necessary conversion from Java character format to 3733 * the national character set in the database. 3734 * It is intended for use when 3735 * updating <code>NCHAR</code>,<code>NVARCHAR</code> 3736 * and <code>LONGNVARCHAR</code> columns. 3737 * <p> 3738 * The updater methods are used to update column values in the 3739 * current row or the insert row. The updater methods do not 3740 * update the underlying database; instead the <code>updateRow</code> or 3741 * <code>insertRow</code> methods are called to update the database. 3742 * 3743 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3744 * it might be more efficient to use a version of 3745 * <code>updateNCharacterStream</code> which takes a length parameter. 3746 * 3747 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3748 * @param reader the <code>java.io.Reader</code> object containing 3749 * the new column value 3750 * @exception SQLException if the columnLabel is not valid; 3751 * if a database access error occurs; 3752 * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set 3753 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3754 * this method 3755 * @since 1.6 3756 */ updateNCharacterStream(String columnLabel, java.io.Reader reader)3757 void updateNCharacterStream(String columnLabel, 3758 java.io.Reader reader) throws SQLException; 3759 /** 3760 * Updates the designated column with an ascii stream value. 3761 * The data will be read from the stream 3762 * as needed until end-of-stream is reached. 3763 * <p> 3764 * The updater methods are used to update column values in the 3765 * current row or the insert row. The updater methods do not 3766 * update the underlying database; instead the <code>updateRow</code> or 3767 * <code>insertRow</code> methods are called to update the database. 3768 * 3769 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3770 * it might be more efficient to use a version of 3771 * <code>updateAsciiStream</code> which takes a length parameter. 3772 * 3773 * @param columnIndex the first column is 1, the second is 2, ... 3774 * @param x the new column value 3775 * @exception SQLException if the columnIndex is not valid; 3776 * if a database access error occurs; 3777 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3778 * or this method is called on a closed result set 3779 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3780 * this method 3781 * @since 1.6 3782 */ updateAsciiStream(int columnIndex, java.io.InputStream x)3783 void updateAsciiStream(int columnIndex, 3784 java.io.InputStream x) throws SQLException; 3785 3786 /** 3787 * Updates the designated column with a binary stream value. 3788 * The data will be read from the stream 3789 * as needed until end-of-stream is reached. 3790 * <p> 3791 * The updater methods are used to update column values in the 3792 * current row or the insert row. The updater methods do not 3793 * update the underlying database; instead the <code>updateRow</code> or 3794 * <code>insertRow</code> methods are called to update the database. 3795 * 3796 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3797 * it might be more efficient to use a version of 3798 * <code>updateBinaryStream</code> which takes a length parameter. 3799 * 3800 * @param columnIndex the first column is 1, the second is 2, ... 3801 * @param x the new column value 3802 * @exception SQLException if the columnIndex is not valid; 3803 * if a database access error occurs; 3804 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3805 * or this method is called on a closed result set 3806 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3807 * this method 3808 * @since 1.6 3809 */ updateBinaryStream(int columnIndex, java.io.InputStream x)3810 void updateBinaryStream(int columnIndex, 3811 java.io.InputStream x) throws SQLException; 3812 3813 /** 3814 * Updates the designated column with a character stream value. 3815 * The data will be read from the stream 3816 * as needed until end-of-stream is reached. 3817 * <p> 3818 * The updater methods are used to update column values in the 3819 * current row or the insert row. The updater methods do not 3820 * update the underlying database; instead the <code>updateRow</code> or 3821 * <code>insertRow</code> methods are called to update the database. 3822 * 3823 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3824 * it might be more efficient to use a version of 3825 * <code>updateCharacterStream</code> which takes a length parameter. 3826 * 3827 * @param columnIndex the first column is 1, the second is 2, ... 3828 * @param x the new column value 3829 * @exception SQLException if the columnIndex is not valid; 3830 * if a database access error occurs; 3831 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3832 * or this method is called on a closed result set 3833 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3834 * this method 3835 * @since 1.6 3836 */ updateCharacterStream(int columnIndex, java.io.Reader x)3837 void updateCharacterStream(int columnIndex, 3838 java.io.Reader x) throws SQLException; 3839 /** 3840 * Updates the designated column with an ascii stream value. 3841 * The data will be read from the stream 3842 * as needed until end-of-stream is reached. 3843 * <p> 3844 * The updater methods are used to update column values in the 3845 * current row or the insert row. The updater methods do not 3846 * update the underlying database; instead the <code>updateRow</code> or 3847 * <code>insertRow</code> methods are called to update the database. 3848 * 3849 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3850 * it might be more efficient to use a version of 3851 * <code>updateAsciiStream</code> which takes a length parameter. 3852 * 3853 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3854 * @param x the new column value 3855 * @exception SQLException if the columnLabel is not valid; 3856 * if a database access error occurs; 3857 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3858 * or this method is called on a closed result set 3859 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3860 * this method 3861 * @since 1.6 3862 */ updateAsciiStream(String columnLabel, java.io.InputStream x)3863 void updateAsciiStream(String columnLabel, 3864 java.io.InputStream x) throws SQLException; 3865 3866 /** 3867 * Updates the designated column with a binary stream value. 3868 * The data will be read from the stream 3869 * as needed until end-of-stream is reached. 3870 * <p> 3871 * The updater methods are used to update column values in the 3872 * current row or the insert row. The updater methods do not 3873 * update the underlying database; instead the <code>updateRow</code> or 3874 * <code>insertRow</code> methods are called to update the database. 3875 * 3876 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3877 * it might be more efficient to use a version of 3878 * <code>updateBinaryStream</code> which takes a length parameter. 3879 * 3880 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3881 * @param x the new column value 3882 * @exception SQLException if the columnLabel is not valid; 3883 * if a database access error occurs; 3884 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3885 * or this method is called on a closed result set 3886 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3887 * this method 3888 * @since 1.6 3889 */ updateBinaryStream(String columnLabel, java.io.InputStream x)3890 void updateBinaryStream(String columnLabel, 3891 java.io.InputStream x) throws SQLException; 3892 3893 /** 3894 * Updates the designated column with a character stream value. 3895 * The data will be read from the stream 3896 * as needed until end-of-stream is reached. 3897 * <p> 3898 * The updater methods are used to update column values in the 3899 * current row or the insert row. The updater methods do not 3900 * update the underlying database; instead the <code>updateRow</code> or 3901 * <code>insertRow</code> methods are called to update the database. 3902 * 3903 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3904 * it might be more efficient to use a version of 3905 * <code>updateCharacterStream</code> which takes a length parameter. 3906 * 3907 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3908 * @param reader the <code>java.io.Reader</code> object containing 3909 * the new column value 3910 * @exception SQLException if the columnLabel is not valid; if a database access error occurs; 3911 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3912 * or this method is called on a closed result set 3913 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3914 * this method 3915 * @since 1.6 3916 */ updateCharacterStream(String columnLabel, java.io.Reader reader)3917 void updateCharacterStream(String columnLabel, 3918 java.io.Reader reader) throws SQLException; 3919 /** 3920 * Updates the designated column using the given input stream. The data will be read from the stream 3921 * as needed until end-of-stream is reached. 3922 * <p> 3923 * The updater methods are used to update column values in the 3924 * current row or the insert row. The updater methods do not 3925 * update the underlying database; instead the <code>updateRow</code> or 3926 * <code>insertRow</code> methods are called to update the database. 3927 * 3928 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3929 * it might be more efficient to use a version of 3930 * <code>updateBlob</code> which takes a length parameter. 3931 * 3932 * @param columnIndex the first column is 1, the second is 2, ... 3933 * @param inputStream An object that contains the data to set the parameter 3934 * value to. 3935 * @exception SQLException if the columnIndex is not valid; if a database access error occurs; 3936 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3937 * or this method is called on a closed result set 3938 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3939 * this method 3940 * @since 1.6 3941 */ updateBlob(int columnIndex, InputStream inputStream)3942 void updateBlob(int columnIndex, InputStream inputStream) throws SQLException; 3943 3944 /** 3945 * Updates the designated column using the given input stream. The data will be read from the stream 3946 * as needed until end-of-stream is reached. 3947 * <p> 3948 * The updater methods are used to update column values in the 3949 * current row or the insert row. The updater methods do not 3950 * update the underlying database; instead the <code>updateRow</code> or 3951 * <code>insertRow</code> methods are called to update the database. 3952 * 3953 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3954 * it might be more efficient to use a version of 3955 * <code>updateBlob</code> which takes a length parameter. 3956 * 3957 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 3958 * @param inputStream An object that contains the data to set the parameter 3959 * value to. 3960 * @exception SQLException if the columnLabel is not valid; if a database access error occurs; 3961 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3962 * or this method is called on a closed result set 3963 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3964 * this method 3965 * @since 1.6 3966 */ updateBlob(String columnLabel, InputStream inputStream)3967 void updateBlob(String columnLabel, InputStream inputStream) throws SQLException; 3968 3969 /** 3970 * Updates the designated column using the given <code>Reader</code> 3971 * object. 3972 * The data will be read from the stream 3973 * as needed until end-of-stream is reached. The JDBC driver will 3974 * do any necessary conversion from UNICODE to the database char format. 3975 * 3976 * <p> 3977 * The updater methods are used to update column values in the 3978 * current row or the insert row. The updater methods do not 3979 * update the underlying database; instead the <code>updateRow</code> or 3980 * <code>insertRow</code> methods are called to update the database. 3981 * 3982 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 3983 * it might be more efficient to use a version of 3984 * <code>updateClob</code> which takes a length parameter. 3985 * 3986 * @param columnIndex the first column is 1, the second is 2, ... 3987 * @param reader An object that contains the data to set the parameter value to. 3988 * @exception SQLException if the columnIndex is not valid; 3989 * if a database access error occurs; 3990 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 3991 * or this method is called on a closed result set 3992 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 3993 * this method 3994 * @since 1.6 3995 */ updateClob(int columnIndex, Reader reader)3996 void updateClob(int columnIndex, Reader reader) throws SQLException; 3997 3998 /** 3999 * Updates the designated column using the given <code>Reader</code> 4000 * object. 4001 * The data will be read from the stream 4002 * as needed until end-of-stream is reached. The JDBC driver will 4003 * do any necessary conversion from UNICODE to the database char format. 4004 * 4005 * <p> 4006 * The updater methods are used to update column values in the 4007 * current row or the insert row. The updater methods do not 4008 * update the underlying database; instead the <code>updateRow</code> or 4009 * <code>insertRow</code> methods are called to update the database. 4010 * 4011 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 4012 * it might be more efficient to use a version of 4013 * <code>updateClob</code> which takes a length parameter. 4014 * 4015 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 4016 * @param reader An object that contains the data to set the parameter value to. 4017 * @exception SQLException if the columnLabel is not valid; if a database access error occurs; 4018 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 4019 * or this method is called on a closed result set 4020 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 4021 * this method 4022 * @since 1.6 4023 */ updateClob(String columnLabel, Reader reader)4024 void updateClob(String columnLabel, Reader reader) throws SQLException; 4025 /** 4026 * Updates the designated column using the given <code>Reader</code> 4027 * 4028 * The data will be read from the stream 4029 * as needed until end-of-stream is reached. The JDBC driver will 4030 * do any necessary conversion from UNICODE to the database char format. 4031 * 4032 * <p> 4033 * The updater methods are used to update column values in the 4034 * current row or the insert row. The updater methods do not 4035 * update the underlying database; instead the <code>updateRow</code> or 4036 * <code>insertRow</code> methods are called to update the database. 4037 * 4038 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 4039 * it might be more efficient to use a version of 4040 * <code>updateNClob</code> which takes a length parameter. 4041 * 4042 * @param columnIndex the first column is 1, the second 2, ... 4043 * @param reader An object that contains the data to set the parameter value to. 4044 * @throws SQLException if the columnIndex is not valid; 4045 * if the driver does not support national 4046 * character sets; if the driver can detect that a data conversion 4047 * error could occur; this method is called on a closed result set, 4048 * if a database access error occurs or 4049 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 4050 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 4051 * this method 4052 * @since 1.6 4053 */ updateNClob(int columnIndex, Reader reader)4054 void updateNClob(int columnIndex, Reader reader) throws SQLException; 4055 4056 /** 4057 * Updates the designated column using the given <code>Reader</code> 4058 * object. 4059 * The data will be read from the stream 4060 * as needed until end-of-stream is reached. The JDBC driver will 4061 * do any necessary conversion from UNICODE to the database char format. 4062 * 4063 * <p> 4064 * The updater methods are used to update column values in the 4065 * current row or the insert row. The updater methods do not 4066 * update the underlying database; instead the <code>updateRow</code> or 4067 * <code>insertRow</code> methods are called to update the database. 4068 * 4069 * <P><B>Note:</B> Consult your JDBC driver documentation to determine if 4070 * it might be more efficient to use a version of 4071 * <code>updateNClob</code> which takes a length parameter. 4072 * 4073 * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column 4074 * @param reader An object that contains the data to set the parameter value to. 4075 * @throws SQLException if the columnLabel is not valid; if the driver does not support national 4076 * character sets; if the driver can detect that a data conversion 4077 * error could occur; this method is called on a closed result set; 4078 * if a database access error occurs or 4079 * the result set concurrency is <code>CONCUR_READ_ONLY</code> 4080 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 4081 * this method 4082 * @since 1.6 4083 */ updateNClob(String columnLabel, Reader reader)4084 void updateNClob(String columnLabel, Reader reader) throws SQLException; 4085 4086 } 4087