History

My first initial commit with all of mine experimental changes.

Dmitry Kabak (userdima committed 13 years ago

Commit d37b88d1 parent 3f5b46618352 files · +2598093 −-8690Browse files

Showing the changes to java/pkg/java/sql/ResultSet.java (1 of 18352 files). Show all

Unified · Split

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