1 package com.opencsv;
2
3 import javax.sql.rowset.serial.SerialClob;
4 import java.io.InputStream;
5 import java.io.Reader;
6 import java.math.BigDecimal;
7 import java.net.URL;
8 import java.sql.SQLXML;
9 import java.sql.*;
10 import java.util.Calendar;
11 import java.util.Map;
12
13 import static java.sql.Types.*;
14 import static org.mockito.Mockito.mock;
15 import static org.mockito.Mockito.when;
16
17 public class MockResultSetBuilder {
18
19 public static ResultSet buildResultSet(ResultSetMetaData metaData, String[] columnValues, int[] columnTypes) throws SQLException {
20 ResultSet resultSet = mock(ResultSet.class);
21 when(resultSet.getMetaData()).thenReturn(metaData);
22
23 for (int i = 0; i < columnValues.length; i++) {
24 setExpectToGetColumnValue(resultSet, i + 1, columnValues[i], columnTypes[i]);
25 }
26
27 return wrapResultsetWasNull(columnValues, resultSet);
28 }
29
30 private static void setExpectToGetColumnValue(ResultSet rs, int index, String value, int type) throws SQLException {
31
32 switch (type) {
33 case BIT:
34 case JAVA_OBJECT:
35 when(rs.getObject(index)).thenReturn(value);
36 break;
37 case BOOLEAN:
38 when(rs.getBoolean(index)).thenReturn(Boolean.valueOf(value));
39 break;
40 case BIGINT:
41 when(rs.getBigDecimal(index)).thenReturn(value != null ? new BigDecimal(value) : null);
42 break;
43 case Types.DECIMAL:
44 case Types.REAL:
45 case Types.NUMERIC:
46 when(rs.getBigDecimal(index)).thenReturn(value != null ? new BigDecimal(value) : null);
47 break;
48 case Types.DOUBLE:
49 when(rs.getDouble(index)).thenReturn(value != null ? Double.valueOf(value) : null);
50 break;
51 case Types.FLOAT:
52 when(rs.getFloat(index)).thenReturn(value != null ? Float.valueOf(value) : null);
53 break;
54 case Types.INTEGER:
55 case Types.TINYINT:
56 case Types.SMALLINT:
57 when(rs.getInt(index)).thenReturn(value != null ? Integer.parseInt(value) : 0);
58 break;
59 case Types.NVARCHAR:
60 case Types.NCHAR:
61 case Types.LONGNVARCHAR:
62 when(rs.getNString(index)).thenReturn(value);
63 break;
64 case Types.LONGVARCHAR:
65 case Types.VARCHAR:
66 case Types.CHAR:
67 when(rs.getString(index)).thenReturn(value);
68 break;
69 case Types.DATE:
70 Date date = createDateFromMilliSeconds(value);
71 when(rs.getDate(index)).thenReturn(date);
72 break;
73 case Types.TIME:
74 Time time = createTimeFromMilliSeconds(value);
75 when(rs.getTime(index)).thenReturn(time);
76 break;
77 case Types.TIMESTAMP:
78 Timestamp ts = createTimeStampFromMilliSeconds(value);
79 when(rs.getTimestamp(index)).thenReturn(ts);
80 break;
81 case Types.NCLOB:
82 NClob nc = createNClobFromString(value);
83 when(rs.getNClob(index)).thenReturn(nc);
84 break;
85 case Types.CLOB:
86 Clob c = createClobFromString(value);
87 when(rs.getClob(index)).thenReturn(c);
88 break;
89
90 }
91
92 }
93
94 private static Clob createClobFromString(String value) throws SQLException {
95 return value != null ? new SerialClob(value.toCharArray()) : null;
96 }
97
98 private static NClob createNClobFromString(String value) throws SQLException {
99 return value != null ? new NClobWrapper(new SerialClob(value.toCharArray())) : null;
100 }
101
102 private static Date createDateFromMilliSeconds(String value) {
103 Date date;
104
105 if (value == null) {
106 date = null;
107 } else {
108 long milliseconds = Long.parseLong(value);
109 date = new Date(milliseconds);
110 }
111 return date;
112 }
113
114 private static Time createTimeFromMilliSeconds(String value) {
115 Time time;
116
117 if (value == null) {
118 time = null;
119 } else {
120 long milliseconds = Long.parseLong(value);
121 time = new Time(milliseconds);
122 }
123 return time;
124 }
125
126 private static Timestamp createTimeStampFromMilliSeconds(String value) {
127 Timestamp timestamp;
128
129 if (value == null) {
130 timestamp = null;
131 } else {
132 long milliseconds = Long.parseLong(value);
133 timestamp = new Timestamp(milliseconds);
134 }
135 return timestamp;
136 }
137
138 public static ResultSet buildResultSet(String[] header, String[] values, int numRows) throws SQLException {
139 ResultSet rs = mock(ResultSet.class);
140 ResultSetMetaData rsmd = MockResultSetMetaDataBuilder.buildMetaData(header);
141
142 when(rs.getMetaData()).thenReturn(rsmd);
143
144 for (int i = 0; i < values.length; i++) {
145 buildStringExpects(rs, i + 1, values[i], numRows);
146 }
147 buildNextExpect(rs, numRows);
148 return rs;
149 }
150
151 private static void buildStringExpects(ResultSet rs, int index, String value, int numRows) throws SQLException {
152
153 if (numRows > 1) {
154 String[] columnValues = new String[numRows];
155 for (int i = 0; i < numRows - 1; i++) {
156 columnValues[i] = value;
157 }
158 when(rs.getString(index)).thenReturn(value, columnValues);
159 } else {
160 when(rs.getString(index)).thenReturn(value);
161 }
162 }
163
164 private static void buildNextExpect(ResultSet rs, int numRows) throws SQLException {
165 if (numRows == 1) {
166 when(rs.next()).thenReturn(true, false);
167 } else {
168 Boolean[] nextArray = new Boolean[numRows];
169 for (int i = 0; i < numRows; i++) {
170 nextArray[i] = i < (numRows - 1);
171 }
172 when(rs.next()).thenReturn(true, nextArray);
173 }
174 }
175
176 private static ResultSet wrapResultsetWasNull(String[] columnValues, ResultSet resultSet) {
177 return new ResultSet() {
178 int lastColumn = 0;
179
180 public boolean wasNull() throws SQLException {
181 return columnValues[lastColumn - 1] == null;
182 }
183
184 public boolean absolute(int row) throws SQLException {
185 return resultSet.absolute(row);
186 }
187
188 public void afterLast() throws SQLException {
189 resultSet.afterLast();
190 }
191
192 public void beforeFirst() throws SQLException {
193 resultSet.beforeFirst();
194 }
195
196 public void cancelRowUpdates() throws SQLException {
197 resultSet.cancelRowUpdates();
198 }
199
200 public void clearWarnings() throws SQLException {
201 resultSet.clearWarnings();
202 }
203
204 public void close() throws SQLException {
205 resultSet.close();
206 }
207
208 public void deleteRow() throws SQLException {
209 resultSet.deleteRow();
210 }
211
212 public int findColumn(String columnLabel) throws SQLException {
213 return resultSet.findColumn(columnLabel);
214 }
215
216 public boolean first() throws SQLException {
217 return resultSet.first();
218 }
219
220 public Array getArray(int columnIndex) throws SQLException {
221 return resultSet.getArray(columnIndex);
222 }
223
224 public Array getArray(String columnLabel) throws SQLException {
225 return resultSet.getArray(columnLabel);
226 }
227
228 public InputStream getAsciiStream(int columnIndex) throws SQLException {
229 lastColumn = columnIndex;
230 return resultSet.getAsciiStream(columnIndex);
231 }
232
233 public InputStream getAsciiStream(String columnLabel) throws SQLException {
234 return resultSet.getAsciiStream(columnLabel);
235 }
236
237 @Deprecated
238 public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
239 lastColumn = columnIndex;
240 return resultSet.getBigDecimal(columnIndex, scale);
241 }
242
243 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
244 lastColumn = columnIndex;
245 return resultSet.getBigDecimal(columnIndex);
246 }
247
248 @Deprecated
249 public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException {
250 return resultSet.getBigDecimal(columnLabel, scale);
251 }
252
253 public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
254 return resultSet.getBigDecimal(columnLabel);
255 }
256
257 public InputStream getBinaryStream(int columnIndex) throws SQLException {
258 lastColumn = columnIndex;
259 return resultSet.getBinaryStream(columnIndex);
260 }
261
262 public InputStream getBinaryStream(String columnLabel) throws SQLException {
263 return resultSet.getBinaryStream(columnLabel);
264 }
265
266 public Blob getBlob(int columnIndex) throws SQLException {
267 lastColumn = columnIndex;
268 return resultSet.getBlob(columnIndex);
269 }
270
271 public Blob getBlob(String columnLabel) throws SQLException {
272 return resultSet.getBlob(columnLabel);
273 }
274
275 public boolean getBoolean(int columnIndex) throws SQLException {
276 lastColumn = columnIndex;
277 return resultSet.getBoolean(columnIndex);
278 }
279
280 public boolean getBoolean(String columnLabel) throws SQLException {
281 return resultSet.getBoolean(columnLabel);
282 }
283
284 public byte getByte(int columnIndex) throws SQLException {
285 lastColumn = columnIndex;
286 return resultSet.getByte(columnIndex);
287 }
288
289 public byte getByte(String columnLabel) throws SQLException {
290 return resultSet.getByte(columnLabel);
291 }
292
293 public byte[] getBytes(int columnIndex) throws SQLException {
294 lastColumn = columnIndex;
295 return resultSet.getBytes(columnIndex);
296 }
297
298 public byte[] getBytes(String columnLabel) throws SQLException {
299 return resultSet.getBytes(columnLabel);
300 }
301
302 public Reader getCharacterStream(int columnIndex) throws SQLException {
303 lastColumn = columnIndex;
304 return resultSet.getCharacterStream(columnIndex);
305 }
306
307 public Reader getCharacterStream(String columnLabel) throws SQLException {
308 return resultSet.getCharacterStream(columnLabel);
309 }
310
311 public Clob getClob(int columnIndex) throws SQLException {
312 lastColumn = columnIndex;
313 return resultSet.getClob(columnIndex);
314 }
315
316 public Clob getClob(String columnLabel) throws SQLException {
317 return resultSet.getClob(columnLabel);
318 }
319
320 public int getConcurrency() throws SQLException {
321 return resultSet.getConcurrency();
322 }
323
324 public String getCursorName() throws SQLException {
325 return resultSet.getCursorName();
326 }
327
328 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
329 lastColumn = columnIndex;
330 return resultSet.getDate(columnIndex, cal);
331 }
332
333 public Date getDate(int columnIndex) throws SQLException {
334 lastColumn = columnIndex;
335 return resultSet.getDate(columnIndex);
336 }
337
338 public Date getDate(String columnLabel, Calendar cal) throws SQLException {
339 return resultSet.getDate(columnLabel, cal);
340 }
341
342 public Date getDate(String columnLabel) throws SQLException {
343 return resultSet.getDate(columnLabel);
344 }
345
346 public double getDouble(int columnIndex) throws SQLException {
347 lastColumn = columnIndex;
348 return resultSet.getDouble(columnIndex);
349 }
350
351 public double getDouble(String columnLabel) throws SQLException {
352 return resultSet.getDouble(columnLabel);
353 }
354
355 public int getFetchDirection() throws SQLException {
356 return resultSet.getFetchDirection();
357 }
358
359 public int getFetchSize() throws SQLException {
360 return resultSet.getFetchSize();
361 }
362
363 public float getFloat(int columnIndex) throws SQLException {
364 lastColumn = columnIndex;
365 return resultSet.getFloat(columnIndex);
366 }
367
368 public float getFloat(String columnLabel) throws SQLException {
369 return resultSet.getFloat(columnLabel);
370 }
371
372 public int getHoldability() throws SQLException {
373 return resultSet.getHoldability();
374 }
375
376 public int getInt(int columnIndex) throws SQLException {
377 lastColumn = columnIndex;
378 return resultSet.getInt(columnIndex);
379 }
380
381 public int getInt(String columnLabel) throws SQLException {
382 return resultSet.getInt(columnLabel);
383 }
384
385 public long getLong(int columnIndex) throws SQLException {
386 lastColumn = columnIndex;
387 return resultSet.getLong(columnIndex);
388 }
389
390 public long getLong(String columnLabel) throws SQLException {
391 return resultSet.getLong(columnLabel);
392 }
393
394 public ResultSetMetaData getMetaData() throws SQLException {
395 return resultSet.getMetaData();
396 }
397
398 public Reader getNCharacterStream(int columnIndex) throws SQLException {
399 lastColumn = columnIndex;
400 return resultSet.getNCharacterStream(columnIndex);
401 }
402
403 public Reader getNCharacterStream(String columnLabel) throws SQLException {
404 return resultSet.getNCharacterStream(columnLabel);
405 }
406
407 public NClob getNClob(int columnIndex) throws SQLException {
408 lastColumn = columnIndex;
409 return resultSet.getNClob(columnIndex);
410 }
411
412 public NClob getNClob(String columnLabel) throws SQLException {
413 return resultSet.getNClob(columnLabel);
414 }
415
416 public String getNString(int columnIndex) throws SQLException {
417 lastColumn = columnIndex;
418 return resultSet.getNString(columnIndex);
419 }
420
421 public String getNString(String columnLabel) throws SQLException {
422 return resultSet.getNString(columnLabel);
423 }
424
425 public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
426 lastColumn = columnIndex;
427 return resultSet.getObject(columnIndex, type);
428 }
429
430 public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException {
431 lastColumn = columnIndex;
432 return resultSet.getObject(columnIndex, map);
433 }
434
435 public Object getObject(int columnIndex) throws SQLException {
436 lastColumn = columnIndex;
437 return resultSet.getObject(columnIndex);
438 }
439
440 public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
441 return resultSet.getObject(columnLabel, type);
442 }
443
444 public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException {
445 return resultSet.getObject(columnLabel, map);
446 }
447
448 public Object getObject(String columnLabel) throws SQLException {
449 return resultSet.getObject(columnLabel);
450 }
451
452 public Ref getRef(int columnIndex) throws SQLException {
453 lastColumn = columnIndex;
454 return resultSet.getRef(columnIndex);
455 }
456
457 public Ref getRef(String columnLabel) throws SQLException {
458 return resultSet.getRef(columnLabel);
459 }
460
461 public int getRow() throws SQLException {
462 return resultSet.getRow();
463 }
464
465 public RowId getRowId(int columnIndex) throws SQLException {
466 lastColumn = columnIndex;
467 return resultSet.getRowId(columnIndex);
468 }
469
470 public RowId getRowId(String columnLabel) throws SQLException {
471 return resultSet.getRowId(columnLabel);
472 }
473
474 public SQLXML getSQLXML(int columnIndex) throws SQLException {
475 lastColumn = columnIndex;
476 return resultSet.getSQLXML(columnIndex);
477 }
478
479 public SQLXML getSQLXML(String columnLabel) throws SQLException {
480 return resultSet.getSQLXML(columnLabel);
481 }
482
483 public short getShort(int columnIndex) throws SQLException {
484 lastColumn = columnIndex;
485 return resultSet.getShort(columnIndex);
486 }
487
488 public short getShort(String columnLabel) throws SQLException {
489 return resultSet.getShort(columnLabel);
490 }
491
492 public Statement getStatement() throws SQLException {
493 return resultSet.getStatement();
494 }
495
496 public String getString(int columnIndex) throws SQLException {
497 lastColumn = columnIndex;
498 return resultSet.getString(columnIndex);
499 }
500
501 public String getString(String columnLabel) throws SQLException {
502 return resultSet.getString(columnLabel);
503 }
504
505 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
506 lastColumn = columnIndex;
507 return resultSet.getTime(columnIndex, cal);
508 }
509
510 public Time getTime(int columnIndex) throws SQLException {
511 lastColumn = columnIndex;
512 return resultSet.getTime(columnIndex);
513 }
514
515 public Time getTime(String columnLabel, Calendar cal) throws SQLException {
516 return resultSet.getTime(columnLabel, cal);
517 }
518
519 public Time getTime(String columnLabel) throws SQLException {
520 return resultSet.getTime(columnLabel);
521 }
522
523 public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
524 lastColumn = columnIndex;
525 return resultSet.getTimestamp(columnIndex, cal);
526 }
527
528 public Timestamp getTimestamp(int columnIndex) throws SQLException {
529 lastColumn = columnIndex;
530 return resultSet.getTimestamp(columnIndex);
531 }
532
533 public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException {
534 return resultSet.getTimestamp(columnLabel, cal);
535 }
536
537 public Timestamp getTimestamp(String columnLabel) throws SQLException {
538 return resultSet.getTimestamp(columnLabel);
539 }
540
541 public int getType() throws SQLException {
542 return resultSet.getType();
543 }
544
545 public URL getURL(int columnIndex) throws SQLException {
546 lastColumn = columnIndex;
547 return resultSet.getURL(columnIndex);
548 }
549
550 public URL getURL(String columnLabel) throws SQLException {
551 return resultSet.getURL(columnLabel);
552 }
553
554 @Deprecated
555 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
556 lastColumn = columnIndex;
557 return resultSet.getUnicodeStream(columnIndex);
558 }
559
560 @Deprecated
561 public InputStream getUnicodeStream(String columnLabel) throws SQLException {
562 return resultSet.getUnicodeStream(columnLabel);
563 }
564
565 public SQLWarning getWarnings() throws SQLException {
566 return resultSet.getWarnings();
567 }
568
569 public void insertRow() throws SQLException {
570 resultSet.insertRow();
571 }
572
573 public boolean isAfterLast() throws SQLException {
574 return resultSet.isAfterLast();
575 }
576
577 public boolean isBeforeFirst() throws SQLException {
578 return resultSet.isBeforeFirst();
579 }
580
581 public boolean isClosed() throws SQLException {
582 return resultSet.isClosed();
583 }
584
585 public boolean isFirst() throws SQLException {
586 return resultSet.isFirst();
587 }
588
589 public boolean isLast() throws SQLException {
590 return resultSet.isLast();
591 }
592
593 public boolean isWrapperFor(Class<?> arg0) throws SQLException {
594 return resultSet.isWrapperFor(arg0);
595 }
596
597 public boolean last() throws SQLException {
598 return resultSet.last();
599 }
600
601 public void moveToCurrentRow() throws SQLException {
602 resultSet.moveToCurrentRow();
603 }
604
605 public void moveToInsertRow() throws SQLException {
606 resultSet.moveToInsertRow();
607 }
608
609 public boolean next() throws SQLException {
610 return resultSet.next();
611 }
612
613 public boolean previous() throws SQLException {
614 return resultSet.previous();
615 }
616
617 public void refreshRow() throws SQLException {
618 resultSet.refreshRow();
619 }
620
621 public boolean relative(int rows) throws SQLException {
622 return resultSet.relative(rows);
623 }
624
625 public boolean rowDeleted() throws SQLException {
626 return resultSet.rowDeleted();
627 }
628
629 public boolean rowInserted() throws SQLException {
630 return resultSet.rowInserted();
631 }
632
633 public boolean rowUpdated() throws SQLException {
634 return resultSet.rowUpdated();
635 }
636
637 public void setFetchDirection(int direction) throws SQLException {
638 resultSet.setFetchDirection(direction);
639 }
640
641 public void setFetchSize(int rows) throws SQLException {
642 resultSet.setFetchSize(rows);
643 }
644
645 public <T> T unwrap(Class<T> arg0) throws SQLException {
646 return resultSet.unwrap(arg0);
647 }
648
649 public void updateArray(int columnIndex, Array x) throws SQLException {
650 resultSet.updateArray(columnIndex, x);
651 }
652
653 public void updateArray(String columnLabel, Array x) throws SQLException {
654 resultSet.updateArray(columnLabel, x);
655 }
656
657 public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException {
658 resultSet.updateAsciiStream(columnIndex, x, length);
659 }
660
661 public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException {
662 resultSet.updateAsciiStream(columnIndex, x, length);
663 }
664
665 public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException {
666 resultSet.updateAsciiStream(columnIndex, x);
667 }
668
669 public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException {
670 resultSet.updateAsciiStream(columnLabel, x, length);
671 }
672
673 public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException {
674 resultSet.updateAsciiStream(columnLabel, x, length);
675 }
676
677 public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException {
678 resultSet.updateAsciiStream(columnLabel, x);
679 }
680
681 public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
682 resultSet.updateBigDecimal(columnIndex, x);
683 }
684
685 public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException {
686 resultSet.updateBigDecimal(columnLabel, x);
687 }
688
689 public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException {
690 resultSet.updateBinaryStream(columnIndex, x, length);
691 }
692
693 public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException {
694 resultSet.updateBinaryStream(columnIndex, x, length);
695 }
696
697 public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {
698 resultSet.updateBinaryStream(columnIndex, x);
699 }
700
701 public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException {
702 resultSet.updateBinaryStream(columnLabel, x, length);
703 }
704
705 public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException {
706 resultSet.updateBinaryStream(columnLabel, x, length);
707 }
708
709 public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException {
710 resultSet.updateBinaryStream(columnLabel, x);
711 }
712
713 public void updateBlob(int columnIndex, Blob x) throws SQLException {
714 resultSet.updateBlob(columnIndex, x);
715 }
716
717 public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException {
718 resultSet.updateBlob(columnIndex, inputStream, length);
719 }
720
721 public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
722 resultSet.updateBlob(columnIndex, inputStream);
723 }
724
725 public void updateBlob(String columnLabel, Blob x) throws SQLException {
726 resultSet.updateBlob(columnLabel, x);
727 }
728
729 public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
730 resultSet.updateBlob(columnLabel, inputStream, length);
731 }
732
733 public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
734 resultSet.updateBlob(columnLabel, inputStream);
735 }
736
737 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
738 resultSet.updateBoolean(columnIndex, x);
739 }
740
741 public void updateBoolean(String columnLabel, boolean x) throws SQLException {
742 resultSet.updateBoolean(columnLabel, x);
743 }
744
745 public void updateByte(int columnIndex, byte x) throws SQLException {
746 resultSet.updateByte(columnIndex, x);
747 }
748
749 public void updateByte(String columnLabel, byte x) throws SQLException {
750 resultSet.updateByte(columnLabel, x);
751 }
752
753 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
754 resultSet.updateBytes(columnIndex, x);
755 }
756
757 public void updateBytes(String columnLabel, byte[] x) throws SQLException {
758 resultSet.updateBytes(columnLabel, x);
759 }
760
761 public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {
762 resultSet.updateCharacterStream(columnIndex, x, length);
763 }
764
765 public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
766 resultSet.updateCharacterStream(columnIndex, x, length);
767 }
768
769 public void updateCharacterStream(int columnIndex, Reader x) throws SQLException {
770 resultSet.updateCharacterStream(columnIndex, x);
771 }
772
773 public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException {
774 resultSet.updateCharacterStream(columnLabel, reader, length);
775 }
776
777 public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
778 resultSet.updateCharacterStream(columnLabel, reader, length);
779 }
780
781 public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException {
782 resultSet.updateCharacterStream(columnLabel, reader);
783 }
784
785 public void updateClob(int columnIndex, Clob x) throws SQLException {
786 resultSet.updateClob(columnIndex, x);
787 }
788
789 public void updateClob(int columnIndex, Reader reader, long length) throws SQLException {
790 resultSet.updateClob(columnIndex, reader, length);
791 }
792
793 public void updateClob(int columnIndex, Reader reader) throws SQLException {
794 resultSet.updateClob(columnIndex, reader);
795 }
796
797 public void updateClob(String columnLabel, Clob x) throws SQLException {
798 resultSet.updateClob(columnLabel, x);
799 }
800
801 public void updateClob(String columnLabel, Reader reader, long length) throws SQLException {
802 resultSet.updateClob(columnLabel, reader, length);
803 }
804
805 public void updateClob(String columnLabel, Reader reader) throws SQLException {
806 resultSet.updateClob(columnLabel, reader);
807 }
808
809 public void updateDate(int columnIndex, Date x) throws SQLException {
810 resultSet.updateDate(columnIndex, x);
811 }
812
813 public void updateDate(String columnLabel, Date x) throws SQLException {
814 resultSet.updateDate(columnLabel, x);
815 }
816
817 public void updateDouble(int columnIndex, double x) throws SQLException {
818 resultSet.updateDouble(columnIndex, x);
819 }
820
821 public void updateDouble(String columnLabel, double x) throws SQLException {
822 resultSet.updateDouble(columnLabel, x);
823 }
824
825 public void updateFloat(int columnIndex, float x) throws SQLException {
826 resultSet.updateFloat(columnIndex, x);
827 }
828
829 public void updateFloat(String columnLabel, float x) throws SQLException {
830 resultSet.updateFloat(columnLabel, x);
831 }
832
833 public void updateInt(int columnIndex, int x) throws SQLException {
834 resultSet.updateInt(columnIndex, x);
835 }
836
837 public void updateInt(String columnLabel, int x) throws SQLException {
838 resultSet.updateInt(columnLabel, x);
839 }
840
841 public void updateLong(int columnIndex, long x) throws SQLException {
842 resultSet.updateLong(columnIndex, x);
843 }
844
845 public void updateLong(String columnLabel, long x) throws SQLException {
846 resultSet.updateLong(columnLabel, x);
847 }
848
849 public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
850 resultSet.updateNCharacterStream(columnIndex, x, length);
851 }
852
853 public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException {
854 resultSet.updateNCharacterStream(columnIndex, x);
855 }
856
857 public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
858 resultSet.updateNCharacterStream(columnLabel, reader, length);
859 }
860
861 public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException {
862 resultSet.updateNCharacterStream(columnLabel, reader);
863 }
864
865 public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
866 resultSet.updateNClob(columnIndex, nClob);
867 }
868
869 public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException {
870 resultSet.updateNClob(columnIndex, reader, length);
871 }
872
873 public void updateNClob(int columnIndex, Reader reader) throws SQLException {
874 resultSet.updateNClob(columnIndex, reader);
875 }
876
877 public void updateNClob(String columnLabel, NClob nClob) throws SQLException {
878 resultSet.updateNClob(columnLabel, nClob);
879 }
880
881 public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException {
882 resultSet.updateNClob(columnLabel, reader, length);
883 }
884
885 public void updateNClob(String columnLabel, Reader reader) throws SQLException {
886 resultSet.updateNClob(columnLabel, reader);
887 }
888
889 public void updateNString(int columnIndex, String nString) throws SQLException {
890 resultSet.updateNString(columnIndex, nString);
891 }
892
893 public void updateNString(String columnLabel, String nString) throws SQLException {
894 resultSet.updateNString(columnLabel, nString);
895 }
896
897 public void updateNull(int columnIndex) throws SQLException {
898 resultSet.updateNull(columnIndex);
899 }
900
901 public void updateNull(String columnLabel) throws SQLException {
902 resultSet.updateNull(columnLabel);
903 }
904
905 public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException {
906 resultSet.updateObject(columnIndex, x, scaleOrLength);
907 }
908
909 public void updateObject(int columnIndex, Object x) throws SQLException {
910 resultSet.updateObject(columnIndex, x);
911 }
912
913 public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException {
914 resultSet.updateObject(columnLabel, x, scaleOrLength);
915 }
916
917 public void updateObject(String columnLabel, Object x) throws SQLException {
918 resultSet.updateObject(columnLabel, x);
919 }
920
921 public void updateRef(int columnIndex, Ref x) throws SQLException {
922 resultSet.updateRef(columnIndex, x);
923 }
924
925 public void updateRef(String columnLabel, Ref x) throws SQLException {
926 resultSet.updateRef(columnLabel, x);
927 }
928
929 public void updateRow() throws SQLException {
930 resultSet.updateRow();
931 }
932
933 public void updateRowId(int columnIndex, RowId x) throws SQLException {
934 resultSet.updateRowId(columnIndex, x);
935 }
936
937 public void updateRowId(String columnLabel, RowId x) throws SQLException {
938 resultSet.updateRowId(columnLabel, x);
939 }
940
941 public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
942 resultSet.updateSQLXML(columnIndex, xmlObject);
943 }
944
945 public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {
946 resultSet.updateSQLXML(columnLabel, xmlObject);
947 }
948
949 public void updateShort(int columnIndex, short x) throws SQLException {
950 resultSet.updateShort(columnIndex, x);
951 }
952
953 public void updateShort(String columnLabel, short x) throws SQLException {
954 resultSet.updateShort(columnLabel, x);
955 }
956
957 public void updateString(int columnIndex, String x) throws SQLException {
958 resultSet.updateString(columnIndex, x);
959 }
960
961 public void updateString(String columnLabel, String x) throws SQLException {
962 resultSet.updateString(columnLabel, x);
963 }
964
965 public void updateTime(int columnIndex, Time x) throws SQLException {
966 resultSet.updateTime(columnIndex, x);
967 }
968
969 public void updateTime(String columnLabel, Time x) throws SQLException {
970 resultSet.updateTime(columnLabel, x);
971 }
972
973 public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException {
974 resultSet.updateTimestamp(columnIndex, x);
975 }
976
977 public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException {
978 resultSet.updateTimestamp(columnLabel, x);
979 }
980
981 };
982 }
983
984 }