OSDN Git Service

Start of AWT merge with Classpath:
[pf3gnuchains/gcc-fork.git] / libjava / java / sql / ResultSet.java
1 /* ResultSet.java -- A SQL statement result set.
2    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
3
4 This file is part of GNU Classpath.
5
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10  
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING.  If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
20
21 As a special exception, if you link this library with other files to
22 produce an executable, this library does not by itself cause the
23 resulting executable to be covered by the GNU General Public License.
24 This exception does not however invalidate any other reasons why the
25 executable file might be covered by the GNU General Public License. */
26
27
28 package java.sql;
29
30 import java.io.InputStream;
31 import java.io.Reader;
32 import java.math.BigDecimal;
33 import java.util.Calendar;
34 import java.util.Map;
35
36 /**
37   * This interface provides access to the data set returned by a SQL
38   * statement.  An instance of this interface is returned by the various
39   * execution methods in the <code>Statement</code.
40   * <p>
41   * This class models a cursor, which can be stepped through one row at a
42   * time.  Methods are provided for accessing columns by column name or by
43   * index.
44   * <p>
45   * Note that a result set is invalidated if the statement that returned
46   * it is closed.
47   *
48   * @author Aaron M. Renn (arenn@urbanophile.com)
49   */
50 public interface ResultSet
51 {
52
53 /**
54   * The rows will be processed in order from first to last.
55   */
56 public static final int FETCH_FORWARD = 0;
57
58 /**
59   * The rows will be processed in order from last to first.
60   */
61 public static final int FETCH_REVERSE = 1;
62
63 /**
64   * The rows will be processed in an unknown order
65   */
66 public static final int FETCH_UNKNOWN = 2;
67
68 /**
69   * This type of result set may only step forward through the rows returned.
70   */
71 public static final int TYPE_FORWARD_ONLY = 0;
72
73 /**
74   * This type of result set is scrollable and is not sensitive to changes
75   * made by other statements.
76   */
77 public static final int TYPE_SCROLL_INSENSITIVE = 1;
78
79 /**
80   * This type of result set is scrollable and is also sensitive to changes
81   * made by other statements.
82   */
83 public static final int TYPE_SCROLL_SENSITIVE = 1;
84
85 /**
86   * The concurrency mode of for the result set may not be modified.
87   */
88 public static final int CONCUR_READ_ONLY = 0;
89
90 /**
91   * The concurrency mode of for the result set may be modified.
92   */
93 public static final int CONCUR_UPDATABLE = 1;
94
95 /*************************************************************************/
96
97 /**
98   * This method advances to the next row in the result set.  Any streams
99   * open on the current row are closed automatically.
100   *
101   * @return <code>true</code> if the next row exists, <code>false</code>
102   * otherwise.
103   * 
104   * @exception SQLException If an error occurs.
105   */
106 public abstract boolean 
107 next() throws SQLException;
108
109 /*************************************************************************/
110
111 /**
112   * This method moves the current position to the previous row in the
113   * result set.
114   *
115   * @return <code>true</code> if the previous row exists, <code>false</code>
116   * otherwise.
117   * 
118   * @exception SQLException If an error occurs.
119   */
120 public abstract boolean
121 previous() throws SQLException;
122
123 /*************************************************************************/
124
125 /**
126   * This method closes the result set and frees any associated resources.
127   * 
128   * @exception SQLException If an error occurs.
129   */
130 public abstract void
131 close() throws SQLException;
132
133 /*************************************************************************/
134
135 /**
136   * This method tests whether the value of the last column that was fetched
137   * was actually a SQL NULL value.
138   *
139   * @return <code>true</code> if the last column fetched was a NULL,
140   * <code>false</code> otherwise.
141   * 
142   * @exception SQLException If an error occurs.
143   */
144 public abstract boolean
145 wasNull() throws SQLException;
146
147 /*************************************************************************/
148
149 /**
150   * This method returns the value of the specified column as a Java
151   * <code>String</code>.
152   *
153   * @param index The index of the column to return.
154   *
155   * @return The column value as a <code>String</code>.
156   *
157   * @exception SQLException If an error occurs.
158   */
159 public abstract String
160 getString(int index) throws SQLException;
161
162 /*************************************************************************/
163
164 /**
165   * This method returns the value of the specified column as a Java
166   * <code>Object</code>.
167   *
168   * @param index The index of the column to return.
169   *
170   * @return The column value as an <code>Object</code>.
171   *
172   * @exception SQLException If an error occurs.
173   */
174 public abstract Object
175 getObject(int index) throws SQLException;
176
177 /*************************************************************************/
178
179 /**
180   * This method returns the value of the specified column as a Java
181   * <code>boolean</code>.
182   *
183   * @param index The index of the column to return.
184   *
185   * @return The column value as a <code>boolean</code>.
186   *
187   * @exception SQLException If an error occurs.
188   */
189 public abstract boolean
190 getBoolean(int index) throws SQLException;
191
192 /*************************************************************************/
193
194 /**
195   * This method returns the value of the specified column as a Java
196   * <code>byte</code>.
197   *
198   * @param index The index of the column to return.
199   *
200   * @return The column value as a <code>byte</code>.
201   *
202   * @exception SQLException If an error occurs.
203   */
204 public abstract byte
205 getByte(int index) throws SQLException;
206
207 /*************************************************************************/
208
209 /**
210   * This method returns the value of the specified column as a Java
211   * <code>short</code>.
212   *
213   * @param index The index of the column to return.
214   *
215   * @return The column value as a <code>short</code>.
216   *
217   * @exception SQLException If an error occurs.
218   */
219 public abstract short
220 getShort(int index) throws SQLException;
221
222 /*************************************************************************/
223
224 /**
225   * This method returns the value of the specified column as a Java
226   * <code>int</code>.
227   *
228   * @param index The index of the column to return.
229   *
230   * @return The column value as a <code>int</code>.
231   *
232   * @exception SQLException If an error occurs.
233   */
234 public abstract int
235 getInt(int index) throws SQLException;
236
237 /*************************************************************************/
238
239 /**
240   * This method returns the value of the specified column as a Java
241   * <code>long</code>.
242   *
243   * @param index The index of the column to return.
244   *
245   * @return The column value as a <code>long</code>.
246   *
247   * @exception SQLException If an error occurs.
248   */
249 public abstract long
250 getLong(int index) throws SQLException;
251
252 /*************************************************************************/
253
254 /**
255   * This method returns the value of the specified column as a Java
256   * <code>float</code>.
257   *
258   * @param index The index of the column to return.
259   *
260   * @return The column value as a <code>float</code>.
261   *
262   * @exception SQLException If an error occurs.
263   */
264 public abstract float
265 getFloat(int index) throws SQLException;
266
267 /*************************************************************************/
268
269 /**
270   * This method returns the value of the specified column as a Java
271   * <code>double</code>.
272   *
273   * @param index The index of the column to return.
274   *
275   * @return The column value as a <code>double</code>.
276   *
277   * @exception SQLException If an error occurs.
278   */
279 public abstract double
280 getDouble(int index) throws SQLException;
281
282 /*************************************************************************/
283
284 /**
285   * This method returns the value of the specified column as a Java
286   * <code>BigDecimal</code>.
287   *
288   * @param index The index of the column to return.
289   *
290   * @return The column value as a <code>BigDecimal</code>.
291   *
292   * @exception SQLException If an error occurs.
293   */
294 public abstract BigDecimal
295 getBigDecimal(int index) throws SQLException;
296
297 /*************************************************************************/
298
299 /**
300   * This method returns the value of the specified column as a Java
301   * <code>BigDecimal</code>.
302   *
303   * @param index The index of the column to return.
304   * @param scale The number of digits to the right of the decimal to return.
305   *
306   * @return The column value as a <code>BigDecimal</code>.
307   *
308   * @exception SQLException If an error occurs.
309   */
310 public abstract BigDecimal
311 getBigDecimal(int index, int scale) throws SQLException;
312
313 /*************************************************************************/
314
315 /**
316   * This method returns the value of the specified column as a Java
317   * byte array.
318   *
319   * @param index The index of the column to return.
320   *
321   * @return The column value as a byte array
322   *
323   * @exception SQLException If an error occurs.
324   */
325 public abstract byte[]
326 getBytes(int index) throws SQLException;
327
328 /*************************************************************************/
329
330 /**
331   * This method returns the value of the specified column as a Java
332   * <code>java.sql.Date</code>.
333   *
334   * @param index The index of the column to return.
335   *
336   * @return The column value as a <code>java.sql.Date</code>.
337   *
338   * @exception SQLException If an error occurs.
339   */
340 public abstract java.sql.Date
341 getDate(int index) throws SQLException;
342
343 /*************************************************************************/
344
345 /**
346   * This method returns the value of the specified column as a Java
347   * <code>java.sql.Time</code>.
348   *
349   * @param index The index of the column to return.
350   *
351   * @return The column value as a <code>java.sql.Time</code>.
352   *
353   * @exception SQLException If an error occurs.
354   */
355 public abstract java.sql.Time
356 getTime(int index) throws SQLException;
357
358 /*************************************************************************/
359
360 /**
361   * This method returns the value of the specified column as a Java
362   * <code>java.sql.Timestamp</code>.
363   *
364   * @param index The index of the column to return.
365   *
366   * @return The column value as a <code>java.sql.Timestamp</code>.
367   *
368   * @exception SQLException If an error occurs.
369   */
370 public abstract java.sql.Timestamp
371 getTimestamp(int index) throws SQLException;
372
373 /*************************************************************************/
374
375 /**
376   * This method returns the value of the specified column as an ASCII 
377   * stream.  Note that all the data from this stream must be read before
378   * fetching the value of any other column.  Please also be aware that 
379   * calling <code>next()</code> or <code>close()</code> on this result set
380   * will close this stream as well.
381   *
382   * @param index The index of the column to return.
383   *
384   * @return The column value as an ASCII <code>InputStream</code>.
385   *
386   * @exception SQLException If an error occurs.
387   */
388 public abstract InputStream
389 getAsciiStream(int index) throws SQLException;
390
391 /*************************************************************************/
392
393 /**
394   * This method returns the value of the specified column as a Unicode UTF-8
395   * stream.  Note that all the data from this stream must be read before
396   * fetching the value of any other column.  Please also be aware that 
397   * calling <code>next()</code> or <code>close()</code> on this result set
398   * will close this stream as well.
399   *
400   * @param index The index of the column to return.
401   *
402   * @return The column value as a Unicode UTF-8 <code>InputStream</code>.
403   *
404   * @exception SQLException If an error occurs.
405   */
406 public abstract InputStream
407 getUnicodeStream(int index) throws SQLException;
408
409 /*************************************************************************/
410
411 /**
412   * This method returns the value of the specified column as a raw byte
413   * stream.  Note that all the data from this stream must be read before
414   * fetching the value of any other column.  Please also be aware that 
415   * calling <code>next()</code> or <code>close()</code> on this result set
416   * will close this stream as well.
417   *
418   * @param index The index of the column to return.
419   *
420   * @return The column value as a raw byte <code>InputStream</code>.
421   *
422   * @exception SQLException If an error occurs.
423   */
424 public abstract InputStream
425 getBinaryStream(int index) throws SQLException;
426
427 /*************************************************************************/
428
429 /**
430   * This method returns the value of the specified column as a character
431   * stream.  Note that all the data from this stream must be read before
432   * fetching the value of any other column.  Please also be aware that 
433   * calling <code>next()</code> or <code>close()</code> on this result set
434   * will close this stream as well.
435   *
436   * @param index The index of the column to return.
437   *
438   * @return The column value as an character <code>Reader</code>.
439   *
440   * @exception SQLException If an error occurs.
441   */
442 public abstract Reader
443 getCharacterStream(int index) throws SQLException;
444
445 /*************************************************************************/
446
447 /**
448   * This method returns the value of the specified column as a Java
449   * <code>String</code>.
450   *
451   * @param column The name of the column to return.
452   *
453   * @return The column value as a <code>String</code>.
454   *
455   * @exception SQLException If an error occurs.
456   */
457 public abstract String
458 getString(String column) throws SQLException;
459
460 /*************************************************************************/
461
462 /**
463   * This method returns the value of the specified column as a Java
464   * <code>Object</code>.
465   *
466   * @param column The name of the column to return.
467   *
468   * @return The column value as an <code>Object</code>.
469   *
470   * @exception SQLException If an error occurs.
471   */
472 public abstract Object
473 getObject(String column) throws SQLException;
474
475 /*************************************************************************/
476
477 /**
478   * This method returns the value of the specified column as a Java
479   * <code>boolean</code>.
480   *
481   * @param column The name of the column to return.
482   *
483   * @return The column value as a <code>boolean</code>.
484   *
485   * @exception SQLException If an error occurs.
486   */
487 public abstract boolean
488 getBoolean(String column) throws SQLException;
489
490 /*************************************************************************/
491
492 /**
493   * This method returns the value of the specified column as a Java
494   * <code>byte</code>.
495   *
496   * @param column The name of the column to return.
497   *
498   * @return The column value as a <code>byte</code>.
499   *
500   * @exception SQLException If an error occurs.
501   */
502 public abstract byte
503 getByte(String column) throws SQLException;
504
505 /*************************************************************************/
506
507 /**
508   * This method returns the value of the specified column as a Java
509   * <code>short</code>.
510   *
511   * @param column The name of the column to return.
512   *
513   * @return The column value as a <code>short</code>.
514   *
515   * @exception SQLException If an error occurs.
516   */
517 public abstract short
518 getShort(String column) throws SQLException;
519
520 /*************************************************************************/
521
522 /**
523   * This method returns the value of the specified column as a Java
524   * <code>int</code>.
525   *
526   * @param column The name of the column to return.
527   *
528   * @return The column value as a <code>int</code>.
529   *
530   * @exception SQLException If an error occurs.
531   */
532 public abstract int
533 getInt(String column) throws SQLException;
534
535 /*************************************************************************/
536
537 /**
538   * This method returns the value of the specified column as a Java
539   * <code>long</code>.
540   *
541   * @param column The name of the column to return.
542   *
543   * @return The column value as a <code>long</code>.
544   *
545   * @exception SQLException If an error occurs.
546   */
547 public abstract long
548 getLong(String column) throws SQLException;
549
550 /*************************************************************************/
551
552 /**
553   * This method returns the value of the specified column as a Java
554   * <code>float</code>.
555   *
556   * @param column The name of the column to return.
557   *
558   * @return The column value as a <code>float</code>.
559   *
560   * @exception SQLException If an error occurs.
561   */
562 public abstract float
563 getFloat(String column) throws SQLException;
564
565 /*************************************************************************/
566
567 /**
568   * This method returns the value of the specified column as a Java
569   * <code>double</code>.
570   *
571   * @param column The name of the column to return.
572   *
573   * @return The column value as a <code>double</code>.
574   *
575   * @exception SQLException If an error occurs.
576   */
577 public abstract double
578 getDouble(String column) throws SQLException;
579
580 /*************************************************************************/
581
582 /**
583   * This method returns the value of the specified column as a Java
584   * <code>BigDecimal</code>.
585   *
586   * @param column The name of the column to return.
587   *
588   * @return The column value as a <code>BigDecimal</code>.
589   *
590   * @exception SQLException If an error occurs.
591   */
592 public abstract BigDecimal
593 getBigDecimal(String column) throws SQLException;
594
595 /*************************************************************************/
596
597 /**
598   * This method returns the value of the specified column as a Java
599   * <code>BigDecimal</code>.
600   *
601   * @param column The name of the column to return.
602   * @param scale The number of digits to the right of the decimal to return.
603   *
604   * @return The column value as a <code>BigDecimal</code>.
605   *
606   * @exception SQLException If an error occurs.
607   */
608 public abstract BigDecimal
609 getBigDecimal(String column, int scale) throws SQLException;
610
611 /*************************************************************************/
612
613 /**
614   * This method returns the value of the specified column as a Java
615   * byte array.
616   *
617   * @param column The name of the column to return.
618   *
619   * @return The column value as a byte array
620   *
621   * @exception SQLException If an error occurs.
622   */
623 public abstract byte[]
624 getBytes(String column) throws SQLException;
625
626 /*************************************************************************/
627
628 /**
629   * This method returns the value of the specified column as a Java
630   * <code>java.sql.Date</code>.
631   *
632   * @param column The name of the column to return.
633   *
634   * @return The column value as a <code>java.sql.Date</code>.
635   *
636   * @exception SQLException If an error occurs.
637   */
638 public abstract java.sql.Date
639 getDate(String column) throws SQLException;
640
641 /*************************************************************************/
642
643 /**
644   * This method returns the value of the specified column as a Java
645   * <code>java.sql.Time</code>.
646   *
647   * @param column The name of the column to return.
648   *
649   * @return The column value as a <code>java.sql.Time</code>.
650   *
651   * @exception SQLException If an error occurs.
652   */
653 public abstract java.sql.Time
654 getTime(String column) throws SQLException;
655
656 /*************************************************************************/
657
658 /**
659   * This method returns the value of the specified column as a Java
660   * <code>java.sql.Timestamp</code>.
661   *
662   * @param column The name of the column to return.
663   *
664   * @return The column value as a <code>java.sql.Timestamp</code>.
665   *
666   * @exception SQLException If an error occurs.
667   */
668 public abstract java.sql.Timestamp
669 getTimestamp(String column) throws SQLException;
670
671 /*************************************************************************/
672
673 /**
674   * This method returns the value of the specified column as an ASCII 
675   * stream.  Note that all the data from this stream must be read before
676   * fetching the value of any other column.  Please also be aware that 
677   * calling <code>next()</code> or <code>close()</code> on this result set
678   * will close this stream as well.
679   *
680   * @param column The name of the column to return.
681   *
682   * @return The column value as an ASCII <code>InputStream</code>.
683   *
684   * @exception SQLException If an error occurs.
685   */
686 public abstract InputStream
687 getAsciiStream(String column) throws SQLException;
688
689 /*************************************************************************/
690
691 /**
692   * This method returns the value of the specified column as a Unicode UTF-8
693   * stream.  Note that all the data from this stream must be read before
694   * fetching the value of any other column.  Please also be aware that 
695   * calling <code>next()</code> or <code>close()</code> on this result set
696   * will close this stream as well.
697   *
698   * @param column The name of the column to return.
699   *
700   * @return The column value as a Unicode UTF-8 <code>InputStream</code>.
701   *
702   * @exception SQLException If an error occurs.
703   */
704 public abstract InputStream
705 getUnicodeStream(String column) throws SQLException;
706
707 /*************************************************************************/
708
709 /**
710   * This method returns the value of the specified column as a raw byte
711   * stream.  Note that all the data from this stream must be read before
712   * fetching the value of any other column.  Please also be aware that 
713   * calling <code>next()</code> or <code>close()</code> on this result set
714   * will close this stream as well.
715   *
716   * @param column The name of the column to return.
717   *
718   * @return The column value as a raw byte <code>InputStream</code>.
719   *
720   * @exception SQLException If an error occurs.
721   */
722 public abstract InputStream
723 getBinaryStream(String column) throws SQLException;
724
725 /*************************************************************************/
726
727 /**
728   * This method returns the value of the specified column as a character
729   * stream.  Note that all the data from this stream must be read before
730   * fetching the value of any other column.  Please also be aware that 
731   * calling <code>next()</code> or <code>close()</code> on this result set
732   * will close this stream as well.
733   *
734   * @param column The name of the column to return.
735   *
736   * @return The column value as an character <code>Reader</code>.
737   *
738   * @exception SQLException If an error occurs.
739   */
740 public abstract Reader
741 getCharacterStream(String column) throws SQLException;
742
743 /*************************************************************************/
744
745 /**
746   * This method returns the first SQL warning associated with this result
747   * set.  Any additional warnings will be chained to this one.
748   *
749   * @return The first SQLWarning for this result set, or <code>null</code> if
750   * there are no warnings.
751   * 
752   * @exception SQLException If an error occurs.
753   */
754 public abstract SQLWarning 
755 getWarnings() throws SQLException;
756
757 /*************************************************************************/
758
759 /**
760   * This method clears all warnings associated with this result set.
761   *
762   * @exception SQLException If an error occurs.
763   */
764 public abstract void
765 clearWarnings() throws SQLException;
766
767 /*************************************************************************/
768
769 /**
770   * This method returns the name of the database cursor used by this
771   * result set.
772   *
773   * @return The name of the database cursor used by this result set.
774   * 
775   * @exception SQLException If an error occurs.
776   */
777 public abstract String
778 getCursorName() throws SQLException;
779
780 /*************************************************************************/
781
782 /**
783   * This method returns data about the columns returned as part of the
784   * result set as a <code>ResultSetMetaData</code> instance.
785   *
786   * @return The <code>ResultSetMetaData</code> instance for this result set.
787   * 
788   * @exception SQLException If an error occurs.
789   */
790 public abstract ResultSetMetaData
791 getMetaData() throws SQLException;
792
793 /*************************************************************************/
794
795 /**
796   * This method returns the column index of the specified named column.
797   *
798   * @param column The name of the column.
799   *
800   * @return The index of the column.
801   * 
802   * @exception SQLException If an error occurs.
803   */
804 public abstract int
805 findColumn(String column) throws SQLException;
806
807 /*************************************************************************/
808
809 /**
810   * This method tests whether or not the cursor is before the first row
811   * in the result set.
812   *
813   * @return <code>true</code> if the cursor is positioned before the first
814   * row, <code>false</code> otherwise.
815   * 
816   * @exception SQLException If an error occurs.
817   */
818 public abstract boolean
819 isBeforeFirst() throws SQLException;
820
821 /*************************************************************************/
822
823 /**
824   * This method tests whether or not the cursor is after the last row
825   * in the result set.
826   *
827   * @return <code>true</code> if the cursor is positioned after the last
828   * row, <code>false</code> otherwise.
829   * 
830   * @exception SQLException If an error occurs.
831   */
832 public abstract boolean
833 isAfterLast() throws SQLException;
834
835 /*************************************************************************/
836
837 /**
838   * This method tests whether or not the cursor is positioned on the first
839   * row in the result set.
840   *
841   * @return <code>true</code> if the cursor is positioned on the first
842   * row, <code>false</code> otherwise.
843   * 
844   * @exception SQLException If an error occurs.
845   */
846 public abstract boolean
847 isFirst() throws SQLException;
848
849 /*************************************************************************/
850
851 /**
852   * This method tests whether or not the cursor is on the last row
853   * in the result set.
854   *
855   * @return <code>true</code> if the cursor is positioned on the last
856   * row, <code>false</code> otherwise.
857   * 
858   * @exception SQLException If an error occurs.
859   */
860 public abstract boolean
861 isLast() throws SQLException;
862
863 /*************************************************************************/
864
865 /**
866   * This method repositions the cursor to before the first row in the
867   * result set.
868   * 
869   * @exception SQLException If an error occurs.
870   */
871 public abstract void
872 beforeFirst() throws SQLException;
873
874 /*************************************************************************/
875
876 /**
877   * This method repositions the cursor to after the last row in the result
878   * set.
879   * 
880   * @exception SQLException If an error occurs.
881   */
882 public abstract void
883 afterLast() throws SQLException;
884
885 /*************************************************************************/
886
887 /**
888   * This method repositions the cursor on the first row in the
889   * result set.
890   *
891   * @return <code>true</code> if the cursor is on a valid row;
892   * <code>false</code> if there are no rows in the result set.
893   * 
894   * @exception SQLException If an error occurs.
895   */
896 public abstract boolean
897 first() throws SQLException;
898
899 /*************************************************************************/
900
901 /**
902   * This method repositions the cursor on the last row in the result
903   * set.
904   * 
905   * @return <code>true</code> if the cursor is on a valid row;
906   * <code>false</code> if there are no rows in the result set.
907   * 
908   * @exception SQLException If an error occurs.
909   */
910 public abstract boolean
911 last() throws SQLException;
912
913 /*************************************************************************/
914
915 /**
916   * This method returns the current row number in the cursor.  Numbering
917   * begins at index 1.
918   *
919   * @return The current row number, or 0 if there is not current row.
920   * 
921   * @exception SQLException If an error occurs.
922   */
923 public abstract int
924 getRow() throws SQLException;
925
926 /*************************************************************************/
927
928 /**
929   * This method positions the result set to the specified absolute row.
930   * Positive numbers are row offsets from the beginning of the result
931   * set (numbering starts from row 1) and negative numbers are row offsets
932   * from the end of the result set (numbering starts from -1).
933   *
934   * @param row The row to position the result set to.
935   *
936   * @return <code>true</code> if the current position was changed,
937   * <code>false</code> otherwise.
938   * 
939   * @exception SQLException If an error occurs.
940   */
941 public abstract boolean
942 absolute(int row) throws SQLException;
943
944 /*************************************************************************/
945
946 /**
947   * This method moves the result set position relative to the current row.
948   * The offset can be positive or negative.
949   *
950   * @param row The relative row position to move to.
951   *
952   * @return <code>true</code> if the current position was changed,
953   * <code>false</code> otherwise.
954   * 
955   * @exception SQLException If an error occurs.
956   */
957 public abstract boolean
958 relative(int row) throws SQLException;
959
960 /*************************************************************************/
961
962 /**
963   * This method provides a hint to the driver about which direction the
964   * result set will be processed in. 
965   *
966   * @param direction The direction in which rows will be processed. (Values?)
967   * 
968   * @exception SQLException If an error occurs.
969   */
970 public abstract void
971 setFetchDirection(int direction) throws SQLException;
972  
973 /*************************************************************************/
974
975 /**
976   * This method returns the current fetch direction for this result set.
977   *
978   * @return The fetch direction for this result set.
979   * 
980   * @exception SQLException If an error occurs.
981   */
982 public abstract int
983 getFetchDirection() throws SQLException;
984
985 /*************************************************************************/
986
987 /**
988   * This method provides a hint to the driver about how many rows at a
989   * time it should fetch from the database.
990   *
991   * @param rows The number of rows the driver should fetch per call.
992   * 
993   * @exception SQLException If an error occurs.
994   */
995 public abstract void
996 setFetchSize(int rows) throws SQLException;
997
998 /*************************************************************************/
999
1000 /**
1001   * This method returns the current number of rows that will be fetched 
1002   * from the database at a time.
1003   *
1004   * @return The current fetch size for this result set.
1005   * 
1006   * @exception SQLException If an error occurs.
1007   */
1008 public abstract int
1009 getFetchSize() throws SQLException;
1010
1011 /*************************************************************************/
1012
1013 /**
1014   * This method returns the result set type of this result set.  This will
1015   * be one of the TYPE_* constants defined in this interface.
1016   *
1017   * @return The result set type.
1018   * 
1019   * @exception SQLException If an error occurs.
1020   */
1021 public abstract int
1022 getType() throws SQLException;
1023
1024 /*************************************************************************/
1025
1026 /**
1027   * This method returns the concurrency type of this result set.  This will
1028   * be one of the CONCUR_* constants defined in this interface.
1029   *
1030   * @return The result set concurrency type.
1031   * 
1032   * @exception SQLException If an error occurs.
1033   */
1034 public abstract int
1035 getConcurrency() throws SQLException;
1036
1037 /*************************************************************************/
1038
1039 /**
1040   * This method tests whether or not the current row in the result set
1041   * has been updated.  Updates must be visible in order of this method to
1042   * detect the update.
1043   *
1044   * @return <code>true</code> if the row has been updated, <code>false</code>
1045   * otherwise.
1046   * 
1047   * @exception SQLException If an error occurs.
1048   */
1049 public abstract boolean
1050 rowUpdated() throws SQLException;
1051
1052 /*************************************************************************/
1053
1054 /**
1055   * This method tests whether or not the current row in the result set
1056   * has been inserted.  Inserts must be visible in order of this method to
1057   * detect the insert.
1058   *
1059   * @return <code>true</code> if the row has been inserted, <code>false</code>
1060   * otherwise.
1061   * 
1062   * @exception SQLException If an error occurs.
1063   */
1064 public abstract boolean
1065 rowInserted() throws SQLException;
1066
1067 /*************************************************************************/
1068
1069 /**
1070   * This method tests whether or not the current row in the result set
1071   * has been deleted.  Deletes must be visible in order of this method to
1072   * detect the deletion.
1073   *
1074   * @return <code>true</code> if the row has been deleted, <code>false</code>
1075   * otherwise.
1076   * 
1077   * @exception SQLException If an error occurs.
1078   */
1079 public abstract boolean
1080 rowDeleted() throws SQLException;
1081
1082 /*************************************************************************/
1083
1084 /**
1085   * This method updates the specified column to have a NULL value.  This
1086   * does not update the actual database.  <code>updateRow</code> must be
1087   * called in order to do that.
1088   *
1089   * @return index The index of the column to update.
1090   *
1091   * @exception SQLException If an error occurs.
1092   */
1093 public abstract void
1094 updateNull(int index) throws SQLException;
1095
1096 /*************************************************************************/
1097
1098 /**
1099   * This method updates the specified column to have a boolean value.  This
1100   * does not update the actual database.  <code>updateRow</code> must be
1101   * called in order to do that.
1102   *
1103   * @param index The index of the column to update.
1104   * @param value The new value of the column.
1105   *
1106   * @exception SQLException If an error occurs.
1107   */
1108 public abstract void
1109 updateBoolean(int index, boolean value) throws SQLException;
1110
1111 /*************************************************************************/
1112
1113 /**
1114   * This method updates the specified column to have a byte value.  This
1115   * does not update the actual database.  <code>updateRow</code> must be
1116   * called in order to do that.
1117   *
1118   * @param index The index of the column to update.
1119   * @param value The new value of the column.
1120   *
1121   * @exception SQLException If an error occurs.
1122   */
1123 public abstract void
1124 updateByte(int index, byte value) throws SQLException;
1125
1126 /*************************************************************************/
1127
1128 /**
1129   * This method updates the specified column to have a short value.  This
1130   * does not update the actual database.  <code>updateRow</code> must be
1131   * called in order to do that.
1132   *
1133   * @param index The index of the column to update.
1134   * @param value The new value of the column.
1135   *
1136   * @exception SQLException If an error occurs.
1137   */
1138 public abstract void
1139 updateShort(int index, short value) throws SQLException;
1140
1141 /*************************************************************************/
1142
1143 /**
1144   * This method updates the specified column to have an int value.  This
1145   * does not update the actual database.  <code>updateRow</code> must be
1146   * called in order to do that.
1147   *
1148   * @param index The index of the column to update.
1149   * @param value The new value of the column.
1150   *
1151   * @exception SQLException If an error occurs.
1152   */
1153 public abstract void
1154 updateInt(int index, int value) throws SQLException;
1155
1156 /*************************************************************************/
1157
1158 /**
1159   * This method updates the specified column to have a long value.  This
1160   * does not update the actual database.  <code>updateRow</code> must be
1161   * called in order to do that.
1162   *
1163   * @param index The index of the column to update.
1164   * @param value The new value of the column.
1165   *
1166   * @exception SQLException If an error occurs.
1167   */
1168 public abstract void
1169 updateLong(int index, long value) throws SQLException;
1170
1171 /*************************************************************************/
1172
1173 /**
1174   * This method updates the specified column to have a float value.  This
1175   * does not update the actual database.  <code>updateRow</code> must be
1176   * called in order to do that.
1177   *
1178   * @param index The index of the column to update.
1179   * @param value The new value of the column.
1180   *
1181   * @exception SQLException If an error occurs.
1182   */
1183 public abstract void
1184 updateFloat(int index, float value) throws SQLException;
1185
1186 /*************************************************************************/
1187
1188 /**
1189   * This method updates the specified column to have a double value.  This
1190   * does not update the actual database.  <code>updateRow</code> must be
1191   * called in order to do that.
1192   *
1193   * @param index The index of the column to update.
1194   * @param value The new value of the column.
1195   *
1196   * @exception SQLException If an error occurs.
1197   */
1198 public abstract void
1199 updateDouble(int index, double value) throws SQLException;
1200
1201 /*************************************************************************/
1202
1203 /**
1204   * This method updates the specified column to have a BigDecimal value.  This
1205   * does not update the actual database.  <code>updateRow</code> must be
1206   * called in order to do that.
1207   *
1208   * @param index The index of the column to update.
1209   * @param value The new value of the column.
1210   *
1211   * @exception SQLException If an error occurs.
1212   */
1213 public abstract void
1214 updateBigDecimal(int index, BigDecimal value) throws SQLException;
1215
1216 /*************************************************************************/
1217
1218 /**
1219   * This method updates the specified column to have a String value.  This
1220   * does not update the actual database.  <code>updateRow</code> must be
1221   * called in order to do that.
1222   *
1223   * @param index The index of the column to update.
1224   * @param value The new value of the column.
1225   *
1226   * @exception SQLException If an error occurs.
1227   */
1228 public abstract void
1229 updateString(int index, String value) throws SQLException;
1230
1231 /*************************************************************************/
1232
1233 /**
1234   * This method updates the specified column to have a byte array value.  This
1235   * does not update the actual database.  <code>updateRow</code> must be
1236   * called in order to do that.
1237   *
1238   * @param index The index of the column to update.
1239   * @param value The new value of the column.
1240   *
1241   * @exception SQLException If an error occurs.
1242   */
1243 public abstract void
1244 updateBytes(int index, byte[] value) throws SQLException;
1245
1246 /*************************************************************************/
1247
1248 /**
1249   * This method updates the specified column to have a java.sql.Date value.  This
1250   * does not update the actual database.  <code>updateRow</code> must be
1251   * called in order to do that.
1252   *
1253   * @param index The index of the column to update.
1254   * @param value The new value of the column.
1255   *
1256   * @exception SQLException If an error occurs.
1257   */
1258 public abstract void
1259 updateDate(int index, java.sql.Date value) throws SQLException;
1260
1261 /*************************************************************************/
1262
1263 /**
1264   * This method updates the specified column to have a java.sql.Time value.  This
1265   * does not update the actual database.  <code>updateRow</code> must be
1266   * called in order to do that.
1267   *
1268   * @param index The index of the column to update.
1269   * @param value The new value of the column.
1270   *
1271   * @exception SQLException If an error occurs.
1272   */
1273 public abstract void
1274 updateTime(int index, java.sql.Time value) throws SQLException;
1275
1276 /*************************************************************************/
1277
1278 /**
1279   * This method updates the specified column to have a java.sql.Timestamp value.  
1280   * This does not update the actual database.  <code>updateRow</code> must be
1281   * called in order to do that.
1282   *
1283   * @param index The index of the column to update.
1284   * @param value The new value of the column.
1285   *
1286   * @exception SQLException If an error occurs.
1287   */
1288 public abstract void
1289 updateTimestamp(int index, java.sql.Timestamp value) throws SQLException;
1290
1291 /*************************************************************************/
1292
1293 /**
1294   * This method updates the specified column from an ASCII text stream.
1295   * This does not update the actual database.  <code>updateRow</code> must be
1296   * called in order to do that.
1297   *
1298   * @param index The index of the column to update.
1299   * @param value The new value of the column.
1300   * @param length The length of the stream.
1301   *
1302   * @exception SQLException If an error occurs.
1303   */
1304 public abstract void
1305 updateAsciiStream(int index, InputStream value, int length) throws SQLException;
1306
1307 /*************************************************************************/
1308
1309 /**
1310   * This method updates the specified column from a binary stream.
1311   * This does not update the actual database.  <code>updateRow</code> must be
1312   * called in order to do that.
1313   *
1314   * @param index The index of the column to update.
1315   * @param value The new value of the column.
1316   * @param length The length of the stream.
1317   *
1318   * @exception SQLException If an error occurs.
1319   */
1320 public abstract void
1321 updateBinaryStream(int index, InputStream value, int length) 
1322                    throws SQLException;
1323
1324 /*************************************************************************/
1325
1326 /**
1327   * This method updates the specified column from a character stream.
1328   * This does not update the actual database.  <code>updateRow</code> must be
1329   * called in order to do that.
1330   *
1331   * @param index The index of the column to update.
1332   * @param value The new value of the column.
1333   * @param length The length of the stream.
1334   *
1335   * @exception SQLException If an error occurs.
1336   */
1337 public abstract void
1338 updateCharacterStream(int index, Reader value, int length) throws SQLException;
1339
1340 /*************************************************************************/
1341
1342 /**
1343   * This method updates the specified column to have an Object value.  
1344   * This does not update the actual database.  <code>updateRow</code> must be
1345   * called in order to do that.
1346   *
1347   * @param index The index of the column to update.
1348   * @param value The new value of the column.
1349   *
1350   * @exception SQLException If an error occurs.
1351   */
1352 public abstract void
1353 updateObject(int index, Object value) throws SQLException;
1354
1355 /*************************************************************************/
1356
1357 /**
1358   * This method updates the specified column to have an Object value.  
1359   * This does not update the actual database.  <code>updateRow</code> must be
1360   * called in order to do that.
1361   *
1362   * @param index The index of the column to update.
1363   * @param value The new value of the column.
1364   * @param scale The scale of the object in question, which is used only
1365   * for numeric type objects.
1366   *
1367   * @exception SQLException If an error occurs.
1368   */
1369 public abstract void
1370 updateObject(int index, Object value, int scale) throws SQLException;
1371
1372 /*************************************************************************/
1373
1374 /**
1375   * This method updates the specified column to have a NULL value.  This
1376   * does not update the actual database.  <code>updateRow</code> must be
1377   * called in order to do that.
1378   *
1379   * @return name The name of the column to update.
1380   *
1381   * @exception SQLException If an error occurs.
1382   */
1383 public abstract void
1384 updateNull(String name) throws SQLException;
1385
1386 /*************************************************************************/
1387
1388 /**
1389   * This method updates the specified column to have a boolean value.  This
1390   * does not update the actual database.  <code>updateRow</code> must be
1391   * called in order to do that.
1392   *
1393   * @param name The name of the column to update.
1394   * @param value The new value of the column.
1395   *
1396   * @exception SQLException If an error occurs.
1397   */
1398 public abstract void
1399 updateBoolean(String name, boolean value) throws SQLException;
1400
1401 /*************************************************************************/
1402
1403 /**
1404   * This method updates the specified column to have a byte value.  This
1405   * does not update the actual database.  <code>updateRow</code> must be
1406   * called in order to do that.
1407   *
1408   * @param name The name of the column to update.
1409   * @param value The new value of the column.
1410   *
1411   * @exception SQLException If an error occurs.
1412   */
1413 public abstract void
1414 updateByte(String name, byte value) throws SQLException;
1415
1416 /*************************************************************************/
1417
1418 /**
1419   * This method updates the specified column to have a short value.  This
1420   * does not update the actual database.  <code>updateRow</code> must be
1421   * called in order to do that.
1422   *
1423   * @param name The name of the column to update.
1424   * @param value The new value of the column.
1425   *
1426   * @exception SQLException If an error occurs.
1427   */
1428 public abstract void
1429 updateShort(String name, short value) throws SQLException;
1430
1431 /*************************************************************************/
1432
1433 /**
1434   * This method updates the specified column to have an int value.  This
1435   * does not update the actual database.  <code>updateRow</code> must be
1436   * called in order to do that.
1437   *
1438   * @param name The name of the column to update.
1439   * @param value The new value of the column.
1440   *
1441   * @exception SQLException If an error occurs.
1442   */
1443 public abstract void
1444 updateInt(String name, int value) throws SQLException;
1445
1446 /*************************************************************************/
1447
1448 /**
1449   * This method updates the specified column to have a long value.  This
1450   * does not update the actual database.  <code>updateRow</code> must be
1451   * called in order to do that.
1452   *
1453   * @param name The name of the column to update.
1454   * @param value The new value of the column.
1455   *
1456   * @exception SQLException If an error occurs.
1457   */
1458 public abstract void
1459 updateLong(String name, long value) throws SQLException;
1460
1461 /*************************************************************************/
1462
1463 /**
1464   * This method updates the specified column to have a float value.  This
1465   * does not update the actual database.  <code>updateRow</code> must be
1466   * called in order to do that.
1467   *
1468   * @param name The name of the column to update.
1469   * @param value The new value of the column.
1470   *
1471   * @exception SQLException If an error occurs.
1472   */
1473 public abstract void
1474 updateFloat(String name, float value) throws SQLException;
1475
1476 /*************************************************************************/
1477
1478 /**
1479   * This method updates the specified column to have a double value.  This
1480   * does not update the actual database.  <code>updateRow</code> must be
1481   * called in order to do that.
1482   *
1483   * @param name The name of the column to update.
1484   * @param value The new value of the column.
1485   *
1486   * @exception SQLException If an error occurs.
1487   */
1488 public abstract void
1489 updateDouble(String name, double value) throws SQLException;
1490
1491 /*************************************************************************/
1492
1493 /**
1494   * This method updates the specified column to have a BigDecimal value.  This
1495   * does not update the actual database.  <code>updateRow</code> must be
1496   * called in order to do that.
1497   *
1498   * @param name The name of the column to update.
1499   * @param value The new value of the column.
1500   *
1501   * @exception SQLException If an error occurs.
1502   */
1503 public abstract void
1504 updateBigDecimal(String name, BigDecimal value) throws SQLException;
1505
1506 /*************************************************************************/
1507
1508 /**
1509   * This method updates the specified column to have a String value.  This
1510   * does not update the actual database.  <code>updateRow</code> must be
1511   * called in order to do that.
1512   *
1513   * @param name The name of the column to update.
1514   * @param value The new value of the column.
1515   *
1516   * @exception SQLException If an error occurs.
1517   */
1518 public abstract void
1519 updateString(String name, String value) throws SQLException;
1520
1521 /*************************************************************************/
1522
1523 /**
1524   * This method updates the specified column to have a byte array value.  This
1525   * does not update the actual database.  <code>updateRow</code> must be
1526   * called in order to do that.
1527   *
1528   * @param name The name of the column to update.
1529   * @param value The new value of the column.
1530   *
1531   * @exception SQLException If an error occurs.
1532   */
1533 public abstract void
1534 updateBytes(String name, byte[] value) throws SQLException;
1535
1536 /*************************************************************************/
1537
1538 /**
1539   * This method updates the specified column to have a java.sql.Date value.  This
1540   * does not update the actual database.  <code>updateRow</code> must be
1541   * called in order to do that.
1542   *
1543   * @param name The name of the column to update.
1544   * @param value The new value of the column.
1545   *
1546   * @exception SQLException If an error occurs.
1547   */
1548 public abstract void
1549 updateDate(String name, java.sql.Date value) throws SQLException;
1550
1551 /*************************************************************************/
1552
1553 /**
1554   * This method updates the specified column to have a java.sql.Time value.  This
1555   * does not update the actual database.  <code>updateRow</code> must be
1556   * called in order to do that.
1557   *
1558   * @param name The name of the column to update.
1559   * @param value The new value of the column.
1560   *
1561   * @exception SQLException If an error occurs.
1562   */
1563 public abstract void
1564 updateTime(String name, java.sql.Time value) throws SQLException;
1565
1566 /*************************************************************************/
1567
1568 /**
1569   * This method updates the specified column to have a java.sql.Timestamp value.  
1570   * This does not update the actual database.  <code>updateRow</code> must be
1571   * called in order to do that.
1572   *
1573   * @param name The name of the column to update.
1574   * @param value The new value of the column.
1575   *
1576   * @exception SQLException If an error occurs.
1577   */
1578 public abstract void
1579 updateTimestamp(String name, java.sql.Timestamp value) throws SQLException;
1580
1581 /*************************************************************************/
1582
1583 /**
1584   * This method updates the specified column from an ASCII text stream.
1585   * This does not update the actual database.  <code>updateRow</code> must be
1586   * called in order to do that.
1587   *
1588   * @param name The name of the column to update.
1589   * @param value The new value of the column.
1590   * @param length The length of the stream.
1591   *
1592   * @exception SQLException If an error occurs.
1593   */
1594 public abstract void
1595 updateAsciiStream(String name, InputStream value, int length) throws SQLException;
1596
1597 /*************************************************************************/
1598
1599 /**
1600   * This method updates the specified column from a binary stream.
1601   * This does not update the actual database.  <code>updateRow</code> must be
1602   * called in order to do that.
1603   *
1604   * @param name The name of the column to update.
1605   * @param value The new value of the column.
1606   * @param length The length of the stream.
1607   *
1608   * @exception SQLException If an error occurs.
1609   */
1610 public abstract void
1611 updateBinaryStream(String name, InputStream value, int length) 
1612                    throws SQLException;
1613
1614 /*************************************************************************/
1615
1616 /**
1617   * This method updates the specified column from a character stream.
1618   * This does not update the actual database.  <code>updateRow</code> must be
1619   * called in order to do that.
1620   *
1621   * @param name The name of the column to update.
1622   * @param value The new value of the column.
1623   * @param length The length of the stream.
1624   *
1625   * @exception SQLException If an error occurs.
1626   */
1627 public abstract void
1628 updateCharacterStream(String name, Reader value, int length) throws SQLException;
1629
1630 /*************************************************************************/
1631
1632 /**
1633   * This method updates the specified column to have an Object value.  
1634   * This does not update the actual database.  <code>updateRow</code> must be
1635   * called in order to do that.
1636   *
1637   * @param name The name of the column to update.
1638   * @param value The new value of the column.
1639   *
1640   * @exception SQLException If an error occurs.
1641   */
1642 public abstract void
1643 updateObject(String name, Object value) throws SQLException;
1644
1645 /*************************************************************************/
1646
1647 /**
1648   * This method updates the specified column to have an Object value.  
1649   * This does not update the actual database.  <code>updateRow</code> must be
1650   * called in order to do that.
1651   *
1652   * @param name The name of the column to update.
1653   * @param value The new value of the column.
1654   * @param scale The scale of the object in question, which is used only
1655   * for numeric type objects.
1656   *
1657   * @exception SQLException If an error occurs.
1658   */
1659 public abstract void
1660 updateObject(String name, Object value, int scale) throws SQLException;
1661
1662 /*************************************************************************/
1663
1664 /**
1665   * This method inserts the current row into the database.  The result set
1666   * must be positioned on the insert row in order to call this method
1667   * successfully.
1668   *
1669   * @exception SQLException If an error occurs.
1670   */
1671 public abstract void
1672 insertRow() throws SQLException;
1673
1674 /*************************************************************************/
1675
1676 /**
1677   * This method updates the current row in the database.
1678   *
1679   * @exception SQLException If an error occurs.
1680   */
1681 public abstract void
1682 updateRow() throws SQLException;
1683
1684 /*************************************************************************/
1685
1686 /**
1687   * This method deletes the current row in the database.
1688   *
1689   * @exception SQLException If an error occurs.
1690   */
1691 public abstract void
1692 deleteRow() throws SQLException;
1693
1694 /*************************************************************************/
1695
1696 /**
1697   * This method refreshes the contents of the current row from the database.
1698   *
1699   * @exception SQLException If an error occurs.
1700   */
1701 public abstract void
1702 refreshRow() throws SQLException;
1703
1704 /*************************************************************************/
1705
1706 /**
1707   * This method cancels any changes that have been made to a row.  If 
1708   * the <code>rowUpdate</code> method has been called, then the changes
1709   * cannot be undone.
1710   *
1711   * @exception SQLException If an error occurs.
1712   */
1713 public abstract void
1714 cancelRowUpdates() throws SQLException;
1715
1716 /*************************************************************************/
1717
1718 /**
1719   * This method positions the result set to the "insert row", which allows
1720   * a new row to be inserted into the database from the result set.
1721   *
1722   * @exception SQLException If an error occurs.
1723   */
1724 public abstract void
1725 moveToInsertRow() throws SQLException;
1726
1727 /*************************************************************************/
1728
1729 /**
1730   * This method moves the result set position from the insert row back to
1731   * the current row that was selected prior to moving to the insert row.
1732   *
1733   * @exception SQLException If an error occurs.
1734   */
1735 public abstract void
1736 moveToCurrentRow() throws SQLException;
1737
1738 /*************************************************************************/
1739
1740 /**
1741   * This method returns a the <code>Statement</code> that was used to
1742   * produce this result set.
1743   *
1744   * @return The <code>Statement</code> used to produce this result set.
1745   *
1746   * @exception SQLException If an error occurs.
1747   */
1748 public abstract Statement
1749 getStatement() throws SQLException;
1750
1751 /*************************************************************************/
1752
1753 /**
1754   * This method returns the value of the specified column as a Java
1755   * <code>Object</code> using the specified SQL type to Java type map.
1756   *
1757   * @param index The index of the column to return.
1758   * @param map The SQL type to Java type map to use.
1759   *
1760   * @return The value of the column as an <code>Object</code>.
1761   *
1762   * @exception SQLException If an error occurs.
1763   */
1764 public abstract Object
1765 getObject(int index, Map map) throws SQLException;
1766
1767 /*************************************************************************/
1768
1769 /**
1770   * This method returns a <code>Ref</code> for the specified column which
1771   * represents the structured type for the column.
1772   *
1773   * @param index  The index of the column to return.
1774   *
1775   * @return A <code>Ref</code> object for the column
1776   *
1777   * @exception SQLException If an error occurs.
1778   */
1779 public Ref
1780 getRef(int index) throws SQLException;
1781
1782 /*************************************************************************/
1783
1784 /**
1785   * This method returns the specified column value as a BLOB.
1786   *
1787   * @param index The index of the column value to return.
1788   *
1789   * @return The value of the column as a BLOB.
1790   *
1791   * @exception SQLException If an error occurs.
1792   */
1793 public abstract Blob
1794 getBlob(int index) throws SQLException;
1795
1796 /*************************************************************************/
1797
1798 /**
1799   * This method returns the specified column value as a CLOB.
1800   *
1801   * @param index The index of the column value to return.
1802   *
1803   * @return The value of the column as a CLOB.
1804   *
1805   * @exception SQLException If an error occurs.
1806   */
1807 public abstract Clob
1808 getClob(int index) throws SQLException;
1809
1810 /*************************************************************************/
1811
1812 /**
1813   * This method returns the specified column value as an <code>Array</code>.
1814   *
1815   * @param index The index of the column value to return.
1816   *
1817   * @return The value of the column as an <code>Array</code>.
1818   *
1819   * @exception SQLException If an error occurs.
1820   */
1821 public abstract Array
1822 getArray(int index) throws SQLException;
1823
1824 /*************************************************************************/
1825
1826 /**
1827   * This method returns the value of the specified column as a Java
1828   * <code>Object</code> using the specified SQL type to Java type map.
1829   *
1830   * @param name The name of the column to return.
1831   * @param map The SQL type to Java type map to use.
1832   *
1833   * @return The value of the column as an <code>Object</code>.
1834   *
1835   * @exception SQLException If an error occurs.
1836   */
1837 public abstract Object
1838 getObject(String name, Map map) throws SQLException;
1839
1840 /*************************************************************************/
1841
1842 /**
1843   * This method returns a <code>Ref</code> for the specified column which
1844   * represents the structured type for the column.
1845   *
1846   * @param index  The index of the column to return.
1847   *
1848   * @return A <code>Ref</code> object for the column
1849   *
1850   * @exception SQLException If an error occurs.
1851   */
1852 public Ref
1853 getRef(String name) throws SQLException;
1854
1855 /*************************************************************************/
1856
1857 /**
1858   * This method returns the specified column value as a BLOB.
1859   *
1860   * @param name The name of the column value to return.
1861   *
1862   * @return The value of the column as a BLOB.
1863   *
1864   * @exception SQLException If an error occurs.
1865   */
1866 public abstract Blob
1867 getBlob(String name) throws SQLException;
1868
1869 /*************************************************************************/
1870
1871 /**
1872   * This method returns the specified column value as a CLOB.
1873   *
1874   * @param name The name of the column value to return.
1875   *
1876   * @return The value of the column as a CLOB.
1877   *
1878   * @exception SQLException If an error occurs.
1879   */
1880 public abstract Clob
1881 getClob(String name) throws SQLException;
1882
1883 /*************************************************************************/
1884
1885 /**
1886   * This method returns the specified column value as an <code>Array</code>.
1887   *
1888   * @param name The name of the column value to return.
1889   *
1890   * @return The value of the column as an <code>Array</code>.
1891   *
1892   * @exception SQLException If an error occurs.
1893   */
1894 public abstract Array
1895 getArray(String name) throws SQLException;
1896
1897 /*************************************************************************/
1898
1899 /**
1900   * This method returns the specified column value as a 
1901   * <code>java.sql.Date</code>.  The specified <code>Calendar</code> is used
1902   * to generate a value for the date if the database does not support
1903   * timezones.
1904   *
1905   * @param index The index of the column value to return.
1906   * @param cal The <code>Calendar</code> to use for calculating timezones.
1907   *
1908   * @return The value of the column as a <code>java.sql.Date</code>.
1909   *
1910   * @exception SQLException If an error occurs.
1911   */
1912 public abstract java.sql.Date
1913 getDate(int index, Calendar cal) throws SQLException;
1914
1915 /*************************************************************************/
1916
1917 /**
1918   * This method returns the specified column value as a 
1919   * <code>java.sql.Time</code>.  The specified <code>Calendar</code> is used
1920   * to generate a value for the time if the database does not support
1921   * timezones.
1922   *
1923   * @param index The index of the column value to return.
1924   * @param cal The <code>Calendar</code> to use for calculating timezones.
1925   *
1926   * @return The value of the column as a <code>java.sql.Time</code>.
1927   *
1928   * @exception SQLException If an error occurs.
1929   */
1930 public abstract java.sql.Time
1931 getTime(int index, Calendar cal) throws SQLException;
1932
1933 /*************************************************************************/
1934
1935 /**
1936   * This method returns the specified column value as a 
1937   * <code>java.sql.Timestamp</code>.  The specified <code>Calendar</code> is used
1938   * to generate a value for the timestamp if the database does not support
1939   * timezones.
1940   *
1941   * @param index The index of the column value to return.
1942   * @param cal The <code>Calendar</code> to use for calculating timezones.
1943   *
1944   * @return The value of the column as a <code>java.sql.Timestamp</code>.
1945   *
1946   * @exception SQLException If an error occurs.
1947   */
1948 public abstract java.sql.Timestamp
1949 getTimestamp(int index, Calendar cal) throws SQLException;
1950
1951 /*************************************************************************/
1952
1953 /**
1954   * This method returns the specified column value as a 
1955   * <code>java.sql.Date</code>.  The specified <code>Calendar</code> is used
1956   * to generate a value for the date if the database does not support
1957   * timezones.
1958   *
1959   * @param name The name of the column value to return.
1960   * @param cal The <code>Calendar</code> to use for calculating timezones.
1961   *
1962   * @return The value of the column as a <code>java.sql.Date</code>.
1963   *
1964   * @exception SQLException If an error occurs.
1965   */
1966 public abstract java.sql.Date
1967 getDate(String name, Calendar cal) throws SQLException;
1968
1969 /*************************************************************************/
1970
1971 /**
1972   * This method returns the specified column value as a 
1973   * <code>java.sql.Time</code>.  The specified <code>Calendar</code> is used
1974   * to generate a value for the time if the database does not support
1975   * timezones.
1976   *
1977   * @param name The name of the column value to return.
1978   * @param cal The <code>Calendar</code> to use for calculating timezones.
1979   *
1980   * @return The value of the column as a <code>java.sql.Time</code>.
1981   *
1982   * @exception SQLException If an error occurs.
1983   */
1984 public abstract java.sql.Time
1985 getTime(String name, Calendar cal) throws SQLException;
1986
1987 /*************************************************************************/
1988
1989 /**
1990   * This method returns the specified column value as a 
1991   * <code>java.sql.Timestamp</code>.  The specified <code>Calendar</code> is used
1992   * to generate a value for the timestamp if the database does not support
1993   * timezones.
1994   *
1995   * @param name The name of the column value to return.
1996   * @param cal The <code>Calendar</code> to use for calculating timezones.
1997   *
1998   * @return The value of the column as a <code>java.sql.Timestamp</code>.
1999   *
2000   * @exception SQLException If an error occurs.
2001   */
2002 public abstract java.sql.Timestamp
2003 getTimestamp(String name, Calendar cal) throws SQLException;
2004
2005 } // interface ResultSet
2006