source: trunk/src/gcc/libjava/java/sql/ResultSet.java@ 1213

Last change on this file since 1213 was 2, checked in by bird, 23 years ago

Initial revision

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