KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > sql > ResultSet


1 /*
2  * @(#)ResultSet.java 1.49 04/06/28
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.sql;
9
10 import java.math.BigDecimal JavaDoc;
11 import java.util.Calendar JavaDoc;
12
13 /**
14  * A table of data representing a database result set, which
15  * is usually generated by executing a statement that queries the database.
16  *
17  * <P>A <code>ResultSet</code> object maintains a cursor pointing
18  * to its current row of data. Initially the cursor is positioned
19  * before the first row. The <code>next</code> method moves the
20  * cursor to the next row, and because it returns <code>false</code>
21  * when there are no more rows in the <code>ResultSet</code> object,
22  * it can be used in a <code>while</code> loop to iterate through
23  * the result set.
24  * <P>
25  * A default <code>ResultSet</code> object is not updatable and
26  * has a cursor that moves forward only. Thus, you can
27  * iterate through it only once and only from the first row to the
28  * last row. It is possible to
29  * produce <code>ResultSet</code> objects that are scrollable and/or
30  * updatable. The following code fragment, in which <code>con</code>
31  * is a valid <code>Connection</code> object, illustrates how to make
32  * a result set that is scrollable and insensitive to updates by others, and
33  * that is updatable. See <code>ResultSet</code> fields for other
34  * options.
35  * <PRE>
36  *
37  * Statement stmt = con.createStatement(
38  * ResultSet.TYPE_SCROLL_INSENSITIVE,
39  * ResultSet.CONCUR_UPDATABLE);
40  * ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
41  * // rs will be scrollable, will not show changes made by others,
42  * // and will be updatable
43  *
44  * </PRE>
45  * The <code>ResultSet</code> interface provides
46  * <i>getter</i> methods (<code>getBoolean</code>, <code>getLong</code>, and so on)
47  * for retrieving column values from the current row.
48  * Values can be retrieved using either the index number of the
49  * column or the name of the column. In general, using the
50  * column index will be more efficient. Columns are numbered from 1.
51  * For maximum portability, result set columns within each row should be
52  * read in left-to-right order, and each column should be read only once.
53  *
54  * <P>For the getter methods, a JDBC driver attempts
55  * to convert the underlying data to the Java type specified in the
56  * getter method and returns a suitable Java value. The JDBC specification
57  * has a table showing the allowable mappings from SQL types to Java types
58  * that can be used by the <code>ResultSet</code> getter methods.
59  * <P>
60  * <P>Column names used as input to getter methods are case
61  * insensitive. When a getter method is called with
62  * a column name and several columns have the same name,
63  * the value of the first matching column will be returned.
64  * The column name option is
65  * designed to be used when column names are used in the SQL
66  * query that generated the result set.
67  * For columns that are NOT explicitly named in the query, it
68  * is best to use column numbers. If column names are used, there is
69  * no way for the programmer to guarantee that they actually refer to
70  * the intended columns.
71  * <P>
72  * A set of updater methods were added to this interface
73  * in the JDBC 2.0 API (JDK 1.2).
74  * The comments regarding parameters
75  * to the getter methods also apply to parameters to the
76  * updater methods.
77  *<P>
78  * The updater methods may be used in two ways:
79  * <ol>
80  * <LI>to update a column value in the current row. In a scrollable
81  * <code>ResultSet</code> object, the cursor can be moved backwards
82  * and forwards, to an absolute position, or to a position
83  * relative to the current row.
84  * The following code fragment updates the <code>NAME</code> column
85  * in the fifth row of the <code>ResultSet</code> object
86  * <code>rs</code> and then uses the method <code>updateRow</code>
87  * to update the data source table from which <code>rs</code> was derived.
88  * <PRE>
89  *
90  * rs.absolute(5); // moves the cursor to the fifth row of rs
91  * rs.updateString("NAME", "AINSWORTH"); // updates the
92  * // <code>NAME</code> column of row 5 to be <code>AINSWORTH</code>
93  * rs.updateRow(); // updates the row in the data source
94  *
95  * </PRE>
96  * <LI>to insert column values into the insert row. An updatable
97  * <code>ResultSet</code> object has a special row associated with
98  * it that serves as a staging area for building a row to be inserted.
99  * The following code fragment moves the cursor to the insert row, builds
100  * a three-column row, and inserts it into <code>rs</code> and into
101  * the data source table using the method <code>insertRow</code>.
102  * <PRE>
103  *
104  * rs.moveToInsertRow(); // moves cursor to the insert row
105  * rs.updateString(1, "AINSWORTH"); // updates the
106  * // first column of the insert row to be <code>AINSWORTH</code>
107  * rs.updateInt(2,35); // updates the second column to be <code>35</code>
108  * rs.updateBoolean(3, true); // updates the third column to <code>true</code>
109  * rs.insertRow();
110  * rs.moveToCurrentRow();
111  *
112  * </PRE>
113  * </ol>
114  * <P>A <code>ResultSet</code> object is automatically closed when the
115  * <code>Statement</code> object that
116  * generated it is closed, re-executed, or used
117  * to retrieve the next result from a sequence of multiple results.
118  *
119  * <P>The number, types and properties of a <code>ResultSet</code>
120  * object's columns are provided by the <code>ResulSetMetaData</code>
121  * object returned by the <code>ResultSet.getMetaData</code> method.
122  *
123  * @see Statement#executeQuery
124  * @see Statement#getResultSet
125  * @see ResultSetMetaData
126  */

127
128 public interface ResultSet {
129
130     /**
131      * Moves the cursor down one row from its current position.
132      * A <code>ResultSet</code> cursor is initially positioned
133      * before the first row; the first call to the method
134      * <code>next</code> makes the first row the current row; the
135      * second call makes the second row the current row, and so on.
136      *
137      * <P>If an input stream is open for the current row, a call
138      * to the method <code>next</code> will
139      * implicitly close it. A <code>ResultSet</code> object's
140      * warning chain is cleared when a new row is read.
141      *
142      * @return <code>true</code> if the new current row is valid;
143      * <code>false</code> if there are no more rows
144      * @exception SQLException if a database access error occurs
145      */

146     boolean next() throws SQLException JavaDoc;
147
148
149     /**
150      * Releases this <code>ResultSet</code> object's database and
151      * JDBC resources immediately instead of waiting for
152      * this to happen when it is automatically closed.
153      *
154      * <P><B>Note:</B> A <code>ResultSet</code> object
155      * is automatically closed by the
156      * <code>Statement</code> object that generated it when
157      * that <code>Statement</code> object is closed,
158      * re-executed, or is used to retrieve the next result from a
159      * sequence of multiple results. A <code>ResultSet</code> object
160      * is also automatically closed when it is garbage collected.
161      *
162      * @exception SQLException if a database access error occurs
163      */

164     void close() throws SQLException JavaDoc;
165
166     /**
167      * Reports whether
168      * the last column read had a value of SQL <code>NULL</code>.
169      * Note that you must first call one of the getter methods
170      * on a column to try to read its value and then call
171      * the method <code>wasNull</code> to see if the value read was
172      * SQL <code>NULL</code>.
173      *
174      * @return <code>true</code> if the last column value read was SQL
175      * <code>NULL</code> and <code>false</code> otherwise
176      * @exception SQLException if a database access error occurs
177      */

178     boolean wasNull() throws SQLException JavaDoc;
179     
180     //======================================================================
181
// Methods for accessing results by column index
182
//======================================================================
183

184     /**
185      * Retrieves the value of the designated column in the current row
186      * of this <code>ResultSet</code> object as
187      * a <code>String</code> in the Java programming language.
188      *
189      * @param columnIndex the first column is 1, the second is 2, ...
190      * @return the column value; if the value is SQL <code>NULL</code>, the
191      * value returned is <code>null</code>
192      * @exception SQLException if a database access error occurs
193      */

194     String JavaDoc getString(int columnIndex) throws SQLException JavaDoc;
195
196     /**
197      * Retrieves the value of the designated column in the current row
198      * of this <code>ResultSet</code> object as
199      * a <code>boolean</code> in the Java programming language.
200      *
201      * @param columnIndex the first column is 1, the second is 2, ...
202      * @return the column value; if the value is SQL <code>NULL</code>, the
203      * value returned is <code>false</code>
204      * @exception SQLException if a database access error occurs
205      */

206     boolean getBoolean(int columnIndex) throws SQLException JavaDoc;
207
208     /**
209      * Retrieves the value of the designated column in the current row
210      * of this <code>ResultSet</code> object as
211      * a <code>byte</code> in the Java programming language.
212      *
213      * @param columnIndex the first column is 1, the second is 2, ...
214      * @return the column value; if the value is SQL <code>NULL</code>, the
215      * value returned is <code>0</code>
216      * @exception SQLException if a database access error occurs
217      */

218     byte getByte(int columnIndex) throws SQLException JavaDoc;
219
220     /**
221      * Retrieves the value of the designated column in the current row
222      * of this <code>ResultSet</code> object as
223      * a <code>short</code> in the Java programming language.
224      *
225      * @param columnIndex the first column is 1, the second is 2, ...
226      * @return the column value; if the value is SQL <code>NULL</code>, the
227      * value returned is <code>0</code>
228      * @exception SQLException if a database access error occurs
229      */

230     short getShort(int columnIndex) throws SQLException JavaDoc;
231
232     /**
233      * Retrieves the value of the designated column in the current row
234      * of this <code>ResultSet</code> object as
235      * an <code>int</code> in the Java programming language.
236      *
237      * @param columnIndex the first column is 1, the second is 2, ...
238      * @return the column value; if the value is SQL <code>NULL</code>, the
239      * value returned is <code>0</code>
240      * @exception SQLException if a database access error occurs
241      */

242     int getInt(int columnIndex) throws SQLException JavaDoc;
243
244     /**
245      * Retrieves the value of the designated column in the current row
246      * of this <code>ResultSet</code> object as
247      * a <code>long</code> in the Java programming language.
248      *
249      * @param columnIndex the first column is 1, the second is 2, ...
250      * @return the column value; if the value is SQL <code>NULL</code>, the
251      * value returned is <code>0</code>
252      * @exception SQLException if a database access error occurs
253      */

254     long getLong(int columnIndex) throws SQLException JavaDoc;
255
256     /**
257      * Retrieves the value of the designated column in the current row
258      * of this <code>ResultSet</code> object as
259      * a <code>float</code> in the Java programming language.
260      *
261      * @param columnIndex the first column is 1, the second is 2, ...
262      * @return the column value; if the value is SQL <code>NULL</code>, the
263      * value returned is <code>0</code>
264      * @exception SQLException if a database access error occurs
265      */

266     float getFloat(int columnIndex) throws SQLException JavaDoc;
267
268     /**
269      * Retrieves the value of the designated column in the current row
270      * of this <code>ResultSet</code> object as
271      * a <code>double</code> in the Java programming language.
272      *
273      * @param columnIndex the first column is 1, the second is 2, ...
274      * @return the column value; if the value is SQL <code>NULL</code>, the
275      * value returned is <code>0</code>
276      * @exception SQLException if a database access error occurs
277      */

278     double getDouble(int columnIndex) throws SQLException JavaDoc;
279
280     /**
281      * Retrieves the value of the designated column in the current row
282      * of this <code>ResultSet</code> object as
283      * a <code>java.sql.BigDecimal</code> in the Java programming language.
284      *
285      * @param columnIndex the first column is 1, the second is 2, ...
286      * @param scale the number of digits to the right of the decimal point
287      * @return the column value; if the value is SQL <code>NULL</code>, the
288      * value returned is <code>null</code>
289      * @exception SQLException if a database access error occurs
290      * @deprecated
291      */

292     @Deprecated JavaDoc
293     BigDecimal JavaDoc getBigDecimal(int columnIndex, int scale) throws SQLException JavaDoc;
294
295     /**
296      * Retrieves the value of the designated column in the current row
297      * of this <code>ResultSet</code> object as
298      * a <code>byte</code> array in the Java programming language.
299      * The bytes represent the raw values returned by the driver.
300      *
301      * @param columnIndex the first column is 1, the second is 2, ...
302      * @return the column value; if the value is SQL <code>NULL</code>, the
303      * value returned is <code>null</code>
304      * @exception SQLException if a database access error occurs
305      */

306     byte[] getBytes(int columnIndex) throws SQLException JavaDoc;
307
308     /**
309      * Retrieves the value of the designated column in the current row
310      * of this <code>ResultSet</code> object as
311      * a <code>java.sql.Date</code> object in the Java programming language.
312      *
313      * @param columnIndex the first column is 1, the second is 2, ...
314      * @return the column value; if the value is SQL <code>NULL</code>, the
315      * value returned is <code>null</code>
316      * @exception SQLException if a database access error occurs
317      */

318     java.sql.Date JavaDoc getDate(int columnIndex) throws SQLException JavaDoc;
319
320     /**
321      * Retrieves the value of the designated column in the current row
322      * of this <code>ResultSet</code> object as
323      * a <code>java.sql.Time</code> object in the Java programming language.
324      *
325      * @param columnIndex the first column is 1, the second is 2, ...
326      * @return the column value; if the value is SQL <code>NULL</code>, the
327      * value returned is <code>null</code>
328      * @exception SQLException if a database access error occurs
329      */

330     java.sql.Time JavaDoc getTime(int columnIndex) throws SQLException JavaDoc;
331
332     /**
333      * Retrieves the value of the designated column in the current row
334      * of this <code>ResultSet</code> object as
335      * a <code>java.sql.Timestamp</code> object in the Java programming language.
336      *
337      * @param columnIndex the first column is 1, the second is 2, ...
338      * @return the column value; if the value is SQL <code>NULL</code>, the
339      * value returned is <code>null</code>
340      * @exception SQLException if a database access error occurs
341      */

342     java.sql.Timestamp JavaDoc getTimestamp(int columnIndex) throws SQLException JavaDoc;
343
344     /**
345      * Retrieves the value of the designated column in the current row
346      * of this <code>ResultSet</code> object as
347      * a stream of ASCII characters. The value can then be read in chunks from the
348      * stream. This method is particularly
349      * suitable for retrieving large <char>LONGVARCHAR</char> values.
350      * The JDBC driver will
351      * do any necessary conversion from the database format into ASCII.
352      *
353      * <P><B>Note:</B> All the data in the returned stream must be
354      * read prior to getting the value of any other column. The next
355      * call to a getter method implicitly closes the stream. Also, a
356      * stream may return <code>0</code> when the method
357      * <code>InputStream.available</code>
358      * is called whether there is data available or not.
359      *
360      * @param columnIndex the first column is 1, the second is 2, ...
361      * @return a Java input stream that delivers the database column value
362      * as a stream of one-byte ASCII characters;
363      * if the value is SQL <code>NULL</code>, the
364      * value returned is <code>null</code>
365      * @exception SQLException if a database access error occurs
366      */

367     java.io.InputStream JavaDoc getAsciiStream(int columnIndex) throws SQLException JavaDoc;
368
369     /**
370      * Retrieves the value of the designated column in the current row
371      * of this <code>ResultSet</code> object as
372      * as a stream of two-byte Unicode characters. The first byte is
373      * the high byte; the second byte is the low byte.
374      *
375      * The value can then be read in chunks from the
376      * stream. This method is particularly
377      * suitable for retrieving large <code>LONGVARCHAR</code>values. The
378      * JDBC driver will do any necessary conversion from the database
379      * format into Unicode.
380      *
381      * <P><B>Note:</B> All the data in the returned stream must be
382      * read prior to getting the value of any other column. The next
383      * call to a getter method implicitly closes the stream.
384      * Also, a stream may return <code>0</code> when the method
385      * <code>InputStream.available</code>
386      * is called, whether there is data available or not.
387      *
388      * @param columnIndex the first column is 1, the second is 2, ...
389      * @return a Java input stream that delivers the database column value
390      * as a stream of two-byte Unicode characters;
391      * if the value is SQL <code>NULL</code>, the value returned is
392      * <code>null</code>
393      *
394      * @exception SQLException if a database access error occurs
395      * @deprecated use <code>getCharacterStream</code> in place of
396      * <code>getUnicodeStream</code>
397      */

398     @Deprecated JavaDoc
399     java.io.InputStream JavaDoc getUnicodeStream(int columnIndex) throws SQLException JavaDoc;
400
401     /**
402      * Retrieves the value of the designated column in the current row
403      * of this <code>ResultSet</code> object as a binary stream of
404      * uninterpreted bytes. The value can then be read in chunks from the
405      * stream. This method is particularly
406      * suitable for retrieving large <code>LONGVARBINARY</code> values.
407      *
408      * <P><B>Note:</B> All the data in the returned stream must be
409      * read prior to getting the value of any other column. The next
410      * call to a getter method implicitly closes the stream. Also, a
411      * stream may return <code>0</code> when the method
412      * <code>InputStream.available</code>
413      * is called whether there is data available or not.
414      *
415      * @param columnIndex the first column is 1, the second is 2, ...
416      * @return a Java input stream that delivers the database column value
417      * as a stream of uninterpreted bytes;
418      * if the value is SQL <code>NULL</code>, the value returned is
419      * <code>null</code>
420      * @exception SQLException if a database access error occurs
421      */

422     java.io.InputStream JavaDoc getBinaryStream(int columnIndex)
423         throws SQLException JavaDoc;
424
425
426     //======================================================================
427
// Methods for accessing results by column name
428
//======================================================================
429

430     /**
431      * Retrieves the value of the designated column in the current row
432      * of this <code>ResultSet</code> object as
433      * a <code>String</code> in the Java programming language.
434      *
435      * @param columnName the SQL name of the column
436      * @return the column value; if the value is SQL <code>NULL</code>, the
437      * value returned is <code>null</code>
438      * @exception SQLException if a database access error occurs
439      */

440     String JavaDoc getString(String JavaDoc columnName) throws SQLException JavaDoc;
441
442     /**
443      * Retrieves the value of the designated column in the current row
444      * of this <code>ResultSet</code> object as
445      * a <code>boolean</code> in the Java programming language.
446      *
447      * @param columnName the SQL name of the column
448      * @return the column value; if the value is SQL <code>NULL</code>, the
449      * value returned is <code>false</code>
450      * @exception SQLException if a database access error occurs
451      */

452     boolean getBoolean(String JavaDoc columnName) throws SQLException JavaDoc;
453
454     /**
455      * Retrieves the value of the designated column in the current row
456      * of this <code>ResultSet</code> object as
457      * a <code>byte</code> in the Java programming language.
458      *
459      * @param columnName the SQL name of the column
460      * @return the column value; if the value is SQL <code>NULL</code>, the
461      * value returned is <code>0</code>
462      * @exception SQLException if a database access error occurs
463      */

464     byte getByte(String JavaDoc columnName) throws SQLException JavaDoc;
465
466     /**
467      * Retrieves the value of the designated column in the current row
468      * of this <code>ResultSet</code> object as
469      * a <code>short</code> in the Java programming language.
470      *
471      * @param columnName the SQL name of the column
472      * @return the column value; if the value is SQL <code>NULL</code>, the
473      * value returned is <code>0</code>
474      * @exception SQLException if a database access error occurs
475      */

476     short getShort(String JavaDoc columnName) throws SQLException JavaDoc;
477
478     /**
479      * Retrieves the value of the designated column in the current row
480      * of this <code>ResultSet</code> object as
481      * an <code>int</code> in the Java programming language.
482      *
483      * @param columnName the SQL name of the column
484      * @return the column value; if the value is SQL <code>NULL</code>, the
485      * value returned is <code>0</code>
486      * @exception SQLException if a database access error occurs
487      */

488     int getInt(String JavaDoc columnName) throws SQLException JavaDoc;
489
490     /**
491      * Retrieves the value of the designated column in the current row
492      * of this <code>ResultSet</code> object as
493      * a <code>long</code> in the Java programming language.
494      *
495      * @param columnName the SQL name of the column
496      * @return the column value; if the value is SQL <code>NULL</code>, the
497      * value returned is <code>0</code>
498      * @exception SQLException if a database access error occurs
499      */

500     long getLong(String JavaDoc columnName) throws SQLException JavaDoc;
501
502     /**
503      * Retrieves the value of the designated column in the current row
504      * of this <code>ResultSet</code> object as
505      * a <code>float</code> in the Java programming language.
506      *
507      * @param columnName the SQL name of the column
508      * @return the column value; if the value is SQL <code>NULL</code>, the
509      * value returned is <code>0</code>
510      * @exception SQLException if a database access error occurs
511      */

512     float getFloat(String JavaDoc columnName) throws SQLException JavaDoc;
513
514     /**
515      * Retrieves the value of the designated column in the current row
516      * of this <code>ResultSet</code> object as
517      * a <code>double</code> in the Java programming language.
518      *
519      * @param columnName the SQL name of the column
520      * @return the column value; if the value is SQL <code>NULL</code>, the
521      * value returned is <code>0</code>
522      * @exception SQLException if a database access error occurs
523      */

524     double getDouble(String JavaDoc columnName) throws SQLException JavaDoc;
525
526     /**
527      * Retrieves the value of the designated column in the current row
528      * of this <code>ResultSet</code> object as
529      * a <code>java.math.BigDecimal</code> in the Java programming language.
530      *
531      * @param columnName the SQL name of the column
532      * @param scale the number of digits to the right of the decimal point
533      * @return the column value; if the value is SQL <code>NULL</code>, the
534      * value returned is <code>null</code>
535      * @exception SQLException if a database access error occurs
536      * @deprecated
537      */

538     @Deprecated JavaDoc
539     BigDecimal JavaDoc getBigDecimal(String JavaDoc columnName, int scale) throws SQLException JavaDoc;
540
541     /**
542      * Retrieves the value of the designated column in the current row
543      * of this <code>ResultSet</code> object as
544      * a <code>byte</code> array in the Java programming language.
545      * The bytes represent the raw values returned by the driver.
546      *
547      * @param columnName the SQL name of the column
548      * @return the column value; if the value is SQL <code>NULL</code>, the
549      * value returned is <code>null</code>
550      * @exception SQLException if a database access error occurs
551      */

552     byte[] getBytes(String JavaDoc columnName) throws SQLException JavaDoc;
553
554     /**
555      * Retrieves the value of the designated column in the current row
556      * of this <code>ResultSet</code> object as
557      * a <code>java.sql.Date</code> object in the Java programming language.
558      *
559      * @param columnName the SQL name of the column
560      * @return the column value; if the value is SQL <code>NULL</code>, the
561      * value returned is <code>null</code>
562      * @exception SQLException if a database access error occurs
563      */

564     java.sql.Date JavaDoc getDate(String JavaDoc columnName) throws SQLException JavaDoc;
565
566     /**
567      * Retrieves the value of the designated column in the current row
568      * of this <code>ResultSet</code> object as
569      * a <code>java.sql.Time</code> object in the Java programming language.
570      *
571      * @param columnName the SQL name of the column
572      * @return the column value;
573      * if the value is SQL <code>NULL</code>,
574      * the value returned is <code>null</code>
575      * @exception SQLException if a database access error occurs
576      */

577     java.sql.Time JavaDoc getTime(String JavaDoc columnName) throws SQLException JavaDoc;
578
579     /**
580      * Retrieves the value of the designated column in the current row
581      * of this <code>ResultSet</code> object as
582      * a <code>java.sql.Timestamp</code> object.
583      *
584      * @param columnName the SQL name of the column
585      * @return the column value; if the value is SQL <code>NULL</code>, the
586      * value returned is <code>null</code>
587      * @exception SQLException if a database access error occurs
588      */

589     java.sql.Timestamp JavaDoc getTimestamp(String JavaDoc columnName) throws SQLException JavaDoc;
590
591     /**
592      * Retrieves the value of the designated column in the current row
593      * of this <code>ResultSet</code> object as a stream of
594      * ASCII characters. The value can then be read in chunks from the
595      * stream. This method is particularly
596      * suitable for retrieving large <code>LONGVARCHAR</code> values.
597      * The JDBC driver will
598      * do any necessary conversion from the database format into ASCII.
599      *
600      * <P><B>Note:</B> All the data in the returned stream must be
601      * read prior to getting the value of any other column. The next
602      * call to a getter method implicitly closes the stream. Also, a
603      * stream may return <code>0</code> when the method <code>available</code>
604      * is called whether there is data available or not.
605      *
606      * @param columnName the SQL name of the column
607      * @return a Java input stream that delivers the database column value
608      * as a stream of one-byte ASCII characters.
609      * If the value is SQL <code>NULL</code>,
610      * the value returned is <code>null</code>.
611      * @exception SQLException if a database access error occurs
612      */

613     java.io.InputStream JavaDoc getAsciiStream(String JavaDoc columnName) throws SQLException JavaDoc;
614
615     /**
616      * Retrieves the value of the designated column in the current row
617      * of this <code>ResultSet</code> object as a stream of two-byte
618      * Unicode characters. The first byte is the high byte; the second
619      * byte is the low byte.
620      *
621      * The value can then be read in chunks from the
622      * stream. This method is particularly
623      * suitable for retrieving large <code>LONGVARCHAR</code> values.
624      * The JDBC technology-enabled driver will
625      * do any necessary conversion from the database format into Unicode.
626      *
627      * <P><B>Note:</B> All the data in the returned stream must be
628      * read prior to getting the value of any other column. The next
629      * call to a getter method implicitly closes the stream.
630      * Also, a stream may return <code>0</code> when the method
631      * <code>InputStream.available</code> is called, whether there
632      * is data available or not.
633      *
634      * @param columnName the SQL name of the column
635      * @return a Java input stream that delivers the database column value
636      * as a stream of two-byte Unicode characters.
637      * If the value is SQL <code>NULL</code>, the value returned
638      * is <code>null</code>.
639      * @exception SQLException if a database access error occurs
640      * @deprecated use <code>getCharacterStream</code> instead
641      */

642     @Deprecated JavaDoc
643     java.io.InputStream JavaDoc getUnicodeStream(String JavaDoc columnName) throws SQLException JavaDoc;
644
645     /**
646      * Retrieves the value of the designated column in the current row
647      * of this <code>ResultSet</code> object as a stream of uninterpreted
648      * <code>byte</code>s.
649      * The value can then be read in chunks from the
650      * stream. This method is particularly
651      * suitable for retrieving large <code>LONGVARBINARY</code>
652      * values.
653      *
654      * <P><B>Note:</B> All the data in the returned stream must be
655      * read prior to getting the value of any other column. The next
656      * call to a getter method implicitly closes the stream. Also, a
657      * stream may return <code>0</code> when the method <code>available</code>
658      * is called whether there is data available or not.
659      *
660      * @param columnName the SQL name of the column
661      * @return a Java input stream that delivers the database column value
662      * as a stream of uninterpreted bytes;
663      * if the value is SQL <code>NULL</code>, the result is <code>null</code>
664      * @exception SQLException if a database access error occurs
665      */

666     java.io.InputStream JavaDoc getBinaryStream(String JavaDoc columnName)
667         throws SQLException JavaDoc;
668
669
670     //=====================================================================
671
// Advanced features:
672
//=====================================================================
673

674     /**
675      * Retrieves the first warning reported by calls on this
676      * <code>ResultSet</code> object.
677      * Subsequent warnings on this <code>ResultSet</code> object
678      * will be chained to the <code>SQLWarning</code> object that
679      * this method returns.
680      *
681      * <P>The warning chain is automatically cleared each time a new
682      * row is read. This method may not be called on a <code>ResultSet</code>
683      * object that has been closed; doing so will cause an
684      * <code>SQLException</code> to be thrown.
685      * <P>
686      * <B>Note:</B> This warning chain only covers warnings caused
687      * by <code>ResultSet</code> methods. Any warning caused by
688      * <code>Statement</code> methods
689      * (such as reading OUT parameters) will be chained on the
690      * <code>Statement</code> object.
691      *
692      * @return the first <code>SQLWarning</code> object reported or
693      * <code>null</code> if there are none
694      * @exception SQLException if a database access error occurs or this method is
695      * called on a closed result set
696      */

697     SQLWarning JavaDoc getWarnings() throws SQLException JavaDoc;
698
699     /**
700      * Clears all warnings reported on this <code>ResultSet</code> object.
701      * After this method is called, the method <code>getWarnings</code>
702      * returns <code>null</code> until a new warning is
703      * reported for this <code>ResultSet</code> object.
704      *
705      * @exception SQLException if a database access error occurs
706      */

707     void clearWarnings() throws SQLException JavaDoc;
708
709     /**
710      * Retrieves the name of the SQL cursor used by this <code>ResultSet</code>
711      * object.
712      *
713      * <P>In SQL, a result table is retrieved through a cursor that is
714      * named. The current row of a result set can be updated or deleted
715      * using a positioned update/delete statement that references the
716      * cursor name. To insure that the cursor has the proper isolation
717      * level to support update, the cursor's <code>SELECT</code> statement
718      * should be of the form <code>SELECT FOR UPDATE</code>. If
719      * <code>FOR UPDATE</code> is omitted, the positioned updates may fail.
720      *
721      * <P>The JDBC API supports this SQL feature by providing the name of the
722      * SQL cursor used by a <code>ResultSet</code> object.
723      * The current row of a <code>ResultSet</code> object
724      * is also the current row of this SQL cursor.
725      *
726      * <P><B>Note:</B> If positioned update is not supported, a
727      * <code>SQLException</code> is thrown.
728      *
729      * @return the SQL name for this <code>ResultSet</code> object's cursor
730      * @exception SQLException if a database access error occurs
731      */

732     String JavaDoc getCursorName() throws SQLException JavaDoc;
733
734     /**
735      * Retrieves the number, types and properties of
736      * this <code>ResultSet</code> object's columns.
737      *
738      * @return the description of this <code>ResultSet</code> object's columns
739      * @exception SQLException if a database access error occurs
740      */

741     ResultSetMetaData JavaDoc getMetaData() throws SQLException JavaDoc;
742
743     /**
744      * <p>Gets the value of the designated column in the current row
745      * of this <code>ResultSet</code> object as
746      * an <code>Object</code> in the Java programming language.
747      *
748      * <p>This method will return the value of the given column as a
749      * Java object. The type of the Java object will be the default
750      * Java object type corresponding to the column's SQL type,
751      * following the mapping for built-in types specified in the JDBC
752      * specification. If the value is an SQL <code>NULL</code>,
753      * the driver returns a Java <code>null</code>.
754      *
755      * <p>This method may also be used to read database-specific
756      * abstract data types.
757      *
758      * In the JDBC 2.0 API, the behavior of method
759      * <code>getObject</code> is extended to materialize
760      * data of SQL user-defined types. When a column contains
761      * a structured or distinct value, the behavior of this method is as
762      * if it were a call to: <code>getObject(columnIndex,
763      * this.getStatement().getConnection().getTypeMap())</code>.
764      *
765      * @param columnIndex the first column is 1, the second is 2, ...
766      * @return a <code>java.lang.Object</code> holding the column value
767      * @exception SQLException if a database access error occurs
768      */

769     Object JavaDoc getObject(int columnIndex) throws SQLException JavaDoc;
770
771     /**
772      * <p>Gets the value of the designated column in the current row
773      * of this <code>ResultSet</code> object as
774      * an <code>Object</code> in the Java programming language.
775      *
776      * <p>This method will return the value of the given column as a
777      * Java object. The type of the Java object will be the default
778      * Java object type corresponding to the column's SQL type,
779      * following the mapping for built-in types specified in the JDBC
780      * specification. If the value is an SQL <code>NULL</code>,
781      * the driver returns a Java <code>null</code>.
782      * <P>
783      * This method may also be used to read database-specific
784      * abstract data types.
785      * <P>
786      * In the JDBC 2.0 API, the behavior of the method
787      * <code>getObject</code> is extended to materialize
788      * data of SQL user-defined types. When a column contains
789      * a structured or distinct value, the behavior of this method is as
790      * if it were a call to: <code>getObject(columnIndex,
791      * this.getStatement().getConnection().getTypeMap())</code>.
792      *
793      * @param columnName the SQL name of the column
794      * @return a <code>java.lang.Object</code> holding the column value
795      * @exception SQLException if a database access error occurs
796      */

797     Object JavaDoc getObject(String JavaDoc columnName) throws SQLException JavaDoc;
798
799     //----------------------------------------------------------------
800

801     /**
802      * Maps the given <code>ResultSet</code> column name to its
803      * <code>ResultSet</code> column index.
804      *
805      * @param columnName the name of the column
806      * @return the column index of the given column name
807      * @exception SQLException if the <code>ResultSet</code> object
808      * does not contain <code>columnName</code> or a database access error occurs
809      */

810     int findColumn(String JavaDoc columnName) throws SQLException JavaDoc;
811
812
813     //--------------------------JDBC 2.0-----------------------------------
814

815     //---------------------------------------------------------------------
816
// Getters and Setters
817
//---------------------------------------------------------------------
818

819     /**
820      * Retrieves the value of the designated column in the current row
821      * of this <code>ResultSet</code> object as a
822      * <code>java.io.Reader</code> object.
823      * @return a <code>java.io.Reader</code> object that contains the column
824      * value; if the value is SQL <code>NULL</code>, the value returned is
825      * <code>null</code> in the Java programming language.
826      * @param columnIndex the first column is 1, the second is 2, ...
827      * @exception SQLException if a database access error occurs
828      * @since 1.2
829      */

830     java.io.Reader JavaDoc getCharacterStream(int columnIndex) throws SQLException JavaDoc;
831
832     /**
833      * Retrieves the value of the designated column in the current row
834      * of this <code>ResultSet</code> object as a
835      * <code>java.io.Reader</code> object.
836      *
837      * @param columnName the name of the column
838      * @return a <code>java.io.Reader</code> object that contains the column
839      * value; if the value is SQL <code>NULL</code>, the value returned is
840      * <code>null</code> in the Java programming language
841      * @exception SQLException if a database access error occurs
842      * @since 1.2
843      */

844     java.io.Reader JavaDoc getCharacterStream(String JavaDoc columnName) throws SQLException JavaDoc;
845
846     /**
847      * Retrieves the value of the designated column in the current row
848      * of this <code>ResultSet</code> object as a
849      * <code>java.math.BigDecimal</code> with full precision.
850      *
851      * @param columnIndex the first column is 1, the second is 2, ...
852      * @return the column value (full precision);
853      * if the value is SQL <code>NULL</code>, the value returned is
854      * <code>null</code> in the Java programming language.
855      * @exception SQLException if a database access error occurs
856      * @since 1.2
857      */

858     BigDecimal JavaDoc getBigDecimal(int columnIndex) throws SQLException JavaDoc;
859
860     /**
861      * Retrieves the value of the designated column in the current row
862      * of this <code>ResultSet</code> object as a
863      * <code>java.math.BigDecimal</code> with full precision.
864      *
865      * @param columnName the column name
866      * @return the column value (full precision);
867      * if the value is SQL <code>NULL</code>, the value returned is
868      * <code>null</code> in the Java programming language.
869      * @exception SQLException if a database access error occurs
870      * @since 1.2
871      *
872      */

873     BigDecimal JavaDoc getBigDecimal(String JavaDoc columnName) throws SQLException JavaDoc;
874
875     //---------------------------------------------------------------------
876
// Traversal/Positioning
877
//---------------------------------------------------------------------
878

879     /**
880      * Retrieves whether the cursor is before the first row in
881      * this <code>ResultSet</code> object.
882      *
883      * @return <code>true</code> if the cursor is before the first row;
884      * <code>false</code> if the cursor is at any other position or the
885      * result set contains no rows
886      * @exception SQLException if a database access error occurs
887      * @since 1.2
888      */

889     boolean isBeforeFirst() throws SQLException JavaDoc;
890       
891     /**
892      * Retrieves whether the cursor is after the last row in
893      * this <code>ResultSet</code> object.
894      *
895      * @return <code>true</code> if the cursor is after the last row;
896      * <code>false</code> if the cursor is at any other position or the
897      * result set contains no rows
898      * @exception SQLException if a database access error occurs
899      * @since 1.2
900      */

901     boolean isAfterLast() throws SQLException JavaDoc;
902  
903     /**
904      * Retrieves whether the cursor is on the first row of
905      * this <code>ResultSet</code> object.
906      *
907      * @return <code>true</code> if the cursor is on the first row;
908      * <code>false</code> otherwise
909      * @exception SQLException if a database access error occurs
910      * @since 1.2
911      */

912     boolean isFirst() throws SQLException JavaDoc;
913  
914     /**
915      * Retrieves whether the cursor is on the last row of
916      * this <code>ResultSet</code> object.
917      * Note: Calling the method <code>isLast</code> may be expensive
918      * because the JDBC driver
919      * might need to fetch ahead one row in order to determine
920      * whether the current row is the last row in the result set.
921      *
922      * @return <code>true</code> if the cursor is on the last row;
923      * <code>false</code> otherwise
924      * @exception SQLException if a database access error occurs
925      * @since 1.2
926      */

927     boolean isLast() throws SQLException JavaDoc;
928
929     /**
930      * Moves the cursor to the front of
931      * this <code>ResultSet</code> object, just before the
932      * first row. This method has no effect if the result set contains no rows.
933      *
934      * @exception SQLException if a database access error
935      * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
936      * @since 1.2
937      */

938     void beforeFirst() throws SQLException JavaDoc;
939
940     /**
941      * Moves the cursor to the end of
942      * this <code>ResultSet</code> object, just after the
943      * last row. This method has no effect if the result set contains no rows.
944      * @exception SQLException if a database access error
945      * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
946      * @since 1.2
947      */

948     void afterLast() throws SQLException JavaDoc;
949
950     /**
951      * Moves the cursor to the first row in
952      * this <code>ResultSet</code> object.
953      *
954      * @return <code>true</code> if the cursor is on a valid row;
955      * <code>false</code> if there are no rows in the result set
956      * @exception SQLException if a database access error
957      * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
958      * @since 1.2
959      */

960     boolean first() throws SQLException JavaDoc;
961
962     /**
963      * Moves the cursor to the last row in
964      * this <code>ResultSet</code> object.
965      *
966      * @return <code>true</code> if the cursor is on a valid row;
967      * <code>false</code> if there are no rows in the result set
968      * @exception SQLException if a database access error
969      * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
970      * @since 1.2
971      */

972     boolean last() throws SQLException JavaDoc;
973
974     /**
975      * Retrieves the current row number. The first row is number 1, the
976      * second number 2, and so on.
977      *
978      * @return the current row number; <code>0</code> if there is no current row
979      * @exception SQLException if a database access error occurs
980      * @since 1.2
981      */

982     int getRow() throws SQLException JavaDoc;
983
984     /**
985      * Moves the cursor to the given row number in
986      * this <code>ResultSet</code> object.
987      *
988      * <p>If the row number is positive, the cursor moves to
989      * the given row number with respect to the
990      * beginning of the result set. The first row is row 1, the second
991      * is row 2, and so on.
992      *
993      * <p>If the given row number is negative, the cursor moves to
994      * an absolute row position with respect to
995      * the end of the result set. For example, calling the method
996      * <code>absolute(-1)</code> positions the
997      * cursor on the last row; calling the method <code>absolute(-2)</code>
998      * moves the cursor to the next-to-last row, and so on.
999      *
1000     * <p>An attempt to position the cursor beyond the first/last row in
1001     * the result set leaves the cursor before the first row or after
1002     * the last row.
1003     *
1004     * <p><B>Note:</B> Calling <code>absolute(1)</code> is the same
1005     * as calling <code>first()</code>. Calling <code>absolute(-1)</code>
1006     * is the same as calling <code>last()</code>.
1007     *
1008     * @param row the number of the row to which the cursor should move.
1009     * A positive number indicates the row number counting from the
1010     * beginning of the result set; a negative number indicates the
1011     * row number counting from the end of the result set
1012     * @return <code>true</code> if the cursor is on the result set;
1013     * <code>false</code> otherwise
1014     * @exception SQLException if a database access error
1015     * occurs, or the result set type is <code>TYPE_FORWARD_ONLY</code>
1016     * @since 1.2
1017     */

1018    boolean absolute( int row ) throws SQLException JavaDoc;
1019
1020    /**
1021     * Moves the cursor a relative number of rows, either positive or negative.
1022     * Attempting to move beyond the first/last row in the
1023     * result set positions the cursor before/after the
1024     * the first/last row. Calling <code>relative(0)</code> is valid, but does
1025     * not change the cursor position.
1026     *
1027     * <p>Note: Calling the method <code>relative(1)</code>
1028     * is identical to calling the method <code>next()</code> and
1029     * calling the method <code>relative(-1)</code> is identical
1030     * to calling the method <code>previous()</code>.
1031     *
1032     * @param rows an <code>int</code> specifying the number of rows to
1033     * move from the current row; a positive number moves the cursor
1034     * forward; a negative number moves the cursor backward
1035     * @return <code>true</code> if the cursor is on a row;
1036     * <code>false</code> otherwise
1037     * @exception SQLException if a database access error occurs,
1038     * there is no current row, or the result set type is
1039     * <code>TYPE_FORWARD_ONLY</code>
1040     * @since 1.2
1041     */

1042    boolean relative( int rows ) throws SQLException JavaDoc;
1043
1044    /**
1045     * Moves the cursor to the previous row in this
1046     * <code>ResultSet</code> object.
1047     *
1048     * @return <code>true</code> if the cursor is on a valid row;
1049     * <code>false</code> if it is off the result set
1050     * @exception SQLException if a database access error
1051     * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1052     * @since 1.2
1053     */

1054    boolean previous() throws SQLException JavaDoc;
1055
1056    //---------------------------------------------------------------------
1057
// Properties
1058
//---------------------------------------------------------------------
1059

1060    /**
1061     * The constant indicating that the rows in a result set will be
1062     * processed in a forward direction; first-to-last.
1063     * This constant is used by the method <code>setFetchDirection</code>
1064     * as a hint to the driver, which the driver may ignore.
1065     * @since 1.2
1066     */

1067    int FETCH_FORWARD = 1000;
1068
1069    /**
1070     * The constant indicating that the rows in a result set will be
1071     * processed in a reverse direction; last-to-first.
1072     * This constant is used by the method <code>setFetchDirection</code>
1073     * as a hint to the driver, which the driver may ignore.
1074     * @since 1.2
1075     */

1076    int FETCH_REVERSE = 1001;
1077
1078    /**
1079     * The constant indicating that the order in which rows in a
1080     * result set will be processed is unknown.
1081     * This constant is used by the method <code>setFetchDirection</code>
1082     * as a hint to the driver, which the driver may ignore.
1083     */

1084    int FETCH_UNKNOWN = 1002;
1085
1086    /**
1087     * Gives a hint as to the direction in which the rows in this
1088     * <code>ResultSet</code> object will be processed.
1089     * The initial value is determined by the
1090     * <code>Statement</code> object
1091     * that produced this <code>ResultSet</code> object.
1092     * The fetch direction may be changed at any time.
1093     *
1094     * @param direction an <code>int</code> specifying the suggested
1095     * fetch direction; one of <code>ResultSet.FETCH_FORWARD</code>,
1096     * <code>ResultSet.FETCH_REVERSE</code>, or
1097     * <code>ResultSet.FETCH_UNKNOWN</code>
1098     * @exception SQLException if a database access error occurs or
1099     * the result set type is <code>TYPE_FORWARD_ONLY</code> and the fetch
1100     * direction is not <code>FETCH_FORWARD</code>
1101     * @since 1.2
1102     * @see Statement#setFetchDirection
1103     * @see #getFetchDirection
1104     */

1105    void setFetchDirection(int direction) throws SQLException JavaDoc;
1106
1107    /**
1108     * Retrieves the fetch direction for this
1109     * <code>ResultSet</code> object.
1110     *
1111     * @return the current fetch direction for this <code>ResultSet</code> object
1112     * @exception SQLException if a database access error occurs
1113     * @since 1.2
1114     * @see #setFetchDirection
1115     */

1116    int getFetchDirection() throws SQLException JavaDoc;
1117
1118    /**
1119     * Gives the JDBC driver a hint as to the number of rows that should
1120     * be fetched from the database when more rows are needed for this
1121     * <code>ResultSet</code> object.
1122     * If the fetch size specified is zero, the JDBC driver
1123     * ignores the value and is free to make its own best guess as to what
1124     * the fetch size should be. The default value is set by the
1125     * <code>Statement</code> object
1126     * that created the result set. The fetch size may be changed at any time.
1127     *
1128     * @param rows the number of rows to fetch
1129     * @exception SQLException if a database access error occurs or the
1130     * condition <code>0 <= rows <= Statement.getMaxRows()</code> is not satisfied
1131     * @since 1.2
1132     * @see #getFetchSize
1133     */

1134    void setFetchSize(int rows) throws SQLException JavaDoc;
1135
1136    /**
1137     * Retrieves the fetch size for this
1138     * <code>ResultSet</code> object.
1139     *
1140     * @return the current fetch size for this <code>ResultSet</code> object
1141     * @exception SQLException if a database access error occurs
1142     * @since 1.2
1143     * @see #setFetchSize
1144     */

1145    int getFetchSize() throws SQLException JavaDoc;
1146
1147    /**
1148     * The constant indicating the type for a <code>ResultSet</code> object
1149     * whose cursor may move only forward.
1150     * @since 1.2
1151     */

1152    int TYPE_FORWARD_ONLY = 1003;
1153
1154    /**
1155     * The constant indicating the type for a <code>ResultSet</code> object
1156     * that is scrollable but generally not sensitive to changes made by others.
1157     * @since 1.2
1158     */

1159    int TYPE_SCROLL_INSENSITIVE = 1004;
1160
1161    /**
1162     * The constant indicating the type for a <code>ResultSet</code> object
1163     * that is scrollable and generally sensitive to changes made by others.
1164     * @since 1.2
1165     */

1166    int TYPE_SCROLL_SENSITIVE = 1005;
1167
1168    /**
1169     * Retrieves the type of this <code>ResultSet</code> object.
1170     * The type is determined by the <code>Statement</code> object
1171     * that created the result set.
1172     *
1173     * @return <code>ResultSet.TYPE_FORWARD_ONLY</code>,
1174     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>,
1175     * or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
1176     * @exception SQLException if a database access error occurs
1177     * @since 1.2
1178     */

1179    int getType() throws SQLException JavaDoc;
1180
1181    /**
1182     * The constant indicating the concurrency mode for a
1183     * <code>ResultSet</code> object that may NOT be updated.
1184     * @since 1.2
1185     */

1186    int CONCUR_READ_ONLY = 1007;
1187
1188    /**
1189     * The constant indicating the concurrency mode for a
1190     * <code>ResultSet</code> object that may be updated.
1191     * @since 1.2
1192     */

1193    int CONCUR_UPDATABLE = 1008;
1194
1195    /**
1196     * Retrieves the concurrency mode of this <code>ResultSet</code> object.
1197     * The concurrency used is determined by the
1198     * <code>Statement</code> object that created the result set.
1199     *
1200     * @return the concurrency type, either
1201     * <code>ResultSet.CONCUR_READ_ONLY</code>
1202     * or <code>ResultSet.CONCUR_UPDATABLE</code>
1203     * @exception SQLException if a database access error occurs
1204     * @since 1.2
1205     */

1206    int getConcurrency() throws SQLException JavaDoc;
1207
1208    //---------------------------------------------------------------------
1209
// Updates
1210
//---------------------------------------------------------------------
1211

1212    /**
1213     * Retrieves whether the current row has been updated. The value returned
1214     * depends on whether or not the result set can detect updates.
1215     *
1216     * @return <code>true</code> if both (1) the row has been visibly updated
1217     * by the owner or another and (2) updates are detected
1218     * @exception SQLException if a database access error occurs
1219     * @see DatabaseMetaData#updatesAreDetected
1220     * @since 1.2
1221     */

1222    boolean rowUpdated() throws SQLException JavaDoc;
1223
1224    /**
1225     * Retrieves whether the current row has had an insertion.
1226     * The value returned depends on whether or not this
1227     * <code>ResultSet</code> object can detect visible inserts.
1228     *
1229     * @return <code>true</code> if a row has had an insertion
1230     * and insertions are detected; <code>false</code> otherwise
1231     * @exception SQLException if a database access error occurs
1232     *
1233     * @see DatabaseMetaData#insertsAreDetected
1234     * @since 1.2
1235     */

1236    boolean rowInserted() throws SQLException JavaDoc;
1237   
1238    /**
1239     * Retrieves whether a row has been deleted. A deleted row may leave
1240     * a visible "hole" in a result set. This method can be used to
1241     * detect holes in a result set. The value returned depends on whether
1242     * or not this <code>ResultSet</code> object can detect deletions.
1243     *
1244     * @return <code>true</code> if a row was deleted and deletions are detected;
1245     * <code>false</code> otherwise
1246     * @exception SQLException if a database access error occurs
1247     *
1248     * @see DatabaseMetaData#deletesAreDetected
1249     * @since 1.2
1250     */

1251    boolean rowDeleted() throws SQLException JavaDoc;
1252
1253    /**
1254     * Gives a nullable column a null value.
1255     *
1256     * The updater methods are used to update column values in the
1257     * current row or the insert row. The updater methods do not
1258     * update the underlying database; instead the <code>updateRow</code>
1259     * or <code>insertRow</code> methods are called to update the database.
1260     *
1261     * @param columnIndex the first column is 1, the second is 2, ...
1262     * @exception SQLException if a database access error occurs
1263     * @since 1.2
1264     */

1265    void updateNull(int columnIndex) throws SQLException JavaDoc;
1266
1267    /**
1268     * Updates the designated column with a <code>boolean</code> value.
1269     * The updater methods are used to update column values in the
1270     * current row or the insert row. The updater methods do not
1271     * update the underlying database; instead the <code>updateRow</code> or
1272     * <code>insertRow</code> methods are called to update the database.
1273     *
1274     * @param columnIndex the first column is 1, the second is 2, ...
1275     * @param x the new column value
1276     * @exception SQLException if a database access error occurs
1277     * @since 1.2
1278     */

1279    void updateBoolean(int columnIndex, boolean x) throws SQLException JavaDoc;
1280
1281    /**
1282     * Updates the designated column with a <code>byte</code> value.
1283     * The updater methods are used to update column values in the
1284     * current row or the insert row. The updater methods do not
1285     * update the underlying database; instead the <code>updateRow</code> or
1286     * <code>insertRow</code> methods are called to update the database.
1287     *
1288     *
1289     * @param columnIndex the first column is 1, the second is 2, ...
1290     * @param x the new column value
1291     * @exception SQLException if a database access error occurs
1292     * @since 1.2
1293     */

1294    void updateByte(int columnIndex, byte x) throws SQLException JavaDoc;
1295
1296    /**
1297     * Updates the designated column with a <code>short</code> value.
1298     * The updater methods are used to update column values in the
1299     * current row or the insert row. The updater methods do not
1300     * update the underlying database; instead the <code>updateRow</code> or
1301     * <code>insertRow</code> methods are called to update the database.
1302     *
1303     * @param columnIndex the first column is 1, the second is 2, ...
1304     * @param x the new column value
1305     * @exception SQLException if a database access error occurs
1306     * @since 1.2
1307     */

1308    void updateShort(int columnIndex, short x) throws SQLException JavaDoc;
1309
1310    /**
1311     * Updates the designated column with an <code>int</code> value.
1312     * The updater methods are used to update column values in the
1313     * current row or the insert row. The updater methods do not
1314     * update the underlying database; instead the <code>updateRow</code> or
1315     * <code>insertRow</code> methods are called to update the database.
1316     *
1317     * @param columnIndex the first column is 1, the second is 2, ...
1318     * @param x the new column value
1319     * @exception SQLException if a database access error occurs
1320     * @since 1.2
1321     */

1322    void updateInt(int columnIndex, int x) throws SQLException JavaDoc;
1323
1324    /**
1325     * Updates the designated column with a <code>long</code> value.
1326     * The updater methods are used to update column values in the
1327     * current row or the insert row. The updater methods do not
1328     * update the underlying database; instead the <code>updateRow</code> or
1329     * <code>insertRow</code> methods are called to update the database.
1330     *
1331     * @param columnIndex the first column is 1, the second is 2, ...
1332     * @param x the new column value
1333     * @exception SQLException if a database access error occurs
1334     * @since 1.2
1335     */

1336    void updateLong(int columnIndex, long x) throws SQLException JavaDoc;
1337
1338    /**
1339     * Updates the designated column with a <code>float</code> value.
1340     * The updater methods are used to update column values in the
1341     * current row or the insert row. The updater methods do not
1342     * update the underlying database; instead the <code>updateRow</code> or
1343     * <code>insertRow</code> methods are called to update the database.
1344     *
1345     * @param columnIndex the first column is 1, the second is 2, ...
1346     * @param x the new column value
1347     * @exception SQLException if a database access error occurs
1348     * @since 1.2
1349     */

1350    void updateFloat(int columnIndex, float x) throws SQLException JavaDoc;
1351
1352    /**
1353     * Updates the designated column with a <code>double</code> value.
1354     * The updater methods are used to update column values in the
1355     * current row or the insert row. The updater methods do not
1356     * update the underlying database; instead the <code>updateRow</code> or
1357     * <code>insertRow</code> methods are called to update the database.
1358     *
1359     * @param columnIndex the first column is 1, the second is 2, ...
1360     * @param x the new column value
1361     * @exception SQLException if a database access error occurs
1362     * @since 1.2
1363     */

1364    void updateDouble(int columnIndex, double x) throws SQLException JavaDoc;
1365
1366    /**
1367     * Updates the designated column with a <code>java.math.BigDecimal</code>
1368     * value.
1369     * The updater methods are used to update column values in the
1370     * current row or the insert row. The updater methods do not
1371     * update the underlying database; instead the <code>updateRow</code> or
1372     * <code>insertRow</code> methods are called to update the database.
1373     *
1374     * @param columnIndex the first column is 1, the second is 2, ...
1375     * @param x the new column value
1376     * @exception SQLException if a database access error occurs
1377     * @since 1.2
1378     */

1379    void updateBigDecimal(int columnIndex, BigDecimal JavaDoc x) throws SQLException JavaDoc;
1380
1381    /**
1382     * Updates the designated column with a <code>String</code> value.
1383     * The updater methods are used to update column values in the
1384     * current row or the insert row. The updater methods do not
1385     * update the underlying database; instead the <code>updateRow</code> or
1386     * <code>insertRow</code> methods are called to update the database.
1387     *
1388     * @param columnIndex the first column is 1, the second is 2, ...
1389     * @param x the new column value
1390     * @exception SQLException if a database access error occurs
1391     * @since 1.2
1392     */

1393    void updateString(int columnIndex, String JavaDoc x) throws SQLException JavaDoc;
1394
1395    /**
1396     * Updates the designated column with a <code>byte</code> array value.
1397     * The updater methods are used to update column values in the
1398     * current row or the insert row. The updater methods do not
1399     * update the underlying database; instead the <code>updateRow</code> or
1400     * <code>insertRow</code> methods are called to update the database.
1401     *
1402     * @param columnIndex the first column is 1, the second is 2, ...
1403     * @param x the new column value
1404     * @exception SQLException if a database access error occurs
1405     * @since 1.2
1406     */

1407    void updateBytes(int columnIndex, byte x[]) throws SQLException JavaDoc;
1408
1409    /**
1410     * Updates the designated column with a <code>java.sql.Date</code> value.
1411     * The updater methods are used to update column values in the
1412     * current row or the insert row. The updater methods do not
1413     * update the underlying database; instead the <code>updateRow</code> or
1414     * <code>insertRow</code> methods are called to update the database.
1415     *
1416     * @param columnIndex the first column is 1, the second is 2, ...
1417     * @param x the new column value
1418     * @exception SQLException if a database access error occurs
1419     * @since 1.2
1420     */

1421    void updateDate(int columnIndex, java.sql.Date JavaDoc x) throws SQLException JavaDoc;
1422
1423    /**
1424     * Updates the designated column with a <code>java.sql.Time</code> value.
1425     * The updater methods are used to update column values in the
1426     * current row or the insert row. The updater methods do not
1427     * update the underlying database; instead the <code>updateRow</code> or
1428     * <code>insertRow</code> methods are called to update the database.
1429     *
1430     * @param columnIndex the first column is 1, the second is 2, ...
1431     * @param x the new column value
1432     * @exception SQLException if a database access error occurs
1433     * @since 1.2
1434     */

1435    void updateTime(int columnIndex, java.sql.Time JavaDoc x) throws SQLException JavaDoc;
1436
1437    /**
1438     * Updates the designated column with a <code>java.sql.Timestamp</code>
1439     * value.
1440     * The updater methods are used to update column values in the
1441     * current row or the insert row. The updater methods do not
1442     * update the underlying database; instead the <code>updateRow</code> or
1443     * <code>insertRow</code> methods are called to update the database.
1444     *
1445     * @param columnIndex the first column is 1, the second is 2, ...
1446     * @param x the new column value
1447     * @exception SQLException if a database access error occurs
1448     * @since 1.2
1449     */

1450    void updateTimestamp(int columnIndex, java.sql.Timestamp JavaDoc x)
1451      throws SQLException JavaDoc;
1452
1453    /**
1454     * Updates the designated column with an ascii stream value.
1455     * The updater methods are used to update column values in the
1456     * current row or the insert row. The updater methods do not
1457     * update the underlying database; instead the <code>updateRow</code> or
1458     * <code>insertRow</code> methods are called to update the database.
1459     *
1460     * @param columnIndex the first column is 1, the second is 2, ...
1461     * @param x the new column value
1462     * @param length the length of the stream
1463     * @exception SQLException if a database access error occurs
1464     * @since 1.2
1465     */

1466    void updateAsciiStream(int columnIndex,
1467               java.io.InputStream JavaDoc x,
1468               int length) throws SQLException JavaDoc;
1469
1470    /**
1471     * Updates the designated column with a binary stream value.
1472     * The updater methods are used to update column values in the
1473     * current row or the insert row. The updater methods do not
1474     * update the underlying database; instead the <code>updateRow</code> or
1475     * <code>insertRow</code> methods are called to update the database.
1476     *
1477     * @param columnIndex the first column is 1, the second is 2, ...
1478     * @param x the new column value
1479     * @param length the length of the stream
1480     * @exception SQLException if a database access error occurs
1481     * @since 1.2
1482     */

1483    void updateBinaryStream(int columnIndex,
1484                java.io.InputStream JavaDoc x,
1485                int length) throws SQLException JavaDoc;
1486
1487    /**
1488     * Updates the designated column with a character stream value.
1489     * The updater methods are used to update column values in the
1490     * current row or the insert row. The updater methods do not
1491     * update the underlying database; instead the <code>updateRow</code> or
1492     * <code>insertRow</code> methods are called to update the database.
1493     *
1494     * @param columnIndex the first column is 1, the second is 2, ...
1495     * @param x the new column value
1496     * @param length the length of the stream
1497     * @exception SQLException if a database access error occurs
1498     * @since 1.2
1499     */

1500    void updateCharacterStream(int columnIndex,
1501                 java.io.Reader JavaDoc x,
1502                 int length) throws SQLException JavaDoc;
1503
1504    /**
1505     * Updates the designated column with an <code>Object</code> value.
1506     * The updater methods are used to update column values in the
1507     * current row or the insert row. The updater methods do not
1508     * update the underlying database; instead the <code>updateRow</code> or
1509     * <code>insertRow</code> methods are called to update the database.
1510     *
1511     * @param columnIndex the first column is 1, the second is 2, ...
1512     * @param x the new column value
1513     * @param scale for <code>java.sql.Types.DECIMA</code>
1514     * or <code>java.sql.Types.NUMERIC</code> types,
1515     * this is the number of digits after the decimal point. For all other
1516     * types this value will be ignored.
1517     * @exception SQLException if a database access error occurs
1518     * @since 1.2
1519     */

1520    void updateObject(int columnIndex, Object JavaDoc x, int scale)
1521      throws SQLException JavaDoc;
1522
1523    /**
1524     * Updates the designated column with an <code>Object</code> value.
1525     * The updater methods are used to update column values in the
1526     * current row or the insert row. The updater methods do not
1527     * update the underlying database; instead the <code>updateRow</code> or
1528     * <code>insertRow</code> methods are called to update the database.
1529     *
1530     * @param columnIndex the first column is 1, the second is 2, ...
1531     * @param x the new column value
1532     * @exception SQLException if a database access error occurs
1533     * @since 1.2
1534     */

1535    void updateObject(int columnIndex, Object JavaDoc x) throws SQLException JavaDoc;
1536
1537    /**
1538     * Updates the designated column with a <code>null</code> value.
1539     * The updater methods are used to update column values in the
1540     * current row or the insert row. The updater methods do not
1541     * update the underlying database; instead the <code>updateRow</code> or
1542     * <code>insertRow</code> methods are called to update the database.
1543     *
1544     * @param columnName the name of the column
1545     * @exception SQLException if a database access error occurs
1546     * @since 1.2
1547     */

1548    void updateNull(String JavaDoc columnName) throws SQLException JavaDoc;
1549
1550    /**
1551     * Updates the designated column with a <code>boolean</code> value.
1552     * The updater methods are used to update column values in the
1553     * current row or the insert row. The updater methods do not
1554     * update the underlying database; instead the <code>updateRow</code> or
1555     * <code>insertRow</code> methods are called to update the database.
1556     *
1557     * @param columnName the name of the column
1558     * @param x the new column value
1559     * @exception SQLException if a database access error occurs
1560     * @since 1.2
1561     */

1562    void updateBoolean(String JavaDoc columnName, boolean x) throws SQLException JavaDoc;
1563
1564    /**
1565     * Updates the designated column with a <code>byte</code> value.
1566     * The updater methods are used to update column values in the
1567     * current row or the insert row. The updater methods do not
1568     * update the underlying database; instead the <code>updateRow</code> or
1569     * <code>insertRow</code> methods are called to update the database.
1570     *
1571     * @param columnName the name of the column
1572     * @param x the new column value
1573     * @exception SQLException if a database access error occurs
1574     * @since 1.2
1575     */

1576    void updateByte(String JavaDoc columnName, byte x) throws SQLException JavaDoc;
1577
1578    /**
1579     * Updates the designated column with a <code>short</code> value.
1580     * The updater methods are used to update column values in the
1581     * current row or the insert row. The updater methods do not
1582     * update the underlying database; instead the <code>updateRow</code> or
1583     * <code>insertRow</code> methods are called to update the database.
1584     *
1585     * @param columnName the name of the column
1586     * @param x the new column value
1587     * @exception SQLException if a database access error occurs
1588     * @since 1.2
1589     */

1590    void updateShort(String JavaDoc columnName, short x) throws SQLException JavaDoc;
1591
1592    /**
1593     * Updates the designated column with an <code>int</code> value.
1594     * The updater methods are used to update column values in the
1595     * current row or the insert row. The updater methods do not
1596     * update the underlying database; instead the <code>updateRow</code> or
1597     * <code>insertRow</code> methods are called to update the database.
1598     *
1599     * @param columnName the name of the column
1600     * @param x the new column value
1601     * @exception SQLException if a database access error occurs
1602     * @since 1.2
1603     */

1604    void updateInt(String JavaDoc columnName, int x) throws SQLException JavaDoc;
1605
1606    /**
1607     * Updates the designated column with a <code>long</code> value.
1608     * The updater methods are used to update column values in the
1609     * current row or the insert row. The updater methods do not
1610     * update the underlying database; instead the <code>updateRow</code> or
1611     * <code>insertRow</code> methods are called to update the database.
1612     *
1613     * @param columnName the name of the column
1614     * @param x the new column value
1615     * @exception SQLException if a database access error occurs
1616     * @since 1.2
1617     */

1618    void updateLong(String JavaDoc columnName, long x) throws SQLException JavaDoc;
1619
1620    /**
1621     * Updates the designated column with a <code>float </code> value.
1622     * The updater methods are used to update column values in the
1623     * current row or the insert row. The updater methods do not
1624     * update the underlying database; instead the <code>updateRow</code> or
1625     * <code>insertRow</code> methods are called to update the database.
1626     *
1627     * @param columnName the name of the column
1628     * @param x the new column value
1629     * @exception SQLException if a database access error occurs
1630     * @since 1.2
1631     */

1632    void updateFloat(String JavaDoc columnName, float x) throws SQLException JavaDoc;
1633
1634    /**
1635     * Updates the designated column with a <code>double</code> value.
1636     * The updater methods are used to update column values in the
1637     * current row or the insert row. The updater methods do not
1638     * update the underlying database; instead the <code>updateRow</code> or
1639     * <code>insertRow</code> methods are called to update the database.
1640     *
1641     * @param columnName the name of the column
1642     * @param x the new column value
1643     * @exception SQLException if a database access error occurs
1644     * @since 1.2
1645     */

1646    void updateDouble(String JavaDoc columnName, double x) throws SQLException JavaDoc;
1647
1648    /**
1649     * Updates the designated column with a <code>java.sql.BigDecimal</code>
1650     * value.
1651     * The updater methods are used to update column values in the
1652     * current row or the insert row. The updater methods do not
1653     * update the underlying database; instead the <code>updateRow</code> or
1654     * <code>insertRow</code> methods are called to update the database.
1655     *
1656     * @param columnName the name of the column
1657     * @param x the new column value
1658     * @exception SQLException if a database access error occurs
1659     * @since 1.2
1660     */

1661    void updateBigDecimal(String JavaDoc columnName, BigDecimal JavaDoc x) throws SQLException JavaDoc;
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 columnName the name of the column
1671     * @param x the new column value
1672     * @exception SQLException if a database access error occurs
1673     * @since 1.2
1674     */

1675    void updateString(String JavaDoc columnName, String JavaDoc x) throws SQLException JavaDoc;
1676
1677    /**
1678     * Updates the designated column with a byte array value.
1679     *
1680     * The updater methods are used to update column values in the
1681     * current row or the insert row. The updater methods do not
1682     * update the underlying database; instead the <code>updateRow</code>
1683     * or <code>insertRow</code> methods are called to update the database.
1684     *
1685     * @param columnName the name of the column
1686     * @param x the new column value
1687     * @exception SQLException if a database access error occurs
1688     * @since 1.2
1689     */

1690    void updateBytes(String JavaDoc columnName, byte x[]) throws SQLException JavaDoc;
1691
1692    /**
1693     * Updates the designated column with a <code>java.sql.Date</code> value.
1694     * The updater methods are used to update column values in the
1695     * current row or the insert row. The updater methods do not
1696     * update the underlying database; instead the <code>updateRow</code> or
1697     * <code>insertRow</code> methods are called to update the database.
1698     *
1699     * @param columnName the name of the column
1700     * @param x the new column value
1701     * @exception SQLException if a database access error occurs
1702     * @since 1.2
1703     */

1704    void updateDate(String JavaDoc columnName, java.sql.Date JavaDoc x) throws SQLException JavaDoc;
1705
1706    /**
1707     * Updates the designated column with a <code>java.sql.Time</code> value.
1708     * The updater methods are used to update column values in the
1709     * current row or the insert row. The updater methods do not
1710     * update the underlying database; instead the <code>updateRow</code> or
1711     * <code>insertRow</code> methods are called to update the database.
1712     *
1713     * @param columnName the name of the column
1714     * @param x the new column value
1715     * @exception SQLException if a database access error occurs
1716     * @since 1.2
1717     */

1718    void updateTime(String JavaDoc columnName, java.sql.Time JavaDoc x) throws SQLException JavaDoc;
1719
1720    /**
1721     * Updates the designated column with a <code>java.sql.Timestamp</code>
1722     * value.
1723     * The updater methods are used to update column values in the
1724     * current row or the insert row. The updater methods do not
1725     * update the underlying database; instead the <code>updateRow</code> or
1726     * <code>insertRow</code> methods are called to update the database.
1727     *
1728     * @param columnName the name of the column
1729     * @param x the new column value
1730     * @exception SQLException if a database access error occurs
1731     * @since 1.2
1732     */

1733    void updateTimestamp(String JavaDoc columnName, java.sql.Timestamp JavaDoc x)
1734      throws SQLException JavaDoc;
1735
1736    /**
1737     * Updates the designated column with an ascii stream value.
1738     * The updater methods are used to update column values in the
1739     * current row or the insert row. The updater methods do not
1740     * update the underlying database; instead the <code>updateRow</code> or
1741     * <code>insertRow</code> methods are called to update the database.
1742     *
1743     * @param columnName the name of the column
1744     * @param x the new column value
1745     * @param length the length of the stream
1746     * @exception SQLException if a database access error occurs
1747     * @since 1.2
1748     */

1749    void updateAsciiStream(String JavaDoc columnName,
1750               java.io.InputStream JavaDoc x,
1751               int length) throws SQLException JavaDoc;
1752
1753    /**
1754     * Updates the designated column with a binary stream value.
1755     * The updater methods are used to update column values in the
1756     * current row or the insert row. The updater methods do not
1757     * update the underlying database; instead the <code>updateRow</code> or
1758     * <code>insertRow</code> methods are called to update the database.
1759     *
1760     * @param columnName the name of the column
1761     * @param x the new column value
1762     * @param length the length of the stream
1763     * @exception SQLException if a database access error occurs
1764     * @since 1.2
1765     */

1766    void updateBinaryStream(String JavaDoc columnName,
1767                java.io.InputStream JavaDoc x,
1768                int length) throws SQLException JavaDoc;
1769
1770    /**
1771     * Updates the designated column with a character stream value.
1772     * The updater methods are used to update column values in the
1773     * current row or the insert row. The updater methods do not
1774     * update the underlying database; instead the <code>updateRow</code> or
1775     * <code>insertRow</code> methods are called to update the database.
1776     *
1777     * @param columnName the name of the column
1778     * @param reader the <code>java.io.Reader</code> object containing
1779     * the new column value
1780     * @param length the length of the stream
1781     * @exception SQLException if a database access error occurs
1782     * @since 1.2
1783     */

1784    void updateCharacterStream(String JavaDoc columnName,
1785                 java.io.Reader JavaDoc reader,
1786                 int length) throws SQLException JavaDoc;
1787
1788    /**
1789     * Updates the designated column with an <code>Object</code> value.
1790     * The updater methods are used to update column values in the
1791     * current row or the insert row. The updater methods do not
1792     * update the underlying database; instead the <code>updateRow</code> or
1793     * <code>insertRow</code> methods are called to update the database.
1794     *
1795     * @param columnName the name of the column
1796     * @param x the new column value
1797     * @param scale for <code>java.sql.Types.DECIMAL</code>
1798     * or <code>java.sql.Types.NUMERIC</code> types,
1799     * this is the number of digits after the decimal point. For all other
1800     * types this value will be ignored.
1801     * @exception SQLException if a database access error occurs
1802     * @since 1.2
1803     */

1804    void updateObject(String JavaDoc columnName, Object JavaDoc x, int scale)
1805      throws SQLException JavaDoc;
1806
1807    /**
1808     * Updates the designated column with an <code>Object</code> value.
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 columnName the name of the column
1815     * @param x the new column value
1816     * @exception SQLException if a database access error occurs
1817     * @since 1.2
1818     */

1819    void updateObject(String JavaDoc columnName, Object JavaDoc x) throws SQLException JavaDoc;
1820
1821    /**
1822     * Inserts the contents of the insert row into this
1823     * <code>ResultSet</code> object and into the database.
1824     * The cursor must be on the insert row when this method is called.
1825     *
1826     * @exception SQLException if a database access error occurs,
1827     * if this method is called when the cursor is not on the insert row,
1828     * or if not all of non-nullable columns in
1829     * the insert row have been given a value
1830     * @since 1.2
1831     */

1832    void insertRow() throws SQLException JavaDoc;
1833
1834    /**
1835     * Updates the underlying database with the new contents of the
1836     * current row of this <code>ResultSet</code> object.
1837     * This method cannot be called when the cursor is on the insert row.
1838     *
1839     * @exception SQLException if a database access error occurs or
1840     * if this method is called when the cursor is on the insert row
1841     * @since 1.2
1842     */

1843    void updateRow() throws SQLException JavaDoc;
1844
1845    /**
1846     * Deletes the current row from this <code>ResultSet</code> object
1847     * and from the underlying database. This method cannot be called when
1848     * the cursor is on the insert row.
1849     *
1850     * @exception SQLException if a database access error occurs
1851     * or if this method is called when the cursor is on the insert row
1852     * @since 1.2
1853     */

1854    void deleteRow() throws SQLException JavaDoc;
1855
1856    /**
1857     * Refreshes the current row with its most recent value in
1858     * the database. This method cannot be called when
1859     * the cursor is on the insert row.
1860     *
1861     * <P>The <code>refreshRow</code> method provides a way for an
1862     * application to
1863     * explicitly tell the JDBC driver to refetch a row(s) from the
1864     * database. An application may want to call <code>refreshRow</code> when
1865     * caching or prefetching is being done by the JDBC driver to
1866     * fetch the latest value of a row from the database. The JDBC driver
1867     * may actually refresh multiple rows at once if the fetch size is
1868     * greater than one.
1869     *
1870     * <P> All values are refetched subject to the transaction isolation
1871     * level and cursor sensitivity. If <code>refreshRow</code> is called after
1872     * calling an updater method, but before calling
1873     * the method <code>updateRow</code>, then the
1874     * updates made to the row are lost. Calling the method
1875     * <code>refreshRow</code> frequently will likely slow performance.
1876     *
1877     * @exception SQLException if a database access error
1878     * occurs or if this method is called when the cursor is on the insert row
1879     * @since 1.2
1880     */

1881    void refreshRow() throws SQLException JavaDoc;
1882
1883    /**
1884     * Cancels the updates made to the current row in this
1885     * <code>ResultSet</code> object.
1886     * This method may be called after calling an
1887     * updater method(s) and before calling
1888     * the method <code>updateRow</code> to roll back
1889     * the updates made to a row. If no updates have been made or
1890     * <code>updateRow</code> has already been called, this method has no
1891     * effect.
1892     *
1893     * @exception SQLException if a database access error
1894     * occurs or if this method is called when the cursor is
1895     * on the insert row
1896     * @since 1.2
1897     */

1898    void cancelRowUpdates() throws SQLException JavaDoc;
1899
1900    /**
1901     * Moves the cursor to the insert row. The current cursor position is
1902     * remembered while the cursor is positioned on the insert row.
1903     *
1904     * The insert row is a special row associated with an updatable
1905     * result set. It is essentially a buffer where a new row may
1906     * be constructed by calling the updater methods prior to
1907     * inserting the row into the result set.
1908     *
1909     * Only the updater, getter,
1910     * and <code>insertRow</code> methods may be
1911     * called when the cursor is on the insert row. All of the columns in
1912     * a result set must be given a value each time this method is
1913     * called before calling <code>insertRow</code>.
1914     * An updater method must be called before a
1915     * getter method can be called on a column value.
1916     *
1917     * @exception SQLException if a database access error occurs
1918     * or the result set is not updatable
1919     * @since 1.2
1920     */

1921    void moveToInsertRow() throws SQLException JavaDoc;
1922
1923    /**
1924     * Moves the cursor to the remembered cursor position, usually the
1925     * current row. This method has no effect if the cursor is not on
1926     * the insert row.
1927     *
1928     * @exception SQLException if a database access error occurs
1929     * or the result set is not updatable
1930     * @since 1.2
1931     */

1932    void moveToCurrentRow() throws SQLException JavaDoc;
1933
1934    /**
1935     * Retrieves the <code>Statement</code> object that produced this
1936     * <code>ResultSet</code> object.
1937     * If the result set was generated some other way, such as by a
1938     * <code>DatabaseMetaData</code> method, this method returns
1939     * <code>null</code>.
1940     *
1941     * @return the <code>Statment</code> object that produced
1942     * this <code>ResultSet</code> object or <code>null</code>
1943     * if the result set was produced some other way
1944     * @exception SQLException if a database access error occurs
1945     * @since 1.2
1946     */

1947    Statement JavaDoc getStatement() throws SQLException JavaDoc;
1948
1949    /**
1950     * Retrieves the value of the designated column in the current row
1951     * of this <code>ResultSet</code> object as an <code>Object</code>
1952     * in the Java programming language.
1953     * If the value is an SQL <code>NULL</code>,
1954     * the driver returns a Java <code>null</code>.
1955     * This method uses the given <code>Map</code> object
1956     * for the custom mapping of the
1957     * SQL structured or distinct type that is being retrieved.
1958     *
1959     * @param i the first column is 1, the second is 2, ...
1960     * @param map a <code>java.util.Map</code> object that contains the mapping
1961     * from SQL type names to classes in the Java programming language
1962     * @return an <code>Object</code> in the Java programming language
1963     * representing the SQL value
1964     * @exception SQLException if a database access error occurs
1965     * @since 1.2
1966     */

1967    Object JavaDoc getObject(int i, java.util.Map JavaDoc<String JavaDoc,Class JavaDoc<?>> map)
1968    throws SQLException JavaDoc;
1969
1970    /**
1971     * Retrieves the value of the designated column in the current row
1972     * of this <code>ResultSet</code> object as a <code>Ref</code> object
1973     * in the Java programming language.
1974     *
1975     * @param i the first column is 1, the second is 2, ...
1976     * @return a <code>Ref</code> object representing an SQL <code>REF</code>
1977     * value
1978     * @exception SQLException if a database access error occurs
1979     * @since 1.2
1980     */

1981    Ref JavaDoc getRef(int i) throws SQLException JavaDoc;
1982
1983    /**
1984     * Retrieves the value of the designated column in the current row
1985     * of this <code>ResultSet</code> object as a <code>Blob</code> object
1986     * in the Java programming language.
1987     *
1988     * @param i the first column is 1, the second is 2, ...
1989     * @return a <code>Blob</code> object representing the SQL
1990     * <code>BLOB</code> value in the specified column
1991     * @exception SQLException if a database access error occurs
1992     * @since 1.2
1993     */

1994    Blob JavaDoc getBlob(int i) throws SQLException JavaDoc;
1995
1996    /**
1997     * Retrieves the value of the designated column in the current row
1998     * of this <code>ResultSet</code> object as a <code>Clob</code> object
1999     * in the Java programming language.
2000     *
2001     * @param i the first column is 1, the second is 2, ...
2002     * @return a <code>Clob</code> object representing the SQL
2003     * <code>CLOB</code> value in the specified column
2004     * @exception SQLException if a database access error occurs
2005     * @since 1.2
2006     */

2007    Clob JavaDoc getClob(int i) throws SQLException JavaDoc;
2008
2009    /**
2010     * Retrieves the value of the designated column in the current row
2011     * of this <code>ResultSet</code> object as an <code>Array</code> object
2012     * in the Java programming language.
2013     *
2014     * @param i the first column is 1, the second is 2, ...
2015     * @return an <code>Array</code> object representing the SQL
2016     * <code>ARRAY</code> value in the specified column
2017     * @exception SQLException if a database access error occurs
2018     * @since 1.2
2019     */

2020    Array JavaDoc getArray(int i) throws SQLException JavaDoc;
2021
2022    /**
2023     * Retrieves the value of the designated column in the current row
2024     * of this <code>ResultSet</code> object as an <code>Object</code>
2025     * in the Java programming language.
2026     * If the value is an SQL <code>NULL</code>,
2027     * the driver returns a Java <code>null</code>.
2028     * This method uses the specified <code>Map</code> object for
2029     * custom mapping if appropriate.
2030     *
2031     * @param colName the name of the column from which to retrieve the value
2032     * @param map a <code>java.util.Map</code> object that contains the mapping
2033     * from SQL type names to classes in the Java programming language
2034     * @return an <code>Object</code> representing the SQL value in the
2035     * specified column
2036     * @exception SQLException if a database access error occurs
2037     * @since 1.2
2038     */

2039    Object JavaDoc getObject(String JavaDoc colName, java.util.Map JavaDoc<String JavaDoc,Class JavaDoc<?>> map)
2040    throws SQLException JavaDoc;
2041
2042    /**
2043     * Retrieves the value of the designated column in the current row
2044     * of this <code>ResultSet</code> object as a <code>Ref</code> object
2045     * in the Java programming language.
2046     *
2047     * @param colName the column name
2048     * @return a <code>Ref</code> object representing the SQL <code>REF</code>
2049     * value in the specified column
2050     * @exception SQLException if a database access error occurs
2051     * @since 1.2
2052     */

2053    Ref JavaDoc getRef(String JavaDoc colName) throws SQLException JavaDoc;
2054
2055    /**
2056     * Retrieves the value of the designated column in the current row
2057     * of this <code>ResultSet</code> object as a <code>Blob</code> object
2058     * in the Java programming language.
2059     *
2060     * @param colName the name of the column from which to retrieve the value
2061     * @return a <code>Blob</code> object representing the SQL <code>BLOB</code>
2062     * value in the specified column
2063     * @exception SQLException if a database access error occurs
2064     * @since 1.2
2065     */

2066    Blob JavaDoc getBlob(String JavaDoc colName) throws SQLException JavaDoc;
2067
2068    /**
2069     * Retrieves the value of the designated column in the current row
2070     * of this <code>ResultSet</code> object as a <code>Clob</code> object
2071     * in the Java programming language.
2072     *
2073     * @param colName the name of the column from which to retrieve the value
2074     * @return a <code>Clob</code> object representing the SQL <code>CLOB</code>
2075     * value in the specified column
2076     * @exception SQLException if a database access error occurs
2077     * @since 1.2
2078     */

2079    Clob JavaDoc getClob(String JavaDoc colName) throws SQLException JavaDoc;
2080
2081    /**
2082     * Retrieves the value of the designated column in the current row
2083     * of this <code>ResultSet</code> object as an <code>Array</code> object
2084     * in the Java programming language.
2085     *
2086     * @param colName the name of the column from which to retrieve the value
2087     * @return an <code>Array</code> object representing the SQL <code>ARRAY</code> value in
2088     * the specified column
2089     * @exception SQLException if a database access error occurs
2090     * @since 1.2
2091     */

2092    Array JavaDoc getArray(String JavaDoc colName) throws SQLException JavaDoc;
2093
2094    /**
2095     * Retrieves the value of the designated column in the current row
2096     * of this <code>ResultSet</code> object as a <code>java.sql.Date</code> object
2097     * in the Java programming language.
2098     * This method uses the given calendar to construct an appropriate millisecond
2099     * value for the date if the underlying database does not store
2100     * timezone information.
2101     *
2102     * @param columnIndex the first column is 1, the second is 2, ...
2103     * @param cal the <code>java.util.Calendar</code> object
2104     * to use in constructing the date
2105     * @return the column value as a <code>java.sql.Date</code> object;
2106     * if the value is SQL <code>NULL</code>,
2107     * the value returned is <code>null</code> in the Java programming language
2108     * @exception SQLException if a database access error occurs
2109     * @since 1.2
2110     */

2111    java.sql.Date JavaDoc getDate(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc;
2112
2113    /**
2114     * Retrieves the value of the designated column in the current row
2115     * of this <code>ResultSet</code> object as a <code>java.sql.Date</code> object
2116     * in the Java programming language.
2117     * This method uses the given calendar to construct an appropriate millisecond
2118     * value for the date if the underlying database does not store
2119     * timezone information.
2120     *
2121     * @param columnName the SQL name of the column from which to retrieve the value
2122     * @param cal the <code>java.util.Calendar</code> object
2123     * to use in constructing the date
2124     * @return the column value as a <code>java.sql.Date</code> object;
2125     * if the value is SQL <code>NULL</code>,
2126     * the value returned is <code>null</code> in the Java programming language
2127     * @exception SQLException if a database access error occurs
2128     * @since 1.2
2129     */

2130    java.sql.Date JavaDoc getDate(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc;
2131
2132    /**
2133     * Retrieves the value of the designated column in the current row
2134     * of this <code>ResultSet</code> object as a <code>java.sql.Time</code> object
2135     * in the Java programming language.
2136     * This method uses the given calendar to construct an appropriate millisecond
2137     * value for the time if the underlying database does not store
2138     * timezone information.
2139     *
2140     * @param columnIndex the first column is 1, the second is 2, ...
2141     * @param cal the <code>java.util.Calendar</code> object
2142     * to use in constructing the time
2143     * @return the column value as a <code>java.sql.Time</code> object;
2144     * if the value is SQL <code>NULL</code>,
2145     * the value returned is <code>null</code> in the Java programming language
2146     * @exception SQLException if a database access error occurs
2147     * @since 1.2
2148     */

2149    java.sql.Time JavaDoc getTime(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc;
2150
2151    /**
2152     * Retrieves the value of the designated column in the current row
2153     * of this <code>ResultSet</code> object as a <code>java.sql.Time</code> object
2154     * in the Java programming language.
2155     * This method uses the given calendar to construct an appropriate millisecond
2156     * value for the time if the underlying database does not store
2157     * timezone information.
2158     *
2159     * @param columnName the SQL name of the column
2160     * @param cal the <code>java.util.Calendar</code> object
2161     * to use in constructing the time
2162     * @return the column value as a <code>java.sql.Time</code> object;
2163     * if the value is SQL <code>NULL</code>,
2164     * the value returned is <code>null</code> in the Java programming language
2165     * @exception SQLException if a database access error occurs
2166     * @since 1.2
2167     */

2168    java.sql.Time JavaDoc getTime(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc;
2169
2170    /**
2171     * Retrieves the value of the designated column in the current row
2172     * of this <code>ResultSet</code> object as a <code>java.sql.Timestamp</code> object
2173     * in the Java programming language.
2174     * This method uses the given calendar to construct an appropriate millisecond
2175     * value for the timestamp if the underlying database does not store
2176     * timezone information.
2177     *
2178     * @param columnIndex the first column is 1, the second is 2, ...
2179     * @param cal the <code>java.util.Calendar</code> object
2180     * to use in constructing the timestamp
2181     * @return the column value as a <code>java.sql.Timestamp</code> object;
2182     * if the value is SQL <code>NULL</code>,
2183     * the value returned is <code>null</code> in the Java programming language
2184     * @exception SQLException if a database access error occurs
2185     * @since 1.2
2186     */

2187    java.sql.Timestamp JavaDoc getTimestamp(int columnIndex, Calendar JavaDoc cal)
2188      throws SQLException JavaDoc;
2189
2190    /**
2191     * Retrieves the value of the designated column in the current row
2192     * of this <code>ResultSet</code> object as a <code>java.sql.Timestamp</code> object
2193     * in the Java programming language.
2194     * This method uses the given calendar to construct an appropriate millisecond
2195     * value for the timestamp if the underlying database does not store
2196     * timezone information.
2197     *
2198     * @param columnName the SQL name of the column
2199     * @param cal the <code>java.util.Calendar</code> object
2200     * to use in constructing the date
2201     * @return the column value as a <code>java.sql.Timestamp</code> object;
2202     * if the value is SQL <code>NULL</code>,
2203     * the value returned is <code>null</code> in the Java programming language
2204     * @exception SQLException if a database access error occurs
2205     * @since 1.2
2206     */

2207    java.sql.Timestamp JavaDoc getTimestamp(String JavaDoc columnName, Calendar JavaDoc cal)
2208      throws SQLException JavaDoc;
2209
2210    //-------------------------- JDBC 3.0 ----------------------------------------
2211

2212    /**
2213     * The constant indicating that <code>ResultSet</code> objects should not
2214     * be closed when the method <code>Connection.commit</code> is called.
2215     *
2216     * @since 1.4
2217     */

2218    int HOLD_CURSORS_OVER_COMMIT = 1;
2219
2220    /**
2221     * The constant indicating that <code>ResultSet</code> objects should be
2222     * closed when the method <code>Connection.commit</code> is called.
2223     *
2224     * @since 1.4
2225     */

2226    int CLOSE_CURSORS_AT_COMMIT = 2;
2227
2228    /**
2229     * Retrieves the value of the designated column in the current row
2230     * of this <code>ResultSet</code> object as a <code>java.net.URL</code>
2231     * object in the Java programming language.
2232     *
2233     * @param columnIndex the index of the column 1 is the first, 2 is the second,...
2234     * @return the column value as a <code>java.net.URL</code> object;
2235     * if the value is SQL <code>NULL</code>,
2236     * the value returned is <code>null</code> in the Java programming language
2237     * @exception SQLException if a database access error occurs,
2238     * or if a URL is malformed
2239     * @since 1.4
2240     */

2241    java.net.URL JavaDoc getURL(int columnIndex) throws SQLException JavaDoc;
2242
2243    /**
2244     * Retrieves the value of the designated column in the current row
2245     * of this <code>ResultSet</code> object as a <code>java.net.URL</code>
2246     * object in the Java programming language.
2247     *
2248     * @param columnName the SQL name of the column
2249     * @return the column value as a <code>java.net.URL</code> object;
2250     * if the value is SQL <code>NULL</code>,
2251     * the value returned is <code>null</code> in the Java programming language
2252     * @exception SQLException if a database access error occurs
2253     * or if a URL is malformed
2254     * @since 1.4
2255     */

2256    java.net.URL JavaDoc getURL(String JavaDoc columnName) throws SQLException JavaDoc;
2257
2258    /**
2259     * Updates the designated column with a <code>java.sql.Ref</code> value.
2260     * The updater methods are used to update column values in the
2261     * current row or the insert row. The updater methods do not
2262     * update the underlying database; instead the <code>updateRow</code> or
2263     * <code>insertRow</code> methods are called to update the database.
2264     *
2265     * @param columnIndex the first column is 1, the second is 2, ...
2266     * @param x the new column value
2267     * @exception SQLException if a database access error occurs
2268     * @since 1.4
2269     */

2270    void updateRef(int columnIndex, java.sql.Ref JavaDoc x) throws SQLException JavaDoc;
2271    
2272    /**
2273     * Updates the designated column with a <code>java.sql.Ref</code> value.
2274     * The updater methods are used to update column values in the
2275     * current row or the insert row. The updater methods do not
2276     * update the underlying database; instead the <code>updateRow</code> or
2277     * <code>insertRow</code> methods are called to update the database.
2278     *
2279     * @param columnName the name of the column
2280     * @param x the new column value
2281     * @exception SQLException if a database access error occurs
2282     * @since 1.4
2283     */

2284    void updateRef(String JavaDoc columnName, java.sql.Ref JavaDoc x) throws SQLException JavaDoc;
2285
2286    /**
2287     * Updates the designated column with a <code>java.sql.Blob</code> value.
2288     * The updater methods are used to update column values in the
2289     * current row or the insert row. The updater methods do not
2290     * update the underlying database; instead the <code>updateRow</code> or
2291     * <code>insertRow</code> methods are called to update the database.
2292     *
2293     * @param columnIndex the first column is 1, the second is 2, ...
2294     * @param x the new column value
2295     * @exception SQLException if a database access error occurs
2296     * @since 1.4
2297     */

2298    void updateBlob(int columnIndex, java.sql.Blob JavaDoc x) throws SQLException JavaDoc;
2299
2300    /**
2301     * Updates the designated column with a <code>java.sql.Blob</code> value.
2302     * The updater methods are used to update column values in the
2303     * current row or the insert row. The updater methods do not
2304     * update the underlying database; instead the <code>updateRow</code> or
2305     * <code>insertRow</code> methods are called to update the database.
2306     *
2307     * @param columnName the name of the column
2308     * @param x the new column value
2309     * @exception SQLException if a database access error occurs
2310     * @since 1.4
2311     */

2312    void updateBlob(String JavaDoc columnName, java.sql.Blob JavaDoc x) throws SQLException JavaDoc;
2313
2314    /**
2315     * Updates the designated column with a <code>java.sql.Clob</code> value.
2316     * The updater methods are used to update column values in the
2317     * current row or the insert row. The updater methods do not
2318     * update the underlying database; instead the <code>updateRow</code> or
2319     * <code>insertRow</code> methods are called to update the database.
2320     *
2321     * @param columnIndex the first column is 1, the second is 2, ...
2322     * @param x the new column value
2323     * @exception SQLException if a database access error occurs
2324     * @since 1.4
2325     */

2326    void updateClob(int columnIndex, java.sql.Clob JavaDoc x) throws SQLException JavaDoc;
2327
2328    /**
2329     * Updates the designated column with a <code>java.sql.Clob</code> value.
2330     * The updater methods are used to update column values in the
2331     * current row or the insert row. The updater methods do not
2332     * update the underlying database; instead the <code>updateRow</code> or
2333     * <code>insertRow</code> methods are called to update the database.
2334     *
2335     * @param columnName the name of the column
2336     * @param x the new column value
2337     * @exception SQLException if a database access error occurs
2338     * @since 1.4
2339     */

2340    void updateClob(String JavaDoc columnName, java.sql.Clob JavaDoc x) throws SQLException JavaDoc;
2341
2342    /**
2343     * Updates the designated column with a <code>java.sql.Array</code> value.
2344     * The updater methods are used to update column values in the
2345     * current row or the insert row. The updater methods do not
2346     * update the underlying database; instead the <code>updateRow</code> or
2347     * <code>insertRow</code> methods are called to update the database.
2348     *
2349     * @param columnIndex the first column is 1, the second is 2, ...
2350     * @param x the new column value
2351     * @exception SQLException if a database access error occurs
2352     * @since 1.4
2353     */

2354    void updateArray(int columnIndex, java.sql.Array JavaDoc x) throws SQLException JavaDoc;
2355
2356    /**
2357     * Updates the designated column with a <code>java.sql.Array</code> value.
2358     * The updater methods are used to update column values in the
2359     * current row or the insert row. The updater methods do not
2360     * update the underlying database; instead the <code>updateRow</code> or
2361     * <code>insertRow</code> methods are called to update the database.
2362     *
2363     * @param columnName the name of the column
2364     * @param x the new column value
2365     * @exception SQLException if a database access error occurs
2366     * @since 1.4
2367     */

2368    void updateArray(String JavaDoc columnName, java.sql.Array JavaDoc x) throws SQLException JavaDoc;
2369}
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
Popular Tags