001    /**
002     * Copyright 2007-2008 Arthur Blake
003     *
004     * Licensed under the Apache License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     *    http://www.apache.org/licenses/LICENSE-2.0
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package net.sf.log4jdbc;
017    
018    import java.io.InputStream;
019    import java.io.Reader;
020    import java.math.BigDecimal;
021    import java.net.URL;
022    import java.sql.Array;
023    import java.sql.Blob;
024    import java.sql.Clob;
025    import java.sql.Date;
026    import java.sql.Ref;
027    import java.sql.ResultSet;
028    import java.sql.ResultSetMetaData;
029    import java.sql.SQLException;
030    import java.sql.SQLWarning;
031    import java.sql.Statement;
032    import java.sql.Time;
033    import java.sql.Timestamp;
034    import java.util.Calendar;
035    import java.util.Map;
036    
037    /**
038     * Wraps a ResultSet and reports method calls, returns and exceptions.
039     *
040     * @author Arthur Blake
041     */
042    public class ResultSetSpy implements ResultSet, Spy
043    {
044      private final SpyLogDelegator log;
045    
046      /**
047       * Report an exception to be logged.
048       *
049       * @param methodCall description of method call and arguments passed to it that generated the exception.
050       * @param exception exception that was generated
051       */
052      protected void reportException(String methodCall, SQLException exception)
053      {
054        log.exceptionOccured(this, methodCall, exception, null, -1L);
055      }
056    
057      /**
058       * Report (for logging) that a method returned.  All the other reportReturn methods are conveniance methods that call
059       * this method.
060       *
061       * @param methodCall description of method call and arguments passed to it that returned.
062       * @param msg description of what the return value that was returned.  may be an empty String for void return types.
063       */
064      protected void reportAllReturns(String methodCall, String msg)
065      {
066        log.methodReturned(this, methodCall, msg);
067      }
068    
069      private ResultSet realResultSet;
070      private StatementSpy parent;
071    
072      /**
073       * Create a new ResultSetSpy that wraps another ResultSet object, that logs all method calls, expceptions, etc.
074       *
075       * @param parent Statement that generated this ResultSet.
076       * @param realResultSet real underlying ResultSet that is being wrapped.
077       */
078      public ResultSetSpy(StatementSpy parent, ResultSet realResultSet)
079      {
080        if (realResultSet == null)
081        {
082          throw new IllegalArgumentException("Must provide a non null real ResultSet");
083        }
084        this.realResultSet = realResultSet;
085        this.parent = parent;
086        log = SpyLogFactory.getSpyLogDelegator();
087      }
088    
089      /**
090       * Description for ResultSet class type.
091       */
092      public static final String classTypeDescription = "ResultSet";
093    
094      public String getClassType()
095      {
096        return classTypeDescription;
097      }
098    
099      public int getConnectionNumber()
100      {
101        return parent.getConnectionNumber();
102      }
103    
104      /**
105       * Conveniance method to report (for logging) that a method returned a boolean value.
106       *
107       * @param methodCall description of method call and arguments passed to it that returned.
108       * @param value boolean return value.
109       * @return the boolean return value as passed in.
110       */
111      protected boolean reportReturn(String methodCall, boolean value)
112      {
113        reportAllReturns(methodCall, "" + value);
114        return value;
115      }
116    
117      /**
118       * Conveniance method to report (for logging) that a method returned a byte value.
119       *
120       * @param methodCall description of method call and arguments passed to it that returned.
121       * @param value byte return value.
122       * @return the byte return value as passed in.
123       */
124      protected byte reportReturn(String methodCall, byte value)
125      {
126        reportAllReturns(methodCall, "" + value);
127        return value;
128      }
129    
130      /**
131       * Conveniance method to report (for logging) that a method returned a int value.
132       *
133       * @param methodCall description of method call and arguments passed to it that returned.
134       * @param value int return value.
135       * @return the int return value as passed in.
136       */
137      protected int reportReturn(String methodCall, int value)
138      {
139        reportAllReturns(methodCall, "" + value);
140        return value;
141      }
142    
143      /**
144       * Conveniance method to report (for logging) that a method returned a double value.
145       *
146       * @param methodCall description of method call and arguments passed to it that returned.
147       * @param value double return value.
148       * @return the double return value as passed in.
149       */
150      protected double reportReturn(String methodCall, double value)
151      {
152        reportAllReturns(methodCall, "" + value);
153        return value;
154      }
155    
156      /**
157       * Conveniance method to report (for logging) that a method returned a short value.
158       *
159       * @param methodCall description of method call and arguments passed to it that returned.
160       * @param value short return value.
161       * @return the short return value as passed in.
162       */
163      protected short reportReturn(String methodCall, short value)
164      {
165        reportAllReturns(methodCall, "" + value);
166        return value;
167      }
168    
169      /**
170       * Conveniance method to report (for logging) that a method returned a long value.
171       *
172       * @param methodCall description of method call and arguments passed to it that returned.
173       * @param value long return value.
174       * @return the long return value as passed in.
175       */
176      protected long reportReturn(String methodCall, long value)
177      {
178        reportAllReturns(methodCall, "" + value);
179        return value;
180      }
181    
182      /**
183       * Conveniance method to report (for logging) that a method returned a float value.
184       *
185       * @param methodCall description of method call and arguments passed to it that returned.
186       * @param value float return value.
187       * @return the float return value as passed in.
188       */
189      protected float reportReturn(String methodCall, float value)
190      {
191        reportAllReturns(methodCall, "" + value);
192        return value;
193      }
194    
195      /**
196       * Conveniance method to report (for logging) that a method returned an Object.
197       *
198       * @param methodCall description of method call and arguments passed to it that returned.
199       * @param value return Object.
200       * @return the return Object as passed in.
201       */
202      protected Object reportReturn(String methodCall, Object value)
203      {
204        reportAllReturns(methodCall, "" + value);
205        return value;
206      }
207    
208      /**
209       * Conveniance method to report (for logging) that a method returned (void return type).
210       *
211       * @param methodCall description of method call and arguments passed to it that returned.
212       */
213      protected void reportReturn(String methodCall)
214      {
215        reportAllReturns(methodCall, "");
216      }
217    
218      // forwarding methods
219    
220      public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException
221      {
222        String methodCall = "updateAsciiStream(" + columnIndex + ", " + x + ", " + length + ")";
223        try
224        {
225          realResultSet.updateAsciiStream(columnIndex, x, length);
226        }
227        catch (SQLException s)
228        {
229          reportException(methodCall, s);
230          throw s;
231        }
232        reportReturn(methodCall);
233      }
234    
235      public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
236      {
237        String methodCall = "updateAsciiStream(" + columnName + ", " + x + ", " + length + ")";
238        try
239        {
240          realResultSet.updateAsciiStream(columnName, x, length);
241        }
242        catch (SQLException s)
243        {
244          reportException(methodCall, s);
245          throw s;
246        }
247        reportReturn(methodCall);
248      }
249    
250      public int getRow() throws SQLException
251      {
252        String methodCall = "getRow()";
253        try
254        {
255          return reportReturn(methodCall, realResultSet.getRow());
256        }
257        catch (SQLException s)
258        {
259          reportException(methodCall, s);
260          throw s;
261        }
262      }
263    
264      public void cancelRowUpdates() throws SQLException
265      {
266        String methodCall = "cancelRowUpdates()";
267        try
268        {
269          realResultSet.cancelRowUpdates();
270        }
271        catch (SQLException s)
272        {
273          reportException(methodCall, s);
274          throw s;
275        }
276        reportReturn(methodCall);
277      }
278    
279      public Time getTime(int columnIndex) throws SQLException
280      {
281        String methodCall = "getTime(" + columnIndex + ")";
282        try
283        {
284          return (Time) reportReturn(methodCall, realResultSet.getTime(columnIndex));
285        }
286        catch (SQLException s)
287        {
288          reportException(methodCall, s);
289          throw s;
290        }
291      }
292    
293      public Time getTime(String columnName) throws SQLException
294      {
295        String methodCall = "getTime(" + columnName + ")";
296        try
297        {
298          return (Time) reportReturn(methodCall, realResultSet.getTime(columnName));
299        }
300        catch (SQLException s)
301        {
302          reportException(methodCall, s);
303          throw s;
304        }
305      }
306    
307      public Time getTime(int columnIndex, Calendar cal) throws SQLException
308      {
309        String methodCall = "getTime(" + columnIndex + ", " + cal + ")";
310        try
311        {
312          return (Time) reportReturn(methodCall, realResultSet.getTime(columnIndex, cal));
313        }
314        catch (SQLException s)
315        {
316          reportException(methodCall, s);
317          throw s;
318        }
319      }
320    
321      public Time getTime(String columnName, Calendar cal) throws SQLException
322      {
323        String methodCall = "getTime(" + columnName + ", " + cal + ")";
324        try
325        {
326          return (Time) reportReturn(methodCall, realResultSet.getTime(columnName, cal));
327        }
328        catch (SQLException s)
329        {
330          reportException(methodCall, s);
331          throw s;
332        }
333      }
334    
335      public boolean absolute(int row) throws SQLException
336      {
337        String methodCall = "absolute(" + row + ")";
338        try
339        {
340          return reportReturn(methodCall, realResultSet.absolute(row));
341        }
342        catch (SQLException s)
343        {
344          reportException(methodCall, s);
345          throw s;
346        }
347      }
348    
349      public Timestamp getTimestamp(int columnIndex) throws SQLException
350      {
351        String methodCall = "getTimestamp(" + columnIndex + ")";
352        try
353        {
354          return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnIndex));
355        }
356        catch (SQLException s)
357        {
358          reportException(methodCall, s);
359          throw s;
360        }
361      }
362    
363      public Timestamp getTimestamp(String columnName) throws SQLException
364      {
365        String methodCall = "getTimestamp(" + columnName + ")";
366        try
367        {
368          return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnName));
369        }
370        catch (SQLException s)
371        {
372          reportException(methodCall, s);
373          throw s;
374        }
375    
376      }
377    
378      public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
379      {
380        String methodCall = "getTimestamp(" + columnIndex + ", " + cal + ")";
381        try
382        {
383          return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnIndex, cal));
384        }
385        catch (SQLException s)
386        {
387          reportException(methodCall, s);
388          throw s;
389        }
390    
391      }
392    
393      public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
394      {
395        String methodCall = "getTimestamp(" + columnName + ", " + cal + ")";
396        try
397        {
398          return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnName, cal));
399        }
400        catch (SQLException s)
401        {
402          reportException(methodCall, s);
403          throw s;
404        }
405      }
406    
407      public void moveToInsertRow() throws SQLException
408      {
409        String methodCall = "moveToInsertRow()";
410        try
411        {
412          realResultSet.moveToInsertRow();
413        }
414        catch (SQLException s)
415        {
416          reportException(methodCall, s);
417          throw s;
418        }
419        reportReturn(methodCall);
420      }
421    
422      public boolean relative(int rows) throws SQLException
423      {
424        String methodCall = "relative(" + rows + ")";
425        try
426        {
427          return reportReturn(methodCall, realResultSet.relative(rows));
428        }
429        catch (SQLException s)
430        {
431          reportException(methodCall, s);
432          throw s;
433        }
434      }
435    
436      public boolean previous() throws SQLException
437      {
438        String methodCall = "previous()";
439        try
440        {
441          return reportReturn(methodCall, realResultSet.previous());
442        }
443        catch (SQLException s)
444        {
445          reportException(methodCall, s);
446          throw s;
447        }
448      }
449    
450      public void moveToCurrentRow() throws SQLException
451      {
452        String methodCall = "moveToCurrentRow()";
453        try
454        {
455          realResultSet.moveToCurrentRow();
456        }
457        catch (SQLException s)
458        {
459          reportException(methodCall, s);
460          throw s;
461        }
462        reportReturn(methodCall);
463      }
464    
465      public Ref getRef(int i) throws SQLException
466      {
467        String methodCall = "getRef(" + i + ")";
468        try
469        {
470          return (Ref) reportReturn(methodCall, realResultSet.getRef(i));
471        }
472        catch (SQLException s)
473        {
474          reportException(methodCall, s);
475          throw s;
476        }
477      }
478    
479      public void updateRef(int columnIndex, Ref x) throws SQLException
480      {
481        String methodCall = "updateRef(" + columnIndex + ", " + x + ")";
482        try
483        {
484          realResultSet.updateRef(columnIndex, x);
485        }
486        catch (SQLException s)
487        {
488          reportException(methodCall, s);
489          throw s;
490        }
491        reportReturn(methodCall);
492      }
493    
494      public Ref getRef(String colName) throws SQLException
495      {
496        String methodCall = "getRef(" + colName + ")";
497        try
498        {
499          return (Ref) reportReturn(methodCall, realResultSet.getRef(colName));
500        }
501        catch (SQLException s)
502        {
503          reportException(methodCall, s);
504          throw s;
505        }
506      }
507    
508      public void updateRef(String columnName, Ref x) throws SQLException
509      {
510        String methodCall = "updateRef(" + columnName + ", " + x + ")";
511        try
512        {
513          realResultSet.updateRef(columnName, x);
514        }
515        catch (SQLException s)
516        {
517          reportException(methodCall, s);
518          throw s;
519        }
520        reportReturn(methodCall);
521      }
522    
523      public Blob getBlob(int i) throws SQLException
524      {
525        String methodCall = "getBlob(" + i + ")";
526        try
527        {
528          return (Blob) reportReturn(methodCall, realResultSet.getBlob(i));
529        }
530        catch (SQLException s)
531        {
532          reportException(methodCall, s);
533          throw s;
534        }
535      }
536    
537      public void updateBlob(int columnIndex, Blob x) throws SQLException
538      {
539        String methodCall = "updateBlob(" + columnIndex + ", " + x + ")";
540        try
541        {
542          realResultSet.updateBlob(columnIndex, x);
543        }
544        catch (SQLException s)
545        {
546          reportException(methodCall, s);
547          throw s;
548        }
549        reportReturn(methodCall);
550      }
551    
552      public Blob getBlob(String colName) throws SQLException
553      {
554        String methodCall = "getBlob(" + colName + ")";
555        try
556        {
557          return (Blob) reportReturn(methodCall, realResultSet.getBlob(colName));
558        }
559        catch (SQLException s)
560        {
561          reportException(methodCall, s);
562          throw s;
563        }
564      }
565    
566      public void updateBlob(String columnName, Blob x) throws SQLException
567      {
568        String methodCall = "updateBlob(" + columnName + ", " + x + ")";
569        try
570        {
571          realResultSet.updateBlob(columnName, x);
572        }
573        catch (SQLException s)
574        {
575          reportException(methodCall, s);
576          throw s;
577        }
578        reportReturn(methodCall);
579      }
580    
581      public Clob getClob(int i) throws SQLException
582      {
583        String methodCall = "getClob(" + i + ")";
584        try
585        {
586          return (Clob) reportReturn(methodCall, realResultSet.getClob(i));
587        }
588        catch (SQLException s)
589        {
590          reportException(methodCall, s);
591          throw s;
592        }
593      }
594    
595      public void updateClob(int columnIndex, Clob x) throws SQLException
596      {
597        String methodCall = "updateClob(" + columnIndex + ", " + x + ")";
598        try
599        {
600          realResultSet.updateClob(columnIndex, x);
601        }
602        catch (SQLException s)
603        {
604          reportException(methodCall, s);
605          throw s;
606        }
607        reportReturn(methodCall);
608      }
609    
610      public Clob getClob(String colName) throws SQLException
611      {
612        String methodCall = "getClob(" + colName + ")";
613        try
614        {
615          return (Clob) reportReturn(methodCall, realResultSet.getClob(colName));
616        }
617        catch (SQLException s)
618        {
619          reportException(methodCall, s);
620          throw s;
621        }
622      }
623    
624      public void updateClob(String columnName, Clob x) throws SQLException
625      {
626        String methodCall = "updateClob(" + columnName + ", " + x + ")";
627        try
628        {
629          realResultSet.updateClob(columnName, x);
630        }
631        catch (SQLException s)
632        {
633          reportException(methodCall, s);
634          throw s;
635        }
636        reportReturn(methodCall);
637      }
638    
639      public boolean getBoolean(int columnIndex) throws SQLException
640      {
641        String methodCall = "getBoolean(" + columnIndex + ")";
642        try
643        {
644          return reportReturn(methodCall, realResultSet.getBoolean(columnIndex));
645        }
646        catch (SQLException s)
647        {
648          reportException(methodCall, s);
649          throw s;
650        }
651      }
652    
653      public boolean getBoolean(String columnName) throws SQLException
654      {
655        String methodCall = "getBoolean(" + columnName + ")";
656        try
657        {
658          return reportReturn(methodCall, realResultSet.getBoolean(columnName));
659        }
660        catch (SQLException s)
661        {
662          reportException(methodCall, s);
663          throw s;
664        }
665      }
666    
667      public Array getArray(int i) throws SQLException
668      {
669        String methodCall = "getArray(" + i + ")";
670        try
671        {
672          return (Array) reportReturn(methodCall, realResultSet.getArray(i));
673        }
674        catch (SQLException s)
675        {
676          reportException(methodCall, s);
677          throw s;
678        }
679      }
680    
681      public void updateArray(int columnIndex, Array x) throws SQLException
682      {
683        String methodCall = "updateArray(" + columnIndex + ", " + x + ")";
684        try
685        {
686          realResultSet.updateArray(columnIndex, x);
687        }
688        catch (SQLException s)
689        {
690          reportException(methodCall, s);
691          throw s;
692        }
693        reportReturn(methodCall);
694      }
695    
696      public Array getArray(String colName) throws SQLException
697      {
698        String methodCall = "getArray(" + colName + ")";
699        try
700        {
701          return (Array) reportReturn(methodCall, realResultSet.getArray(colName));
702        }
703        catch (SQLException s)
704        {
705          reportException(methodCall, s);
706          throw s;
707        }
708      }
709    
710      public void updateArray(String columnName, Array x) throws SQLException
711      {
712        String methodCall = "updateArray(" + columnName + ", " + x + ")";
713        try
714        {
715          realResultSet.updateArray(columnName, x);
716        }
717        catch (SQLException s)
718        {
719          reportException(methodCall, s);
720          throw s;
721        }
722        reportReturn(methodCall);
723      }
724    
725      public boolean isBeforeFirst() throws SQLException
726      {
727        String methodCall = "isBeforeFirst()";
728        try
729        {
730          return reportReturn(methodCall, realResultSet.isBeforeFirst());
731        }
732        catch (SQLException s)
733        {
734          reportException(methodCall, s);
735          throw s;
736        }
737      }
738    
739      public short getShort(int columnIndex) throws SQLException
740      {
741        String methodCall = "getShort(" + columnIndex + ")";
742        try
743        {
744          return reportReturn(methodCall, realResultSet.getShort(columnIndex));
745        }
746        catch (SQLException s)
747        {
748          reportException(methodCall, s);
749          throw s;
750        }
751      }
752    
753      public short getShort(String columnName) throws SQLException
754      {
755        String methodCall = "getShort(" + columnName + ")";
756        try
757        {
758          return reportReturn(methodCall, realResultSet.getShort(columnName));
759        }
760        catch (SQLException s)
761        {
762          reportException(methodCall, s);
763          throw s;
764        }
765      }
766    
767      public int getInt(int columnIndex) throws SQLException
768      {
769        String methodCall = "getInt(" + columnIndex + ")";
770        try
771        {
772          return reportReturn(methodCall, realResultSet.getInt(columnIndex));
773        }
774        catch (SQLException s)
775        {
776          reportException(methodCall, s);
777          throw s;
778        }
779      }
780    
781      public int getInt(String columnName) throws SQLException
782      {
783        String methodCall = "getInt(" + columnName + ")";
784        try
785        {
786          return reportReturn(methodCall, realResultSet.getInt(columnName));
787        }
788        catch (SQLException s)
789        {
790          reportException(methodCall, s);
791          throw s;
792        }
793      }
794    
795      public void close() throws SQLException
796      {
797        String methodCall = "close()";
798        try
799        {
800          realResultSet.close();
801        }
802        catch (SQLException s)
803        {
804          reportException(methodCall, s);
805          throw s;
806        }
807        reportReturn(methodCall);
808      }
809    
810      public ResultSetMetaData getMetaData() throws SQLException
811      {
812        String methodCall = "getMetaData()";
813        try
814        {
815          return (ResultSetMetaData) reportReturn(methodCall, realResultSet.getMetaData());
816        }
817        catch (SQLException s)
818        {
819          reportException(methodCall, s);
820          throw s;
821        }
822      }
823    
824      public int getType() throws SQLException
825      {
826        String methodCall = "getType()";
827        try
828        {
829          return reportReturn(methodCall, realResultSet.getType());
830        }
831        catch (SQLException s)
832        {
833          reportException(methodCall, s);
834          throw s;
835        }
836      }
837    
838      public double getDouble(int columnIndex) throws SQLException
839      {
840        String methodCall = "getDouble(" + columnIndex + ")";
841        try
842        {
843          return reportReturn(methodCall, realResultSet.getDouble(columnIndex));
844        }
845        catch (SQLException s)
846        {
847          reportException(methodCall, s);
848          throw s;
849        }
850      }
851    
852      public double getDouble(String columnName) throws SQLException
853      {
854        String methodCall = "getDouble(" + columnName + ")";
855        try
856        {
857          return reportReturn(methodCall, realResultSet.getDouble(columnName));
858        }
859        catch (SQLException s)
860        {
861          reportException(methodCall, s);
862          throw s;
863        }
864      }
865    
866      public void deleteRow() throws SQLException
867      {
868        String methodCall = "deleteRow()";
869        try
870        {
871          realResultSet.deleteRow();
872        }
873        catch (SQLException s)
874        {
875          reportException(methodCall, s);
876          throw s;
877        }
878        reportReturn(methodCall);
879      }
880    
881      public int getConcurrency() throws SQLException
882      {
883        String methodCall = "getConcurrency()";
884        try
885        {
886          return reportReturn(methodCall, realResultSet.getConcurrency());
887        }
888        catch (SQLException s)
889        {
890          reportException(methodCall, s);
891          throw s;
892        }
893      }
894    
895      public boolean rowUpdated() throws SQLException
896      {
897        String methodCall = "rowUpdated()";
898        try
899        {
900          return reportReturn(methodCall, realResultSet.rowUpdated());
901        }
902        catch (SQLException s)
903        {
904          reportException(methodCall, s);
905          throw s;
906        }
907      }
908    
909      public Date getDate(int columnIndex) throws SQLException
910      {
911        String methodCall = "getDate(" + columnIndex + ")";
912        try
913        {
914          return (Date) reportReturn(methodCall, realResultSet.getDate(columnIndex));
915        }
916        catch (SQLException s)
917        {
918          reportException(methodCall, s);
919          throw s;
920        }
921      }
922    
923      public Date getDate(String columnName) throws SQLException
924      {
925        String methodCall = "getDate(" + columnName + ")";
926        try
927        {
928          return (Date) reportReturn(methodCall, realResultSet.getDate(columnName));
929        }
930        catch (SQLException s)
931        {
932          reportException(methodCall, s);
933          throw s;
934        }
935      }
936    
937      public Date getDate(int columnIndex, Calendar cal) throws SQLException
938      {
939        String methodCall = "getDate(" + columnIndex + ", " + cal + ")";
940        try
941        {
942          return (Date) reportReturn(methodCall, realResultSet.getDate(columnIndex, cal));
943        }
944        catch (SQLException s)
945        {
946          reportException(methodCall, s);
947          throw s;
948        }
949    
950      }
951    
952      public Date getDate(String columnName, Calendar cal) throws SQLException
953      {
954        String methodCall = "getDate(" + columnName + ", " + cal + ")";
955        try
956        {
957          return (Date) reportReturn(methodCall, realResultSet.getDate(columnName, cal));
958        }
959        catch (SQLException s)
960        {
961          reportException(methodCall, s);
962          throw s;
963        }
964      }
965    
966      public boolean last() throws SQLException
967      {
968        String methodCall = "last()";
969        try
970        {
971          return reportReturn(methodCall, realResultSet.last());
972        }
973        catch (SQLException s)
974        {
975          reportException(methodCall, s);
976          throw s;
977        }
978      }
979    
980      public boolean rowInserted() throws SQLException
981      {
982        String methodCall = "rowInserted()";
983        try
984        {
985          return reportReturn(methodCall, realResultSet.rowInserted());
986        }
987        catch (SQLException s)
988        {
989          reportException(methodCall, s);
990          throw s;
991        }
992      }
993    
994      public boolean rowDeleted() throws SQLException
995      {
996        String methodCall = "rowDeleted()";
997        try
998        {
999          return reportReturn(methodCall, realResultSet.rowDeleted());
1000        }
1001        catch (SQLException s)
1002        {
1003          reportException(methodCall, s);
1004          throw s;
1005        }
1006      }
1007    
1008      public void updateNull(int columnIndex) throws SQLException
1009      {
1010        String methodCall = "updateNull(" + columnIndex + ")";
1011        try
1012        {
1013          realResultSet.updateNull(columnIndex);
1014        }
1015        catch (SQLException s)
1016        {
1017          reportException(methodCall, s);
1018          throw s;
1019        }
1020        reportReturn(methodCall);
1021      }
1022    
1023      public void updateNull(String columnName) throws SQLException
1024      {
1025        String methodCall = "updateNull(" + columnName + ")";
1026        try
1027        {
1028          realResultSet.updateNull(columnName);
1029        }
1030        catch (SQLException s)
1031        {
1032          reportException(methodCall, s);
1033          throw s;
1034        }
1035        reportReturn(methodCall);
1036      }
1037    
1038      public void updateShort(int columnIndex, short x) throws SQLException
1039      {
1040        String methodCall = "updateShort(" + columnIndex + ", " + x + ")";
1041        try
1042        {
1043          realResultSet.updateShort(columnIndex, x);
1044        }
1045        catch (SQLException s)
1046        {
1047          reportException(methodCall, s);
1048          throw s;
1049        }
1050        reportReturn(methodCall);
1051      }
1052    
1053      public void updateShort(String columnName, short x) throws SQLException
1054      {
1055        String methodCall = "updateShort(" + columnName + ", " + x + ")";
1056        try
1057        {
1058          realResultSet.updateShort(columnName, x);
1059        }
1060        catch (SQLException s)
1061        {
1062          reportException(methodCall, s);
1063          throw s;
1064        }
1065        reportReturn(methodCall);
1066      }
1067    
1068      public void updateBoolean(int columnIndex, boolean x) throws SQLException
1069      {
1070        String methodCall = "updateBoolean(" + columnIndex + ", " + x + ")";
1071        try
1072        {
1073          realResultSet.updateBoolean(columnIndex, x);
1074        }
1075        catch (SQLException s)
1076        {
1077          reportException(methodCall, s);
1078          throw s;
1079        }
1080        reportReturn(methodCall);
1081      }
1082    
1083      public void updateBoolean(String columnName, boolean x) throws SQLException
1084      {
1085        String methodCall = "updateBoolean(" + columnName + ", " + x + ")";
1086        try
1087        {
1088          realResultSet.updateBoolean(columnName, x);
1089        }
1090        catch (SQLException s)
1091        {
1092          reportException(methodCall, s);
1093          throw s;
1094        }
1095        reportReturn(methodCall);
1096      }
1097    
1098      public void updateByte(int columnIndex, byte x) throws SQLException
1099      {
1100        String methodCall = "updateByte(" + columnIndex + ", " + x + ")";
1101        try
1102        {
1103          realResultSet.updateByte(columnIndex, x);
1104        }
1105        catch (SQLException s)
1106        {
1107          reportException(methodCall, s);
1108          throw s;
1109        }
1110        reportReturn(methodCall);
1111      }
1112    
1113      public void updateByte(String columnName, byte x) throws SQLException
1114      {
1115        String methodCall = "updateByte(" + columnName + ", " + x + ")";
1116        try
1117        {
1118          realResultSet.updateByte(columnName, x);
1119        }
1120        catch (SQLException s)
1121        {
1122          reportException(methodCall, s);
1123          throw s;
1124        }
1125        reportReturn(methodCall);
1126      }
1127    
1128      public void updateInt(int columnIndex, int x) throws SQLException
1129      {
1130        String methodCall = "updateInt(" + columnIndex + ", " + x + ")";
1131        try
1132        {
1133          realResultSet.updateInt(columnIndex, x);
1134        }
1135        catch (SQLException s)
1136        {
1137          reportException(methodCall, s);
1138          throw s;
1139        }
1140        reportReturn(methodCall);
1141      }
1142    
1143      public void updateInt(String columnName, int x) throws SQLException
1144      {
1145        String methodCall = "updateInt(" + columnName + ", " + x + ")";
1146        try
1147        {
1148          realResultSet.updateInt(columnName, x);
1149        }
1150        catch (SQLException s)
1151        {
1152          reportException(methodCall, s);
1153          throw s;
1154        }
1155        reportReturn(methodCall);
1156      }
1157    
1158      public Object getObject(int columnIndex) throws SQLException
1159      {
1160        String methodCall = "getObject(" + columnIndex + ")";
1161        try
1162        {
1163          return reportReturn(methodCall, realResultSet.getObject(columnIndex));
1164        }
1165        catch (SQLException s)
1166        {
1167          reportException(methodCall, s);
1168          throw s;
1169        }
1170      }
1171    
1172      public Object getObject(String columnName) throws SQLException
1173      {
1174        String methodCall = "getObject(" + columnName + ")";
1175        try
1176        {
1177          return reportReturn(methodCall, realResultSet.getObject(columnName));
1178        }
1179        catch (SQLException s)
1180        {
1181          reportException(methodCall, s);
1182          throw s;
1183        }
1184      }
1185    
1186      public Object getObject(int i, Map map) throws SQLException
1187      {
1188        String methodCall = "getObject(" + i + ", " + map + ")";
1189        try
1190        {
1191          return reportReturn(methodCall, realResultSet.getObject(i, map));
1192        }
1193        catch (SQLException s)
1194        {
1195          reportException(methodCall, s);
1196          throw s;
1197        }
1198      }
1199    
1200      public Object getObject(String colName, Map map) throws SQLException
1201      {
1202        String methodCall = "getObject(" + colName + ", " + map + ")";
1203        try
1204        {
1205          return reportReturn(methodCall, realResultSet.getObject(colName, map));
1206        }
1207        catch (SQLException s)
1208        {
1209          reportException(methodCall, s);
1210          throw s;
1211        }
1212      }
1213    
1214      public boolean next() throws SQLException
1215      {
1216        String methodCall = "next()";
1217        try
1218        {
1219          return reportReturn(methodCall, realResultSet.next());
1220        }
1221        catch (SQLException s)
1222        {
1223          reportException(methodCall, s);
1224          throw s;
1225        }
1226      }
1227    
1228      public void updateLong(int columnIndex, long x) throws SQLException
1229      {
1230        String methodCall = "updateLong(" + columnIndex + ", " + x + ")";
1231        try
1232        {
1233          realResultSet.updateLong(columnIndex, x);
1234        }
1235        catch (SQLException s)
1236        {
1237          reportException(methodCall, s);
1238          throw s;
1239        }
1240        reportReturn(methodCall);
1241      }
1242    
1243      public void updateLong(String columnName, long x) throws SQLException
1244      {
1245        String methodCall = "updateLong(" + columnName + ", " + x + ")";
1246        try
1247        {
1248          realResultSet.updateLong(columnName, x);
1249        }
1250        catch (SQLException s)
1251        {
1252          reportException(methodCall, s);
1253          throw s;
1254        }
1255        reportReturn(methodCall);
1256      }
1257    
1258      public void updateFloat(int columnIndex, float x) throws SQLException
1259      {
1260        String methodCall = "updateFloat(" + columnIndex + ", " + x + ")";
1261        try
1262        {
1263          realResultSet.updateFloat(columnIndex, x);
1264        }
1265        catch (SQLException s)
1266        {
1267          reportException(methodCall, s);
1268          throw s;
1269        }
1270        reportReturn(methodCall);
1271    
1272      }
1273    
1274      public void updateFloat(String columnName, float x) throws SQLException
1275      {
1276        String methodCall = "updateFloat(" + columnName + ", " + x + ")";
1277        try
1278        {
1279          realResultSet.updateFloat(columnName, x);
1280        }
1281        catch (SQLException s)
1282        {
1283          reportException(methodCall, s);
1284          throw s;
1285        }
1286        reportReturn(methodCall);
1287      }
1288    
1289      public void updateDouble(int columnIndex, double x) throws SQLException
1290      {
1291        String methodCall = "updateDouble(" + columnIndex + ", " + x + ")";
1292        try
1293        {
1294          realResultSet.updateDouble(columnIndex, x);
1295        }
1296        catch (SQLException s)
1297        {
1298          reportException(methodCall, s);
1299          throw s;
1300        }
1301        reportReturn(methodCall);
1302      }
1303    
1304      public void updateDouble(String columnName, double x) throws SQLException
1305      {
1306        String methodCall = "updateDouble(" + columnName + ", " + x + ")";
1307        try
1308        {
1309          realResultSet.updateDouble(columnName, x);
1310        }
1311        catch (SQLException s)
1312        {
1313          reportException(methodCall, s);
1314          throw s;
1315        }
1316        reportReturn(methodCall);
1317      }
1318    
1319      public Statement getStatement() throws SQLException
1320      {
1321        String methodCall = "getStatement()";
1322        try
1323        {
1324          Statement s = realResultSet.getStatement();
1325          if (s == null)
1326          {
1327            return (Statement) reportReturn(methodCall, s);
1328          }
1329          else
1330          {
1331            return (Statement) reportReturn(methodCall, new StatementSpy(new ConnectionSpy(s.getConnection()), s));
1332          }
1333        }
1334        catch (SQLException s)
1335        {
1336          reportException(methodCall, s);
1337          throw s;
1338        }
1339      }
1340    
1341      public void updateString(int columnIndex, String x) throws SQLException
1342      {
1343        String methodCall = "updateString(" + columnIndex + ", " + x + ")";
1344        try
1345        {
1346          realResultSet.updateString(columnIndex, x);
1347        }
1348        catch (SQLException s)
1349        {
1350          reportException(methodCall, s);
1351          throw s;
1352        }
1353        reportReturn(methodCall);
1354      }
1355    
1356      public void updateString(String columnName, String x) throws SQLException
1357      {
1358        String methodCall = "updateString(" + columnName + ", " + x + ")";
1359        try
1360        {
1361          realResultSet.updateString(columnName, x);
1362        }
1363        catch (SQLException s)
1364        {
1365          reportException(methodCall, s);
1366          throw s;
1367        }
1368        reportReturn(methodCall);
1369      }
1370    
1371      public InputStream getAsciiStream(int columnIndex) throws SQLException
1372      {
1373        String methodCall = "getAsciiStream(" + columnIndex + ")";
1374        try
1375        {
1376          return (InputStream) reportReturn(methodCall, realResultSet.getAsciiStream(columnIndex));
1377        }
1378        catch (SQLException s)
1379        {
1380          reportException(methodCall, s);
1381          throw s;
1382        }
1383      }
1384    
1385      public InputStream getAsciiStream(String columnName) throws SQLException
1386      {
1387        String methodCall = "getAsciiStream(" + columnName + ")";
1388        try
1389        {
1390          return (InputStream) reportReturn(methodCall, realResultSet.getAsciiStream(columnName));
1391        }
1392        catch (SQLException s)
1393        {
1394          reportException(methodCall, s);
1395          throw s;
1396        }
1397      }
1398    
1399      public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException
1400      {
1401        String methodCall = "updateBigDecimal(" + columnIndex + ", " + x + ")";
1402        try
1403        {
1404          realResultSet.updateBigDecimal(columnIndex, x);
1405        }
1406        catch (SQLException s)
1407        {
1408          reportException(methodCall, s);
1409          throw s;
1410        }
1411        reportReturn(methodCall);
1412      }
1413    
1414      public URL getURL(int columnIndex) throws SQLException
1415      {
1416        String methodCall = "getURL(" + columnIndex + ")";
1417        try
1418        {
1419          return (URL) reportReturn(methodCall, realResultSet.getURL(columnIndex));
1420        }
1421        catch (SQLException s)
1422        {
1423          reportException(methodCall, s);
1424          throw s;
1425        }
1426      }
1427    
1428      public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
1429      {
1430        String methodCall = "updateBigDecimal(" + columnName + ", " + x + ")";
1431        try
1432        {
1433          realResultSet.updateBigDecimal(columnName, x);
1434        }
1435        catch (SQLException s)
1436        {
1437          reportException(methodCall, s);
1438          throw s;
1439        }
1440        reportReturn(methodCall);
1441      }
1442    
1443      public URL getURL(String columnName) throws SQLException
1444      {
1445        String methodCall = "getURL(" + columnName + ")";
1446        try
1447        {
1448          return (URL) reportReturn(methodCall, realResultSet.getURL(columnName));
1449        }
1450        catch (SQLException s)
1451        {
1452          reportException(methodCall, s);
1453          throw s;
1454        }
1455      }
1456    
1457      public void updateBytes(int columnIndex, byte[] x) throws SQLException
1458      {
1459        String methodCall = "updateBytes(" + columnIndex + ", " + x + ")";
1460        try
1461        {
1462          realResultSet.updateBytes(columnIndex, x);
1463        }
1464        catch (SQLException s)
1465        {
1466          reportException(methodCall, s);
1467          throw s;
1468        }
1469        reportReturn(methodCall);
1470      }
1471    
1472      public void updateBytes(String columnName, byte[] x) throws SQLException
1473      {
1474        String methodCall = "updateBytes(" + columnName + ", " + x + ")";
1475        try
1476        {
1477          realResultSet.updateBytes(columnName, x);
1478        }
1479        catch (SQLException s)
1480        {
1481          reportException(methodCall, s);
1482          throw s;
1483        }
1484        reportReturn(methodCall);
1485      }
1486    
1487      /**
1488       * @deprecated
1489       */
1490      public InputStream getUnicodeStream(int columnIndex) throws SQLException
1491      {
1492        String methodCall = "getUnicodeStream(" + columnIndex + ")";
1493        try
1494        {
1495          return (InputStream) reportReturn(methodCall, realResultSet.getUnicodeStream(columnIndex));
1496        }
1497        catch (SQLException s)
1498        {
1499          reportException(methodCall, s);
1500          throw s;
1501        }
1502      }
1503    
1504      /**
1505       * @deprecated
1506       */
1507      public InputStream getUnicodeStream(String columnName) throws SQLException
1508      {
1509        String methodCall = "getUnicodeStream(" + columnName + ")";
1510        try
1511        {
1512          return (InputStream) reportReturn(methodCall, realResultSet.getUnicodeStream(columnName));
1513        }
1514        catch (SQLException s)
1515        {
1516          reportException(methodCall, s);
1517          throw s;
1518        }
1519      }
1520    
1521      public void updateDate(int columnIndex, Date x) throws SQLException
1522      {
1523        String methodCall = "updateDate(" + columnIndex + ", " + x + ")";
1524        try
1525        {
1526          realResultSet.updateDate(columnIndex, x);
1527        }
1528        catch (SQLException s)
1529        {
1530          reportException(methodCall, s);
1531          throw s;
1532        }
1533      }
1534    
1535      public void updateDate(String columnName, Date x) throws SQLException
1536      {
1537        String methodCall = "updateDate(" + columnName + ", " + x + ")";
1538        try
1539        {
1540          realResultSet.updateDate(columnName, x);
1541        }
1542        catch (SQLException s)
1543        {
1544          reportException(methodCall, s);
1545          throw s;
1546        }
1547        reportReturn(methodCall);
1548      }
1549    
1550      public int getFetchSize() throws SQLException
1551      {
1552        String methodCall = "getFetchSize()";
1553        try
1554        {
1555          return reportReturn(methodCall, realResultSet.getFetchSize());
1556        }
1557        catch (SQLException s)
1558        {
1559          reportException(methodCall, s);
1560          throw s;
1561        }
1562      }
1563    
1564      public SQLWarning getWarnings() throws SQLException
1565      {
1566        String methodCall = "getWarnings()";
1567        try
1568        {
1569          return (SQLWarning) reportReturn(methodCall, realResultSet.getWarnings());
1570        }
1571        catch (SQLException s)
1572        {
1573          reportException(methodCall, s);
1574          throw s;
1575        }
1576      }
1577    
1578      public InputStream getBinaryStream(int columnIndex) throws SQLException
1579      {
1580        String methodCall = "getBinaryStream(" + columnIndex + ")";
1581        try
1582        {
1583          return (InputStream) reportReturn(methodCall, realResultSet.getBinaryStream(columnIndex));
1584        }
1585        catch (SQLException s)
1586        {
1587          reportException(methodCall, s);
1588          throw s;
1589        }
1590      }
1591    
1592      public InputStream getBinaryStream(String columnName) throws SQLException
1593      {
1594        String methodCall = "getBinaryStream(" + columnName + ")";
1595        try
1596        {
1597          return (InputStream) reportReturn(methodCall, realResultSet.getBinaryStream(columnName));
1598        }
1599        catch (SQLException s)
1600        {
1601          reportException(methodCall, s);
1602          throw s;
1603        }
1604      }
1605    
1606      public void clearWarnings() throws SQLException
1607      {
1608        String methodCall = "clearWarnings()";
1609        try
1610        {
1611          realResultSet.clearWarnings();
1612        }
1613        catch (SQLException s)
1614        {
1615          reportException(methodCall, s);
1616          throw s;
1617        }
1618        reportReturn(methodCall);
1619      }
1620    
1621      public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
1622      {
1623        String methodCall = "updateTimestamp(" + columnIndex + ", " + x + ")";
1624        try
1625        {
1626          realResultSet.updateTimestamp(columnIndex, x);
1627        }
1628        catch (SQLException s)
1629        {
1630          reportException(methodCall, s);
1631          throw s;
1632        }
1633        reportReturn(methodCall);
1634      }
1635    
1636      public void updateTimestamp(String columnName, Timestamp x) throws SQLException
1637      {
1638        String methodCall = "updateTimestamp(" + columnName + ", " + x + ")";
1639        try
1640        {
1641          realResultSet.updateTimestamp(columnName, x);
1642        }
1643        catch (SQLException s)
1644        {
1645          reportException(methodCall, s);
1646          throw s;
1647        }
1648        reportReturn(methodCall);
1649      }
1650    
1651      public boolean first() throws SQLException
1652      {
1653        String methodCall = "first()";
1654        try
1655        {
1656          return reportReturn(methodCall, realResultSet.first());
1657        }
1658        catch (SQLException s)
1659        {
1660          reportException(methodCall, s);
1661          throw s;
1662        }
1663      }
1664    
1665      public String getCursorName() throws SQLException
1666      {
1667        String methodCall = "getCursorName()";
1668        try
1669        {
1670          return (String) reportReturn(methodCall, realResultSet.getCursorName());
1671        }
1672        catch (SQLException s)
1673        {
1674          reportException(methodCall, s);
1675          throw s;
1676        }
1677      }
1678    
1679      public int findColumn(String columnName) throws SQLException
1680      {
1681        String methodCall = "findColumn(" + columnName + ")";
1682        try
1683        {
1684          return reportReturn(methodCall, realResultSet.findColumn(columnName));
1685        }
1686        catch (SQLException s)
1687        {
1688          reportException(methodCall, s);
1689          throw s;
1690        }
1691      }
1692    
1693      public boolean wasNull() throws SQLException
1694      {
1695        String methodCall = "wasNull()";
1696        try
1697        {
1698          return reportReturn(methodCall, realResultSet.wasNull());
1699        }
1700        catch (SQLException s)
1701        {
1702          reportException(methodCall, s);
1703          throw s;
1704        }
1705      }
1706    
1707      public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException
1708      {
1709        String methodCall = "updateBinaryStream(" + columnIndex + ", " + x + ", " + length + ")";
1710        try
1711        {
1712          realResultSet.updateBinaryStream(columnIndex, x, length);
1713        }
1714        catch (SQLException s)
1715        {
1716          reportException(methodCall, s);
1717          throw s;
1718        }
1719        reportReturn(methodCall);
1720      }
1721    
1722      public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
1723      {
1724        String methodCall = "updateBinaryStream(" + columnName + ", " + x + ", " + length + ")";
1725        try
1726        {
1727          realResultSet.updateBinaryStream(columnName, x, length);
1728        }
1729        catch (SQLException s)
1730        {
1731          reportException(methodCall, s);
1732          throw s;
1733        }
1734        reportReturn(methodCall);
1735      }
1736    
1737      public String getString(int columnIndex) throws SQLException
1738      {
1739        String methodCall = "getString(" + columnIndex + ")";
1740        try
1741        {
1742          return (String) reportReturn(methodCall, realResultSet.getString(columnIndex));
1743        }
1744        catch (SQLException s)
1745        {
1746          reportException(methodCall, s);
1747          throw s;
1748        }
1749      }
1750    
1751      public String getString(String columnName) throws SQLException
1752      {
1753        String methodCall = "getString(" + columnName + ")";
1754        try
1755        {
1756          return (String) reportReturn(methodCall, realResultSet.getString(columnName));
1757        }
1758        catch (SQLException s)
1759        {
1760          reportException(methodCall, s);
1761          throw s;
1762        }
1763      }
1764    
1765      public Reader getCharacterStream(int columnIndex) throws SQLException
1766      {
1767        String methodCall = "getCharacterStream(" + columnIndex + ")";
1768        try
1769        {
1770          return (Reader) reportReturn(methodCall, realResultSet.getCharacterStream(columnIndex));
1771        }
1772        catch (SQLException s)
1773        {
1774          reportException(methodCall, s);
1775          throw s;
1776        }
1777      }
1778    
1779      public Reader getCharacterStream(String columnName) throws SQLException
1780      {
1781        String methodCall = "getCharacterStream(" + columnName + ")";
1782        try
1783        {
1784          return (Reader) reportReturn(methodCall, realResultSet.getCharacterStream(columnName));
1785        }
1786        catch (SQLException s)
1787        {
1788          reportException(methodCall, s);
1789          throw s;
1790        }
1791      }
1792    
1793      public void setFetchDirection(int direction) throws SQLException
1794      {
1795        String methodCall = "setFetchDirection(" + direction + ")";
1796        try
1797        {
1798          realResultSet.setFetchDirection(direction);
1799        }
1800        catch (SQLException s)
1801        {
1802          reportException(methodCall, s);
1803          throw s;
1804        }
1805        reportReturn(methodCall);
1806      }
1807    
1808      public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException
1809      {
1810        String methodCall = "updateCharacterStream(" + columnIndex + ", " + x + ", " + length + ")";
1811        try
1812        {
1813          realResultSet.updateCharacterStream(columnIndex, x, length);
1814        }
1815        catch (SQLException s)
1816        {
1817          reportException(methodCall, s);
1818          throw s;
1819        }
1820        reportReturn(methodCall);
1821      }
1822    
1823      public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException
1824      {
1825        String methodCall = "updateCharacterStream(" + columnName + ", " + reader + ", " + length + ")";
1826        try
1827        {
1828          realResultSet.updateCharacterStream(columnName, reader, length);
1829        }
1830        catch (SQLException s)
1831        {
1832          reportException(methodCall, s);
1833          throw s;
1834        }
1835        reportReturn(methodCall);
1836      }
1837    
1838      public byte getByte(int columnIndex) throws SQLException
1839      {
1840        String methodCall = "getByte(" + columnIndex + ")";
1841        try
1842        {
1843          return reportReturn(methodCall, realResultSet.getByte(columnIndex));
1844        }
1845        catch (SQLException s)
1846        {
1847          reportException(methodCall, s);
1848          throw s;
1849        }
1850      }
1851    
1852      public byte getByte(String columnName) throws SQLException
1853      {
1854        String methodCall = "getByte(" + columnName + ")";
1855        try
1856        {
1857          return reportReturn(methodCall, realResultSet.getByte(columnName));
1858        }
1859        catch (SQLException s)
1860        {
1861          reportException(methodCall, s);
1862          throw s;
1863        }
1864      }
1865    
1866      public void updateTime(int columnIndex, Time x) throws SQLException
1867      {
1868        String methodCall = "updateTime(" + columnIndex + ", " + x + ")";
1869        try
1870        {
1871          realResultSet.updateTime(columnIndex, x);
1872        }
1873        catch (SQLException s)
1874        {
1875          reportException(methodCall, s);
1876          throw s;
1877        }
1878        reportReturn(methodCall);
1879      }
1880    
1881      public void updateTime(String columnName, Time x) throws SQLException
1882      {
1883        String methodCall = "updateTime(" + columnName + ", " + x + ")";
1884        try
1885        {
1886          realResultSet.updateTime(columnName, x);
1887        }
1888        catch (SQLException s)
1889        {
1890          reportException(methodCall, s);
1891          throw s;
1892        }
1893        reportReturn(methodCall);
1894      }
1895    
1896      public byte[] getBytes(int columnIndex) throws SQLException
1897      {
1898        String methodCall = "getBytes(" + columnIndex + ")";
1899        try
1900        {
1901          return (byte[]) reportReturn(methodCall, realResultSet.getBytes(columnIndex));
1902        }
1903        catch (SQLException s)
1904        {
1905          reportException(methodCall, s);
1906          throw s;
1907        }
1908      }
1909    
1910      public byte[] getBytes(String columnName) throws SQLException
1911      {
1912        String methodCall = "getBytes(" + columnName + ")";
1913        try
1914        {
1915          return (byte[]) reportReturn(methodCall, realResultSet.getBytes(columnName));
1916        }
1917        catch (SQLException s)
1918        {
1919          reportException(methodCall, s);
1920          throw s;
1921        }
1922      }
1923    
1924      public boolean isAfterLast() throws SQLException
1925      {
1926        String methodCall = "isAfterLast()";
1927        try
1928        {
1929          return reportReturn(methodCall, realResultSet.isAfterLast());
1930        }
1931        catch (SQLException s)
1932        {
1933          reportException(methodCall, s);
1934          throw s;
1935        }
1936      }
1937    
1938      public void updateObject(int columnIndex, Object x, int scale) throws SQLException
1939      {
1940        String methodCall = "updateObject(" + columnIndex + ", " + x + ", " + scale + ")";
1941        try
1942        {
1943          realResultSet.updateObject(columnIndex, x, scale);
1944        }
1945        catch (SQLException s)
1946        {
1947          reportException(methodCall, s);
1948          throw s;
1949        }
1950        reportReturn(methodCall);
1951      }
1952    
1953      public void updateObject(int columnIndex, Object x) throws SQLException
1954      {
1955        String methodCall = "updateObject(" + columnIndex + ", " + x + ")";
1956        try
1957        {
1958          realResultSet.updateObject(columnIndex, x);
1959        }
1960        catch (SQLException s)
1961        {
1962          reportException(methodCall, s);
1963          throw s;
1964        }
1965        reportReturn(methodCall);
1966      }
1967    
1968      public void updateObject(String columnName, Object x, int scale) throws SQLException
1969      {
1970        String methodCall = "updateObject(" + columnName + ", " + x + ", " + scale + ")";
1971        try
1972        {
1973          realResultSet.updateObject(columnName, x, scale);
1974        }
1975        catch (SQLException s)
1976        {
1977          reportException(methodCall, s);
1978          throw s;
1979        }
1980        reportReturn(methodCall);
1981      }
1982    
1983      public void updateObject(String columnName, Object x) throws SQLException
1984      {
1985        String methodCall = "updateObject(" + columnName + ", " + x + ")";
1986        try
1987        {
1988          realResultSet.updateObject(columnName, x);
1989        }
1990        catch (SQLException s)
1991        {
1992          reportException(methodCall, s);
1993          throw s;
1994        }
1995        reportReturn(methodCall);
1996      }
1997    
1998      public int getFetchDirection() throws SQLException
1999      {
2000        String methodCall = "getFetchDirection()";
2001        try
2002        {
2003          return reportReturn(methodCall, realResultSet.getFetchDirection());
2004        }
2005        catch (SQLException s)
2006        {
2007          reportException(methodCall, s);
2008          throw s;
2009        }
2010      }
2011    
2012      public long getLong(int columnIndex) throws SQLException
2013      {
2014        String methodCall = "getLong(" + columnIndex + ")";
2015        try
2016        {
2017          return reportReturn(methodCall, realResultSet.getLong(columnIndex));
2018        }
2019        catch (SQLException s)
2020        {
2021          reportException(methodCall, s);
2022          throw s;
2023        }
2024      }
2025    
2026      public long getLong(String columnName) throws SQLException
2027      {
2028        String methodCall = "getLong(" + columnName + ")";
2029        try
2030        {
2031          return reportReturn(methodCall, realResultSet.getLong(columnName));
2032        }
2033        catch (SQLException s)
2034        {
2035          reportException(methodCall, s);
2036          throw s;
2037        }
2038      }
2039    
2040      public boolean isFirst() throws SQLException
2041      {
2042        String methodCall = "isFirst()";
2043        try
2044        {
2045          return reportReturn(methodCall, realResultSet.isFirst());
2046        }
2047        catch (SQLException s)
2048        {
2049          reportException(methodCall, s);
2050          throw s;
2051        }
2052      }
2053    
2054      public void insertRow() throws SQLException
2055      {
2056        String methodCall = "insertRow()";
2057        try
2058        {
2059          realResultSet.insertRow();
2060        }
2061        catch (SQLException s)
2062        {
2063          reportException(methodCall, s);
2064          throw s;
2065        }
2066      }
2067    
2068      public float getFloat(int columnIndex) throws SQLException
2069      {
2070        String methodCall = "getFloat(" + columnIndex + ")";
2071        try
2072        {
2073          return reportReturn(methodCall, realResultSet.getFloat(columnIndex));
2074        }
2075        catch (SQLException s)
2076        {
2077          reportException(methodCall, s);
2078          throw s;
2079        }
2080      }
2081    
2082      public float getFloat(String columnName) throws SQLException
2083      {
2084        String methodCall = "getFloat(" + columnName + ")";
2085        try
2086        {
2087          return reportReturn(methodCall, realResultSet.getFloat(columnName));
2088        }
2089        catch (SQLException s)
2090        {
2091          reportException(methodCall, s);
2092          throw s;
2093        }
2094      }
2095    
2096      public boolean isLast() throws SQLException
2097      {
2098        String methodCall = "isLast()";
2099        try
2100        {
2101          return reportReturn(methodCall, realResultSet.isLast());
2102        }
2103        catch (SQLException s)
2104        {
2105          reportException(methodCall, s);
2106          throw s;
2107        }
2108      }
2109    
2110      public void setFetchSize(int rows) throws SQLException
2111      {
2112        String methodCall = "setFetchSize(" + rows + ")";
2113        try
2114        {
2115          realResultSet.setFetchSize(rows);
2116        }
2117        catch (SQLException s)
2118        {
2119          reportException(methodCall, s);
2120          throw s;
2121        }
2122        reportReturn(methodCall);
2123      }
2124    
2125      public void updateRow() throws SQLException
2126      {
2127        String methodCall = "updateRow()";
2128        try
2129        {
2130          realResultSet.updateRow();
2131        }
2132        catch (SQLException s)
2133        {
2134          reportException(methodCall, s);
2135          throw s;
2136        }
2137        reportReturn(methodCall);
2138      }
2139    
2140      public void beforeFirst() throws SQLException
2141      {
2142        String methodCall = "beforeFirst()";
2143        try
2144        {
2145          realResultSet.beforeFirst();
2146        }
2147        catch (SQLException s)
2148        {
2149          reportException(methodCall, s);
2150          throw s;
2151        }
2152        reportReturn(methodCall);
2153      }
2154    
2155      /**
2156       * @deprecated
2157       */
2158      public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
2159      {
2160        String methodCall = "getBigDecimal(" + columnIndex + ", " + scale + ")";
2161        try
2162        {
2163          return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnIndex, scale));
2164        }
2165        catch (SQLException s)
2166        {
2167          reportException(methodCall, s);
2168          throw s;
2169        }
2170      }
2171    
2172      /**
2173       * @deprecated
2174       */
2175      public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
2176      {
2177        String methodCall = "getBigDecimal(" + columnName + ", " + scale + ")";
2178        try
2179        {
2180          return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnName, scale));
2181        }
2182        catch (SQLException s)
2183        {
2184          reportException(methodCall, s);
2185          throw s;
2186        }
2187      }
2188    
2189      public BigDecimal getBigDecimal(int columnIndex) throws SQLException
2190      {
2191        String methodCall = "getBigDecimal(" + columnIndex + ")";
2192        try
2193        {
2194          return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnIndex));
2195        }
2196        catch (SQLException s)
2197        {
2198          reportException(methodCall, s);
2199          throw s;
2200        }
2201      }
2202    
2203      public BigDecimal getBigDecimal(String columnName) throws SQLException
2204      {
2205        String methodCall = "getBigDecimal(" + columnName + ")";
2206        try
2207        {
2208          return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnName));
2209        }
2210        catch (SQLException s)
2211        {
2212          reportException(methodCall, s);
2213          throw s;
2214        }
2215      }
2216    
2217      public void afterLast() throws SQLException
2218      {
2219        String methodCall = "afterLast()";
2220        try
2221        {
2222          realResultSet.afterLast();
2223        }
2224        catch (SQLException s)
2225        {
2226          reportException(methodCall, s);
2227          throw s;
2228        }
2229        reportReturn(methodCall);
2230      }
2231    
2232      public void refreshRow() throws SQLException
2233      {
2234        String methodCall = "refreshRow()";
2235        try
2236        {
2237          realResultSet.refreshRow();
2238        }
2239        catch (SQLException s)
2240        {
2241          reportException(methodCall, s);
2242          throw s;
2243        }
2244      }
2245    }