KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > craftsman > spy > SpyResultSet


1 /*
2  * Craftsman Spy.
3  * Copyright (C) 2005 Sébastien LECACHEUR
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */

19 package craftsman.spy;
20
21 import java.io.InputStream JavaDoc;
22 import java.io.Reader JavaDoc;
23 import java.math.BigDecimal JavaDoc;
24 import java.net.URL JavaDoc;
25 import java.sql.Array JavaDoc;
26 import java.sql.Blob JavaDoc;
27 import java.sql.Clob JavaDoc;
28 import java.sql.Connection JavaDoc;
29 import java.sql.Date JavaDoc;
30 import java.sql.Ref JavaDoc;
31 import java.sql.ResultSet JavaDoc;
32 import java.sql.ResultSetMetaData JavaDoc;
33 import java.sql.SQLException JavaDoc;
34 import java.sql.SQLWarning JavaDoc;
35 import java.sql.Statement JavaDoc;
36 import java.sql.Time JavaDoc;
37 import java.sql.Timestamp JavaDoc;
38 import java.sql.Types JavaDoc;
39 import java.util.Calendar JavaDoc;
40 import java.util.Map JavaDoc;
41
42 /**
43  * A table of data representing a database result set, which is usually
44  * generated by executing a statement that queries the database.
45  *
46  * @author Sébastien LECACHEUR
47  */

48 public class SpyResultSet extends SpyEntity implements ResultSet JavaDoc {
49     /**
50      * The real result set instance.
51      */

52     private ResultSet JavaDoc real = null;
53
54
55     /**
56      * The SQL statement which create this SQL result set.
57      */

58     private Statement JavaDoc statement = null;
59
60
61     /**
62      * The index of the current row.
63      */

64     private int rowCount = 0;
65
66
67     /**
68      * The index of the maximum getted row.
69      */

70     private int maxRowCount = 0;
71
72
73     /**
74      * Constructs a new Spy JDBC result set.
75      *
76      * @param c Connection The used connection.
77      * @param stmt Statement The used statement.
78      * @param rs ResultSet The real JDBC result set.
79      */

80     protected SpyResultSet ( Connection JavaDoc c, Statement JavaDoc stmt, ResultSet JavaDoc rs) {
81         super(c);
82         statement = stmt;
83         real = rs;
84     }
85
86
87     /**
88      * Retrieves the the string representation of the current
89      * row of the result set.
90      *
91      * @return String The string representation of the current row.
92      */

93     private String JavaDoc getDisplayableResultSetRow() {
94         StringBuffer JavaDoc displayableResultSetRow = new StringBuffer JavaDoc();
95
96         try {
97             ResultSetMetaData JavaDoc md = real.getMetaData();
98             for ( int i = 1; i <= md.getColumnCount(); i++) {
99                 displayableResultSetRow.append(md.getColumnName(i))
100                     .append('=');
101                 switch ( md.getColumnType(i)) {
102                     case Types.ARRAY:
103                     case Types.BLOB:
104                     case Types.CHAR:
105                     case Types.CLOB:
106                     case Types.DATALINK:
107                     case Types.DATE:
108                     case Types.JAVA_OBJECT:
109                     case Types.LONGVARBINARY:
110                     case Types.LONGVARCHAR:
111                     case Types.REF:
112                     case Types.TIME:
113                     case Types.TIMESTAMP:
114                     case Types.VARBINARY:
115                     case Types.VARCHAR: if ( real.getString(i)!=null) {
116                                                     displayableResultSetRow.append('\'').append(real.getString(i)).append('\'');
117                                                 } else {
118                                                     displayableResultSetRow.append("NULL");
119                                                 }
120                                                 break;
121                     case Types.NULL: displayableResultSetRow.append("NULL");
122                                                 break;
123                     default: if ( real.getString(i)!=null) {
124                                                     displayableResultSetRow.append(real.getString(i));
125                                                 } else {
126                                                     displayableResultSetRow.append("NULL");
127                                                 }
128                                                 break;
129                 }
130
131                 displayableResultSetRow.append(',');
132             }
133             if ( md.getColumnCount() >= 1) {
134                 displayableResultSetRow.deleteCharAt(displayableResultSetRow.length()-1);
135             }
136         } catch ( SQLException JavaDoc e) {
137             if ( log.isErrorEnabled()) log.error(getId()+":unable to display resultset row",e);
138         }
139
140         return displayableResultSetRow.toString();
141     }
142
143
144     /**
145      * @see ResultSet#getConcurrency()
146      */

147     public int getConcurrency() throws SQLException JavaDoc {
148         return real.getConcurrency();
149     }
150
151
152     /**
153      * @see ResultSet#getFetchDirection()
154      */

155     public int getFetchDirection() throws SQLException JavaDoc {
156         return real.getFetchDirection();
157     }
158
159
160     /**
161      * @see ResultSet#getFetchSize()
162      */

163     public int getFetchSize() throws SQLException JavaDoc {
164         return real.getFetchSize();
165     }
166
167
168     /**
169      * @see ResultSet#getRow()
170      */

171     public int getRow() throws SQLException JavaDoc {
172         return real.getRow();
173     }
174
175
176     /**
177      * @see ResultSet#getType()
178      */

179     public int getType() throws SQLException JavaDoc {
180         return real.getType();
181     }
182
183
184     /**
185      * @see ResultSet#afterLast()
186      */

187     public void afterLast() throws SQLException JavaDoc {
188         real.afterLast();
189     }
190
191
192     /**
193      * @see ResultSet#beforeFirst()
194      */

195     public void beforeFirst() throws SQLException JavaDoc {
196         real.beforeFirst();
197     }
198
199
200     /**
201      * @see ResultSet#cancelRowUpdates()
202      */

203     public void cancelRowUpdates() throws SQLException JavaDoc {
204         real.cancelRowUpdates();
205     }
206
207
208     /**
209      * @see ResultSet#clearWarnings()
210      */

211     public void clearWarnings() throws SQLException JavaDoc {
212         real.clearWarnings();
213     }
214
215
216     /**
217      * @see ResultSet#close()
218      */

219     public void close() throws SQLException JavaDoc {
220         real.close();
221     }
222
223
224     /**
225      * @see ResultSet#deleteRow()
226      */

227     public void deleteRow() throws SQLException JavaDoc {
228         //TODO log row deletion
229
real.deleteRow();
230     }
231
232
233     /**
234      * @see ResultSet#insertRow()
235      */

236     public void insertRow() throws SQLException JavaDoc {
237         //TODO log row insertion
238
real.insertRow();
239     }
240
241
242     /**
243      * @see ResultSet#moveToCurrentRow()
244      */

245     public void moveToCurrentRow() throws SQLException JavaDoc {
246         real.moveToCurrentRow();
247     }
248
249
250     /**
251      * @see ResultSet#moveToInsertRow()
252      */

253     public void moveToInsertRow() throws SQLException JavaDoc {
254         real.moveToInsertRow();
255     }
256
257
258     /**
259      * @see ResultSet#refreshRow()
260      */

261     public void refreshRow() throws SQLException JavaDoc {
262         real.refreshRow();
263     }
264
265
266     /**
267      * @see ResultSet#updateRow()
268      */

269     public void updateRow() throws SQLException JavaDoc {
270         //TODO log row updating
271
real.updateRow();
272     }
273
274
275     /**
276      * @see ResultSet#first()
277      */

278     public boolean first() throws SQLException JavaDoc {
279         return real.first();
280     }
281
282
283     /**
284      * @see ResultSet#isAfterLast()
285      */

286     public boolean isAfterLast() throws SQLException JavaDoc {
287         return real.isAfterLast();
288     }
289
290
291     /**
292      * @see ResultSet#isBeforeFirst()
293      */

294     public boolean isBeforeFirst() throws SQLException JavaDoc {
295         return real.isBeforeFirst();
296     }
297
298
299     /**
300      * @see ResultSet#isFirst()
301      */

302     public boolean isFirst() throws SQLException JavaDoc {
303         return real.isFirst();
304     }
305
306
307     /**
308      * @see ResultSet#isLast()
309      */

310     public boolean isLast() throws SQLException JavaDoc {
311         return real.isLast();
312     }
313
314
315     /**
316      * @see ResultSet#last()
317      */

318     public boolean last() throws SQLException JavaDoc {
319         return real.last();
320     }
321
322
323     /**
324      * @see ResultSet#next()
325      */

326     public boolean next() throws SQLException JavaDoc {
327         boolean result = false;
328
329
330         try {
331             result = real.next();
332
333             if ( result) {
334                 rowCount++;
335
336                 // Log the row only if it was never been logged
337
if ( rowCount > maxRowCount) {
338                     maxRowCount++;
339                     if ( log.isInfoEnabled()) log.info(getId()+":"+getDisplayableResultSetRow()+" (row "+rowCount+")");
340                 }
341             } else {
342                 if ( log.isInfoEnabled()) log.info(getId()+":total rowcount is "+rowCount);
343             }
344         } catch ( SQLException JavaDoc e) {
345             if ( log.isErrorEnabled()) log.error(getId()+": state="+e.getSQLState()+",code="+e.getErrorCode(),e);
346             throw e;
347         }
348
349         return result;
350     }
351
352
353     /**
354      * @see ResultSet#previous()
355      */

356     public boolean previous() throws SQLException JavaDoc {
357         boolean result = real.previous();
358
359
360         if ( result) {
361             rowCount--;
362         }
363
364         return result;
365     }
366
367
368     /**
369      * @see ResultSet#rowDeleted()
370      */

371     public boolean rowDeleted() throws SQLException JavaDoc {
372         return real.rowDeleted();
373     }
374
375
376     /**
377      * @see ResultSet#rowInserted()
378      */

379     public boolean rowInserted() throws SQLException JavaDoc {
380         return real.rowInserted();
381     }
382
383
384     /**
385      * @see ResultSet#rowUpdated()
386      */

387     public boolean rowUpdated() throws SQLException JavaDoc {
388         return real.rowUpdated();
389     }
390
391
392     /**
393      * @see ResultSet#wasNull()
394      */

395     public boolean wasNull() throws SQLException JavaDoc {
396         return real.wasNull();
397     }
398
399
400     /**
401      * @see ResultSet#getByte(int)
402      */

403     public byte getByte(int columnIndex) throws SQLException JavaDoc {
404         return real.getByte(columnIndex);
405     }
406
407
408     /**
409      * @see ResultSet#getDouble(int)
410      */

411     public double getDouble(int columnIndex) throws SQLException JavaDoc {
412         return real.getByte(columnIndex);
413     }
414
415
416     /**
417      * @see ResultSet#getFloat(int)
418      */

419     public float getFloat(int columnIndex) throws SQLException JavaDoc {
420         return real.getFloat(columnIndex);
421     }
422
423
424     /**
425      * @see ResultSet#getInt(int)
426      */

427     public int getInt(int columnIndex) throws SQLException JavaDoc {
428         return real.getInt(columnIndex);
429     }
430
431
432     /**
433      * @see ResultSet#getLong(int)
434      */

435     public long getLong(int columnIndex) throws SQLException JavaDoc {
436         return real.getLong(columnIndex);
437     }
438
439
440     /**
441      * @see ResultSet#getShort(int)
442      */

443     public short getShort(int columnIndex) throws SQLException JavaDoc {
444         return real.getShort(columnIndex);
445     }
446
447
448     /**
449      * @see ResultSet#setFetchDirection(int)
450      */

451     public void setFetchDirection(int direction) throws SQLException JavaDoc {
452         real.setFetchDirection(direction);
453     }
454
455
456     /**
457      * @see ResultSet#setFetchSize(int)
458      */

459     public void setFetchSize(int rows) throws SQLException JavaDoc {
460         real.setFetchSize(rows);
461     }
462
463
464     /**
465      * @see ResultSet#updateNull(int)
466      */

467     public void updateNull(int columnIndex) throws SQLException JavaDoc {
468         real.updateNull(columnIndex);
469     }
470
471
472     /**
473      * @see ResultSet#absolute(int)
474      */

475     public boolean absolute(int row) throws SQLException JavaDoc {
476         return real.absolute(row);
477     }
478
479
480     /**
481      * @see ResultSet#getBoolean(int)
482      */

483     public boolean getBoolean(int columnIndex) throws SQLException JavaDoc {
484         return real.getBoolean(columnIndex);
485     }
486
487
488     /**
489      * @see ResultSet#relative(int)
490      */

491     public boolean relative(int rows) throws SQLException JavaDoc {
492         return real.relative(rows);
493     }
494
495
496     /**
497      * @see ResultSet#getBytes(int)
498      */

499     public byte[] getBytes(int columnIndex) throws SQLException JavaDoc {
500         return real.getBytes(columnIndex);
501     }
502
503
504     /**
505      * @see ResultSet#updateByte(int, byte)
506      */

507     public void updateByte(int columnIndex, byte x) throws SQLException JavaDoc {
508         real.updateByte(columnIndex,x);
509     }
510
511
512     /**
513      * @see ResultSet#updateDouble(int, double)
514      */

515     public void updateDouble(int columnIndex, double x) throws SQLException JavaDoc {
516         real.updateDouble(columnIndex,x);
517     }
518
519
520     /**
521      * @see ResultSet#updateFloat(int, float)
522      */

523     public void updateFloat(int columnIndex, float x) throws SQLException JavaDoc {
524         real.updateFloat(columnIndex,x);
525     }
526
527
528     /**
529      * @see ResultSet#updateInt(int, int)
530      */

531     public void updateInt(int columnIndex, int x) throws SQLException JavaDoc {
532         real.updateInt(columnIndex,x);
533     }
534
535
536     /**
537      * @see ResultSet#updateLong(int, long)
538      */

539     public void updateLong(int columnIndex, long x) throws SQLException JavaDoc {
540         real.updateLong(columnIndex,x);
541     }
542
543
544     /**
545      * @see ResultSet#updateShort(int, short)
546      */

547     public void updateShort(int columnIndex, short x) throws SQLException JavaDoc {
548         real.updateShort(columnIndex,x);
549     }
550
551
552     /**
553      * @see ResultSet#updateBoolean(int, boolean)
554      */

555     public void updateBoolean(int columnIndex, boolean x) throws SQLException JavaDoc {
556         real.updateBoolean(columnIndex,x);
557     }
558
559
560     /**
561      * @see ResultSet#updateBytes(int, byte[])
562      */

563     public void updateBytes(int columnIndex, byte[] x) throws SQLException JavaDoc {
564         real.updateBytes(columnIndex,x);
565     }
566
567
568     /**
569      * @see ResultSet#getAsciiStream(int)
570      */

571     public InputStream JavaDoc getAsciiStream(int columnIndex) throws SQLException JavaDoc {
572         return real.getAsciiStream(columnIndex);
573     }
574
575
576     /**
577      * @see ResultSet#getBinaryStream(int)
578      */

579     public InputStream JavaDoc getBinaryStream(int columnIndex) throws SQLException JavaDoc {
580         return real.getBinaryStream(columnIndex);
581     }
582
583
584     /**
585      * @see ResultSet#getUnicodeStream(int)
586      */

587     public InputStream JavaDoc getUnicodeStream(int columnIndex) throws SQLException JavaDoc {
588         return real.getUnicodeStream(columnIndex);
589     }
590
591
592     /**
593      * @see ResultSet#updateAsciiStream(int, java.io.InputStream, int)
594      */

595     public void updateAsciiStream(int columnIndex, InputStream JavaDoc x, int length) throws SQLException JavaDoc {
596         real.updateAsciiStream(columnIndex,x,length);
597     }
598
599
600     /**
601      * @see ResultSet#updateBinaryStream(int, java.io.InputStream, int)
602      */

603     public void updateBinaryStream(int columnIndex, InputStream JavaDoc x, int length) throws SQLException JavaDoc {
604         real.updateBinaryStream(columnIndex,x,length);
605     }
606
607
608     /**
609      * @see ResultSet#getCharacterStream(int)
610      */

611     public Reader JavaDoc getCharacterStream(int columnIndex) throws SQLException JavaDoc {
612         return real.getCharacterStream(columnIndex);
613     }
614
615
616     /**
617      * @see ResultSet#updateCharacterStream(int, java.io.Reader, int)
618      */

619     public void updateCharacterStream(int columnIndex, Reader JavaDoc x, int length) throws SQLException JavaDoc {
620         real.updateCharacterStream(columnIndex,x,length);
621     }
622
623
624     /**
625      * @see ResultSet#getObject(int)
626      */

627     public Object JavaDoc getObject(int columnIndex) throws SQLException JavaDoc {
628         return real.getObject(columnIndex);
629     }
630
631
632     /**
633      * @see ResultSet#updateObject(int, Object)
634      */

635     public void updateObject(int columnIndex, Object JavaDoc x) throws SQLException JavaDoc {
636         real.updateObject(columnIndex,x);
637     }
638
639
640     /**
641      * @see ResultSet#updateObject(int, Object, int)
642      */

643     public void updateObject(int columnIndex, Object JavaDoc x, int scale) throws SQLException JavaDoc {
644         real.updateObject(columnIndex,x,scale);
645     }
646
647
648     /**
649      * @see ResultSet#getCursorName()
650      */

651     public String JavaDoc getCursorName() throws SQLException JavaDoc {
652         return real.getCursorName();
653     }
654
655
656     /**
657      * @see ResultSet#getString(int)
658      */

659     public String JavaDoc getString(int columnIndex) throws SQLException JavaDoc {
660         return real.getString(columnIndex);
661     }
662
663
664     /**
665      * @see ResultSet#updateString(int, String)
666      */

667     public void updateString(int columnIndex, String JavaDoc x) throws SQLException JavaDoc {
668         real.updateString(columnIndex,x);
669     }
670
671
672     /**
673      * @see ResultSet#getByte(String)
674      */

675     public byte getByte(String JavaDoc columnName) throws SQLException JavaDoc {
676         return real.getByte(columnName);
677     }
678
679
680     /**
681      * @see ResultSet#getDouble(String)
682      */

683     public double getDouble(String JavaDoc columnName) throws SQLException JavaDoc {
684         return real.getDouble(columnName);
685     }
686
687
688     /**
689      * @see ResultSet#getFloat(String)
690      */

691     public float getFloat(String JavaDoc columnName) throws SQLException JavaDoc {
692         return real.getFloat(columnName);
693     }
694
695
696     /**
697      * @see ResultSet#findColumn(String)
698      */

699     public int findColumn(String JavaDoc columnName) throws SQLException JavaDoc {
700         return real.findColumn(columnName);
701     }
702
703
704     /**
705      * @see ResultSet#getInt(String)
706      */

707     public int getInt(String JavaDoc columnName) throws SQLException JavaDoc {
708         return real.getInt(columnName);
709     }
710
711
712     /**
713      * @see ResultSet#getLong(String)
714      */

715     public long getLong(String JavaDoc columnName) throws SQLException JavaDoc {
716         return real.getLong(columnName);
717     }
718
719
720     /**
721      * @see ResultSet#getShort(String)
722      */

723     public short getShort(String JavaDoc columnName) throws SQLException JavaDoc {
724         return real.getShort(columnName);
725     }
726
727
728     /**
729      * @see ResultSet#updateNull(String)
730      */

731     public void updateNull(String JavaDoc columnName) throws SQLException JavaDoc {
732         real.updateNull(columnName);
733     }
734
735
736     /**
737      * @see ResultSet#getBoolean(String)
738      */

739     public boolean getBoolean(String JavaDoc columnName) throws SQLException JavaDoc {
740         return real.getBoolean(columnName);
741     }
742
743
744     /**
745      * @see ResultSet#getBytes(String)
746      */

747     public byte[] getBytes(String JavaDoc columnName) throws SQLException JavaDoc {
748         return real.getBytes(columnName);
749     }
750
751
752     /**
753      * @see ResultSet#updateByte(String, byte)
754      */

755     public void updateByte(String JavaDoc columnName, byte x) throws SQLException JavaDoc {
756         real.updateByte(columnName,x);
757     }
758
759
760     /**
761      * @see ResultSet#updateDouble(String, double)
762      */

763     public void updateDouble(String JavaDoc columnName, double x) throws SQLException JavaDoc {
764         real.updateDouble(columnName,x);
765     }
766
767
768     /**
769      * @see ResultSet#updateFloat(String, float)
770      */

771     public void updateFloat(String JavaDoc columnName, float x) throws SQLException JavaDoc {
772         real.updateFloat(columnName,x);
773     }
774
775
776     /**
777      * @see ResultSet#updateInt(String, int)
778      */

779     public void updateInt(String JavaDoc columnName, int x) throws SQLException JavaDoc {
780         real.updateInt(columnName,x);
781     }
782
783
784     /**
785      * @see ResultSet#updateLong(String, long)
786      */

787     public void updateLong(String JavaDoc columnName, long x) throws SQLException JavaDoc {
788         real.updateLong(columnName,x);
789     }
790
791
792     /**
793      * @see ResultSet#updateShort(String, short)
794      */

795     public void updateShort(String JavaDoc columnName, short x) throws SQLException JavaDoc {
796         real.updateShort(columnName,x);
797     }
798
799
800     /**
801      * @see ResultSet#updateBoolean(String, boolean)
802      */

803     public void updateBoolean(String JavaDoc columnName, boolean x) throws SQLException JavaDoc {
804         real.updateBoolean(columnName,x);
805     }
806
807
808     /**
809      * @see ResultSet#updateBytes(String, byte[])
810      */

811     public void updateBytes(String JavaDoc columnName, byte[] x) throws SQLException JavaDoc {
812         real.updateBytes(columnName,x);
813     }
814
815
816     /**
817      * @see ResultSet#getBigDecimal(int)
818      */

819     public BigDecimal JavaDoc getBigDecimal(int columnIndex) throws SQLException JavaDoc {
820         return real.getBigDecimal(columnIndex);
821     }
822
823
824     /**
825      * @see ResultSet#getBigDecimal(int, int)
826      */

827     public BigDecimal JavaDoc getBigDecimal(int columnIndex, int scale) throws SQLException JavaDoc {
828         return real.getBigDecimal(columnIndex,scale);
829     }
830
831
832     /**
833      * @see ResultSet#updateBigDecimal(int, java.math.BigDecimal)
834      */

835     public void updateBigDecimal(int columnIndex, BigDecimal JavaDoc x) throws SQLException JavaDoc {
836         real.updateBigDecimal(columnIndex,x);
837     }
838
839
840     /**
841      * @see ResultSet#getURL(int)
842      */

843     public URL JavaDoc getURL(int columnIndex) throws SQLException JavaDoc {
844         return real.getURL(columnIndex);
845     }
846
847
848     /**
849      * @see ResultSet#getArray(int)
850      */

851     public Array JavaDoc getArray(int i) throws SQLException JavaDoc {
852         return real.getArray(i);
853     }
854
855
856     /**
857      * @see ResultSet#updateArray(int, Array)
858      */

859     public void updateArray(int columnIndex, Array JavaDoc x) throws SQLException JavaDoc {
860         real.updateArray(columnIndex,x);
861     }
862
863
864     /**
865      * @see ResultSet#getBlob(int)
866      */

867     public Blob JavaDoc getBlob(int i) throws SQLException JavaDoc {
868         return real.getBlob(i);
869     }
870
871
872     /**
873      * @see ResultSet#updateBlob(int, Blob)
874      */

875     public void updateBlob(int columnIndex, Blob JavaDoc x) throws SQLException JavaDoc {
876         real.updateBlob(columnIndex,x);
877     }
878
879
880     /**
881      * @see ResultSet#getClob(int)
882      */

883     public Clob JavaDoc getClob(int i) throws SQLException JavaDoc {
884         return real.getClob(i);
885     }
886
887
888     /**
889      * @see ResultSet#updateClob(int, Clob)
890      */

891     public void updateClob(int columnIndex, Clob JavaDoc x) throws SQLException JavaDoc {
892         real.updateClob(columnIndex,x);
893     }
894
895
896     /**
897      * @see ResultSet#getDate(int)
898      */

899     public Date JavaDoc getDate(int columnIndex) throws SQLException JavaDoc {
900         return real.getDate(columnIndex);
901     }
902
903
904     /**
905      * @see ResultSet#updateDate(int, Date)
906      */

907     public void updateDate(int columnIndex, Date JavaDoc x) throws SQLException JavaDoc {
908         real.updateDate(columnIndex,x);
909     }
910
911
912     /**
913      * @see ResultSet#getRef(int)
914      */

915     public Ref JavaDoc getRef(int i) throws SQLException JavaDoc {
916         return real.getRef(i);
917     }
918
919
920     /**
921      * @see ResultSet#updateRef(int, Ref)
922      */

923     public void updateRef(int columnIndex, Ref JavaDoc x) throws SQLException JavaDoc {
924         real.updateRef(columnIndex,x);
925     }
926
927
928     /**
929      * @see ResultSet#getMetaData()
930      */

931     public ResultSetMetaData JavaDoc getMetaData() throws SQLException JavaDoc {
932         return real.getMetaData();
933     }
934
935
936     /**
937      * @see ResultSet#getWarnings()
938      */

939     public SQLWarning JavaDoc getWarnings() throws SQLException JavaDoc {
940         SQLWarning JavaDoc current, sw = real.getWarnings();
941
942
943         if ( (current = sw)!=null) {
944             do {
945                 if ( log.isInfoEnabled()) log.info(getId()+":sql warning state="+current.getSQLState()+",code="+current.getErrorCode()+",message="+current.getMessage());
946             } while ( (current = current.getNextWarning())!=null);
947         }
948
949         return sw;
950     }
951
952
953     /**
954      * @see ResultSet#getStatement()
955      */

956     public Statement JavaDoc getStatement() throws SQLException JavaDoc {
957         return statement;
958     }
959
960
961     /**
962      * @see ResultSet#getTime(int)
963      */

964     public Time JavaDoc getTime(int columnIndex) throws SQLException JavaDoc {
965         return real.getTime(columnIndex);
966     }
967
968
969     /**
970      * @see ResultSet#updateTime(int, Time)
971      */

972     public void updateTime(int columnIndex, Time JavaDoc x) throws SQLException JavaDoc {
973         real.updateTime(columnIndex,x);
974     }
975
976
977     /**
978      * @see ResultSet#getTimestamp(int)
979      */

980     public Timestamp JavaDoc getTimestamp(int columnIndex) throws SQLException JavaDoc {
981         return real.getTimestamp(columnIndex);
982     }
983
984
985     /**
986      * @see ResultSet#updateTimestamp(int, Timestamp)
987      */

988     public void updateTimestamp(int columnIndex, Timestamp JavaDoc x) throws SQLException JavaDoc {
989         real.updateTimestamp(columnIndex,x);
990     }
991
992
993     /**
994      * @see ResultSet#getAsciiStream(String)
995      */

996     public InputStream JavaDoc getAsciiStream(String JavaDoc columnName) throws SQLException JavaDoc {
997         return real.getAsciiStream(columnName);
998     }
999
1000
1001    /**
1002     * @see ResultSet#getBinaryStream(String)
1003     */

1004    public InputStream JavaDoc getBinaryStream(String JavaDoc columnName) throws SQLException JavaDoc {
1005        return real.getBinaryStream(columnName);
1006    }
1007
1008
1009    /**
1010     * @see ResultSet#getUnicodeStream(String)
1011     */

1012    public InputStream JavaDoc getUnicodeStream(String JavaDoc columnName) throws SQLException JavaDoc {
1013        return real.getUnicodeStream(columnName);
1014    }
1015
1016
1017    /**
1018     * @see ResultSet#updateAsciiStream(String, java.io.InputStream, int)
1019     */

1020    public void updateAsciiStream(String JavaDoc columnName, InputStream JavaDoc x, int length) throws SQLException JavaDoc {
1021        real.updateAsciiStream(columnName,x,length);
1022    }
1023
1024
1025    /**
1026     * @see ResultSet#updateBinaryStream(String, java.io.InputStream, int)
1027     */

1028    public void updateBinaryStream(String JavaDoc columnName, InputStream JavaDoc x, int length) throws SQLException JavaDoc {
1029        real.updateBinaryStream(columnName,x,length);
1030    }
1031
1032
1033    /**
1034     * @see ResultSet#getCharacterStream(String)
1035     */

1036    public Reader JavaDoc getCharacterStream(String JavaDoc columnName) throws SQLException JavaDoc {
1037        return real.getCharacterStream(columnName);
1038    }
1039
1040
1041    /**
1042     * @see ResultSet#updateCharacterStream(String, java.io.Reader, int)
1043     */

1044    public void updateCharacterStream(String JavaDoc columnName, Reader JavaDoc reader, int length) throws SQLException JavaDoc {
1045        real.updateCharacterStream(columnName,reader,length);
1046    }
1047
1048
1049    /**
1050     * @see ResultSet#getObject(String)
1051     */

1052    public Object JavaDoc getObject(String JavaDoc columnName) throws SQLException JavaDoc {
1053        return real.getObject(columnName);
1054    }
1055
1056
1057    /**
1058     * @see ResultSet#updateObject(String, Object)
1059     */

1060    public void updateObject(String JavaDoc columnName, Object JavaDoc x) throws SQLException JavaDoc {
1061        real.updateObject(columnName,x);
1062    }
1063
1064
1065    /**
1066     * @see ResultSet#updateObject(String, Object, int)
1067     */

1068    public void updateObject(String JavaDoc columnName, Object JavaDoc x, int scale) throws SQLException JavaDoc {
1069        real.updateObject(columnName,x,scale);
1070    }
1071
1072
1073    /**
1074     * @see ResultSet#getObject(int, Map)
1075     */

1076    public Object JavaDoc getObject(int i, Map JavaDoc map) throws SQLException JavaDoc {
1077        return real.getObject(i,map);
1078    }
1079
1080
1081    /**
1082     * @see ResultSet#getString(String)
1083     */

1084    public String JavaDoc getString(String JavaDoc columnName) throws SQLException JavaDoc {
1085        return real.getString(columnName);
1086    }
1087
1088
1089    /**
1090     * @see ResultSet#updateString(String, String)
1091     */

1092    public void updateString(String JavaDoc columnName, String JavaDoc x) throws SQLException JavaDoc {
1093        real.updateString(columnName,x);
1094    }
1095
1096
1097    /**
1098     * @see ResultSet#getBigDecimal(String)
1099     */

1100    public BigDecimal JavaDoc getBigDecimal(String JavaDoc columnName) throws SQLException JavaDoc {
1101        return real.getBigDecimal(columnName);
1102    }
1103
1104
1105    /**
1106     * @see ResultSet#getBigDecimal(String, int)
1107     */

1108    public BigDecimal JavaDoc getBigDecimal(String JavaDoc columnName, int scale) throws SQLException JavaDoc {
1109        return real.getBigDecimal(columnName,scale);
1110    }
1111
1112
1113    /**
1114     * @see ResultSet#updateBigDecimal(String, java.math.BigDecimal)
1115     */

1116    public void updateBigDecimal(String JavaDoc columnName, BigDecimal JavaDoc x) throws SQLException JavaDoc {
1117        real.updateBigDecimal(columnName,x);
1118    }
1119
1120
1121    /**
1122     * @see ResultSet#getURL(String)
1123     */

1124    public URL JavaDoc getURL(String JavaDoc columnName) throws SQLException JavaDoc {
1125        return real.getURL(columnName);
1126    }
1127
1128
1129    /**
1130     * @see ResultSet#getArray(String)
1131     */

1132    public Array JavaDoc getArray(String JavaDoc colName) throws SQLException JavaDoc {
1133        return real.getArray(colName);
1134    }
1135
1136
1137    /**
1138     * @see ResultSet#updateArray(String, Array)
1139     */

1140    public void updateArray(String JavaDoc columnName, Array JavaDoc x) throws SQLException JavaDoc {
1141        real.updateArray(columnName,x);
1142    }
1143
1144
1145    /**
1146     * @see ResultSet#getBlob(String)
1147     */

1148    public Blob JavaDoc getBlob(String JavaDoc colName) throws SQLException JavaDoc {
1149        return real.getBlob(colName);
1150    }
1151
1152
1153    /**
1154     * @see ResultSet#updateBlob(String, Blob)
1155     */

1156    public void updateBlob(String JavaDoc columnName, Blob JavaDoc x) throws SQLException JavaDoc {
1157        real.updateBlob(columnName,x);
1158    }
1159
1160
1161    /**
1162     * @see ResultSet#getClob(String)
1163     */

1164    public Clob JavaDoc getClob(String JavaDoc colName) throws SQLException JavaDoc {
1165        return real.getClob(colName);
1166    }
1167
1168
1169    /**
1170     * @see ResultSet#updateClob(String, Clob)
1171     */

1172    public void updateClob(String JavaDoc columnName, Clob JavaDoc x) throws SQLException JavaDoc {
1173        real.updateClob(columnName,x);
1174    }
1175
1176
1177    /**
1178     * @see ResultSet#getDate(String)
1179     */

1180    public Date JavaDoc getDate(String JavaDoc columnName) throws SQLException JavaDoc {
1181        return real.getDate(columnName);
1182    }
1183
1184
1185    /**
1186     * @see ResultSet#updateDate(String, Date)
1187     */

1188    public void updateDate(String JavaDoc columnName, Date JavaDoc x) throws SQLException JavaDoc {
1189        real.updateDate(columnName,x);
1190    }
1191
1192
1193    /**
1194     * @see ResultSet#getDate(int, Calendar)
1195     */

1196    public Date JavaDoc getDate(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc {
1197        return real.getDate(columnIndex,cal);
1198    }
1199
1200
1201    /**
1202     * @see ResultSet#getRef(String)
1203     */

1204    public Ref JavaDoc getRef(String JavaDoc colName) throws SQLException JavaDoc {
1205        return real.getRef(colName);
1206    }
1207
1208
1209    /**
1210     * @see ResultSet#updateRef(String, Ref)
1211     */

1212    public void updateRef(String JavaDoc columnName, Ref JavaDoc x) throws SQLException JavaDoc {
1213        real.updateRef(columnName,x);
1214    }
1215
1216
1217    /**
1218     * @see ResultSet#getTime(String)
1219     */

1220    public Time JavaDoc getTime(String JavaDoc columnName) throws SQLException JavaDoc {
1221        return real.getTime(columnName);
1222    }
1223
1224
1225    /**
1226     * @see ResultSet#updateTime(String, Time)
1227     */

1228    public void updateTime(String JavaDoc columnName, Time JavaDoc x) throws SQLException JavaDoc {
1229        real.updateTime(columnName,x);
1230    }
1231
1232
1233    /**
1234     * @see ResultSet#getTime(int, Calendar)
1235     */

1236    public Time JavaDoc getTime(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc {
1237        return real.getTime(columnIndex,cal);
1238    }
1239
1240
1241    /**
1242     * @see ResultSet#getTimestamp(String)
1243     */

1244    public Timestamp JavaDoc getTimestamp(String JavaDoc columnName) throws SQLException JavaDoc {
1245        return real.getTimestamp(columnName);
1246    }
1247
1248
1249    /**
1250     * @see ResultSet#updateTimestamp(String, Timestamp)
1251     */

1252    public void updateTimestamp(String JavaDoc columnName, Timestamp JavaDoc x) throws SQLException JavaDoc {
1253        real.updateTimestamp(columnName,x);
1254    }
1255
1256
1257    /**
1258     * @see ResultSet#getTimestamp(int, Calendar)
1259     */

1260    public Timestamp JavaDoc getTimestamp(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc {
1261        return real.getTimestamp(columnIndex,cal);
1262    }
1263
1264
1265    /**
1266     * @see ResultSet#getObject(String, Map)
1267     */

1268    public Object JavaDoc getObject(String JavaDoc colName, Map JavaDoc map) throws SQLException JavaDoc {
1269        return real.getObject(colName,map);
1270    }
1271
1272
1273    /**
1274     * @see ResultSet#getDate(String, Calendar)
1275     */

1276    public Date JavaDoc getDate(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc {
1277        return real.getDate(columnName,cal);
1278    }
1279
1280
1281    /**
1282     * @see ResultSet#getTime(String, Calendar)
1283     */

1284    public Time JavaDoc getTime(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc {
1285        return real.getTime(columnName,cal);
1286    }
1287
1288
1289    /**
1290     * @see ResultSet#getTimestamp(String, Calendar)
1291     */

1292    public Timestamp JavaDoc getTimestamp(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc {
1293        return real.getTimestamp(columnName,cal);
1294    }
1295}
1296
Popular Tags