1 package org.webdocwf.util.xml;
2
3 import java.io.ByteArrayInputStream;
4 import java.io.IOException;
5 import java.io.InputStream;
6 import java.io.Reader;
7 import java.io.StringReader;
8 import java.math.BigDecimal;
9 import java.net.URL;
10 import java.sql.*;
11 import java.util.ArrayList;
12 import java.util.Map;
13 import java.util.Calendar;
14
15 public class XmlResultSet implements ResultSet {
16
17 /*** Metadata for this ResultSet */
18 protected ResultSetMetaData resultSetMetaData;
19
20 /*** Statement that produced this ResultSet */
21 protected XmlStatement statement;
22
23 /*** Helper class that performs the actual file reads */
24 protected XmlReader reader;
25
26 /*** Table referenced by the Statement */
27 protected String tableName;
28
29 /*** Array of available columns for referenced table */
30 protected String[] columnNames;
31
32 /*** Array of column values for referenced table */
33 protected String[] columnValues;
34
35 protected String[] whereColumnNames;
36
37 protected String[] whereColumnValues;
38
39
40 /*** Last column name index read */
41 protected int lastIndexRead = -1;
42
43 /*** InputStream to keep track of */
44 protected InputStream is;
45
46 /***
47 * Constructor for the XmlResultSet object
48 *
49 * @param statement Statement that produced this ResultSet
50 * @param reader Helper class that performs the actual file reads
51 * @param tableName Table referenced by the Statement
52 * @param columnNames Array of available columns for referenced table
53 */
54 protected XmlResultSet(XmlStatement statement, XmlReader reader , String tableName , String[] columnNames
55 , String[] whereColumnNames , String[] whereColumnValues ) {
56 this.statement = statement;
57 this.reader = reader;
58 this.tableName = tableName;
59 this.columnNames = columnNames;
60 this.whereColumnNames = whereColumnNames;
61 this.whereColumnValues = whereColumnValues;
62 }
63
64
65 public void select() throws SQLException {
66 reader.select( tableName , columnNames , whereColumnNames , whereColumnValues);
67 this.rset = reader.getResultSet();
68 }
69
70 public void close() {
71 }
72
73 private int index = 0;
74 private ArrayList rset = new ArrayList();
75 /***
76 *Description of the Method
77 *
78 * @return Description of the Returned Value
79 * @exception SQLException
80 * @since
81 */
82 public boolean next() throws SQLException {
83 boolean retVal = false;
84 try {
85 if( !(rset.size() <= index) ) {
86 this.columnValues = (String[])rset.get( index );
87 index++;
88 retVal = true;
89 } else {
90 index = 0;
91 rset = new ArrayList();
92 this.columnValues = new String[0];
93 retVal = false;
94 }
95 }catch( Exception e ) { throw new SQLException("Error in ResultSet.next() : "+e.getMessage()); }
96 return retVal;
97 }
98
99 public String getString(int i) throws SQLException {
100 try {
101 return this.columnValues[i-1].toString();
102 }catch(Exception e) { throw new SQLException("Error ResultSet.getString( index ) : "+e.getMessage()); }
103 }
104
105 /***
106 * Reports whether
107 * the last column read had a value of SQL <code>NULL</code>.
108 * Note that you must first call one of the getter methods
109 * on a column to try to read its value and then call
110 * the method <code>wasNull</code> to see if the value read was
111 * SQL <code>NULL</code>.
112 *
113 * @return <code>true</code> if the last column value read was SQL
114 * <code>NULL</code> and <code>false</code> otherwise
115 * @exception SQLException if a database access error occurs
116 */
117 public boolean wasNull() throws SQLException {
118 if(lastIndexRead >= 0) {
119 return getString(lastIndexRead) == null;
120 } else {
121 throw new SQLException("No previous getter method called");
122 }
123 }
124
125 //======================================================================
126 // Methods for accessing results by column index
127 //======================================================================
128
129
130 /***
131 * Retrieves the value of the designated column in the current row
132 * of this <code>ResultSet</code> object as
133 * a <code>boolean</code> in the Java programming language.
134 *
135 * @param columnIndex the first column is 1, the second is 2, ...
136 * @return the column value; if the value is SQL <code>NULL</code>, the
137 * value returned is <code>false</code>
138 * @exception SQLException if a database access error occurs
139 */
140 public boolean getBoolean(int columnIndex) throws SQLException {
141 String str = getString(columnIndex);
142 return (str == null) ? false : Boolean.valueOf(str).booleanValue();
143 }
144
145 /***
146 * Retrieves the value of the designated column in the current row
147 * of this <code>ResultSet</code> object as
148 * a <code>byte</code> in the Java programming language.
149 *
150 * @param columnIndex the first column is 1, the second is 2, ...
151 * @return the column value; if the value is SQL <code>NULL</code>, the
152 * value returned is <code>0</code>
153 * @exception SQLException if a database access error occurs
154 */
155 public byte getByte(int columnIndex) throws SQLException {
156 String str = getString(columnIndex);
157 return (str == null) ? 0 : Byte.parseByte(str);
158 }
159
160 /***
161 * Retrieves the value of the designated column in the current row
162 * of this <code>ResultSet</code> object as
163 * a <code>short</code> in the Java programming language.
164 *
165 * @param columnIndex the first column is 1, the second is 2, ...
166 * @return the column value; if the value is SQL <code>NULL</code>, the
167 * value returned is <code>0</code>
168 * @exception SQLException if a database access error occurs
169 */
170 public short getShort(int columnIndex) throws SQLException {
171 String str = getString(columnIndex);
172 return (str == null) ? 0 : Short.parseShort(str);
173 }
174
175 /***
176 * Gets the value of the designated column in the current row
177 * of this <code>ResultSet</code> object as
178 * an <code>int</code> in the Java programming language.
179 *
180 * @param columnIndex the first column is 1, the second is 2, ...
181 * @return the column value; if the value is SQL <code>NULL</code>, the
182 * value returned is <code>0</code>
183 * @exception SQLException if a database access error occurs
184 */
185 public int getInt(int columnIndex) throws SQLException {
186 String str = getString(columnIndex);
187 return (str == null) ? 0 : Integer.parseInt(str);
188 }
189
190 /***
191 * Retrieves the value of the designated column in the current row
192 * of this <code>ResultSet</code> object as
193 * a <code>long</code> in the Java programming language.
194 *
195 * @param columnIndex the first column is 1, the second is 2, ...
196 * @return the column value; if the value is SQL <code>NULL</code>, the
197 * value returned is <code>0</code>
198 * @exception SQLException if a database access error occurs
199 */
200 public long getLong(int columnIndex) throws SQLException {
201 String str = getString(columnIndex);
202 return (str == null) ? 0L : Long.parseLong(str);
203 }
204
205 /***
206 * Gets the value of the designated column in the current row
207 * of this <code>ResultSet</code> object as
208 * a <code>float</code> in the Java programming language.
209 *
210 * @param columnIndex the first column is 1, the second is 2, ...
211 * @return the column value; if the value is SQL <code>NULL</code>, the
212 * value returned is <code>0</code>
213 * @exception SQLException if a database access error occurs
214 */
215 public float getFloat(int columnIndex) throws SQLException {
216 String str = getString(columnIndex);
217 return (str == null) ? 0F : Float.parseFloat(str);
218 }
219
220 /***
221 * Retrieves the value of the designated column in the current row
222 * of this <code>ResultSet</code> object as
223 * a <code>double</code> in the Java programming language.
224 *
225 * @param columnIndex the first column is 1, the second is 2, ...
226 * @return the column value; if the value is SQL <code>NULL</code>, the
227 * value returned is <code>0</code>
228 * @exception SQLException if a database access error occurs
229 */
230 public double getDouble(int columnIndex) throws SQLException {
231 String str = getString(columnIndex);
232 return (str == null) ? 0D : Double.parseDouble(str);
233 }
234
235 /***
236 * Retrieves the value of the designated column in the current row
237 * of this <code>ResultSet</code> object as
238 * a <code>java.sql.BigDecimal</code> in the Java programming language.
239 *
240 * @param columnIndex the first column is 1, the second is 2, ...
241 * @param scale the number of digits to the right of the decimal point
242 * @return the column value; if the value is SQL <code>NULL</code>, the
243 * value returned is <code>null</code>
244 * @exception SQLException if a database access error occurs
245 * @deprecated
246 */
247 public BigDecimal getBigDecimal(int columnIndex, int scale)
248 throws SQLException {
249 // let getBigDecimal(int) handle this for now
250 return getBigDecimal(columnIndex);
251 }
252
253 /***
254 * Retrieves the value of the designated column in the current row
255 * of this <code>ResultSet</code> object as
256 * a <code>byte</code> array in the Java programming language.
257 * The bytes represent the raw values returned by the driver.
258 *
259 * @param columnIndex the first column is 1, the second is 2, ...
260 * @return the column value; if the value is SQL <code>NULL</code>, the
261 * value returned is <code>null</code>
262 * @exception SQLException if a database access error occurs
263 */
264 public byte[] getBytes(int columnIndex) throws SQLException {
265 String str = getString(columnIndex);
266 return (str == null) ? null : str.getBytes();
267 }
268
269 /***
270 * Retrieves the value of the designated column in the current row
271 * of this <code>ResultSet</code> object as
272 * a <code>java.sql.Date</code> object in the Java programming language.
273 *
274 * @param columnIndex the first column is 1, the second is 2, ...
275 * @return the column value; if the value is SQL <code>NULL</code>, the
276 * value returned is <code>null</code>
277 * @exception SQLException if a database access error occurs
278 */
279 public Date getDate(int columnIndex) throws SQLException {
280 String str = getString(columnIndex);
281 return (str == null) ? null : Date.valueOf(str);
282 }
283
284 /***
285 * Retrieves the value of the designated column in the current row
286 * of this <code>ResultSet</code> object as
287 * a <code>java.sql.Time</code> object in the Java programming language.
288 *
289 * @param columnIndex the first column is 1, the second is 2, ...
290 * @return the column value; if the value is SQL <code>NULL</code>, the
291 * value returned is <code>null</code>
292 * @exception SQLException if a database access error occurs
293 */
294 public Time getTime(int columnIndex) throws SQLException {
295 String str = getString(columnIndex);
296 return (str == null) ? null : Time.valueOf(str);
297 }
298
299 /***
300 * Retrieves the value of the designated column in the current row
301 * of this <code>ResultSet</code> object as a
302 * <code>java.sql.Timestamp</code> object in the Java programming language.
303 *
304 * @param columnIndex the first column is 1, the second is 2, ...
305 * @return the column value; if the value is SQL <code>NULL</code>, the
306 * value returned is <code>null</code>
307 * @exception SQLException if a database access error occurs
308 */
309 public Timestamp getTimestamp(int columnIndex) throws SQLException {
310 String str = getString(columnIndex);
311 return (str == null) ? null : Timestamp.valueOf(str);
312 }
313
314 /***
315 * Retrieves the value of the designated column in the current row
316 * of this <code>ResultSet</code> object as a stream of ASCII characters.
317 * The value can then be read in chunks from the stream. This method is
318 * particularly suitable for retrieving large <char>LONGVARCHAR</char>
319 * values. The JDBC driver will do any necessary conversion from the
320 * database format into ASCII.
321 *
322 * <P><B>Note:</B> All the data in the returned stream must be
323 * read prior to getting the value of any other column. The next
324 * call to a getter method implicitly closes the stream. Also, a
325 * stream may return <code>0</code> when the method
326 * <code>InputStream.available</code>
327 * is called whether there is data available or not.
328 *
329 * @param columnIndex the first column is 1, the second is 2, ...
330 * @return a Java input stream that delivers the database column value
331 * as a stream of one-byte ASCII characters;
332 * if the value is SQL <code>NULL</code>, the
333 * value returned is <code>null</code>
334 * @exception SQLException if a database access error occurs
335 */
336 public InputStream getAsciiStream(int columnIndex) throws SQLException {
337 String str = getString(columnIndex);
338 is = new ByteArrayInputStream(str.getBytes());
339 return (str == null) ? null : is;
340 }
341
342 /***
343 * Retrieves the value of the designated column in the current row
344 * of this <code>ResultSet</code> object as
345 * as a stream of two-byte Unicode characters. The first byte is
346 * the high byte; the second byte is the low byte.
347 *
348 * The value can then be read in chunks from the
349 * stream. This method is particularly
350 * suitable for retrieving large <code>LONGVARCHAR</code>values. The
351 * JDBC driver will do any necessary conversion from the database
352 * format into Unicode.
353 *
354 * <P><B>Note:</B> All the data in the returned stream must be
355 * read prior to getting the value of any other column. The next
356 * call to a getter method implicitly closes the stream.
357 * Also, a stream may return <code>0</code> when the method
358 * <code>InputStream.available</code>
359 * is called, whether there is data available or not.
360 *
361 * @param columnIndex the first column is 1, the second is 2, ...
362 * @return a Java input stream that delivers the database column value
363 * as a stream of two-byte Unicode characters;
364 * if the value is SQL <code>NULL</code>, the value returned is
365 * <code>null</code>
366 *
367 * @exception SQLException if a database access error occurs
368 * @deprecated use <code>getCharacterStream</code> in place of
369 * <code>getUnicodeStream</code>
370 */
371 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
372 // delegate to getAsciiStream(int)
373 return getAsciiStream(columnIndex);
374 }
375
376 /***
377 * Retrieves the value of the designated column in the current row
378 * of this <code>ResultSet</code> object as a binary stream of
379 * uninterpreted bytes. The value can then be read in chunks from the
380 * stream. This method is particularly
381 * suitable for retrieving large <code>LONGVARBINARY</code> values.
382 *
383 * <P><B>Note:</B> All the data in the returned stream must be
384 * read prior to getting the value of any other column. The next
385 * call to a getter method implicitly closes the stream. Also, a
386 * stream may return <code>0</code> when the method
387 * <code>InputStream.available</code>
388 * is called whether there is data available or not.
389 *
390 * @param columnIndex the first column is 1, the second is 2, ...
391 * @return a Java input stream that delivers the database column value
392 * as a stream of uninterpreted bytes;
393 * if the value is SQL <code>NULL</code>, the value returned is
394 * <code>null</code>
395 * @exception SQLException if a database access error occurs
396 */
397 public InputStream getBinaryStream(int columnIndex) throws SQLException {
398 // delegate to getAsciiStream(int)
399 return getAsciiStream(columnIndex);
400 }
401
402 //======================================================================
403 // Methods for accessing results by column name
404 //======================================================================
405
406 /***
407 * Retrieves the value of the designated column in the current row
408 * of this <code>ResultSet</code> object as
409 * a <code>String</code> in the Java programming language.
410 *
411 * @param columnName the SQL name of the column
412 * @return the column value; if the value is SQL <code>NULL</code>, the
413 * value returned is <code>null</code>
414 * @exception SQLException if a database access error occurs
415 */
416 public String getString(String columnName) throws SQLException {
417 int colIndex = -1;
418 for( int i = 0; i < this.columnNames.length; i++ ) {
419 if(columnName.equalsIgnoreCase( this.columnNames[i] ))
420 colIndex = i;
421 }
422 if( colIndex == -1 )
423 throw new SQLException("Column "+columnName+" not found.");
424 return this.columnValues[colIndex];
425 }
426
427 /***
428 * Retrieves the value of the designated column in the current row
429 * of this <code>ResultSet</code> object as
430 * a <code>boolean</code> in the Java programming language.
431 *
432 * @param columnName the SQL name of the column
433 * @return the column value; if the value is SQL <code>NULL</code>, the
434 * value returned is <code>false</code>
435 * @exception SQLException if a database access error occurs
436 */
437 public boolean getBoolean(String columnName) throws SQLException {
438 String str = getString(columnName);
439 return (str == null) ? false : Boolean.valueOf(str).booleanValue();
440 }
441
442 /***
443 * Retrieves the value of the designated column in the current row
444 * of this <code>ResultSet</code> object as
445 * a <code>byte</code> in the Java programming language.
446 *
447 * @param columnName the SQL name of the column
448 * @return the column value; if the value is SQL <code>NULL</code>, the
449 * value returned is <code>0</code>
450 * @exception SQLException if a database access error occurs
451 */
452 public byte getByte(String columnName) throws SQLException {
453 String str = getString(columnName);
454 return (str == null) ? 0 : Byte.parseByte(str);
455 }
456
457 /***
458 * Retrieves the value of the designated column in the current row
459 * of this <code>ResultSet</code> object as
460 * a <code>short</code> in the Java programming language.
461 *
462 * @param columnName the SQL name of the column
463 * @return the column value; if the value is SQL <code>NULL</code>, the
464 * value returned is <code>0</code>
465 * @exception SQLException if a database access error occurs
466 */
467 public short getShort(String columnName) throws SQLException {
468 String str = getString(columnName);
469 return (str == null) ? 0 : Short.parseShort(str);
470 }
471
472 /***
473 * Gets the value of the designated column in the current row
474 * of this <code>ResultSet</code> object as
475 * an <code>int</code> in the Java programming language.
476 *
477 * @param columnName the SQL name of the column
478 * @return the column value; if the value is SQL <code>NULL</code>, the
479 * value returned is <code>0</code>
480 * @exception SQLException if a database access error occurs
481 */
482 public int getInt(String columnName) throws SQLException {
483 String str = getString(columnName);
484 return (str == null) ? 0 : Integer.parseInt(str);
485 }
486
487 /***
488 * Retrieves the value of the designated column in the current row
489 * of this <code>ResultSet</code> object as
490 * a <code>long</code> in the Java programming language.
491 *
492 * @param columnName the SQL name of the column
493 * @return the column value; if the value is SQL <code>NULL</code>, the
494 * value returned is <code>0</code>
495 * @exception SQLException if a database access error occurs
496 */
497 public long getLong(String columnName) throws SQLException {
498 String str = getString(columnName);
499 return (str == null) ? 0L : Long.parseLong(str);
500 }
501
502 /***
503 * Gets the value of the designated column in the current row
504 * of this <code>ResultSet</code> object as
505 * a <code>float</code> in the Java programming language.
506 *
507 * @param columnName the SQL name of the column
508 * @return the column value; if the value is SQL <code>NULL</code>, the
509 * value returned is <code>0</code>
510 * @exception SQLException if a database access error occurs
511 */
512 public float getFloat(String columnName) throws SQLException {
513 String str = getString(columnName);
514 return (str == null) ? 0F : Float.parseFloat(str);
515 }
516
517 /***
518 * Retrieves the value of the designated column in the current row
519 * of this <code>ResultSet</code> object as
520 * a <code>double</code> in the Java programming language.
521 *
522 * @param columnName the SQL name of the column
523 * @return the column value; if the value is SQL <code>NULL</code>, the
524 * value returned is <code>0</code>
525 * @exception SQLException if a database access error occurs
526 */
527 public double getDouble(String columnName) throws SQLException {
528 String str = getString(columnName);
529 return (str == null) ? 0D : Double.parseDouble(str);
530 }
531
532 /***
533 * Retrieves the value of the designated column in the current row
534 * of this <code>ResultSet</code> object as
535 * a <code>java.math.BigDecimal</code> in the Java programming language.
536 *
537 * @param columnName the SQL name of the column
538 * @param scale the number of digits to the right of the decimal point
539 * @return the column value; if the value is SQL <code>NULL</code>, the
540 * value returned is <code>null</code>
541 * @exception SQLException if a database access error occurs
542 * @deprecated
543 */
544 public BigDecimal getBigDecimal(String columnName, int scale)
545 throws SQLException {
546 // let getBigDecimal(String) handle this for now
547 return getBigDecimal(columnName);
548 }
549
550 /***
551 * Retrieves the value of the designated column in the current row
552 * of this <code>ResultSet</code> object as
553 * a <code>byte</code> array in the Java programming language.
554 * The bytes represent the raw values returned by the driver.
555 *
556 * @param columnName the SQL name of the column
557 * @return the column value; if the value is SQL <code>NULL</code>, the
558 * value returned is <code>null</code>
559 * @exception SQLException if a database access error occurs
560 */
561 public byte[] getBytes(String columnName) throws SQLException {
562 String str = getString(columnName);
563 return (str == null) ? null : str.getBytes();
564 }
565
566 /***
567 * Retrieves the value of the designated column in the current row
568 * of this <code>ResultSet</code> object as
569 * a <code>java.sql.Date</code> object in the Java programming language.
570 *
571 * @param columnName the SQL name of the column
572 * @return the column value; if the value is SQL <code>NULL</code>, the
573 * value returned is <code>null</code>
574 * @exception SQLException if a database access error occurs
575 */
576 public Date getDate(String columnName) throws SQLException {
577 String str = getString(columnName);
578 return (str == null) ? null : Date.valueOf(str);
579 }
580
581 /***
582 * Retrieves the value of the designated column in the current row
583 * of this <code>ResultSet</code> object as
584 * a <code>java.sql.Time</code> object in the Java programming language.
585 *
586 * @param columnName the SQL name of the column
587 * @return the column value;
588 * if the value is SQL <code>NULL</code>,
589 * the value returned is <code>null</code>
590 * @exception SQLException if a database access error occurs
591 */
592 public Time getTime(String columnName) throws SQLException {
593 String str = getString(columnName);
594 return (str == null) ? null : Time.valueOf(str);
595 }
596
597 /***
598 * Retrieves the value of the designated column in the current row
599 * of this <code>ResultSet</code> object as
600 * a <code>java.sql.Timestamp</code> object.
601 *
602 * @param columnName the SQL name of the column
603 * @return the column value; if the value is SQL <code>NULL</code>, the
604 * value returned is <code>null</code>
605 * @exception SQLException if a database access error occurs
606 */
607 public Timestamp getTimestamp(String columnName) throws SQLException {
608 String str = getString(columnName);
609 return (str == null) ? null : Timestamp.valueOf(str);
610 }
611
612 /***
613 * Retrieves the value of the designated column in the current row
614 * of this <code>ResultSet</code> object as a stream of
615 * ASCII characters. The value can then be read in chunks from the
616 * stream. This method is particularly
617 * suitable for retrieving large <code>LONGVARCHAR</code> values.
618 * The JDBC driver will
619 * do any necessary conversion from the database format into ASCII.
620 *
621 * <P><B>Note:</B> All the data in the returned stream must be
622 * read prior to getting the value of any other column. The next
623 * call to a getter method implicitly closes the stream. Also, a
624 * stream may return <code>0</code> when the method <code>available</code>
625 * is called whether there is data available or not.
626 *
627 * @param columnName the SQL name of the column
628 * @return a Java input stream that delivers the database column value
629 * as a stream of one-byte ASCII characters.
630 * If the value is SQL <code>NULL</code>,
631 * the value returned is <code>null</code>.
632 * @exception SQLException if a database access error occurs
633 */
634 public InputStream getAsciiStream(String columnName) throws SQLException {
635 String str = getString(columnName);
636 is = new ByteArrayInputStream(str.getBytes());
637 return (str == null) ? null : is;
638 }
639
640 /***
641 * Retrieves the value of the designated column in the current row
642 * of this <code>ResultSet</code> object as a stream of two-byte
643 * Unicode characters. The first byte is the high byte; the second
644 * byte is the low byte.
645 *
646 * The value can then be read in chunks from the
647 * stream. This method is particularly
648 * suitable for retrieving large <code>LONGVARCHAR</code> values.
649 * The JDBC technology-enabled driver will
650 * do any necessary conversion from the database format into Unicode.
651 *
652 * <P><B>Note:</B> All the data in the returned stream must be
653 * read prior to getting the value of any other column. The next
654 * call to a getter method implicitly closes the stream.
655 * Also, a stream may return <code>0</code> when the method
656 * <code>InputStream.available</code> is called, whether there
657 * is data available or not.
658 *
659 * @param columnName the SQL name of the column
660 * @return a Java input stream that delivers the database column value
661 * as a stream of two-byte Unicode characters.
662 * If the value is SQL <code>NULL</code>, the value returned
663 * is <code>null</code>.
664 * @exception SQLException if a database access error occurs
665 * @deprecated use <code>getCharacterStream</code> instead
666 */
667 public InputStream getUnicodeStream(String columnName) throws SQLException {
668 // delegate to getAsciiStream(String)
669 return getAsciiStream(columnName);
670 }
671
672 /***
673 * Retrieves the value of the designated column in the current row
674 * of this <code>ResultSet</code> object as a stream of uninterpreted
675 * <code>byte</code>s.
676 * The value can then be read in chunks from the
677 * stream. This method is particularly
678 * suitable for retrieving large <code>LONGVARBINARY</code>
679 * values.
680 *
681 * <P><B>Note:</B> All the data in the returned stream must be
682 * read prior to getting the value of any other column. The next
683 * call to a getter method implicitly closes the stream. Also, a
684 * stream may return <code>0</code> when the method <code>available</code>
685 * is called whether there is data available or not.
686 *
687 * @param columnName the SQL name of the column
688 * @return a Java input stream that delivers the database column value
689 * as a stream of uninterpreted bytes;
690 * if the value is SQL <code>NULL</code>, the result is <code>null</code>
691 * @exception SQLException if a database access error occurs
692 */
693 public InputStream getBinaryStream(String columnName) throws SQLException {
694 // delegate to getAsciiStream(String)
695 return getAsciiStream(columnName);
696 }
697
698 //=====================================================================
699 // Advanced features:
700 //=====================================================================
701
702 /***
703 * Retrieves the first warning reported by calls on this
704 * <code>ResultSet</code> object.
705 * Subsequent warnings on this <code>ResultSet</code> object
706 * will be chained to the <code>SQLWarning</code> object that
707 * this method returns.
708 *
709 * <P>The warning chain is automatically cleared each time a new
710 * row is read. This method may not be called on a <code>ResultSet</code>
711 * object that has been closed; doing so will cause an
712 * <code>SQLException</code> to be thrown.
713 * <P>
714 * <B>Note:</B> This warning chain only covers warnings caused
715 * by <code>ResultSet</code> methods. Any warning caused by
716 * <code>Statement</code> methods
717 * (such as reading OUT parameters) will be chained on the
718 * <code>Statement</code> object.
719 *
720 * @return the first <code>SQLWarning</code> object reported or
721 * <code>null</code> if there are none
722 * @exception SQLException if a database access error occurs or this method
723 * is called on a closed result set
724 */
725 public SQLWarning getWarnings() throws SQLException {
726 throw new UnsupportedOperationException(
727 "ResultSet.getWarnings() unsupported");
728 }
729
730 /***
731 * Clears all warnings reported on this <code>ResultSet</code> object.
732 * After this method is called, the method <code>getWarnings</code>
733 * returns <code>null</code> until a new warning is
734 * reported for this <code>ResultSet</code> object.
735 *
736 * @exception SQLException if a database access error occurs
737 */
738 public void clearWarnings() throws SQLException {
739 throw new UnsupportedOperationException(
740 "ResultSet.clearWarnings() unsupported");
741 }
742
743 /***
744 * Retrieves the name of the SQL cursor used by this <code>ResultSet</code>
745 * object.
746 *
747 * <P>In SQL, a result table is retrieved through a cursor that is
748 * named. The current row of a result set can be updated or deleted
749 * using a positioned update/delete statement that references the
750 * cursor name. To insure that the cursor has the proper isolation
751 * level to support update, the cursor's <code>SELECT</code> statement
752 * should be of the form <code>SELECT FOR UPDATE</code>. If
753 * <code>FOR UPDATE</code> is omitted, the positioned updates may fail.
754 *
755 * <P>The JDBC API supports this SQL feature by providing the name of the
756 * SQL cursor used by a <code>ResultSet</code> object.
757 * The current row of a <code>ResultSet</code> object
758 * is also the current row of this SQL cursor.
759 *
760 * <P><B>Note:</B> If positioned update is not supported, a
761 * <code>SQLException</code> is thrown.
762 *
763 * @return the SQL name for this <code>ResultSet</code> object's cursor
764 * @exception SQLException if a database access error occurs
765 */
766 public String getCursorName() throws SQLException {
767 throw new UnsupportedOperationException(
768 "ResultSet.getCursorName() unsupported");
769 }
770
771 /***
772 * Retrieves the number, types and properties of
773 * this <code>ResultSet</code> object's columns.
774 *
775 * @return the description of this <code>ResultSet</code> object's columns
776 * @exception SQLException if a database access error occurs
777 */
778 public ResultSetMetaData getMetaData() throws SQLException {
779 if (resultSetMetaData == null) {
780 resultSetMetaData = new XmlResultSetMetaData(tableName,columnNames);
781 }
782 return resultSetMetaData;
783
784 }
785
786 /***
787 * <p>Gets the value of the designated column in the current row
788 * of this <code>ResultSet</code> object as
789 * an <code>Object</code> in the Java programming language.
790 *
791 * <p>This method will return the value of the given column as a
792 * Java object. The type of the Java object will be the default
793 * Java object type corresponding to the column's SQL type,
794 * following the mapping for built-in types specified in the JDBC
795 * specification. If the value is an SQL <code>NULL</code>,
796 * the driver returns a Java <code>null</code>.
797 *
798 * <p>This method may also be used to read datatabase-specific
799 * abstract data types.
800 *
801 * In the JDBC 2.0 API, the behavior of method
802 * <code>getObject</code> is extended to materialize
803 * data of SQL user-defined types. When a column contains
804 * a structured or distinct value, the behavior of this method is as
805 * if it were a call to: <code>getObject(columnIndex,
806 * this.getStatement().getConnection().getTypeMap())</code>.
807 *
808 * @param columnIndex the first column is 1, the second is 2, ...
809 * @return a <code>java.lang.Object</code> holding the column value
810 * @exception SQLException if a database access error occurs
811 */
812 public Object getObject(int columnIndex) throws SQLException {
813 // throw new UnsupportedOperationException(
814 // "ResultSet.getObject(int) unsupported");
815 return getString(columnIndex);
816 }
817 /***
818 * <p>Gets the value of the designated column in the current row
819 * of this <code>ResultSet</code> object as
820 * an <code>Object</code> in the Java programming language.
821 *
822 * <p>This method will return the value of the given column as a
823 * Java object. The type of the Java object will be the default
824 * Java object type corresponding to the column's SQL type,
825 * following the mapping for built-in types specified in the JDBC
826 * specification. If the value is an SQL <code>NULL</code>,
827 * the driver returns a Java <code>null</code>.
828 * <P>
829 * This method may also be used to read datatabase-specific
830 * abstract data types.
831 * <P>
832 * In the JDBC 2.0 API, the behavior of the method
833 * <code>getObject</code> is extended to materialize
834 * data of SQL user-defined types. When a column contains
835 * a structured or distinct value, the behavior of this method is as
836 * if it were a call to: <code>getObject(columnIndex,
837 * this.getStatement().getConnection().getTypeMap())</code>.
838 *
839 * @param columnName the SQL name of the column
840 * @return a <code>java.lang.Object</code> holding the column value
841 * @exception SQLException if a database access error occurs
842 */
843 public Object getObject(String columnName) throws SQLException {
844 // throw new UnsupportedOperationException(
845 // "ResultSet.getObject(String) unsupported");
846 return getString(columnName);
847 }
848
849 /***
850 * Maps the given <code>ResultSet</code> column name to its
851 * <code>ResultSet</code> column index.
852 *
853 * @param columnName the name of the column
854 * @return the column index of the given column name
855 * @exception SQLException if the <code>ResultSet</code> object does
856 * not contain <code>columnName</code> or a database access error occurs
857 */
858 public int findColumn(String columnName) throws SQLException {
859 throw new UnsupportedOperationException(
860 "ResultSet.findColumn(String) unsupported");
861 }
862
863 //--------------------------JDBC 2.0-----------------------------------
864
865 //---------------------------------------------------------------------
866 // Getters and Setters
867 //---------------------------------------------------------------------
868
869 /***
870 * Retrieves the value of the designated column in the current row
871 * of this <code>ResultSet</code> object as a
872 * <code>java.io.Reader</code> object.
873 *
874 * @param columnIndex the first column is 1, the second is 2, ...
875 * @return a <code>java.io.Reader</code> object that contains the column
876 * value; if the value is SQL <code>NULL</code>, the value returned is
877 * <code>null</code> in the Java programming language.
878 * @exception SQLException if a database access error occurs
879 */
880 public Reader getCharacterStream(int columnIndex) throws SQLException {
881 String str = getString(columnIndex);
882 return (str == null) ? null : new StringReader(str);
883 }
884
885 /***
886 * Retrieves the value of the designated column in the current row
887 * of this <code>ResultSet</code> object as a
888 * <code>java.io.Reader</code> object.
889 *
890 * @param columnName the name of the column
891 * @return a <code>java.io.Reader</code> object that contains the column
892 * value; if the value is SQL <code>NULL</code>, the value returned is
893 * <code>null</code> in the Java programming language
894 * @exception SQLException if a database access error occurs
895 */
896 public Reader getCharacterStream(String columnName) throws SQLException {
897 String str = getString(columnName);
898 return (str == null) ? null : new StringReader(str);
899 }
900
901 /***
902 * Retrieves the value of the designated column in the current row
903 * of this <code>ResultSet</code> object as a
904 * <code>java.math.BigDecimal</code> with full precision.
905 *
906 * @param columnIndex the first column is 1, the second is 2, ...
907 * @return the column value (full precision);
908 * if the value is SQL <code>NULL</code>, the value returned is
909 * <code>null</code> in the Java programming language.
910 * @exception SQLException if a database access error occurs
911 */
912 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
913 BigDecimal retval = null;
914 String str = getString(columnIndex);
915 if(str != null) {
916 try {
917 retval = new BigDecimal(str);
918 }
919 catch (NumberFormatException e) {
920 throw new SQLException("Could not convert '" + str + "' to " +
921 "a java.math.BigDecimal object");
922 }
923 }
924 return retval;
925 }
926
927 /***
928 * Retrieves the value of the designated column in the current row
929 * of this <code>ResultSet</code> object as a
930 * <code>java.math.BigDecimal</code> with full precision.
931 *
932 * @param columnName the column name
933 * @return the column value (full precision);
934 * if the value is SQL <code>NULL</code>, the value returned is
935 * <code>null</code> in the Java programming language.
936 * @exception SQLException if a database access error occurs
937 */
938 public BigDecimal getBigDecimal(String columnName) throws SQLException {
939 BigDecimal retval = null;
940 String str = getString(columnName);
941 if(str != null) {
942 try {
943 retval = new BigDecimal(str);
944 }
945 catch (NumberFormatException e) {
946 throw new SQLException("Could not convert '" + str + "' to " +
947 "a java.math.BigDecimal object");
948 }
949 }
950 return retval;
951 }
952
953 //---------------------------------------------------------------------
954 // Traversal/Positioning
955 //---------------------------------------------------------------------
956
957 /***
958 * Retrieves whether the cursor is before the first row in
959 * this <code>ResultSet</code> object.
960 *
961 * @return <code>true</code> if the cursor is before the first row;
962 * <code>false</code> if the cursor is at any other position or the
963 * result set contains no rows
964 * @exception SQLException if a database access error occurs
965 */
966 public boolean isBeforeFirst() throws SQLException {
967 throw new UnsupportedOperationException(
968 "ResultSet.isBeforeFirst() unsupported");
969 }
970
971 /***
972 * Retrieves whether the cursor is after the last row in
973 * this <code>ResultSet</code> object.
974 *
975 * @return <code>true</code> if the cursor is after the last row;
976 * <code>false</code> if the cursor is at any other position or the
977 * result set contains no rows
978 * @exception SQLException if a database access error occurs
979 */
980 public boolean isAfterLast() throws SQLException {
981 throw new UnsupportedOperationException(
982 "ResultSet.isAfterLast() unsupported");
983 }
984
985 /***
986 * Retrieves whether the cursor is on the first row of
987 * this <code>ResultSet</code> object.
988 *
989 * @return <code>true</code> if the cursor is on the first row;
990 * <code>false</code> otherwise
991 * @exception SQLException if a database access error occurs
992 */
993 public boolean isFirst() throws SQLException {
994 throw new UnsupportedOperationException(
995 "ResultSet.isFirst() unsupported");
996 }
997
998 /***
999 * Retrieves whether the cursor is on the last row of
1000 * this <code>ResultSet</code> object.
1001 * Note: Calling the method <code>isLast</code> may be expensive
1002 * because the JDBC driver
1003 * might need to fetch ahead one row in order to determine
1004 * whether the current row is the last row in the result set.
1005 *
1006 * @return <code>true</code> if the cursor is on the last row;
1007 * <code>false</code> otherwise
1008 * @exception SQLException if a database access error occurs
1009 */
1010 public boolean isLast() throws SQLException {
1011 throw new UnsupportedOperationException(
1012 "ResultSet.isLast() unsupported");
1013 }
1014
1015 /***
1016 * Moves the cursor to the front of
1017 * this <code>ResultSet</code> object, just before the
1018 * first row. This method has no effect if the result set contains no rows.
1019 *
1020 * @exception SQLException if a database access error
1021 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1022 */
1023 public void beforeFirst() throws SQLException {
1024 throw new UnsupportedOperationException(
1025 "ResultSet.beforeFirst() unsupported");
1026 }
1027
1028 /***
1029 * Moves the cursor to the end of
1030 * this <code>ResultSet</code> object, just after the
1031 * last row. This method has no effect if the result set contains no rows.
1032 * @exception SQLException if a database access error
1033 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1034 */
1035 public void afterLast() throws SQLException {
1036 throw new UnsupportedOperationException(
1037 "ResultSet.afterLast() unsupported");
1038 }
1039
1040 /***
1041 * Moves the cursor to the first row in
1042 * this <code>ResultSet</code> object.
1043 *
1044 * @return <code>true</code> if the cursor is on a valid row;
1045 * <code>false</code> if there are no rows in the result set
1046 * @exception SQLException if a database access error
1047 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1048 */
1049 public boolean first() throws SQLException {
1050 throw new UnsupportedOperationException(
1051 "ResultSet.first() unsupported");
1052 }
1053
1054 /***
1055 * Moves the cursor to the last row in
1056 * this <code>ResultSet</code> object.
1057 *
1058 * @return <code>true</code> if the cursor is on a valid row;
1059 * <code>false</code> if there are no rows in the result set
1060 * @exception SQLException if a database access error
1061 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1062 */
1063 public boolean last() throws SQLException {
1064 throw new UnsupportedOperationException("ResultSet.last() unsupported");
1065 }
1066
1067 /***
1068 * Retrieves the current row number. The first row is number 1, the
1069 * second number 2, and so on.
1070 *
1071 * @return the current row number; <code>0</code> if there is no current row
1072 * @exception SQLException if a database access error occurs
1073 */
1074 public int getRow() throws SQLException {
1075 throw new UnsupportedOperationException(
1076 "ResultSet.getRow() unsupported");
1077 }
1078
1079 /***
1080 * Moves the cursor to the given row number in
1081 * this <code>ResultSet</code> object.
1082 *
1083 * <p>If the row number is positive, the cursor moves to
1084 * the given row number with respect to the
1085 * beginning of the result set. The first row is row 1, the second
1086 * is row 2, and so on.
1087 *
1088 * <p>If the given row number is negative, the cursor moves to
1089 * an absolute row position with respect to
1090 * the end of the result set. For example, calling the method
1091 * <code>absolute(-1)</code> positions the
1092 * cursor on the last row; calling the method <code>absolute(-2)</code>
1093 * moves the cursor to the next-to-last row, and so on.
1094 *
1095 * <p>An attempt to position the cursor beyond the first/last row in
1096 * the result set leaves the cursor before the first row or after
1097 * the last row.
1098 *
1099 * <p><B>Note:</B> Calling <code>absolute(1)</code> is the same
1100 * as calling <code>first()</code>. Calling <code>absolute(-1)</code>
1101 * is the same as calling <code>last()</code>.
1102 *
1103 * @param row the number of the row to which the cursor should move.
1104 * A positive number indicates the row number counting from the
1105 * beginning of the result set; a negative number indicates the
1106 * row number counting from the end of the result set
1107 * @return <code>true</code> if the cursor is on the result set;
1108 * <code>false</code> otherwise
1109 * @exception SQLException if a database access error
1110 * occurs, or the result set type is <code>TYPE_FORWARD_ONLY</code>
1111 */
1112 public boolean absolute(int row) throws SQLException {
1113 throw new UnsupportedOperationException(
1114 "ResultSet.absolute() unsupported");
1115 }
1116
1117 /***
1118 * Moves the cursor a relative number of rows, either positive or negative.
1119 * Attempting to move beyond the first/last row in the
1120 * result set positions the cursor before/after the
1121 * the first/last row. Calling <code>relative(0)</code> is valid, but does
1122 * not change the cursor position.
1123 *
1124 * <p>Note: Calling the method <code>relative(1)</code>
1125 * is identical to calling the method <code>next()</code> and
1126 * calling the method <code>relative(-1)</code> is identical
1127 * to calling the method <code>previous()</code>.
1128 *
1129 * @param rows an <code>int</code> specifying the number of rows to
1130 * move from the current row; a positive number moves the cursor
1131 * forward; a negative number moves the cursor backward
1132 * @return <code>true</code> if the cursor is on a row;
1133 * <code>false</code> otherwise
1134 * @exception SQLException if a database access error occurs,
1135 * there is no current row, or the result set type is
1136 * <code>TYPE_FORWARD_ONLY</code>
1137 */
1138 public boolean relative(int rows) throws SQLException {
1139 throw new UnsupportedOperationException(
1140 "ResultSet.relative() unsupported");
1141 }
1142
1143 /***
1144 * Moves the cursor to the previous row in this
1145 * <code>ResultSet</code> object.
1146 *
1147 * @return <code>true</code> if the cursor is on a valid row;
1148 * <code>false</code> if it is off the result set
1149 * @exception SQLException if a database access error
1150 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1151 */
1152 public boolean previous() throws SQLException {
1153 throw new UnsupportedOperationException(
1154 "ResultSet.previous() unsupported");
1155 }
1156
1157 //---------------------------------------------------------------------
1158 // Properties
1159 //---------------------------------------------------------------------
1160
1161 /***
1162 * Gives a hint as to the direction in which the rows in this
1163 * <code>ResultSet</code> object will be processed. The initial value is
1164 * determined by the <code>Statement</code> object that produced this
1165 * <code>ResultSet</code> object. The fetch direction may be changed at
1166 * any time.
1167 *
1168 * @param direction an <code>int</code> specifying the suggested
1169 * fetch direction; one of <code>ResultSet.FETCH_FORWARD</code>,
1170 * <code>ResultSet.FETCH_REVERSE</code>, or
1171 * <code>ResultSet.FETCH_UNKNOWN</code>
1172 * @exception SQLException if a database access error occurs or
1173 * the result set type is <code>TYPE_FORWARD_ONLY</code>
1174 * and the fetch direction is not <code>FETCH_FORWARD</code>
1175 */
1176 public void setFetchDirection(int direction) throws SQLException {
1177 throw new UnsupportedOperationException(
1178 "ResultSet.setFetchDirection(int) unsupported");
1179 }
1180
1181 /***
1182 * Retrieves the fetch direction for this
1183 * <code>ResultSet</code> object.
1184 *
1185 * @return the current fetch direction for this <code>ResultSet</code>
1186 * object
1187 * @exception SQLException if a database access error occurs
1188 * @see #setFetchDirection
1189 */
1190 public int getFetchDirection() throws SQLException {
1191 throw new UnsupportedOperationException(
1192 "ResultSet.getFetchDirection() unsupported");
1193 }
1194
1195 /***
1196 * Gives the JDBC driver a hint as to the number of rows that should
1197 * be fetched from the database when more rows are needed for this
1198 * <code>ResultSet</code> object. If the fetch size specified is zero,
1199 * the JDBC driver ignores the value and is free to make its own best
1200 * guess as to what the fetch size should be. The default value is set
1201 * by the <code>Statement</code> object that created the result set.
1202 * The fetch size may be changed at any time.
1203 *
1204 * @param rows the number of rows to fetch
1205 * @exception SQLException if a database access error occurs or the
1206 * condition <code>0 <= rows <= this.getMaxRows()</code> is not satisfied
1207 */
1208 public void setFetchSize(int rows) throws SQLException {
1209 throw new UnsupportedOperationException(
1210 "ResultSet.setFetchSize(int) unsupported");
1211 }
1212
1213 /***
1214 * Retrieves the fetch size for this
1215 * <code>ResultSet</code> object.
1216 *
1217 * @return the current fetch size for this <code>ResultSet</code> object
1218 * @exception SQLException if a database access error occurs
1219 * @see #setFetchSize
1220 */
1221 public int getFetchSize() throws SQLException {
1222 throw new UnsupportedOperationException(
1223 "ResultSet.getFetchSize() unsupported");
1224 }
1225
1226 /***
1227 * Retrieves the type of this <code>ResultSet</code> object.
1228 * The type is determined by the <code>Statement</code> object
1229 * that created the result set.
1230 *
1231 * @return <code>ResultSet.TYPE_FORWARD_ONLY</code>,
1232 * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>,
1233 * or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
1234 * @exception SQLException if a database access error occurs
1235 */
1236 public int getType() throws SQLException {
1237 throw new UnsupportedOperationException(
1238 "ResultSet.getType() unsupported");
1239 }
1240
1241 /***
1242 * Retrieves the concurrency mode of this <code>ResultSet</code> object.
1243 * The concurrency used is determined by the
1244 * <code>Statement</code> object that created the result set.
1245 *
1246 * @return the concurrency type, either
1247 * <code>ResultSet.CONCUR_READ_ONLY</code>
1248 * or <code>ResultSet.CONCUR_UPDATABLE</code>
1249 * @exception SQLException if a database access error occurs
1250 */
1251 public int getConcurrency() throws SQLException {
1252 return CONCUR_READ_ONLY;
1253 }
1254
1255 //---------------------------------------------------------------------
1256 // Updates
1257 //---------------------------------------------------------------------
1258
1259 /***
1260 * Retrieves whether the current row has been updated. The value returned
1261 * depends on whether or not the result set can detect updates.
1262 *
1263 * @return <code>true</code> if both (1) the row has been visibly updated
1264 * by the owner or another and (2) updates are detected
1265 * @exception SQLException if a database access error occurs
1266 * @see DatabaseMetaData#updatesAreDetected
1267 */
1268 public boolean rowUpdated() throws SQLException {
1269 throw new UnsupportedOperationException(
1270 "ResultSet.rowUpdated() unsupported");
1271 }
1272
1273 /***
1274 * Retrieves whether the current row has had an insertion.
1275 * The value returned depends on whether or not this
1276 * <code>ResultSet</code> object can detect visible inserts.
1277 *
1278 * @return <code>true</code> if a row has had an insertion
1279 * and insertions are detected; <code>false</code> otherwise
1280 * @exception SQLException if a database access error occurs
1281 *
1282 * @see DatabaseMetaData#insertsAreDetected
1283 */
1284 public boolean rowInserted() throws SQLException {
1285 throw new UnsupportedOperationException(
1286 "ResultSet.rowInserted() unsupported");
1287 }
1288
1289 /***
1290 * Retrieves whether a row has been deleted. A deleted row may leave
1291 * a visible "hole" in a result set. This method can be used to
1292 * detect holes in a result set. The value returned depends on whether
1293 * or not this <code>ResultSet</code> object can detect deletions.
1294 *
1295 * @return <code>true</code> if a row was deleted and deletions are
1296 * detected; <code>false</code> otherwise
1297 * @exception SQLException if a database access error occurs
1298 *
1299 * @see DatabaseMetaData#deletesAreDetected
1300 */
1301 public boolean rowDeleted() throws SQLException {
1302 throw new UnsupportedOperationException(
1303 "ResultSet.rowDeleted() unsupported");
1304 }
1305
1306 /***
1307 * Gives a nullable column a null value.
1308 *
1309 * The updater methods are used to update column values in the
1310 * current row or the insert row. The updater methods do not
1311 * update the underlying database; instead the <code>updateRow</code>
1312 * or <code>insertRow</code> methods are called to update the database.
1313 *
1314 * @param columnIndex the first column is 1, the second is 2, ...
1315 * @exception SQLException if a database access error occurs
1316 */
1317 public void updateNull(int columnIndex) throws SQLException {
1318 throw new UnsupportedOperationException(
1319 "ResultSet.updateNull() unsupported");
1320 }
1321
1322 /***
1323 * Updates the designated column with a <code>boolean</code> value.
1324 * The updater methods are used to update column values in the
1325 * current row or the insert row. The updater methods do not
1326 * update the underlying database; instead the <code>updateRow</code> or
1327 * <code>insertRow</code> methods are called to update the database.
1328 *
1329 * @param columnIndex the first column is 1, the second is 2, ...
1330 * @param x the new column value
1331 * @exception SQLException if a database access error occurs
1332 */
1333 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1334 throw new UnsupportedOperationException(
1335 "ResultSet.updateBoolean() unsupported");
1336 }
1337
1338 /***
1339 * Updates the designated column with a <code>byte</code> value.
1340 * The updater methods are used to update column values in the
1341 * current row or the insert row. The updater methods do not
1342 * update the underlying database; instead the <code>updateRow</code> or
1343 * <code>insertRow</code> methods are called to update the database.
1344 *
1345 *
1346 * @param columnIndex the first column is 1, the second is 2, ...
1347 * @param x the new column value
1348 * @exception SQLException if a database access error occurs
1349 */
1350 public void updateByte(int columnIndex, byte x) throws SQLException {
1351 throw new UnsupportedOperationException(
1352 "ResultSet.updateByte() unsupported");
1353 }
1354
1355 /***
1356 * Updates the designated column with a <code>short</code> value.
1357 * The updater methods are used to update column values in the
1358 * current row or the insert row. The updater methods do not
1359 * update the underlying database; instead the <code>updateRow</code> or
1360 * <code>insertRow</code> methods are called to update the database.
1361 *
1362 * @param columnIndex the first column is 1, the second is 2, ...
1363 * @param x the new column value
1364 * @exception SQLException if a database access error occurs
1365 */
1366 public void updateShort(int columnIndex, short x) throws SQLException {
1367 throw new UnsupportedOperationException(
1368 "ResultSet.updateShort() unsupported");
1369 }
1370
1371 /***
1372 * Updates the designated column with an <code>int</code> value.
1373 * The updater methods are used to update column values in the
1374 * current row or the insert row. The updater methods do not
1375 * update the underlying database; instead the <code>updateRow</code> or
1376 * <code>insertRow</code> methods are called to update the database.
1377 *
1378 * @param columnIndex the first column is 1, the second is 2, ...
1379 * @param x the new column value
1380 * @exception SQLException if a database access error occurs
1381 */
1382 public void updateInt(int columnIndex, int x) throws SQLException {
1383 throw new UnsupportedOperationException(
1384 "ResultSet.updateInt() unsupported");
1385 }
1386
1387 /***
1388 * Updates the designated column with a <code>long</code> value.
1389 * The updater methods are used to update column values in the
1390 * current row or the insert row. The updater methods do not
1391 * update the underlying database; instead the <code>updateRow</code> or
1392 * <code>insertRow</code> methods are called to update the database.
1393 *
1394 * @param columnIndex the first column is 1, the second is 2, ...
1395 * @param x the new column value
1396 * @exception SQLException if a database access error occurs
1397 */
1398 public void updateLong(int columnIndex, long x) throws SQLException {
1399 throw new UnsupportedOperationException(
1400 "ResultSet.updateLong(int, long) unsupported");
1401 }
1402
1403 /***
1404 * Updates the designated column with a <code>float</code> value.
1405 * The updater methods are used to update column values in the
1406 * current row or the insert row. The updater methods do not
1407 * update the underlying database; instead the <code>updateRow</code> or
1408 * <code>insertRow</code> methods are called to update the database.
1409 *
1410 * @param columnIndex the first column is 1, the second is 2, ...
1411 * @param x the new column value
1412 * @exception SQLException if a database access error occurs
1413 */
1414 public void updateFloat(int columnIndex, float x) throws SQLException {
1415 throw new UnsupportedOperationException(
1416 "ResultSet.updateFloat(int, float) unsupported");
1417 }
1418
1419 /***
1420 * Updates the designated column with a <code>double</code> value.
1421 * The updater methods are used to update column values in the
1422 * current row or the insert row. The updater methods do not
1423 * update the underlying database; instead the <code>updateRow</code> or
1424 * <code>insertRow</code> methods are called to update the database.
1425 *
1426 * @param columnIndex the first column is 1, the second is 2, ...
1427 * @param x the new column value
1428 * @exception SQLException if a database access error occurs
1429 */
1430 public void updateDouble(int columnIndex, double x) throws SQLException {
1431 throw new UnsupportedOperationException(
1432 "ResultSet.updateDouble(int, double) unsupported");
1433 }
1434
1435 /***
1436 * Updates the designated column with a <code>java.math.BigDecimal</code>
1437 * value.
1438 * The updater methods are used to update column values in the
1439 * current row or the insert row. The updater methods do not
1440 * update the underlying database; instead the <code>updateRow</code> or
1441 * <code>insertRow</code> methods are called to update the database.
1442 *
1443 * @param columnIndex the first column is 1, the second is 2, ...
1444 * @param x the new column value
1445 * @exception SQLException if a database access error occurs
1446 */
1447 public void updateBigDecimal(int columnIndex, BigDecimal x)
1448 throws SQLException {
1449 throw new UnsupportedOperationException(
1450 "ResultSet.updateBigDecimal(int, BigDecimal) unsupported");
1451 }
1452
1453 /***
1454 * Updates the designated column with a <code>String</code> value.
1455 * The updater methods are used to update column values in the
1456 * current row or the insert row. The updater methods do not
1457 * update the underlying database; instead the <code>updateRow</code> or
1458 * <code>insertRow</code> methods are called to update the database.
1459 *
1460 * @param columnIndex the first column is 1, the second is 2, ...
1461 * @param x the new column value
1462 * @exception SQLException if a database access error occurs
1463 */
1464 public void updateString(int columnIndex, String x) throws SQLException {
1465 throw new UnsupportedOperationException(
1466 "ResultSet.updateString(int, String) unsupported");
1467 }
1468
1469 /***
1470 * Updates the designated column with a <code>byte</code> array value.
1471 * The updater methods are used to update column values in the
1472 * current row or the insert row. The updater methods do not
1473 * update the underlying database; instead the <code>updateRow</code> or
1474 * <code>insertRow</code> methods are called to update the database.
1475 *
1476 * @param columnIndex the first column is 1, the second is 2, ...
1477 * @param x the new column value
1478 * @exception SQLException if a database access error occurs
1479 */
1480 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
1481 throw new UnsupportedOperationException(
1482 "ResultSet.updateBytes(int, byte[]) unsupported");
1483 }
1484
1485 /***
1486 * Updates the designated column with a <code>java.sql.Date</code> value.
1487 * The updater methods are used to update column values in the
1488 * current row or the insert row. The updater methods do not
1489 * update the underlying database; instead the <code>updateRow</code> or
1490 * <code>insertRow</code> methods are called to update the database.
1491 *
1492 * @param columnIndex the first column is 1, the second is 2, ...
1493 * @param x the new column value
1494 * @exception SQLException if a database access error occurs
1495 */
1496 public void updateDate(int columnIndex, Date x) throws SQLException {
1497 throw new UnsupportedOperationException(
1498 "ResultSet.updateDate(int, Date) unsupported");
1499 }
1500
1501 /***
1502 * Updates the designated column with a <code>java.sql.Time</code> value.
1503 * The updater methods are used to update column values in the
1504 * current row or the insert row. The updater methods do not
1505 * update the underlying database; instead the <code>updateRow</code> or
1506 * <code>insertRow</code> methods are called to update the database.
1507 *
1508 * @param columnIndex the first column is 1, the second is 2, ...
1509 * @param x the new column value
1510 * @exception SQLException if a database access error occurs
1511 */
1512 public void updateTime(int columnIndex, Time x) throws SQLException {
1513 throw new UnsupportedOperationException(
1514 "ResultSet.updateTime(int, Time) unsupported");
1515 }
1516
1517 /***
1518 * Updates the designated column with a <code>java.sql.Timestamp</code>
1519 * value.
1520 * The updater methods are used to update column values in the
1521 * current row or the insert row. The updater methods do not
1522 * update the underlying database; instead the <code>updateRow</code> or
1523 * <code>insertRow</code> methods are called to update the database.
1524 *
1525 * @param columnIndex the first column is 1, the second is 2, ...
1526 * @param x the new column value
1527 * @exception SQLException if a database access error occurs
1528 */
1529 public void updateTimestamp(int columnIndex, Timestamp x)
1530 throws SQLException {
1531 throw new UnsupportedOperationException(
1532 "ResultSet.updateTimestamp(int, Timestamp) unsupported");
1533 }
1534
1535 /***
1536 * Updates the designated column with an ascii stream value.
1537 * The updater methods are used to update column values in the
1538 * current row or the insert row. The updater methods do not
1539 * update the underlying database; instead the <code>updateRow</code> or
1540 * <code>insertRow</code> methods are called to update the database.
1541 *
1542 * @param columnIndex the first column is 1, the second is 2, ...
1543 * @param x the new column value
1544 * @param length the length of the stream
1545 * @exception SQLException if a database access error occurs
1546 */
1547 public void updateAsciiStream(int columnIndex, InputStream x, int length)
1548 throws SQLException {
1549 throw new UnsupportedOperationException("ResultSet.updateAsciiStream " +
1550 "(int, InputStream, int) unsupported");
1551 }
1552
1553 /***
1554 * Updates the designated column with a binary stream value.
1555 * The updater methods are used to update column values in the
1556 * current row or the insert row. The updater methods do not
1557 * update the underlying database; instead the <code>updateRow</code> or
1558 * <code>insertRow</code> methods are called to update the database.
1559 *
1560 * @param columnIndex the first column is 1, the second is 2, ...
1561 * @param x the new column value
1562 * @param length the length of the stream
1563 * @exception SQLException if a database access error occurs
1564 */
1565 public void updateBinaryStream(int columnIndex, InputStream x, int length)
1566 throws SQLException {
1567 throw new UnsupportedOperationException("ResultSet.updateBinaryStream" +
1568 "(int, InputStream, int) unsupported");
1569 }
1570
1571 /***
1572 * Updates the designated column with a character stream value.
1573 * The updater methods are used to update column values in the
1574 * current row or the insert row. The updater methods do not
1575 * update the underlying database; instead the <code>updateRow</code> or
1576 * <code>insertRow</code> methods are called to update the database.
1577 *
1578 * @param columnIndex the first column is 1, the second is 2, ...
1579 * @param x the new column value
1580 * @param length the length of the stream
1581 * @exception SQLException if a database access error occurs
1582 */
1583 public void updateCharacterStream(int columnIndex, Reader x, int length)
1584 throws SQLException {
1585 throw new UnsupportedOperationException("ResultSet.updateCharacterStr" +
1586 "eam(int, Reader, int) unsupported");
1587 }
1588
1589 /***
1590 * Updates the designated column with an <code>Object</code> value.
1591 * The updater methods are used to update column values in the
1592 * current row or the insert row. The updater methods do not
1593 * update the underlying database; instead the <code>updateRow</code> or
1594 * <code>insertRow</code> methods are called to update the database.
1595 *
1596 * @param columnIndex the first column is 1, the second is 2, ...
1597 * @param x the new column value
1598 * @param scale for <code>java.sql.Types.DECIMA</code>
1599 * or <code>java.sql.Types.NUMERIC</code> types,
1600 * this is the number of digits after the decimal point. For all other
1601 * types this value will be ignored.
1602 * @exception SQLException if a database access error occurs
1603 */
1604 public void updateObject(int columnIndex, Object x, int scale)
1605 throws SQLException {
1606 throw new UnsupportedOperationException(
1607 "ResultSet.udpateObject(int, Object) unsupported");
1608 }
1609
1610 /***
1611 * Updates the designated column with an <code>Object</code> value.
1612 * The updater methods are used to update column values in the
1613 * current row or the insert row. The updater methods do not
1614 * update the underlying database; instead the <code>updateRow</code> or
1615 * <code>insertRow</code> methods are called to update the database.
1616 *
1617 * @param columnIndex the first column is 1, the second is 2, ...
1618 * @param x the new column value
1619 * @exception SQLException if a database access error occurs
1620 */
1621 public void updateObject(int columnIndex, Object x) throws SQLException {
1622 throw new UnsupportedOperationException(
1623 "ResultSet.updateObject(int, Object, int) unsupported");
1624 }
1625
1626 /***
1627 * Updates the designated column with a <code>null</code> value.
1628 * The updater methods are used to update column values in the
1629 * current row or the insert row. The updater methods do not
1630 * update the underlying database; instead the <code>updateRow</code> or
1631 * <code>insertRow</code> methods are called to update the database.
1632 *
1633 * @param columnName the name of the column
1634 * @exception SQLException if a database access error occurs
1635 */
1636 public void updateNull(String columnName) throws SQLException {
1637 throw new UnsupportedOperationException(
1638 "ResultSet.updateNull(String) unsupported");
1639 }
1640
1641 /***
1642 * Updates the designated column with a <code>boolean</code> value.
1643 * The updater methods are used to update column values in the
1644 * current row or the insert row. The updater methods do not
1645 * update the underlying database; instead the <code>updateRow</code> or
1646 * <code>insertRow</code> methods are called to update the database.
1647 *
1648 * @param columnName the name of the column
1649 * @param x the new column value
1650 * @exception SQLException if a database access error occurs
1651 */
1652 public void updateBoolean(String columnName, boolean x)
1653 throws SQLException {
1654 throw new UnsupportedOperationException(
1655 "ResultSet.updateBoolean(String, boolean) unsupported");
1656 }
1657
1658 /***
1659 * Updates the designated column with a <code>byte</code> value.
1660 * The updater methods are used to update column values in the
1661 * current row or the insert row. The updater methods do not
1662 * update the underlying database; instead the <code>updateRow</code> or
1663 * <code>insertRow</code> methods are called to update the database.
1664 *
1665 * @param columnName the name of the column
1666 * @param x the new column value
1667 * @exception SQLException if a database access error occurs
1668 */
1669 public void updateByte(String columnName, byte x) throws SQLException {
1670 throw new UnsupportedOperationException(
1671 "ResultSet.updateByte(String, byte) unsupported");
1672 }
1673
1674 /***
1675 * Updates the designated column with a <code>short</code> value.
1676 * The updater methods are used to update column values in the
1677 * current row or the insert row. The updater methods do not
1678 * update the underlying database; instead the <code>updateRow</code> or
1679 * <code>insertRow</code> methods are called to update the database.
1680 *
1681 * @param columnName the name of the column
1682 * @param x the new column value
1683 * @exception SQLException if a database access error occurs
1684 */
1685 public void updateShort(String columnName, short x) throws SQLException {
1686 throw new UnsupportedOperationException(
1687 "ResultSet.updateShort(String, short) unsupported");
1688 }
1689
1690 /***
1691 * Updates the designated column with an <code>int</code> value.
1692 * The updater methods are used to update column values in the
1693 * current row or the insert row. The updater methods do not
1694 * update the underlying database; instead the <code>updateRow</code> or
1695 * <code>insertRow</code> methods are called to update the database.
1696 *
1697 * @param columnName the name of the column
1698 * @param x the new column value
1699 * @exception SQLException if a database access error occurs
1700 */
1701 public void updateInt(String columnName, int x) throws SQLException {
1702 throw new UnsupportedOperationException(
1703 "ResultSet.updateInt(String, int) unsupported");
1704 }
1705
1706 /***
1707 * Updates the designated column with a <code>long</code> value.
1708 * The updater methods are used to update column values in the
1709 * current row or the insert row. The updater methods do not
1710 * update the underlying database; instead the <code>updateRow</code> or
1711 * <code>insertRow</code> methods are called to update the database.
1712 *
1713 * @param columnName the name of the column
1714 * @param x the new column value
1715 * @exception SQLException if a database access error occurs
1716 */
1717 public void updateLong(String columnName, long x) throws SQLException {
1718 throw new UnsupportedOperationException(
1719 "ResultSet.updateLong(String, long) unsupported");
1720 }
1721
1722 /***
1723 * Updates the designated column with a <code>float </code> value.
1724 * The updater methods are used to update column values in the
1725 * current row or the insert row. The updater methods do not
1726 * update the underlying database; instead the <code>updateRow</code> or
1727 * <code>insertRow</code> methods are called to update the database.
1728 *
1729 * @param columnName the name of the column
1730 * @param x the new column value
1731 * @exception SQLException if a database access error occurs
1732 */
1733 public void updateFloat(String columnName, float x) throws SQLException {
1734 throw new UnsupportedOperationException(
1735 "ResultSet.updateFloat(String, float) unsupported");
1736 }
1737
1738 /***
1739 * Updates the designated column with a <code>double</code> value.
1740 * The updater methods are used to update column values in the
1741 * current row or the insert row. The updater methods do not
1742 * update the underlying database; instead the <code>updateRow</code> or
1743 * <code>insertRow</code> methods are called to update the database.
1744 *
1745 * @param columnName the name of the column
1746 * @param x the new column value
1747 * @exception SQLException if a database access error occurs
1748 */
1749 public void updateDouble(String columnName, double x) throws SQLException {
1750 throw new UnsupportedOperationException(
1751 "ResultSet.updateDouble(String, double) unsupported");
1752 }
1753
1754 /***
1755 * Updates the designated column with a <code>java.sql.BigDecimal</code>
1756 * value.
1757 * The updater methods are used to update column values in the
1758 * current row or the insert row. The updater methods do not
1759 * update the underlying database; instead the <code>updateRow</code> or
1760 * <code>insertRow</code> methods are called to update the database.
1761 *
1762 * @param columnName the name of the column
1763 * @param x the new column value
1764 * @exception SQLException if a database access error occurs
1765 */
1766 public void updateBigDecimal(String columnName, BigDecimal x)
1767 throws SQLException {
1768 throw new UnsupportedOperationException(
1769 "ResultSet.updateBigDecimal(String, BigDecimal) unsupported");
1770 }
1771
1772 /***
1773 * Updates the designated column with a <code>String</code> value.
1774 * The updater methods are used to update column values in the
1775 * current row or the insert row. The updater methods do not
1776 * update the underlying database; instead the <code>updateRow</code> or
1777 * <code>insertRow</code> methods are called to update the database.
1778 *
1779 * @param columnName the name of the column
1780 * @param x the new column value
1781 * @exception SQLException if a database access error occurs
1782 */
1783 public void updateString(String columnName, String x) throws SQLException {
1784 throw new UnsupportedOperationException(
1785 "ResultSet.updateString(String, String) unsupported");
1786 }
1787
1788 /***
1789 * Updates the designated column with a byte array value.
1790 *
1791 * The updater methods are used to update column values in the
1792 * current row or the insert row. The updater methods do not
1793 * update the underlying database; instead the <code>updateRow</code>
1794 * or <code>insertRow</code> methods are called to update the database.
1795 *
1796 * @param columnName the name of the column
1797 * @param x the new column value
1798 * @exception SQLException if a database access error occurs
1799 */
1800 public void updateBytes(String columnName, byte[] x) throws SQLException {
1801 throw new UnsupportedOperationException(
1802 "ResultSet.updateBytes(String, byte[]) unsupported");
1803 }
1804
1805 /***
1806 * Updates the designated column with a <code>java.sql.Date</code> value.
1807 * The updater methods are used to update column values in the
1808 * current row or the insert row. The updater methods do not
1809 * update the underlying database; instead the <code>updateRow</code> or
1810 * <code>insertRow</code> methods are called to update the database.
1811 *
1812 * @param columnName the name of the column
1813 * @param x the new column value
1814 * @exception SQLException if a database access error occurs
1815 */
1816 public void updateDate(String columnName, Date x) throws SQLException {
1817 throw new UnsupportedOperationException(
1818 "ResultSet.updateDate(String, Date) unsupported");
1819 }
1820
1821 /***
1822 * Updates the designated column with a <code>java.sql.Time</code> value.
1823 * The updater methods are used to update column values in the
1824 * current row or the insert row. The updater methods do not
1825 * update the underlying database; instead the <code>updateRow</code> or
1826 * <code>insertRow</code> methods are called to update the database.
1827 *
1828 * @param columnName the name of the column
1829 * @param x the new column value
1830 * @exception SQLException if a database access error occurs
1831 */
1832 public void updateTime(String columnName, Time x) throws SQLException {
1833 throw new UnsupportedOperationException(
1834 "ResultSet.updateTime(String, Time) unsupported");
1835 }
1836
1837 /***
1838 * Updates the designated column with a <code>java.sql.Timestamp</code>
1839 * value.
1840 * The updater methods are used to update column values in the
1841 * current row or the insert row. The updater methods do not
1842 * update the underlying database; instead the <code>updateRow</code> or
1843 * <code>insertRow</code> methods are called to update the database.
1844 *
1845 * @param columnName the name of the column
1846 * @param x the new column value
1847 * @exception SQLException if a database access error occurs
1848 */
1849 public void updateTimestamp(String columnName, Timestamp x)
1850 throws SQLException {
1851 throw new UnsupportedOperationException(
1852 "ResultSet.updateTimestamp(String, Timestamp) unsupported");
1853 }
1854
1855 /***
1856 * Updates the designated column with an ascii stream value.
1857 * The updater methods are used to update column values in the
1858 * current row or the insert row. The updater methods do not
1859 * update the underlying database; instead the <code>updateRow</code> or
1860 * <code>insertRow</code> methods are called to update the database.
1861 *
1862 * @param columnName the name of the column
1863 * @param x the new column value
1864 * @param length the length of the stream
1865 * @exception SQLException if a database access error occurs
1866 */
1867 public void updateAsciiStream(String columnName, InputStream x, int length)
1868 throws SQLException {
1869 throw new UnsupportedOperationException("ResultSet.updateAsciiStream" +
1870 "(String, InputStream, int) unsupported");
1871 }
1872
1873 /***
1874 * Updates the designated column with a binary stream value.
1875 * The updater methods are used to update column values in the
1876 * current row or the insert row. The updater methods do not
1877 * update the underlying database; instead the <code>updateRow</code> or
1878 * <code>insertRow</code> methods are called to update the database.
1879 *
1880 * @param columnName the name of the column
1881 * @param x the new column value
1882 * @param length the length of the stream
1883 * @exception SQLException if a database access error occurs
1884 */
1885 public void updateBinaryStream(String columnName, InputStream x, int length)
1886 throws SQLException {
1887 throw new UnsupportedOperationException("ResultSet.updateBinaryStream" +
1888 "(String, InputStream, int) unsupported");
1889 }
1890
1891 /***
1892 * Updates the designated column with a character stream value.
1893 * The updater methods are used to update column values in the
1894 * current row or the insert row. The updater methods do not
1895 * update the underlying database; instead the <code>updateRow</code> or
1896 * <code>insertRow</code> methods are called to update the database.
1897 *
1898 * @param columnName the name of the column
1899 * @param reader the <code>java.io.Reader</code> object containing
1900 * the new column value
1901 * @param length the length of the stream
1902 * @exception SQLException if a database access error occurs
1903 */
1904 public void updateCharacterStream(String columnName, Reader reader,
1905 int length) throws SQLException {
1906 throw new UnsupportedOperationException("ResultSet.updateCharacterStr" +
1907 "eam(String, Reader, int) unsupported");
1908 }
1909
1910 /***
1911 * Updates the designated column with an <code>Object</code> value.
1912 * The updater methods are used to update column values in the
1913 * current row or the insert row. The updater methods do not
1914 * update the underlying database; instead the <code>updateRow</code> or
1915 * <code>insertRow</code> methods are called to update the database.
1916 *
1917 * @param columnName the name of the column
1918 * @param x the new column value
1919 * @param scale for <code>java.sql.Types.DECIMAL</code>
1920 * or <code>java.sql.Types.NUMERIC</code> types,
1921 * this is the number of digits after the decimal point. For all other
1922 * types this value will be ignored.
1923 * @exception SQLException if a database access error occurs
1924 */
1925 public void updateObject(String columnName, Object x, int scale)
1926 throws SQLException {
1927 throw new UnsupportedOperationException(
1928 "ResultSet.updateObject(String, Object, int) unsupported");
1929 }
1930
1931 /***
1932 * Updates the designated column with an <code>Object</code> value.
1933 * The updater methods are used to update column values in the
1934 * current row or the insert row. The updater methods do not
1935 * update the underlying database; instead the <code>updateRow</code> or
1936 * <code>insertRow</code> methods are called to update the database.
1937 *
1938 * @param columnName the name of the column
1939 * @param x the new column value
1940 * @exception SQLException if a database access error occurs
1941 */
1942 public void updateObject(String columnName, Object x) throws SQLException {
1943 throw new UnsupportedOperationException(
1944 "ResultSet.updateObject(String, Object) unsupported");
1945 }
1946
1947 /***
1948 * Inserts the contents of the insert row into this
1949 * <code>ResultSet</code> object and into the database.
1950 * The cursor must be on the insert row when this method is called.
1951 *
1952 * @exception SQLException if a database access error occurs,
1953 * if this method is called when the cursor is not on the insert row,
1954 * or if not all of non-nullable columns in
1955 * the insert row have been given a value
1956 */
1957 public void insertRow() throws SQLException {
1958 throw new UnsupportedOperationException(
1959 "ResultSet.insertRow() unsupported");
1960 }
1961
1962 /***
1963 * Updates the underlying database with the new contents of the
1964 * current row of this <code>ResultSet</code> object.
1965 * This method cannot be called when the cursor is on the insert row.
1966 *
1967 * @exception SQLException if a database access error occurs or
1968 * if this method is called when the cursor is on the insert row
1969 */
1970 public void updateRow() throws SQLException {
1971 throw new UnsupportedOperationException(
1972 "ResultSet.updateRow() unsupported");
1973 }
1974
1975 /***
1976 * Deletes the current row from this <code>ResultSet</code> object
1977 * and from the underlying database. This method cannot be called when
1978 * the cursor is on the insert row.
1979 *
1980 * @exception SQLException if a database access error occurs
1981 * or if this method is called when the cursor is on the insert row
1982 */
1983 public void deleteRow() throws SQLException {
1984 throw new UnsupportedOperationException(
1985 "ResultSet.deleteRow() unsupported");
1986 }
1987
1988 /***
1989 * Refreshes the current row with its most recent value in
1990 * the database. This method cannot be called when
1991 * the cursor is on the insert row.
1992 *
1993 * <P>The <code>refreshRow</code> method provides a way for an
1994 * application to
1995 * explicitly tell the JDBC driver to refetch a row(s) from the
1996 * database. An application may want to call <code>refreshRow</code> when
1997 * caching or prefetching is being done by the JDBC driver to
1998 * fetch the latest value of a row from the database. The JDBC driver
1999 * may actually refresh multiple rows at once if the fetch size is
2000 * greater than one.
2001 *
2002 * <P> All values are refetched subject to the transaction isolation
2003 * level and cursor sensitivity. If <code>refreshRow</code> is called after
2004 * calling an updater method, but before calling
2005 * the method <code>updateRow</code>, then the
2006 * updates made to the row are lost. Calling the method
2007 * <code>refreshRow</code> frequently will likely slow performance.
2008 *
2009 * @exception SQLException if a database access error
2010 * occurs or if this method is called when the cursor is on the insert row
2011 */
2012 public void refreshRow() throws SQLException {
2013 throw new UnsupportedOperationException(
2014 "ResultSet.refreshRow() unsupported");
2015 }
2016
2017 /***
2018 * Cancels the updates made to the current row in this
2019 * <code>ResultSet</code> object.
2020 * This method may be called after calling an
2021 * updater method(s) and before calling
2022 * the method <code>updateRow</code> to roll back
2023 * the updates made to a row. If no updates have been made or
2024 * <code>updateRow</code> has already been called, this method has no
2025 * effect.
2026 *
2027 * @exception SQLException if a database access error
2028 * occurs or if this method is called when the cursor is
2029 * on the insert row
2030 */
2031 public void cancelRowUpdates() throws SQLException {
2032 throw new UnsupportedOperationException(
2033 "ResultSet.cancelRowUpdates() unsupported");
2034 }
2035
2036 /***
2037 * Moves the cursor to the insert row. The current cursor position is
2038 * remembered while the cursor is positioned on the insert row.
2039 *
2040 * The insert row is a special row associated with an updatable
2041 * result set. It is essentially a buffer where a new row may
2042 * be constructed by calling the updater methods prior to
2043 * inserting the row into the result set.
2044 *
2045 * Only the updater, getter,
2046 * and <code>insertRow</code> methods may be
2047 * called when the cursor is on the insert row. All of the columns in
2048 * a result set must be given a value each time this method is
2049 * called before calling <code>insertRow</code>.
2050 * An updater method must be called before a
2051 * getter method can be called on a column value.
2052 *
2053 * @exception SQLException if a database access error occurs
2054 * or the result set is not updatable
2055 */
2056 public void moveToInsertRow() throws SQLException {
2057 throw new UnsupportedOperationException(
2058 "ResultSet.moveToInsertRow() unsupported");
2059 }
2060
2061 /***
2062 * Moves the cursor to the remembered cursor position, usually the
2063 * current row. This method has no effect if the cursor is not on
2064 * the insert row.
2065 *
2066 * @exception SQLException if a database access error occurs
2067 * or the result set is not updatable
2068 */
2069 public void moveToCurrentRow() throws SQLException {
2070 throw new UnsupportedOperationException(
2071 "ResultSet.moveToeCurrentRow() unsupported");
2072 }
2073
2074 /***
2075 * Retrieves the <code>Statement</code> object that produced this
2076 * <code>ResultSet</code> object.
2077 * If the result set was generated some other way, such as by a
2078 * <code>DatabaseMetaData</code> method, this method returns
2079 * <code>null</code>.
2080 *
2081 * @return the <code>Statment</code> object that produced
2082 * this <code>ResultSet</code> object or <code>null</code>
2083 * if the result set was produced some other way
2084 * @exception SQLException if a database access error occurs
2085 */
2086 public Statement getStatement() throws SQLException {
2087 return statement;
2088 }
2089
2090 /***
2091 * Retrieves the value of the designated column in the current row
2092 * of this <code>ResultSet</code> object as an <code>Object</code>
2093 * in the Java programming language.
2094 * If the value is an SQL <code>NULL</code>,
2095 * the driver returns a Java <code>null</code>.
2096 * This method uses the given <code>Map</code> object
2097 * for the custom mapping of the
2098 * SQL structured or distinct type that is being retrieved.
2099 *
2100 * @param i the first column is 1, the second is 2, ...
2101 * @param map a <code>java.util.Map</code> object that contains the mapping
2102 * from SQL type names to classes in the Java programming language
2103 * @return an <code>Object</code> in the Java programming language
2104 * representing the SQL value
2105 * @exception SQLException if a database access error occurs
2106 */
2107 public Object getObject(int i, Map map) throws SQLException {
2108 throw new UnsupportedOperationException(
2109 "ResultSet.getObject(int, Map) unsupported");
2110 }
2111
2112 /***
2113 * Retrieves the value of the designated column in the current row
2114 * of this <code>ResultSet</code> object as a <code>Ref</code> object
2115 * in the Java programming language.
2116 *
2117 * @param i the first column is 1, the second is 2, ...
2118 * @return a <code>Ref</code> object representing an SQL <code>REF</code>
2119 * value
2120 * @exception SQLException if a database access error occurs
2121 */
2122 public Ref getRef(int i) throws SQLException {
2123 throw new UnsupportedOperationException(
2124 "ResultSet.getRef(int) unsupported");
2125 }
2126
2127 /***
2128 * Retrieves the value of the designated column in the current row
2129 * of this <code>ResultSet</code> object as a <code>Blob</code> object
2130 * in the Java programming language.
2131 *
2132 * @param i the first column is 1, the second is 2, ...
2133 * @return a <code>Blob</code> object representing the SQL
2134 * <code>BLOB</code> value in the specified column
2135 * @exception SQLException if a database access error occurs
2136 */
2137 public Blob getBlob(int i) throws SQLException {
2138 throw new UnsupportedOperationException(
2139 "ResultSet.getBlob(int) unsupported");
2140 }
2141
2142 /***
2143 * Retrieves the value of the designated column in the current row
2144 * of this <code>ResultSet</code> object as a <code>Clob</code> object
2145 * in the Java programming language.
2146 *
2147 * @param i the first column is 1, the second is 2, ...
2148 * @return a <code>Clob</code> object representing the SQL
2149 * <code>CLOB</code> value in the specified column
2150 * @exception SQLException if a database access error occurs
2151 */
2152 public Clob getClob(int i) throws SQLException {
2153 throw new UnsupportedOperationException(
2154 "ResultSet.getClob(int) unsupported");
2155 }
2156
2157 /***
2158 * Retrieves the value of the designated column in the current row
2159 * of this <code>ResultSet</code> object as an <code>Array</code> object
2160 * in the Java programming language.
2161 *
2162 * @param i the first column is 1, the second is 2, ...
2163 * @return an <code>Array</code> object representing the SQL
2164 * <code>ARRAY</code> value in the specified column
2165 * @exception SQLException if a database access error occurs
2166 */
2167 public Array getArray(int i) throws SQLException {
2168 throw new UnsupportedOperationException(
2169 "ResultSet.getArray(int) unsupported");
2170 }
2171
2172 /***
2173 * Retrieves the value of the designated column in the current row
2174 * of this <code>ResultSet</code> object as an <code>Object</code>
2175 * in the Java programming language.
2176 * If the value is an SQL <code>NULL</code>,
2177 * the driver returns a Java <code>null</code>.
2178 * This method uses the specified <code>Map</code> object for
2179 * custom mapping if appropriate.
2180 *
2181 * @param colName the name of the column from which to retrieve the value
2182 * @param map a <code>java.util.Map</code> object that contains the mapping
2183 * from SQL type names to classes in the Java programming language
2184 * @return an <code>Object</code> representing the SQL value in the
2185 * specified column
2186 * @exception SQLException if a database access error occurs
2187 */
2188 public Object getObject(String colName, Map map) throws SQLException {
2189 throw new UnsupportedOperationException(
2190 "ResultSet.getObject(String, Map) unsupported");
2191 }
2192
2193 /***
2194 * Retrieves the value of the designated column in the current row
2195 * of this <code>ResultSet</code> object as a <code>Ref</code> object
2196 * in the Java programming language.
2197 *
2198 * @param colName the column name
2199 * @return a <code>Ref</code> object representing the SQL <code>REF</code>
2200 * value in the specified column
2201 * @exception SQLException if a database access error occurs
2202 */
2203 public Ref getRef(String colName) throws SQLException {
2204 throw new UnsupportedOperationException(
2205 "ResultSet.getRef(String) unsupported");
2206 }
2207
2208 /***
2209 * Retrieves the value of the designated column in the current row
2210 * of this <code>ResultSet</code> object as a <code>Blob</code> object
2211 * in the Java programming language.
2212 *
2213 * @param colName the name of the column from which to retrieve the value
2214 * @return a <code>Blob</code> object representing the SQL <code>BLOB</code>
2215 * value in the specified column
2216 * @exception SQLException if a database access error occurs
2217 */
2218 public Blob getBlob(String colName) throws SQLException {
2219 throw new UnsupportedOperationException(
2220 "ResultSet.getBlob(String) unsupported");
2221 }
2222
2223 /***
2224 * Retrieves the value of the designated column in the current row
2225 * of this <code>ResultSet</code> object as a <code>Clob</code> object
2226 * in the Java programming language.
2227 *
2228 * @param colName the name of the column from which to retrieve the value
2229 * @return a <code>Clob</code> object representing the SQL <code>CLOB</code>
2230 * value in the specified column
2231 * @exception SQLException if a database access error occurs
2232 */
2233 public Clob getClob(String colName) throws SQLException {
2234 throw new UnsupportedOperationException(
2235 "ResultSet.getClob(String) unsupported");
2236 }
2237
2238 /***
2239 * Retrieves the value of the designated column in the current row
2240 * of this <code>ResultSet</code> object as an <code>Array</code> object
2241 * in the Java programming language.
2242 *
2243 * @param colName the name of the column from which to retrieve the value
2244 * @return an <code>Array</code> object representing the SQL
2245 * <code>ARRAY</code> value in the specified column
2246 * @exception SQLException if a database access error occurs
2247 */
2248 public Array getArray(String colName) throws SQLException {
2249 throw new UnsupportedOperationException(
2250 "ResultSet.getArray(String) unsupported");
2251 }
2252
2253 /***
2254 * Retrieves the value of the designated column in the current row
2255 * of this <code>ResultSet</code> object as a <code>java.sql.Date</code>
2256 * object in the Java programming language.
2257 * This method uses the given calendar to construct an appropriate
2258 * millisecond value for the date if the underlying database does not store
2259 * timezone information.
2260 *
2261 * @param columnIndex the first column is 1, the second is 2, ...
2262 * @param cal the <code>java.util.Calendar</code> object
2263 * to use in constructing the date
2264 * @return the column value as a <code>java.sql.Date</code> object;
2265 * if the value is SQL <code>NULL</code>,
2266 * the value returned is <code>null</code> in the Java programming language
2267 * @exception SQLException if a database access error occurs
2268 */
2269 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
2270 throw new UnsupportedOperationException(
2271 "ResultSet.getDate(int, Calendar) unsupported");
2272 }
2273
2274 /***
2275 * Retrieves the value of the designated column in the current row
2276 * of this <code>ResultSet</code> object as a <code>java.sql.Date</code>
2277 * object in the Java programming language.
2278 * This method uses the given calendar to construct an appropriate
2279 * millisecond value for the date if the underlying database does not store
2280 * timezone information.
2281 *
2282 * @param columnName the SQL name of the column from which to retrieve the
2283 * value
2284 * @param cal the <code>java.util.Calendar</code> object
2285 * to use in constructing the date
2286 * @return the column value as a <code>java.sql.Date</code> object;
2287 * if the value is SQL <code>NULL</code>,
2288 * the value returned is <code>null</code> in the Java programming language
2289 * @exception SQLException if a database access error occurs
2290 */
2291 public Date getDate(String columnName, Calendar cal) throws SQLException {
2292 throw new UnsupportedOperationException(
2293 "ResultSet.getDate(String, Calendar) unsupported");
2294 }
2295
2296 /***
2297 * Retrieves the value of the designated column in the current row
2298 * of this <code>ResultSet</code> object as a <code>java.sql.Time</code>
2299 * object in the Java programming language.
2300 * This method uses the given calendar to construct an appropriate
2301 * millisecond value for the time if the underlying database does not store
2302 * timezone information.
2303 *
2304 * @param columnIndex the first column is 1, the second is 2, ...
2305 * @param cal the <code>java.util.Calendar</code> object
2306 * to use in constructing the time
2307 * @return the column value as a <code>java.sql.Time</code> object;
2308 * if the value is SQL <code>NULL</code>,
2309 * the value returned is <code>null</code> in the Java programming language
2310 * @exception SQLException if a database access error occurs
2311 */
2312 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
2313 throw new UnsupportedOperationException(
2314 "ResultSet.getTime(int, Calendar) unsupported");
2315 }
2316
2317 /***
2318 * Retrieves the value of the designated column in the current row
2319 * of this <code>ResultSet</code> object as a <code>java.sql.Time</code>
2320 * object in the Java programming language.
2321 * This method uses the given calendar to construct an appropriate
2322 * millisecond value for the time if the underlying database does not store
2323 * timezone information.
2324 *
2325 * @param columnName the SQL name of the column
2326 * @param cal the <code>java.util.Calendar</code> object
2327 * to use in constructing the time
2328 * @return the column value as a <code>java.sql.Time</code> object;
2329 * if the value is SQL <code>NULL</code>,
2330 * the value returned is <code>null</code> in the Java programming language
2331 * @exception SQLException if a database access error occurs
2332 */
2333 public Time getTime(String columnName, Calendar cal) throws SQLException {
2334 throw new UnsupportedOperationException(
2335 "ResultSet.getTime(String, Calendar) unsupported");
2336 }
2337
2338 /***
2339 * Retrieves the value of the designated column in the current row
2340 * of this <code>ResultSet</code> object as a
2341 * <code>java.sql.Timestamp</code> object in the Java programming language.
2342 * This method uses the given calendar to construct an appropriate
2343 * millisecond value for the timestamp if the underlying database does not
2344 * store timezone information.
2345 *
2346 * @param columnIndex the first column is 1, the second is 2, ...
2347 * @param cal the <code>java.util.Calendar</code> object
2348 * to use in constructing the timestamp
2349 * @return the column value as a <code>java.sql.Timestamp</code> object;
2350 * if the value is SQL <code>NULL</code>,
2351 * the value returned is <code>null</code> in the Java programming language
2352 * @exception SQLException if a database access error occurs
2353 */
2354 public Timestamp getTimestamp(int columnIndex, Calendar cal)
2355 throws SQLException {
2356 throw new UnsupportedOperationException(
2357 "ResultSet.getTimestamp(int, Calendar) unsupported");
2358 }
2359
2360 /***
2361 * Retrieves the value of the designated column in the current row
2362 * of this <code>ResultSet</code> object as a <code>java.sql.Time</code>
2363 * object in the Java programming language.
2364 * This method uses the given calendar to construct an appropriate
2365 * millisecond value for the time if the underlying database does not store
2366 * timezone information.
2367 *
2368 * @param columnName the SQL name of the column
2369 * @param cal the <code>java.util.Calendar</code> object
2370 * to use in constructing the time
2371 * @return the column value as a <code>java.sql.Time</code> object;
2372 * if the value is SQL <code>NULL</code>,
2373 * the value returned is <code>null</code> in the Java programming language
2374 * @exception SQLException if a database access error occurs
2375 */
2376 public Timestamp getTimestamp(String columnName, Calendar cal)
2377 throws SQLException {
2378 throw new UnsupportedOperationException(
2379 "ResultSet.getTimestamp(String, Calendar) unsupported");
2380 }
2381
2382
2383
2384 //---------------------------------------------------------------------
2385 // JDBC 3.0
2386 //---------------------------------------------------------------------
2387
2388 public URL getURL(int columnIndex) throws SQLException {
2389 throw new UnsupportedOperationException("ResultSet.getURL(int) unsupported");
2390 }
2391
2392 public URL getURL(String columnName) throws SQLException {
2393 throw new UnsupportedOperationException("ResultSet.getURL(String) unsupported");
2394 }
2395
2396 public void updateRef(int columnIndex, Ref x) throws SQLException {
2397 throw new UnsupportedOperationException("ResultSet.updateRef(int,java.sql.Ref) unsupported");
2398 }
2399
2400 public void updateRef(String columnName, Ref x) throws SQLException {
2401 throw new UnsupportedOperationException("ResultSet.updateRef(String,java.sql.Ref) unsupported");
2402 }
2403
2404 public void updateBlob(int columnIndex, Blob x) throws SQLException {
2405 throw new UnsupportedOperationException("ResultSet.updateBlob(int,java.sql.Blob) unsupported");
2406 }
2407
2408 public void updateBlob(String columnName, Blob x) throws SQLException {
2409 throw new UnsupportedOperationException("ResultSet.updateBlob(String,java.sql.Blob) unsupported");
2410 }
2411
2412 public void updateClob(int columnIndex, Clob x) throws SQLException {
2413 throw new UnsupportedOperationException("ResultSet.updateClob(int,java.sql.Clob) unsupported");
2414 }
2415
2416 public void updateClob(String columnName, Clob x) throws SQLException {
2417 throw new UnsupportedOperationException("ResultSet.updateClob(String,java.sql.Clob) unsupported");
2418 }
2419
2420 public void updateArray(int columnIndex, Array x) throws SQLException {
2421 throw new UnsupportedOperationException("ResultSet.updateArray(int,java.sql.Array) unsupported");
2422 }
2423
2424 public void updateArray(String columnName, Array x) throws SQLException {
2425 throw new UnsupportedOperationException("ResultSet.updateArray(String,java.sql.Array) unsupported");
2426 }
2427
2428 /////////////////////////////////////////////////
2429
2430 }
This page automatically generated by Maven