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.*;
023    import java.util.Calendar;
024    import java.util.Map;
025    
026    /**
027     * Wraps a ResultSet and reports method calls, returns and exceptions.
028     *
029     * JDBC 4 version.
030     *
031     * @author Arthur Blake
032     */
033    public class ResultSetSpy implements ResultSet, Spy
034    {
035      private final SpyLogDelegator log;
036    
037      /**
038       * Report an exception to be logged.
039       *
040       * @param methodCall description of method call and arguments passed to it that generated the exception.
041       * @param exception exception that was generated
042       */
043      protected void reportException(String methodCall, SQLException exception)
044      {
045        log.exceptionOccured(this, methodCall, exception, null, -1L);
046      }
047    
048      /**
049       * Report (for logging) that a method returned.  All the other reportReturn methods are conveniance methods that call
050       * this method.
051       *
052       * @param methodCall description of method call and arguments passed to it that returned.
053       * @param msg description of what the return value that was returned.  may be an empty String for void return types.
054       */
055      protected void reportAllReturns(String methodCall, String msg)
056      {
057        log.methodReturned(this, methodCall, msg);
058      }
059    
060      private ResultSet realResultSet;
061      private StatementSpy parent;
062    
063      /**
064       * Create a new ResultSetSpy that wraps another ResultSet object, that logs all method calls, expceptions, etc.
065       *
066       * @param parent Statement that generated this ResultSet.
067       * @param realResultSet real underlying ResultSet that is being wrapped.
068       */
069      public ResultSetSpy(StatementSpy parent, ResultSet realResultSet)
070      {
071        if (realResultSet == null)
072        {
073          throw new IllegalArgumentException("Must provide a non null real ResultSet");
074        }
075        this.realResultSet = realResultSet;
076        this.parent = parent;
077        log = SpyLogFactory.getSpyLogDelegator();
078      }
079    
080      /**
081       * Description for ResultSet class type.
082       */
083      public static final String classTypeDescription = "ResultSet";
084    
085      public String getClassType()
086      {
087        return classTypeDescription;
088      }
089    
090      public int getConnectionNumber()
091      {
092        return parent.getConnectionNumber();
093      }
094    
095      /**
096       * Conveniance method to report (for logging) that a method returned a boolean value.
097       *
098       * @param methodCall description of method call and arguments passed to it that returned.
099       * @param value boolean return value.
100       * @return the boolean return value as passed in.
101       */
102      protected boolean reportReturn(String methodCall, boolean value)
103      {
104        reportAllReturns(methodCall, "" + value);
105        return value;
106      }
107    
108      /**
109       * Conveniance method to report (for logging) that a method returned a byte value.
110       *
111       * @param methodCall description of method call and arguments passed to it that returned.
112       * @param value byte return value.
113       * @return the byte return value as passed in.
114       */
115      protected byte reportReturn(String methodCall, byte value)
116      {
117        reportAllReturns(methodCall, "" + value);
118        return value;
119      }
120    
121      /**
122       * Conveniance method to report (for logging) that a method returned a int value.
123       *
124       * @param methodCall description of method call and arguments passed to it that returned.
125       * @param value int return value.
126       * @return the int return value as passed in.
127       */
128      protected int reportReturn(String methodCall, int value)
129      {
130        reportAllReturns(methodCall, "" + value);
131        return value;
132      }
133    
134      /**
135       * Conveniance method to report (for logging) that a method returned a double value.
136       *
137       * @param methodCall description of method call and arguments passed to it that returned.
138       * @param value double return value.
139       * @return the double return value as passed in.
140       */
141      protected double reportReturn(String methodCall, double value)
142      {
143        reportAllReturns(methodCall, "" + value);
144        return value;
145      }
146    
147      /**
148       * Conveniance method to report (for logging) that a method returned a short value.
149       *
150       * @param methodCall description of method call and arguments passed to it that returned.
151       * @param value short return value.
152       * @return the short return value as passed in.
153       */
154      protected short reportReturn(String methodCall, short value)
155      {
156        reportAllReturns(methodCall, "" + value);
157        return value;
158      }
159    
160      /**
161       * Conveniance method to report (for logging) that a method returned a long value.
162       *
163       * @param methodCall description of method call and arguments passed to it that returned.
164       * @param value long return value.
165       * @return the long return value as passed in.
166       */
167      protected long reportReturn(String methodCall, long value)
168      {
169        reportAllReturns(methodCall, "" + value);
170        return value;
171      }
172    
173      /**
174       * Conveniance method to report (for logging) that a method returned a float value.
175       *
176       * @param methodCall description of method call and arguments passed to it that returned.
177       * @param value float return value.
178       * @return the float return value as passed in.
179       */
180      protected float reportReturn(String methodCall, float value)
181      {
182        reportAllReturns(methodCall, "" + value);
183        return value;
184      }
185    
186      /**
187       * Conveniance method to report (for logging) that a method returned an Object.
188       *
189       * @param methodCall description of method call and arguments passed to it that returned.
190       * @param value return Object.
191       * @return the return Object as passed in.
192       */
193      protected Object reportReturn(String methodCall, Object value)
194      {
195        reportAllReturns(methodCall, "" + value);
196        return value;
197      }
198    
199      /**
200       * Conveniance method to report (for logging) that a method returned (void return type).
201       *
202       * @param methodCall description of method call and arguments passed to it that returned.
203       */
204      protected void reportReturn(String methodCall)
205      {
206        reportAllReturns(methodCall, "");
207      }
208    
209      // forwarding methods
210    
211      public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException
212      {
213        String methodCall = "updateAsciiStream(" + columnIndex + ", " + x + ", " + length + ")";
214        try
215        {
216          realResultSet.updateAsciiStream(columnIndex, x, length);
217        }
218        catch (SQLException s)
219        {
220          reportException(methodCall, s);
221          throw s;
222        }
223        reportReturn(methodCall);
224      }
225    
226      public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
227      {
228        String methodCall = "updateAsciiStream(" + columnName + ", " + x + ", " + length + ")";
229        try
230        {
231          realResultSet.updateAsciiStream(columnName, x, length);
232        }
233        catch (SQLException s)
234        {
235          reportException(methodCall, s);
236          throw s;
237        }
238        reportReturn(methodCall);
239      }
240    
241      public int getRow() throws SQLException
242      {
243        String methodCall = "getRow()";
244        try
245        {
246          return reportReturn(methodCall, realResultSet.getRow());
247        }
248        catch (SQLException s)
249        {
250          reportException(methodCall, s);
251          throw s;
252        }
253      }
254    
255      public void cancelRowUpdates() throws SQLException
256      {
257        String methodCall = "cancelRowUpdates()";
258        try
259        {
260          realResultSet.cancelRowUpdates();
261        }
262        catch (SQLException s)
263        {
264          reportException(methodCall, s);
265          throw s;
266        }
267        reportReturn(methodCall);
268      }
269    
270      public Time getTime(int columnIndex) throws SQLException
271      {
272        String methodCall = "getTime(" + columnIndex + ")";
273        try
274        {
275          return (Time) reportReturn(methodCall, realResultSet.getTime(columnIndex));
276        }
277        catch (SQLException s)
278        {
279          reportException(methodCall, s);
280          throw s;
281        }
282      }
283    
284      public Time getTime(String columnName) throws SQLException
285      {
286        String methodCall = "getTime(" + columnName + ")";
287        try
288        {
289          return (Time) reportReturn(methodCall, realResultSet.getTime(columnName));
290        }
291        catch (SQLException s)
292        {
293          reportException(methodCall, s);
294          throw s;
295        }
296      }
297    
298      public Time getTime(int columnIndex, Calendar cal) throws SQLException
299      {
300        String methodCall = "getTime(" + columnIndex + ", " + cal + ")";
301        try
302        {
303          return (Time) reportReturn(methodCall, realResultSet.getTime(columnIndex, cal));
304        }
305        catch (SQLException s)
306        {
307          reportException(methodCall, s);
308          throw s;
309        }
310      }
311    
312      public Time getTime(String columnName, Calendar cal) throws SQLException
313      {
314        String methodCall = "getTime(" + columnName + ", " + cal + ")";
315        try
316        {
317          return (Time) reportReturn(methodCall, realResultSet.getTime(columnName, cal));
318        }
319        catch (SQLException s)
320        {
321          reportException(methodCall, s);
322          throw s;
323        }
324      }
325    
326      public boolean absolute(int row) throws SQLException
327      {
328        String methodCall = "absolute(" + row + ")";
329        try
330        {
331          return reportReturn(methodCall, realResultSet.absolute(row));
332        }
333        catch (SQLException s)
334        {
335          reportException(methodCall, s);
336          throw s;
337        }
338      }
339    
340      public Timestamp getTimestamp(int columnIndex) throws SQLException
341      {
342        String methodCall = "getTimestamp(" + columnIndex + ")";
343        try
344        {
345          return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnIndex));
346        }
347        catch (SQLException s)
348        {
349          reportException(methodCall, s);
350          throw s;
351        }
352      }
353    
354      public Timestamp getTimestamp(String columnName) throws SQLException
355      {
356        String methodCall = "getTimestamp(" + columnName + ")";
357        try
358        {
359          return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnName));
360        }
361        catch (SQLException s)
362        {
363          reportException(methodCall, s);
364          throw s;
365        }
366    
367      }
368    
369      public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
370      {
371        String methodCall = "getTimestamp(" + columnIndex + ", " + cal + ")";
372        try
373        {
374          return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnIndex, cal));
375        }
376        catch (SQLException s)
377        {
378          reportException(methodCall, s);
379          throw s;
380        }
381    
382      }
383    
384      public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
385      {
386        String methodCall = "getTimestamp(" + columnName + ", " + cal + ")";
387        try
388        {
389          return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnName, cal));
390        }
391        catch (SQLException s)
392        {
393          reportException(methodCall, s);
394          throw s;
395        }
396      }
397    
398      public void moveToInsertRow() throws SQLException
399      {
400        String methodCall = "moveToInsertRow()";
401        try
402        {
403          realResultSet.moveToInsertRow();
404        }
405        catch (SQLException s)
406        {
407          reportException(methodCall, s);
408          throw s;
409        }
410        reportReturn(methodCall);
411      }
412    
413      public boolean relative(int rows) throws SQLException
414      {
415        String methodCall = "relative(" + rows + ")";
416        try
417        {
418          return reportReturn(methodCall, realResultSet.relative(rows));
419        }
420        catch (SQLException s)
421        {
422          reportException(methodCall, s);
423          throw s;
424        }
425      }
426    
427      public boolean previous() throws SQLException
428      {
429        String methodCall = "previous()";
430        try
431        {
432          return reportReturn(methodCall, realResultSet.previous());
433        }
434        catch (SQLException s)
435        {
436          reportException(methodCall, s);
437          throw s;
438        }
439      }
440    
441      public void moveToCurrentRow() throws SQLException
442      {
443        String methodCall = "moveToCurrentRow()";
444        try
445        {
446          realResultSet.moveToCurrentRow();
447        }
448        catch (SQLException s)
449        {
450          reportException(methodCall, s);
451          throw s;
452        }
453        reportReturn(methodCall);
454      }
455    
456      public Ref getRef(int i) throws SQLException
457      {
458        String methodCall = "getRef(" + i + ")";
459        try
460        {
461          return (Ref) reportReturn(methodCall, realResultSet.getRef(i));
462        }
463        catch (SQLException s)
464        {
465          reportException(methodCall, s);
466          throw s;
467        }
468      }
469    
470      public void updateRef(int columnIndex, Ref x) throws SQLException
471      {
472        String methodCall = "updateRef(" + columnIndex + ", " + x + ")";
473        try
474        {
475          realResultSet.updateRef(columnIndex, x);
476        }
477        catch (SQLException s)
478        {
479          reportException(methodCall, s);
480          throw s;
481        }
482        reportReturn(methodCall);
483      }
484    
485      public Ref getRef(String colName) throws SQLException
486      {
487        String methodCall = "getRef(" + colName + ")";
488        try
489        {
490          return (Ref) reportReturn(methodCall, realResultSet.getRef(colName));
491        }
492        catch (SQLException s)
493        {
494          reportException(methodCall, s);
495          throw s;
496        }
497      }
498    
499      public void updateRef(String columnName, Ref x) throws SQLException
500      {
501        String methodCall = "updateRef(" + columnName + ", " + x + ")";
502        try
503        {
504          realResultSet.updateRef(columnName, x);
505        }
506        catch (SQLException s)
507        {
508          reportException(methodCall, s);
509          throw s;
510        }
511        reportReturn(methodCall);
512      }
513    
514      public Blob getBlob(int i) throws SQLException
515      {
516        String methodCall = "getBlob(" + i + ")";
517        try
518        {
519          return (Blob) reportReturn(methodCall, realResultSet.getBlob(i));
520        }
521        catch (SQLException s)
522        {
523          reportException(methodCall, s);
524          throw s;
525        }
526      }
527    
528      public void updateBlob(int columnIndex, Blob x) throws SQLException
529      {
530        String methodCall = "updateBlob(" + columnIndex + ", " + x + ")";
531        try
532        {
533          realResultSet.updateBlob(columnIndex, x);
534        }
535        catch (SQLException s)
536        {
537          reportException(methodCall, s);
538          throw s;
539        }
540        reportReturn(methodCall);
541      }
542    
543      public Blob getBlob(String colName) throws SQLException
544      {
545        String methodCall = "getBlob(" + colName + ")";
546        try
547        {
548          return (Blob) reportReturn(methodCall, realResultSet.getBlob(colName));
549        }
550        catch (SQLException s)
551        {
552          reportException(methodCall, s);
553          throw s;
554        }
555      }
556    
557      public void updateBlob(String columnName, Blob x) throws SQLException
558      {
559        String methodCall = "updateBlob(" + columnName + ", " + x + ")";
560        try
561        {
562          realResultSet.updateBlob(columnName, x);
563        }
564        catch (SQLException s)
565        {
566          reportException(methodCall, s);
567          throw s;
568        }
569        reportReturn(methodCall);
570      }
571    
572      public Clob getClob(int i) throws SQLException
573      {
574        String methodCall = "getClob(" + i + ")";
575        try
576        {
577          return (Clob) reportReturn(methodCall, realResultSet.getClob(i));
578        }
579        catch (SQLException s)
580        {
581          reportException(methodCall, s);
582          throw s;
583        }
584      }
585    
586      public void updateClob(int columnIndex, Clob x) throws SQLException
587      {
588        String methodCall = "updateClob(" + columnIndex + ", " + x + ")";
589        try
590        {
591          realResultSet.updateClob(columnIndex, x);
592        }
593        catch (SQLException s)
594        {
595          reportException(methodCall, s);
596          throw s;
597        }
598        reportReturn(methodCall);
599      }
600    
601      public Clob getClob(String colName) throws SQLException
602      {
603        String methodCall = "getClob(" + colName + ")";
604        try
605        {
606          return (Clob) reportReturn(methodCall, realResultSet.getClob(colName));
607        }
608        catch (SQLException s)
609        {
610          reportException(methodCall, s);
611          throw s;
612        }
613      }
614    
615      public void updateClob(String columnName, Clob x) throws SQLException
616      {
617        String methodCall = "updateClob(" + columnName + ", " + x + ")";
618        try
619        {
620          realResultSet.updateClob(columnName, x);
621        }
622        catch (SQLException s)
623        {
624          reportException(methodCall, s);
625          throw s;
626        }
627        reportReturn(methodCall);
628      }
629    
630      public boolean getBoolean(int columnIndex) throws SQLException
631      {
632        String methodCall = "getBoolean(" + columnIndex + ")";
633        try
634        {
635          return reportReturn(methodCall, realResultSet.getBoolean(columnIndex));
636        }
637        catch (SQLException s)
638        {
639          reportException(methodCall, s);
640          throw s;
641        }
642      }
643    
644      public boolean getBoolean(String columnName) throws SQLException
645      {
646        String methodCall = "getBoolean(" + columnName + ")";
647        try
648        {
649          return reportReturn(methodCall, realResultSet.getBoolean(columnName));
650        }
651        catch (SQLException s)
652        {
653          reportException(methodCall, s);
654          throw s;
655        }
656      }
657    
658      public Array getArray(int i) throws SQLException
659      {
660        String methodCall = "getArray(" + i + ")";
661        try
662        {
663          return (Array) reportReturn(methodCall, realResultSet.getArray(i));
664        }
665        catch (SQLException s)
666        {
667          reportException(methodCall, s);
668          throw s;
669        }
670      }
671    
672      public void updateArray(int columnIndex, Array x) throws SQLException
673      {
674        String methodCall = "updateArray(" + columnIndex + ", " + x + ")";
675        try
676        {
677          realResultSet.updateArray(columnIndex, x);
678        }
679        catch (SQLException s)
680        {
681          reportException(methodCall, s);
682          throw s;
683        }
684        reportReturn(methodCall);
685      }
686    
687      public Array getArray(String colName) throws SQLException
688      {
689        String methodCall = "getArray(" + colName + ")";
690        try
691        {
692          return (Array) reportReturn(methodCall, realResultSet.getArray(colName));
693        }
694        catch (SQLException s)
695        {
696          reportException(methodCall, s);
697          throw s;
698        }
699      }
700    
701      public void updateArray(String columnName, Array x) throws SQLException
702      {
703        String methodCall = "updateArray(" + columnName + ", " + x + ")";
704        try
705        {
706          realResultSet.updateArray(columnName, x);
707        }
708        catch (SQLException s)
709        {
710          reportException(methodCall, s);
711          throw s;
712        }
713        reportReturn(methodCall);
714      }
715    
716      public RowId getRowId(int columnIndex) throws SQLException {
717        String methodCall = "getRowId(" + columnIndex + ")";
718        try
719        {
720          return (RowId) reportReturn(methodCall, realResultSet.getRowId(columnIndex));
721        }
722        catch (SQLException s)
723        {
724          reportException(methodCall, s);
725          throw s;
726        }
727      }
728    
729      public RowId getRowId(String columnLabel) throws SQLException {
730        String methodCall = "getRowId(" + columnLabel + ")";
731        try
732        {
733          return (RowId) reportReturn(methodCall, realResultSet.getRowId(columnLabel));
734        }
735        catch (SQLException s)
736        {
737          reportException(methodCall, s);
738          throw s;
739        }
740      }
741    
742      public void updateRowId(int columnIndex, RowId x) throws SQLException {
743        String methodCall = "updateRowId(" + columnIndex + ", " + x + ")";
744        try
745        {
746          realResultSet.updateRowId(columnIndex, x);
747        }
748        catch (SQLException s)
749        {
750          reportException(methodCall, s);
751          throw s;
752        }
753        reportReturn(methodCall);
754      }
755    
756      public void updateRowId(String columnLabel, RowId x) throws SQLException {
757        String methodCall = "updateRowId(" + columnLabel + ", " + x + ")";
758        try
759        {
760          realResultSet.updateRowId(columnLabel, x);
761        }
762        catch (SQLException s)
763        {
764          reportException(methodCall, s);
765          throw s;
766        }
767        reportReturn(methodCall);
768      }
769    
770      public int getHoldability() throws SQLException {
771        String methodCall = "getHoldability()";
772        try
773        {
774          return reportReturn(methodCall, realResultSet.getHoldability());
775        }
776        catch (SQLException s)
777        {
778          reportException(methodCall, s);
779          throw s;
780        }
781      }
782    
783      public boolean isClosed() throws SQLException {
784        String methodCall = "isClosed()";
785        try
786        {
787          return reportReturn(methodCall, realResultSet.isClosed());
788        }
789        catch (SQLException s)
790        {
791          reportException(methodCall, s);
792          throw s;
793        }
794      }
795    
796      public void updateNString(int columnIndex, String nString) throws SQLException {
797        String methodCall = "updateNString(" + columnIndex + ", " + nString + ")";
798        try
799        {
800          realResultSet.updateNString(columnIndex, nString);
801        }
802        catch (SQLException s)
803        {
804          reportException(methodCall, s);
805          throw s;
806        }
807        reportReturn(methodCall);
808      }
809    
810      public void updateNString(String columnLabel, String nString) throws SQLException {
811        String methodCall = "updateNString(" + columnLabel + ", " + nString + ")";
812        try
813        {
814          realResultSet.updateNString(columnLabel, nString);
815        }
816        catch (SQLException s)
817        {
818          reportException(methodCall, s);
819          throw s;
820        }
821        reportReturn(methodCall);
822      }
823    
824      public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
825        String methodCall = "updateNClob(" + columnIndex + ", " + nClob + ")";
826        try
827        {
828          realResultSet.updateNClob(columnIndex, nClob);
829        }
830        catch (SQLException s)
831        {
832          reportException(methodCall, s);
833          throw s;
834        }
835        reportReturn(methodCall);
836      }
837    
838      public void updateNClob(String columnLabel, NClob nClob) throws SQLException {
839        String methodCall = "updateNClob(" + columnLabel + ", " + nClob + ")";
840        try
841        {
842          realResultSet.updateNClob(columnLabel, nClob);
843        }
844        catch (SQLException s)
845        {
846          reportException(methodCall, s);
847          throw s;
848        }
849        reportReturn(methodCall);
850      }
851    
852      public NClob getNClob(int columnIndex) throws SQLException {
853        String methodCall = "getNClob(" + columnIndex + ")";
854        try
855        {
856          return (NClob) reportReturn(methodCall, realResultSet.getNClob(columnIndex));
857        }
858        catch (SQLException s)
859        {
860          reportException(methodCall, s);
861          throw s;
862        }
863      }
864    
865      public NClob getNClob(String columnLabel) throws SQLException {
866        String methodCall = "getNClob(" + columnLabel + ")";
867        try
868        {
869          return (NClob) reportReturn(methodCall, realResultSet.getNClob(columnLabel));
870        }
871        catch (SQLException s)
872        {
873          reportException(methodCall, s);
874          throw s;
875        }
876      }
877    
878      public SQLXML getSQLXML(int columnIndex) throws SQLException {
879        String methodCall = "getSQLXML(" + columnIndex + ")";
880        try
881        {
882          return (SQLXML) reportReturn(methodCall, realResultSet.getSQLXML(columnIndex));
883        }
884        catch (SQLException s)
885        {
886          reportException(methodCall, s);
887          throw s;
888        }
889      }
890    
891      public SQLXML getSQLXML(String columnLabel) throws SQLException {
892        String methodCall = "getSQLXML(" + columnLabel + ")";
893        try
894        {
895          return (SQLXML) reportReturn(methodCall, realResultSet.getSQLXML(columnLabel));
896        }
897        catch (SQLException s)
898        {
899          reportException(methodCall, s);
900          throw s;
901        }
902      }
903    
904      public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
905        String methodCall = "updateSQLXML(" + columnIndex + ", " + xmlObject + ")";
906        try
907        {
908          realResultSet.updateSQLXML(columnIndex, xmlObject);
909        }
910        catch (SQLException s)
911        {
912          reportException(methodCall, s);
913          throw s;
914        }
915        reportReturn(methodCall);
916      }
917    
918      public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {
919        String methodCall = "updateSQLXML(" + columnLabel + ", " + xmlObject + ")";
920        try
921        {
922          realResultSet.updateSQLXML(columnLabel, xmlObject);
923        }
924        catch (SQLException s)
925        {
926          reportException(methodCall, s);
927          throw s;
928        }
929        reportReturn(methodCall);
930      }
931    
932      public String getNString(int columnIndex) throws SQLException {
933        String methodCall = "getNString(" + columnIndex + ")";
934        try
935        {
936          return (String) reportReturn(methodCall, realResultSet.getNString(columnIndex));
937        }
938        catch (SQLException s)
939        {
940          reportException(methodCall, s);
941          throw s;
942        }
943      }
944    
945      public String getNString(String columnLabel) throws SQLException {
946        String methodCall = "getNString(" + columnLabel + ")";
947        try
948        {
949          return (String) reportReturn(methodCall, realResultSet.getNString(columnLabel));
950        }
951        catch (SQLException s)
952        {
953          reportException(methodCall, s);
954          throw s;
955        }
956      }
957    
958      public Reader getNCharacterStream(int columnIndex) throws SQLException {
959        String methodCall = "getNCharacterStream(" + columnIndex + ")";
960        try
961        {
962          return (Reader) reportReturn(methodCall, realResultSet.getNCharacterStream(columnIndex));
963        }
964        catch (SQLException s)
965        {
966          reportException(methodCall, s);
967          throw s;
968        }
969      }
970    
971      public Reader getNCharacterStream(String columnLabel) throws SQLException {
972        String methodCall = "getNCharacterStream(" + columnLabel + ")";
973        try
974        {
975          return (Reader) reportReturn(methodCall, realResultSet.getNCharacterStream(columnLabel));
976        }
977        catch (SQLException s)
978        {
979          reportException(methodCall, s);
980          throw s;
981        }
982      }
983    
984      public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
985        String methodCall = "updateNCharacterStream(" + columnIndex + ", " + x + ", " + length + ")";
986        try
987        {
988          realResultSet.updateNCharacterStream(columnIndex, x, length);
989        }
990        catch (SQLException s)
991        {
992          reportException(methodCall, s);
993          throw s;
994        }
995        reportReturn(methodCall);
996      }
997    
998      public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
999        String methodCall = "updateNCharacterStream(" + columnLabel + ", " + reader + ", " + length + ")";
1000        try
1001        {
1002          realResultSet.updateNCharacterStream(columnLabel, reader, length);
1003        }
1004        catch (SQLException s)
1005        {
1006          reportException(methodCall, s);
1007          throw s;
1008        }
1009        reportReturn(methodCall);
1010      }
1011    
1012      public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException {
1013        String methodCall = "updateAsciiStream(" + columnIndex + ", " + x + ", " + length + ")";
1014        try
1015        {
1016          realResultSet.updateAsciiStream(columnIndex, x, length);
1017        }
1018        catch (SQLException s)
1019        {
1020          reportException(methodCall, s);
1021          throw s;
1022        }
1023        reportReturn(methodCall);
1024      }
1025    
1026      public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException {
1027        String methodCall = "updateBinaryStream(" + columnIndex + ", " + x + ", " + length + ")";
1028        try
1029        {
1030          realResultSet.updateBinaryStream(columnIndex, x, length);
1031        }
1032        catch (SQLException s)
1033        {
1034          reportException(methodCall, s);
1035          throw s;
1036        }
1037        reportReturn(methodCall);
1038      }
1039    
1040      public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
1041        String methodCall = "updateCharacterStream(" + columnIndex + ", " + x + ", " + length + ")";
1042        try
1043        {
1044          realResultSet.updateCharacterStream(columnIndex, x, length);
1045        }
1046        catch (SQLException s)
1047        {
1048          reportException(methodCall, s);
1049          throw s;
1050        }
1051        reportReturn(methodCall);
1052      }
1053    
1054      public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException {
1055        String methodCall = "updateAsciiStream(" + columnLabel + ", " + x + ", " + length + ")";
1056        try
1057        {
1058          realResultSet.updateAsciiStream(columnLabel, x, length);
1059        }
1060        catch (SQLException s)
1061        {
1062          reportException(methodCall, s);
1063          throw s;
1064        }
1065        reportReturn(methodCall);
1066      }
1067    
1068      public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException {
1069        String methodCall = "updateBinaryStream(" + columnLabel + ", " + x + ", " + length + ")";
1070        try
1071        {
1072          realResultSet.updateBinaryStream(columnLabel, x, length);
1073        }
1074        catch (SQLException s)
1075        {
1076          reportException(methodCall, s);
1077          throw s;
1078        }
1079        reportReturn(methodCall);
1080      }
1081    
1082      public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
1083        String methodCall = "updateCharacterStream(" + columnLabel + ", " + reader + ", " + length + ")";
1084        try
1085        {
1086          realResultSet.updateCharacterStream(columnLabel, reader, length);
1087        }
1088        catch (SQLException s)
1089        {
1090          reportException(methodCall, s);
1091          throw s;
1092        }
1093        reportReturn(methodCall);
1094      }
1095    
1096      public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException {
1097        String methodCall = "updateBlob(" + columnIndex + ", " + inputStream + ", " + length + ")";
1098        try
1099        {
1100          realResultSet.updateBlob(columnIndex, inputStream, length);
1101        }
1102        catch (SQLException s)
1103        {
1104          reportException(methodCall, s);
1105          throw s;
1106        }
1107        reportReturn(methodCall);
1108      }
1109    
1110      public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
1111        String methodCall = "updateBlob(" + columnLabel + ", " + inputStream + ", " + length + ")";
1112        try
1113        {
1114          realResultSet.updateBlob(columnLabel, inputStream, length);
1115        }
1116        catch (SQLException s)
1117        {
1118          reportException(methodCall, s);
1119          throw s;
1120        }
1121        reportReturn(methodCall);
1122      }
1123    
1124      public void updateClob(int columnIndex, Reader reader, long length) throws SQLException {
1125        String methodCall = "updateClob(" + columnIndex + ", " + reader + ", " + length + ")";
1126        try
1127        {
1128          realResultSet.updateClob(columnIndex, reader, length);
1129        }
1130        catch (SQLException s)
1131        {
1132          reportException(methodCall, s);
1133          throw s;
1134        }
1135        reportReturn(methodCall);
1136      }
1137    
1138      public void updateClob(String columnLabel, Reader reader, long length) throws SQLException {
1139        String methodCall = "updateClob(" + columnLabel + ", " + reader + ", " + length + ")";
1140        try
1141        {
1142          realResultSet.updateClob(columnLabel, reader, length);
1143        }
1144        catch (SQLException s)
1145        {
1146          reportException(methodCall, s);
1147          throw s;
1148        }
1149        reportReturn(methodCall);
1150      }
1151    
1152      public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException {
1153        String methodCall = "updateNClob(" + columnIndex + ", " + reader + ", " + length + ")";
1154        try
1155        {
1156          realResultSet.updateNClob(columnIndex, reader, length);
1157        }
1158        catch (SQLException s)
1159        {
1160          reportException(methodCall, s);
1161          throw s;
1162        }
1163        reportReturn(methodCall);
1164      }
1165    
1166      public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException {
1167        String methodCall = "updateNClob(" + columnLabel + ", " + reader + ", " + length + ")";
1168        try
1169        {
1170          realResultSet.updateNClob(columnLabel, reader, length);
1171        }
1172        catch (SQLException s)
1173        {
1174          reportException(methodCall, s);
1175          throw s;
1176        }
1177        reportReturn(methodCall);
1178      }
1179    
1180      public void updateNCharacterStream(int columnIndex, Reader reader) throws SQLException {
1181        String methodCall = "updateNCharacterStream(" + columnIndex + ", " + reader + ")";
1182        try
1183        {
1184          realResultSet.updateNCharacterStream(columnIndex, reader);
1185        }
1186        catch (SQLException s)
1187        {
1188          reportException(methodCall, s);
1189          throw s;
1190        }
1191        reportReturn(methodCall);
1192      }
1193    
1194      public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException {
1195        String methodCall = "updateNCharacterStream(" + columnLabel + ", " + reader + ")";
1196        try
1197        {
1198          realResultSet.updateNCharacterStream(columnLabel, reader);
1199        }
1200        catch (SQLException s)
1201        {
1202          reportException(methodCall, s);
1203          throw s;
1204        }
1205        reportReturn(methodCall);
1206      }
1207    
1208      public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException {
1209        String methodCall = "updateAsciiStream(" + columnIndex + ", " + x + ")";
1210        try
1211        {
1212          realResultSet.updateAsciiStream(columnIndex, x);
1213        }
1214        catch (SQLException s)
1215        {
1216          reportException(methodCall, s);
1217          throw s;
1218        }
1219        reportReturn(methodCall);
1220      }
1221    
1222      public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {
1223        String methodCall = "updateBinaryStream(" + columnIndex + ", " + x + ")";
1224        try
1225        {
1226          realResultSet.updateBinaryStream(columnIndex, x);
1227        }
1228        catch (SQLException s)
1229        {
1230          reportException(methodCall, s);
1231          throw s;
1232        }
1233        reportReturn(methodCall);
1234      }
1235    
1236      public void updateCharacterStream(int columnIndex, Reader x) throws SQLException {
1237        String methodCall = "updateCharacterStream(" + columnIndex + ", " + x + ")";
1238        try
1239        {
1240          realResultSet.updateCharacterStream(columnIndex, x);
1241        }
1242        catch (SQLException s)
1243        {
1244          reportException(methodCall, s);
1245          throw s;
1246        }
1247        reportReturn(methodCall);
1248      }
1249    
1250      public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException {
1251        String methodCall = "updateAsciiStream(" + columnLabel + ", " + x + ")";
1252        try
1253        {
1254          realResultSet.updateAsciiStream(columnLabel, x);
1255        }
1256        catch (SQLException s)
1257        {
1258          reportException(methodCall, s);
1259          throw s;
1260        }
1261        reportReturn(methodCall);
1262      }
1263    
1264      public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException {
1265        String methodCall = "updateBinaryStream(" + columnLabel + ", " + x + ")";
1266        try
1267        {
1268          realResultSet.updateBinaryStream(columnLabel, x);
1269        }
1270        catch (SQLException s)
1271        {
1272          reportException(methodCall, s);
1273          throw s;
1274        }
1275        reportReturn(methodCall);
1276      }
1277    
1278      public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException {
1279        String methodCall = "updateCharacterStream(" + columnLabel + ", " + reader + ")";
1280        try
1281        {
1282          realResultSet.updateCharacterStream(columnLabel, reader);
1283        }
1284        catch (SQLException s)
1285        {
1286          reportException(methodCall, s);
1287          throw s;
1288        }
1289        reportReturn(methodCall);
1290      }
1291    
1292      public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
1293        String methodCall = "updateBlob(" + columnIndex + ", " + inputStream + ")";
1294        try
1295        {
1296          realResultSet.updateBlob(columnIndex, inputStream);
1297        }
1298        catch (SQLException s)
1299        {
1300          reportException(methodCall, s);
1301          throw s;
1302        }
1303        reportReturn(methodCall);
1304      }
1305    
1306      public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
1307        String methodCall = "updateBlob(" + columnLabel + ", " + inputStream + ")";
1308        try
1309        {
1310          realResultSet.updateBlob(columnLabel, inputStream);
1311        }
1312        catch (SQLException s)
1313        {
1314          reportException(methodCall, s);
1315          throw s;
1316        }
1317        reportReturn(methodCall);
1318      }
1319    
1320      public void updateClob(int columnIndex, Reader reader) throws SQLException {
1321        String methodCall = "updateClob(" + columnIndex + ", " + reader + ")";
1322        try
1323        {
1324          realResultSet.updateClob(columnIndex, reader);
1325        }
1326        catch (SQLException s)
1327        {
1328          reportException(methodCall, s);
1329          throw s;
1330        }
1331        reportReturn(methodCall);
1332      }
1333    
1334      public void updateClob(String columnLabel, Reader reader) throws SQLException {
1335        String methodCall = "updateClob(" + columnLabel + ", " + reader + ")";
1336        try
1337        {
1338          realResultSet.updateClob(columnLabel, reader);
1339        }
1340        catch (SQLException s)
1341        {
1342          reportException(methodCall, s);
1343          throw s;
1344        }
1345        reportReturn(methodCall);
1346      }
1347    
1348      public void updateNClob(int columnIndex, Reader reader) throws SQLException {
1349        String methodCall = "updateNClob(" + columnIndex + ", " + reader + ")";
1350        try
1351        {
1352          realResultSet.updateNClob(columnIndex, reader);
1353        }
1354        catch (SQLException s)
1355        {
1356          reportException(methodCall, s);
1357          throw s;
1358        }
1359        reportReturn(methodCall);
1360      }
1361    
1362      public void updateNClob(String columnLabel, Reader reader) throws SQLException {
1363        String methodCall = "updateNClob(" + columnLabel + ", " + reader + ")";
1364        try
1365        {
1366          realResultSet.updateNClob(columnLabel, reader);
1367        }
1368        catch (SQLException s)
1369        {
1370          reportException(methodCall, s);
1371          throw s;
1372        }
1373        reportReturn(methodCall);
1374      }
1375    
1376      public boolean isBeforeFirst() throws SQLException
1377      {
1378        String methodCall = "isBeforeFirst()";
1379        try
1380        {
1381          return reportReturn(methodCall, realResultSet.isBeforeFirst());
1382        }
1383        catch (SQLException s)
1384        {
1385          reportException(methodCall, s);
1386          throw s;
1387        }
1388      }
1389    
1390      public short getShort(int columnIndex) throws SQLException
1391      {
1392        String methodCall = "getShort(" + columnIndex + ")";
1393        try
1394        {
1395          return reportReturn(methodCall, realResultSet.getShort(columnIndex));
1396        }
1397        catch (SQLException s)
1398        {
1399          reportException(methodCall, s);
1400          throw s;
1401        }
1402      }
1403    
1404      public short getShort(String columnName) throws SQLException
1405      {
1406        String methodCall = "getShort(" + columnName + ")";
1407        try
1408        {
1409          return reportReturn(methodCall, realResultSet.getShort(columnName));
1410        }
1411        catch (SQLException s)
1412        {
1413          reportException(methodCall, s);
1414          throw s;
1415        }
1416      }
1417    
1418      public int getInt(int columnIndex) throws SQLException
1419      {
1420        String methodCall = "getInt(" + columnIndex + ")";
1421        try
1422        {
1423          return reportReturn(methodCall, realResultSet.getInt(columnIndex));
1424        }
1425        catch (SQLException s)
1426        {
1427          reportException(methodCall, s);
1428          throw s;
1429        }
1430      }
1431    
1432      public int getInt(String columnName) throws SQLException
1433      {
1434        String methodCall = "getInt(" + columnName + ")";
1435        try
1436        {
1437          return reportReturn(methodCall, realResultSet.getInt(columnName));
1438        }
1439        catch (SQLException s)
1440        {
1441          reportException(methodCall, s);
1442          throw s;
1443        }
1444      }
1445    
1446      public void close() throws SQLException
1447      {
1448        String methodCall = "close()";
1449        try
1450        {
1451          realResultSet.close();
1452        }
1453        catch (SQLException s)
1454        {
1455          reportException(methodCall, s);
1456          throw s;
1457        }
1458        reportReturn(methodCall);
1459      }
1460    
1461      public ResultSetMetaData getMetaData() throws SQLException
1462      {
1463        String methodCall = "getMetaData()";
1464        try
1465        {
1466          return (ResultSetMetaData) reportReturn(methodCall, realResultSet.getMetaData());
1467        }
1468        catch (SQLException s)
1469        {
1470          reportException(methodCall, s);
1471          throw s;
1472        }
1473      }
1474    
1475      public int getType() throws SQLException
1476      {
1477        String methodCall = "getType()";
1478        try
1479        {
1480          return reportReturn(methodCall, realResultSet.getType());
1481        }
1482        catch (SQLException s)
1483        {
1484          reportException(methodCall, s);
1485          throw s;
1486        }
1487      }
1488    
1489      public double getDouble(int columnIndex) throws SQLException
1490      {
1491        String methodCall = "getDouble(" + columnIndex + ")";
1492        try
1493        {
1494          return reportReturn(methodCall, realResultSet.getDouble(columnIndex));
1495        }
1496        catch (SQLException s)
1497        {
1498          reportException(methodCall, s);
1499          throw s;
1500        }
1501      }
1502    
1503      public double getDouble(String columnName) throws SQLException
1504      {
1505        String methodCall = "getDouble(" + columnName + ")";
1506        try
1507        {
1508          return reportReturn(methodCall, realResultSet.getDouble(columnName));
1509        }
1510        catch (SQLException s)
1511        {
1512          reportException(methodCall, s);
1513          throw s;
1514        }
1515      }
1516    
1517      public void deleteRow() throws SQLException
1518      {
1519        String methodCall = "deleteRow()";
1520        try
1521        {
1522          realResultSet.deleteRow();
1523        }
1524        catch (SQLException s)
1525        {
1526          reportException(methodCall, s);
1527          throw s;
1528        }
1529        reportReturn(methodCall);
1530      }
1531    
1532      public int getConcurrency() throws SQLException
1533      {
1534        String methodCall = "getConcurrency()";
1535        try
1536        {
1537          return reportReturn(methodCall, realResultSet.getConcurrency());
1538        }
1539        catch (SQLException s)
1540        {
1541          reportException(methodCall, s);
1542          throw s;
1543        }
1544      }
1545    
1546      public boolean rowUpdated() throws SQLException
1547      {
1548        String methodCall = "rowUpdated()";
1549        try
1550        {
1551          return reportReturn(methodCall, realResultSet.rowUpdated());
1552        }
1553        catch (SQLException s)
1554        {
1555          reportException(methodCall, s);
1556          throw s;
1557        }
1558      }
1559    
1560      public Date getDate(int columnIndex) throws SQLException
1561      {
1562        String methodCall = "getDate(" + columnIndex + ")";
1563        try
1564        {
1565          return (Date) reportReturn(methodCall, realResultSet.getDate(columnIndex));
1566        }
1567        catch (SQLException s)
1568        {
1569          reportException(methodCall, s);
1570          throw s;
1571        }
1572      }
1573    
1574      public Date getDate(String columnName) throws SQLException
1575      {
1576        String methodCall = "getDate(" + columnName + ")";
1577        try
1578        {
1579          return (Date) reportReturn(methodCall, realResultSet.getDate(columnName));
1580        }
1581        catch (SQLException s)
1582        {
1583          reportException(methodCall, s);
1584          throw s;
1585        }
1586      }
1587    
1588      public Date getDate(int columnIndex, Calendar cal) throws SQLException
1589      {
1590        String methodCall = "getDate(" + columnIndex + ", " + cal + ")";
1591        try
1592        {
1593          return (Date) reportReturn(methodCall, realResultSet.getDate(columnIndex, cal));
1594        }
1595        catch (SQLException s)
1596        {
1597          reportException(methodCall, s);
1598          throw s;
1599        }
1600    
1601      }
1602    
1603      public Date getDate(String columnName, Calendar cal) throws SQLException
1604      {
1605        String methodCall = "getDate(" + columnName + ", " + cal + ")";
1606        try
1607        {
1608          return (Date) reportReturn(methodCall, realResultSet.getDate(columnName, cal));
1609        }
1610        catch (SQLException s)
1611        {
1612          reportException(methodCall, s);
1613          throw s;
1614        }
1615      }
1616    
1617      public boolean last() throws SQLException
1618      {
1619        String methodCall = "last()";
1620        try
1621        {
1622          return reportReturn(methodCall, realResultSet.last());
1623        }
1624        catch (SQLException s)
1625        {
1626          reportException(methodCall, s);
1627          throw s;
1628        }
1629      }
1630    
1631      public boolean rowInserted() throws SQLException
1632      {
1633        String methodCall = "rowInserted()";
1634        try
1635        {
1636          return reportReturn(methodCall, realResultSet.rowInserted());
1637        }
1638        catch (SQLException s)
1639        {
1640          reportException(methodCall, s);
1641          throw s;
1642        }
1643      }
1644    
1645      public boolean rowDeleted() throws SQLException
1646      {
1647        String methodCall = "rowDeleted()";
1648        try
1649        {
1650          return reportReturn(methodCall, realResultSet.rowDeleted());
1651        }
1652        catch (SQLException s)
1653        {
1654          reportException(methodCall, s);
1655          throw s;
1656        }
1657      }
1658    
1659      public void updateNull(int columnIndex) throws SQLException
1660      {
1661        String methodCall = "updateNull(" + columnIndex + ")";
1662        try
1663        {
1664          realResultSet.updateNull(columnIndex);
1665        }
1666        catch (SQLException s)
1667        {
1668          reportException(methodCall, s);
1669          throw s;
1670        }
1671        reportReturn(methodCall);
1672      }
1673    
1674      public void updateNull(String columnName) throws SQLException
1675      {
1676        String methodCall = "updateNull(" + columnName + ")";
1677        try
1678        {
1679          realResultSet.updateNull(columnName);
1680        }
1681        catch (SQLException s)
1682        {
1683          reportException(methodCall, s);
1684          throw s;
1685        }
1686        reportReturn(methodCall);
1687      }
1688    
1689      public void updateShort(int columnIndex, short x) throws SQLException
1690      {
1691        String methodCall = "updateShort(" + columnIndex + ", " + x + ")";
1692        try
1693        {
1694          realResultSet.updateShort(columnIndex, x);
1695        }
1696        catch (SQLException s)
1697        {
1698          reportException(methodCall, s);
1699          throw s;
1700        }
1701        reportReturn(methodCall);
1702      }
1703    
1704      public void updateShort(String columnName, short x) throws SQLException
1705      {
1706        String methodCall = "updateShort(" + columnName + ", " + x + ")";
1707        try
1708        {
1709          realResultSet.updateShort(columnName, x);
1710        }
1711        catch (SQLException s)
1712        {
1713          reportException(methodCall, s);
1714          throw s;
1715        }
1716        reportReturn(methodCall);
1717      }
1718    
1719      public void updateBoolean(int columnIndex, boolean x) throws SQLException
1720      {
1721        String methodCall = "updateBoolean(" + columnIndex + ", " + x + ")";
1722        try
1723        {
1724          realResultSet.updateBoolean(columnIndex, x);
1725        }
1726        catch (SQLException s)
1727        {
1728          reportException(methodCall, s);
1729          throw s;
1730        }
1731        reportReturn(methodCall);
1732      }
1733    
1734      public void updateBoolean(String columnName, boolean x) throws SQLException
1735      {
1736        String methodCall = "updateBoolean(" + columnName + ", " + x + ")";
1737        try
1738        {
1739          realResultSet.updateBoolean(columnName, x);
1740        }
1741        catch (SQLException s)
1742        {
1743          reportException(methodCall, s);
1744          throw s;
1745        }
1746        reportReturn(methodCall);
1747      }
1748    
1749      public void updateByte(int columnIndex, byte x) throws SQLException
1750      {
1751        String methodCall = "updateByte(" + columnIndex + ", " + x + ")";
1752        try
1753        {
1754          realResultSet.updateByte(columnIndex, x);
1755        }
1756        catch (SQLException s)
1757        {
1758          reportException(methodCall, s);
1759          throw s;
1760        }
1761        reportReturn(methodCall);
1762      }
1763    
1764      public void updateByte(String columnName, byte x) throws SQLException
1765      {
1766        String methodCall = "updateByte(" + columnName + ", " + x + ")";
1767        try
1768        {
1769          realResultSet.updateByte(columnName, x);
1770        }
1771        catch (SQLException s)
1772        {
1773          reportException(methodCall, s);
1774          throw s;
1775        }
1776        reportReturn(methodCall);
1777      }
1778    
1779      public void updateInt(int columnIndex, int x) throws SQLException
1780      {
1781        String methodCall = "updateInt(" + columnIndex + ", " + x + ")";
1782        try
1783        {
1784          realResultSet.updateInt(columnIndex, x);
1785        }
1786        catch (SQLException s)
1787        {
1788          reportException(methodCall, s);
1789          throw s;
1790        }
1791        reportReturn(methodCall);
1792      }
1793    
1794      public void updateInt(String columnName, int x) throws SQLException
1795      {
1796        String methodCall = "updateInt(" + columnName + ", " + x + ")";
1797        try
1798        {
1799          realResultSet.updateInt(columnName, x);
1800        }
1801        catch (SQLException s)
1802        {
1803          reportException(methodCall, s);
1804          throw s;
1805        }
1806        reportReturn(methodCall);
1807      }
1808    
1809      public Object getObject(int columnIndex) throws SQLException
1810      {
1811        String methodCall = "getObject(" + columnIndex + ")";
1812        try
1813        {
1814          return reportReturn(methodCall, realResultSet.getObject(columnIndex));
1815        }
1816        catch (SQLException s)
1817        {
1818          reportException(methodCall, s);
1819          throw s;
1820        }
1821      }
1822    
1823      public Object getObject(String columnName) throws SQLException
1824      {
1825        String methodCall = "getObject(" + columnName + ")";
1826        try
1827        {
1828          return reportReturn(methodCall, realResultSet.getObject(columnName));
1829        }
1830        catch (SQLException s)
1831        {
1832          reportException(methodCall, s);
1833          throw s;
1834        }
1835      }
1836    
1837      public Object getObject(String colName, Map map) throws SQLException
1838      {
1839        String methodCall = "getObject(" + colName + ", " + map + ")";
1840        try
1841        {
1842          return reportReturn(methodCall, realResultSet.getObject(colName, map));
1843        }
1844        catch (SQLException s)
1845        {
1846          reportException(methodCall, s);
1847          throw s;
1848        }
1849      }
1850    
1851      public boolean next() throws SQLException
1852      {
1853        String methodCall = "next()";
1854        try
1855        {
1856          return reportReturn(methodCall, realResultSet.next());
1857        }
1858        catch (SQLException s)
1859        {
1860          reportException(methodCall, s);
1861          throw s;
1862        }
1863      }
1864    
1865      public void updateLong(int columnIndex, long x) throws SQLException
1866      {
1867        String methodCall = "updateLong(" + columnIndex + ", " + x + ")";
1868        try
1869        {
1870          realResultSet.updateLong(columnIndex, x);
1871        }
1872        catch (SQLException s)
1873        {
1874          reportException(methodCall, s);
1875          throw s;
1876        }
1877        reportReturn(methodCall);
1878      }
1879    
1880      public void updateLong(String columnName, long x) throws SQLException
1881      {
1882        String methodCall = "updateLong(" + columnName + ", " + x + ")";
1883        try
1884        {
1885          realResultSet.updateLong(columnName, x);
1886        }
1887        catch (SQLException s)
1888        {
1889          reportException(methodCall, s);
1890          throw s;
1891        }
1892        reportReturn(methodCall);
1893      }
1894    
1895      public void updateFloat(int columnIndex, float x) throws SQLException
1896      {
1897        String methodCall = "updateFloat(" + columnIndex + ", " + x + ")";
1898        try
1899        {
1900          realResultSet.updateFloat(columnIndex, x);
1901        }
1902        catch (SQLException s)
1903        {
1904          reportException(methodCall, s);
1905          throw s;
1906        }
1907        reportReturn(methodCall);
1908    
1909      }
1910    
1911      public void updateFloat(String columnName, float x) throws SQLException
1912      {
1913        String methodCall = "updateFloat(" + columnName + ", " + x + ")";
1914        try
1915        {
1916          realResultSet.updateFloat(columnName, x);
1917        }
1918        catch (SQLException s)
1919        {
1920          reportException(methodCall, s);
1921          throw s;
1922        }
1923        reportReturn(methodCall);
1924      }
1925    
1926      public void updateDouble(int columnIndex, double x) throws SQLException
1927      {
1928        String methodCall = "updateDouble(" + columnIndex + ", " + x + ")";
1929        try
1930        {
1931          realResultSet.updateDouble(columnIndex, x);
1932        }
1933        catch (SQLException s)
1934        {
1935          reportException(methodCall, s);
1936          throw s;
1937        }
1938        reportReturn(methodCall);
1939      }
1940    
1941      public void updateDouble(String columnName, double x) throws SQLException
1942      {
1943        String methodCall = "updateDouble(" + columnName + ", " + x + ")";
1944        try
1945        {
1946          realResultSet.updateDouble(columnName, x);
1947        }
1948        catch (SQLException s)
1949        {
1950          reportException(methodCall, s);
1951          throw s;
1952        }
1953        reportReturn(methodCall);
1954      }
1955    
1956      public Statement getStatement() throws SQLException
1957      {
1958        String methodCall = "getStatement()";
1959        try
1960        {
1961          Statement s = realResultSet.getStatement();
1962          if (s == null)
1963          {
1964            return (Statement) reportReturn(methodCall, s);
1965          }
1966          else
1967          {
1968            //todo: what's going on here?
1969            return (Statement) reportReturn(methodCall, new StatementSpy(new ConnectionSpy(s.getConnection()), s));
1970          }
1971        }
1972        catch (SQLException s)
1973        {
1974          reportException(methodCall, s);
1975          throw s;
1976        }
1977      }
1978    
1979      public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException
1980      {
1981        String methodCall = "getObject(" + columnIndex + ", " + map + ")";
1982        try
1983        {
1984          return reportReturn(methodCall, realResultSet.getObject(columnIndex, map));
1985        }
1986        catch (SQLException s)
1987        {
1988          reportException(methodCall, s);
1989          throw s;
1990        }
1991      }
1992    
1993      public void updateString(int columnIndex, String x) throws SQLException
1994      {
1995        String methodCall = "updateString(" + columnIndex + ", " + x + ")";
1996        try
1997        {
1998          realResultSet.updateString(columnIndex, x);
1999        }
2000        catch (SQLException s)
2001        {
2002          reportException(methodCall, s);
2003          throw s;
2004        }
2005        reportReturn(methodCall);
2006      }
2007    
2008      public void updateString(String columnName, String x) throws SQLException
2009      {
2010        String methodCall = "updateString(" + columnName + ", " + x + ")";
2011        try
2012        {
2013          realResultSet.updateString(columnName, x);
2014        }
2015        catch (SQLException s)
2016        {
2017          reportException(methodCall, s);
2018          throw s;
2019        }
2020        reportReturn(methodCall);
2021      }
2022    
2023      public InputStream getAsciiStream(int columnIndex) throws SQLException
2024      {
2025        String methodCall = "getAsciiStream(" + columnIndex + ")";
2026        try
2027        {
2028          return (InputStream) reportReturn(methodCall, realResultSet.getAsciiStream(columnIndex));
2029        }
2030        catch (SQLException s)
2031        {
2032          reportException(methodCall, s);
2033          throw s;
2034        }
2035      }
2036    
2037      public InputStream getAsciiStream(String columnName) throws SQLException
2038      {
2039        String methodCall = "getAsciiStream(" + columnName + ")";
2040        try
2041        {
2042          return (InputStream) reportReturn(methodCall, realResultSet.getAsciiStream(columnName));
2043        }
2044        catch (SQLException s)
2045        {
2046          reportException(methodCall, s);
2047          throw s;
2048        }
2049      }
2050    
2051      public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException
2052      {
2053        String methodCall = "updateBigDecimal(" + columnIndex + ", " + x + ")";
2054        try
2055        {
2056          realResultSet.updateBigDecimal(columnIndex, x);
2057        }
2058        catch (SQLException s)
2059        {
2060          reportException(methodCall, s);
2061          throw s;
2062        }
2063        reportReturn(methodCall);
2064      }
2065    
2066      public URL getURL(int columnIndex) throws SQLException
2067      {
2068        String methodCall = "getURL(" + columnIndex + ")";
2069        try
2070        {
2071          return (URL) reportReturn(methodCall, realResultSet.getURL(columnIndex));
2072        }
2073        catch (SQLException s)
2074        {
2075          reportException(methodCall, s);
2076          throw s;
2077        }
2078      }
2079    
2080      public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
2081      {
2082        String methodCall = "updateBigDecimal(" + columnName + ", " + x + ")";
2083        try
2084        {
2085          realResultSet.updateBigDecimal(columnName, x);
2086        }
2087        catch (SQLException s)
2088        {
2089          reportException(methodCall, s);
2090          throw s;
2091        }
2092        reportReturn(methodCall);
2093      }
2094    
2095      public URL getURL(String columnName) throws SQLException
2096      {
2097        String methodCall = "getURL(" + columnName + ")";
2098        try
2099        {
2100          return (URL) reportReturn(methodCall, realResultSet.getURL(columnName));
2101        }
2102        catch (SQLException s)
2103        {
2104          reportException(methodCall, s);
2105          throw s;
2106        }
2107      }
2108    
2109      public void updateBytes(int columnIndex, byte[] x) throws SQLException
2110      {
2111        // todo: dump array?
2112        String methodCall = "updateBytes(" + columnIndex + ", " + x + ")";
2113        try
2114        {
2115          realResultSet.updateBytes(columnIndex, x);
2116        }
2117        catch (SQLException s)
2118        {
2119          reportException(methodCall, s);
2120          throw s;
2121        }
2122        reportReturn(methodCall);
2123      }
2124    
2125      public void updateBytes(String columnName, byte[] x) throws SQLException
2126      {
2127        // todo: dump array?
2128        String methodCall = "updateBytes(" + columnName + ", " + x + ")";
2129        try
2130        {
2131          realResultSet.updateBytes(columnName, x);
2132        }
2133        catch (SQLException s)
2134        {
2135          reportException(methodCall, s);
2136          throw s;
2137        }
2138        reportReturn(methodCall);
2139      }
2140    
2141      /**
2142       * @deprecated
2143       */
2144      public InputStream getUnicodeStream(int columnIndex) throws SQLException
2145      {
2146        String methodCall = "getUnicodeStream(" + columnIndex + ")";
2147        try
2148        {
2149          return (InputStream) reportReturn(methodCall, realResultSet.getUnicodeStream(columnIndex));
2150        }
2151        catch (SQLException s)
2152        {
2153          reportException(methodCall, s);
2154          throw s;
2155        }
2156      }
2157    
2158      /**
2159       * @deprecated
2160       */
2161      public InputStream getUnicodeStream(String columnName) throws SQLException
2162      {
2163        String methodCall = "getUnicodeStream(" + columnName + ")";
2164        try
2165        {
2166          return (InputStream) reportReturn(methodCall, realResultSet.getUnicodeStream(columnName));
2167        }
2168        catch (SQLException s)
2169        {
2170          reportException(methodCall, s);
2171          throw s;
2172        }
2173      }
2174    
2175      public void updateDate(int columnIndex, Date x) throws SQLException
2176      {
2177        String methodCall = "updateDate(" + columnIndex + ", " + x + ")";
2178        try
2179        {
2180          realResultSet.updateDate(columnIndex, x);
2181        }
2182        catch (SQLException s)
2183        {
2184          reportException(methodCall, s);
2185          throw s;
2186        }
2187      }
2188    
2189      public void updateDate(String columnName, Date x) throws SQLException
2190      {
2191        String methodCall = "updateDate(" + columnName + ", " + x + ")";
2192        try
2193        {
2194          realResultSet.updateDate(columnName, x);
2195        }
2196        catch (SQLException s)
2197        {
2198          reportException(methodCall, s);
2199          throw s;
2200        }
2201        reportReturn(methodCall);
2202      }
2203    
2204      public int getFetchSize() throws SQLException
2205      {
2206        String methodCall = "getFetchSize()";
2207        try
2208        {
2209          return reportReturn(methodCall, realResultSet.getFetchSize());
2210        }
2211        catch (SQLException s)
2212        {
2213          reportException(methodCall, s);
2214          throw s;
2215        }
2216      }
2217    
2218      public SQLWarning getWarnings() throws SQLException
2219      {
2220        String methodCall = "getWarnings()";
2221        try
2222        {
2223          return (SQLWarning) reportReturn(methodCall, realResultSet.getWarnings());
2224        }
2225        catch (SQLException s)
2226        {
2227          reportException(methodCall, s);
2228          throw s;
2229        }
2230      }
2231    
2232      public InputStream getBinaryStream(int columnIndex) throws SQLException
2233      {
2234        String methodCall = "getBinaryStream(" + columnIndex + ")";
2235        try
2236        {
2237          return (InputStream) reportReturn(methodCall, realResultSet.getBinaryStream(columnIndex));
2238        }
2239        catch (SQLException s)
2240        {
2241          reportException(methodCall, s);
2242          throw s;
2243        }
2244      }
2245    
2246      public InputStream getBinaryStream(String columnName) throws SQLException
2247      {
2248        String methodCall = "getBinaryStream(" + columnName + ")";
2249        try
2250        {
2251          return (InputStream) reportReturn(methodCall, realResultSet.getBinaryStream(columnName));
2252        }
2253        catch (SQLException s)
2254        {
2255          reportException(methodCall, s);
2256          throw s;
2257        }
2258      }
2259    
2260      public void clearWarnings() throws SQLException
2261      {
2262        String methodCall = "clearWarnings()";
2263        try
2264        {
2265          realResultSet.clearWarnings();
2266        }
2267        catch (SQLException s)
2268        {
2269          reportException(methodCall, s);
2270          throw s;
2271        }
2272        reportReturn(methodCall);
2273      }
2274    
2275      public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
2276      {
2277        String methodCall = "updateTimestamp(" + columnIndex + ", " + x + ")";
2278        try
2279        {
2280          realResultSet.updateTimestamp(columnIndex, x);
2281        }
2282        catch (SQLException s)
2283        {
2284          reportException(methodCall, s);
2285          throw s;
2286        }
2287        reportReturn(methodCall);
2288      }
2289    
2290      public void updateTimestamp(String columnName, Timestamp x) throws SQLException
2291      {
2292        String methodCall = "updateTimestamp(" + columnName + ", " + x + ")";
2293        try
2294        {
2295          realResultSet.updateTimestamp(columnName, x);
2296        }
2297        catch (SQLException s)
2298        {
2299          reportException(methodCall, s);
2300          throw s;
2301        }
2302        reportReturn(methodCall);
2303      }
2304    
2305      public boolean first() throws SQLException
2306      {
2307        String methodCall = "first()";
2308        try
2309        {
2310          return reportReturn(methodCall, realResultSet.first());
2311        }
2312        catch (SQLException s)
2313        {
2314          reportException(methodCall, s);
2315          throw s;
2316        }
2317      }
2318    
2319      public String getCursorName() throws SQLException
2320      {
2321        String methodCall = "getCursorName()";
2322        try
2323        {
2324          return (String) reportReturn(methodCall, realResultSet.getCursorName());
2325        }
2326        catch (SQLException s)
2327        {
2328          reportException(methodCall, s);
2329          throw s;
2330        }
2331      }
2332    
2333      public int findColumn(String columnName) throws SQLException
2334      {
2335        String methodCall = "findColumn(" + columnName + ")";
2336        try
2337        {
2338          return reportReturn(methodCall, realResultSet.findColumn(columnName));
2339        }
2340        catch (SQLException s)
2341        {
2342          reportException(methodCall, s);
2343          throw s;
2344        }
2345      }
2346    
2347      public boolean wasNull() throws SQLException
2348      {
2349        String methodCall = "wasNull()";
2350        try
2351        {
2352          return reportReturn(methodCall, realResultSet.wasNull());
2353        }
2354        catch (SQLException s)
2355        {
2356          reportException(methodCall, s);
2357          throw s;
2358        }
2359      }
2360    
2361      public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException
2362      {
2363        String methodCall = "updateBinaryStream(" + columnIndex + ", " + x + ", " + length + ")";
2364        try
2365        {
2366          realResultSet.updateBinaryStream(columnIndex, x, length);
2367        }
2368        catch (SQLException s)
2369        {
2370          reportException(methodCall, s);
2371          throw s;
2372        }
2373        reportReturn(methodCall);
2374      }
2375    
2376      public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
2377      {
2378        String methodCall = "updateBinaryStream(" + columnName + ", " + x + ", " + length + ")";
2379        try
2380        {
2381          realResultSet.updateBinaryStream(columnName, x, length);
2382        }
2383        catch (SQLException s)
2384        {
2385          reportException(methodCall, s);
2386          throw s;
2387        }
2388        reportReturn(methodCall);
2389      }
2390    
2391      public String getString(int columnIndex) throws SQLException
2392      {
2393        String methodCall = "getString(" + columnIndex + ")";
2394        try
2395        {
2396          return (String) reportReturn(methodCall, realResultSet.getString(columnIndex));
2397        }
2398        catch (SQLException s)
2399        {
2400          reportException(methodCall, s);
2401          throw s;
2402        }
2403      }
2404    
2405      public String getString(String columnName) throws SQLException
2406      {
2407        String methodCall = "getString(" + columnName + ")";
2408        try
2409        {
2410          return (String) reportReturn(methodCall, realResultSet.getString(columnName));
2411        }
2412        catch (SQLException s)
2413        {
2414          reportException(methodCall, s);
2415          throw s;
2416        }
2417      }
2418    
2419      public Reader getCharacterStream(int columnIndex) throws SQLException
2420      {
2421        String methodCall = "getCharacterStream(" + columnIndex + ")";
2422        try
2423        {
2424          return (Reader) reportReturn(methodCall, realResultSet.getCharacterStream(columnIndex));
2425        }
2426        catch (SQLException s)
2427        {
2428          reportException(methodCall, s);
2429          throw s;
2430        }
2431      }
2432    
2433      public Reader getCharacterStream(String columnName) throws SQLException
2434      {
2435        String methodCall = "getCharacterStream(" + columnName + ")";
2436        try
2437        {
2438          return (Reader) reportReturn(methodCall, realResultSet.getCharacterStream(columnName));
2439        }
2440        catch (SQLException s)
2441        {
2442          reportException(methodCall, s);
2443          throw s;
2444        }
2445      }
2446    
2447      public void setFetchDirection(int direction) throws SQLException
2448      {
2449        String methodCall = "setFetchDirection(" + direction + ")";
2450        try
2451        {
2452          realResultSet.setFetchDirection(direction);
2453        }
2454        catch (SQLException s)
2455        {
2456          reportException(methodCall, s);
2457          throw s;
2458        }
2459        reportReturn(methodCall);
2460      }
2461    
2462      public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException
2463      {
2464        String methodCall = "updateCharacterStream(" + columnIndex + ", " + x + ", " + length + ")";
2465        try
2466        {
2467          realResultSet.updateCharacterStream(columnIndex, x, length);
2468        }
2469        catch (SQLException s)
2470        {
2471          reportException(methodCall, s);
2472          throw s;
2473        }
2474        reportReturn(methodCall);
2475      }
2476    
2477      public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException
2478      {
2479        String methodCall = "updateCharacterStream(" + columnName + ", " + reader + ", " + length + ")";
2480        try
2481        {
2482          realResultSet.updateCharacterStream(columnName, reader, length);
2483        }
2484        catch (SQLException s)
2485        {
2486          reportException(methodCall, s);
2487          throw s;
2488        }
2489        reportReturn(methodCall);
2490      }
2491    
2492      public byte getByte(int columnIndex) throws SQLException
2493      {
2494        String methodCall = "getByte(" + columnIndex + ")";
2495        try
2496        {
2497          return reportReturn(methodCall, realResultSet.getByte(columnIndex));
2498        }
2499        catch (SQLException s)
2500        {
2501          reportException(methodCall, s);
2502          throw s;
2503        }
2504      }
2505    
2506      public byte getByte(String columnName) throws SQLException
2507      {
2508        String methodCall = "getByte(" + columnName + ")";
2509        try
2510        {
2511          return reportReturn(methodCall, realResultSet.getByte(columnName));
2512        }
2513        catch (SQLException s)
2514        {
2515          reportException(methodCall, s);
2516          throw s;
2517        }
2518      }
2519    
2520      public void updateTime(int columnIndex, Time x) throws SQLException
2521      {
2522        String methodCall = "updateTime(" + columnIndex + ", " + x + ")";
2523        try
2524        {
2525          realResultSet.updateTime(columnIndex, x);
2526        }
2527        catch (SQLException s)
2528        {
2529          reportException(methodCall, s);
2530          throw s;
2531        }
2532        reportReturn(methodCall);
2533      }
2534    
2535      public void updateTime(String columnName, Time x) throws SQLException
2536      {
2537        String methodCall = "updateTime(" + columnName + ", " + x + ")";
2538        try
2539        {
2540          realResultSet.updateTime(columnName, x);
2541        }
2542        catch (SQLException s)
2543        {
2544          reportException(methodCall, s);
2545          throw s;
2546        }
2547        reportReturn(methodCall);
2548      }
2549    
2550      public byte[] getBytes(int columnIndex) throws SQLException
2551      {
2552        String methodCall = "getBytes(" + columnIndex + ")";
2553        try
2554        {
2555          return (byte[]) reportReturn(methodCall, realResultSet.getBytes(columnIndex));
2556        }
2557        catch (SQLException s)
2558        {
2559          reportException(methodCall, s);
2560          throw s;
2561        }
2562      }
2563    
2564      public byte[] getBytes(String columnName) throws SQLException
2565      {
2566        String methodCall = "getBytes(" + columnName + ")";
2567        try
2568        {
2569          return (byte[]) reportReturn(methodCall, realResultSet.getBytes(columnName));
2570        }
2571        catch (SQLException s)
2572        {
2573          reportException(methodCall, s);
2574          throw s;
2575        }
2576      }
2577    
2578      public boolean isAfterLast() throws SQLException
2579      {
2580        String methodCall = "isAfterLast()";
2581        try
2582        {
2583          return reportReturn(methodCall, realResultSet.isAfterLast());
2584        }
2585        catch (SQLException s)
2586        {
2587          reportException(methodCall, s);
2588          throw s;
2589        }
2590      }
2591    
2592      public void updateObject(int columnIndex, Object x, int scale) throws SQLException
2593      {
2594        String methodCall = "updateObject(" + columnIndex + ", " + x + ", " + scale + ")";
2595        try
2596        {
2597          realResultSet.updateObject(columnIndex, x, scale);
2598        }
2599        catch (SQLException s)
2600        {
2601          reportException(methodCall, s);
2602          throw s;
2603        }
2604        reportReturn(methodCall);
2605      }
2606    
2607      public void updateObject(int columnIndex, Object x) throws SQLException
2608      {
2609        String methodCall = "updateObject(" + columnIndex + ", " + x + ")";
2610        try
2611        {
2612          realResultSet.updateObject(columnIndex, x);
2613        }
2614        catch (SQLException s)
2615        {
2616          reportException(methodCall, s);
2617          throw s;
2618        }
2619        reportReturn(methodCall);
2620      }
2621    
2622      public void updateObject(String columnName, Object x, int scale) throws SQLException
2623      {
2624        String methodCall = "updateObject(" + columnName + ", " + x + ", " + scale + ")";
2625        try
2626        {
2627          realResultSet.updateObject(columnName, x, scale);
2628        }
2629        catch (SQLException s)
2630        {
2631          reportException(methodCall, s);
2632          throw s;
2633        }
2634        reportReturn(methodCall);
2635      }
2636    
2637      public void updateObject(String columnName, Object x) throws SQLException
2638      {
2639        String methodCall = "updateObject(" + columnName + ", " + x + ")";
2640        try
2641        {
2642          realResultSet.updateObject(columnName, x);
2643        }
2644        catch (SQLException s)
2645        {
2646          reportException(methodCall, s);
2647          throw s;
2648        }
2649        reportReturn(methodCall);
2650      }
2651    
2652      public int getFetchDirection() throws SQLException
2653      {
2654        String methodCall = "getFetchDirection()";
2655        try
2656        {
2657          return reportReturn(methodCall, realResultSet.getFetchDirection());
2658        }
2659        catch (SQLException s)
2660        {
2661          reportException(methodCall, s);
2662          throw s;
2663        }
2664      }
2665    
2666      public long getLong(int columnIndex) throws SQLException
2667      {
2668        String methodCall = "getLong(" + columnIndex + ")";
2669        try
2670        {
2671          return reportReturn(methodCall, realResultSet.getLong(columnIndex));
2672        }
2673        catch (SQLException s)
2674        {
2675          reportException(methodCall, s);
2676          throw s;
2677        }
2678      }
2679    
2680      public long getLong(String columnName) throws SQLException
2681      {
2682        String methodCall = "getLong(" + columnName + ")";
2683        try
2684        {
2685          return reportReturn(methodCall, realResultSet.getLong(columnName));
2686        }
2687        catch (SQLException s)
2688        {
2689          reportException(methodCall, s);
2690          throw s;
2691        }
2692      }
2693    
2694      public boolean isFirst() throws SQLException
2695      {
2696        String methodCall = "isFirst()";
2697        try
2698        {
2699          return reportReturn(methodCall, realResultSet.isFirst());
2700        }
2701        catch (SQLException s)
2702        {
2703          reportException(methodCall, s);
2704          throw s;
2705        }
2706      }
2707    
2708      public void insertRow() throws SQLException
2709      {
2710        String methodCall = "insertRow()";
2711        try
2712        {
2713          realResultSet.insertRow();
2714        }
2715        catch (SQLException s)
2716        {
2717          reportException(methodCall, s);
2718          throw s;
2719        }
2720      }
2721    
2722      public float getFloat(int columnIndex) throws SQLException
2723      {
2724        String methodCall = "getFloat(" + columnIndex + ")";
2725        try
2726        {
2727          return reportReturn(methodCall, realResultSet.getFloat(columnIndex));
2728        }
2729        catch (SQLException s)
2730        {
2731          reportException(methodCall, s);
2732          throw s;
2733        }
2734      }
2735    
2736      public float getFloat(String columnName) throws SQLException
2737      {
2738        String methodCall = "getFloat(" + columnName + ")";
2739        try
2740        {
2741          return reportReturn(methodCall, realResultSet.getFloat(columnName));
2742        }
2743        catch (SQLException s)
2744        {
2745          reportException(methodCall, s);
2746          throw s;
2747        }
2748      }
2749    
2750      public boolean isLast() throws SQLException
2751      {
2752        String methodCall = "isLast()";
2753        try
2754        {
2755          return reportReturn(methodCall, realResultSet.isLast());
2756        }
2757        catch (SQLException s)
2758        {
2759          reportException(methodCall, s);
2760          throw s;
2761        }
2762      }
2763    
2764      public void setFetchSize(int rows) throws SQLException
2765      {
2766        String methodCall = "setFetchSize(" + rows + ")";
2767        try
2768        {
2769          realResultSet.setFetchSize(rows);
2770        }
2771        catch (SQLException s)
2772        {
2773          reportException(methodCall, s);
2774          throw s;
2775        }
2776        reportReturn(methodCall);
2777      }
2778    
2779      public void updateRow() throws SQLException
2780      {
2781        String methodCall = "updateRow()";
2782        try
2783        {
2784          realResultSet.updateRow();
2785        }
2786        catch (SQLException s)
2787        {
2788          reportException(methodCall, s);
2789          throw s;
2790        }
2791        reportReturn(methodCall);
2792      }
2793    
2794      public void beforeFirst() throws SQLException
2795      {
2796        String methodCall = "beforeFirst()";
2797        try
2798        {
2799          realResultSet.beforeFirst();
2800        }
2801        catch (SQLException s)
2802        {
2803          reportException(methodCall, s);
2804          throw s;
2805        }
2806        reportReturn(methodCall);
2807      }
2808    
2809      /**
2810       * @deprecated
2811       */
2812      public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
2813      {
2814        String methodCall = "getBigDecimal(" + columnIndex + ", " + scale + ")";
2815        try
2816        {
2817          return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnIndex, scale));
2818        }
2819        catch (SQLException s)
2820        {
2821          reportException(methodCall, s);
2822          throw s;
2823        }
2824      }
2825    
2826      /**
2827       * @deprecated
2828       */
2829      public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
2830      {
2831        String methodCall = "getBigDecimal(" + columnName + ", " + scale + ")";
2832        try
2833        {
2834          return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnName, scale));
2835        }
2836        catch (SQLException s)
2837        {
2838          reportException(methodCall, s);
2839          throw s;
2840        }
2841      }
2842    
2843      public BigDecimal getBigDecimal(int columnIndex) throws SQLException
2844      {
2845        String methodCall = "getBigDecimal(" + columnIndex + ")";
2846        try
2847        {
2848          return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnIndex));
2849        }
2850        catch (SQLException s)
2851        {
2852          reportException(methodCall, s);
2853          throw s;
2854        }
2855      }
2856    
2857      public BigDecimal getBigDecimal(String columnName) throws SQLException
2858      {
2859        String methodCall = "getBigDecimal(" + columnName + ")";
2860        try
2861        {
2862          return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnName));
2863        }
2864        catch (SQLException s)
2865        {
2866          reportException(methodCall, s);
2867          throw s;
2868        }
2869      }
2870    
2871      public void afterLast() throws SQLException
2872      {
2873        String methodCall = "afterLast()";
2874        try
2875        {
2876          realResultSet.afterLast();
2877        }
2878        catch (SQLException s)
2879        {
2880          reportException(methodCall, s);
2881          throw s;
2882        }
2883        reportReturn(methodCall);
2884      }
2885    
2886      public void refreshRow() throws SQLException
2887      {
2888        String methodCall = "refreshRow()";
2889        try
2890        {
2891          realResultSet.refreshRow();
2892        }
2893        catch (SQLException s)
2894        {
2895          reportException(methodCall, s);
2896          throw s;
2897        }
2898      }
2899    
2900      public <T> T unwrap(Class<T> iface) throws SQLException {
2901        String methodCall = "unwrap(" + (iface==null?"null":iface.getName()) + ")";
2902        try
2903        {
2904          //todo: double check this logic
2905          return (T)reportReturn(methodCall, (iface != null && (iface == ResultSet.class || iface == Spy.class))?(T)this:realResultSet.unwrap(iface));
2906        }
2907        catch (SQLException s)
2908        {
2909          reportException(methodCall,s);
2910          throw s;
2911        }
2912      }
2913    
2914      public boolean isWrapperFor(Class<?> iface) throws SQLException
2915      {
2916        String methodCall = "isWrapperFor(" + (iface==null?"null":iface.getName()) + ")";
2917        try
2918        {
2919          return reportReturn(methodCall, (iface != null && (iface == ResultSet.class || iface == Spy.class)) ||
2920              realResultSet.isWrapperFor(iface));
2921        }
2922        catch (SQLException s)
2923        {
2924          reportException(methodCall,s);
2925          throw s;
2926        }
2927      }
2928    }