KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > tools > profiler > CallableStatementWrapper


1 /*
2  * Copyright (c) 1998-2005 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  * Free SoftwareFoundation, Inc.
23  * 59 Temple Place, Suite 330
24  * Boston, MA 02111-1307 USA
25  *
26  * @author Sam
27  */

28
29
30 package com.caucho.tools.profiler;
31
32 import java.io.InputStream JavaDoc;
33 import java.io.Reader JavaDoc;
34 import java.math.BigDecimal JavaDoc;
35 import java.net.URL JavaDoc;
36 import java.sql.*;
37 import java.util.Calendar JavaDoc;
38 import java.util.Map JavaDoc;
39
40 public class CallableStatementWrapper
41   implements CallableStatement
42 {
43   private final CallableStatement _callableStatement;
44   private final ProfilerPoint _profilerPoint;
45
46   public CallableStatementWrapper(ProfilerPoint profilerPoint,
47                                   CallableStatement callableStatement)
48   {
49     _profilerPoint = profilerPoint;
50     _callableStatement = callableStatement;
51   }
52
53   public void registerOutParameter(int parameterIndex, int sqlType)
54     throws SQLException
55   {
56     Profiler profiler = _profilerPoint.start();
57
58     try {
59       _callableStatement.registerOutParameter(parameterIndex, sqlType);
60     }
61     finally {
62       profiler.finish();
63     }
64   }
65
66   public void registerOutParameter(int parameterIndex, int sqlType, int scale)
67     throws SQLException
68   {
69     Profiler profiler = _profilerPoint.start();
70
71     try {
72       _callableStatement.registerOutParameter(parameterIndex, sqlType, scale);
73     }
74     finally {
75       profiler.finish();
76     }
77   }
78
79   public boolean wasNull()
80     throws SQLException
81   {
82     Profiler profiler = _profilerPoint.start();
83
84     try {
85       return _callableStatement.wasNull();
86     }
87     finally {
88       profiler.finish();
89     }
90   }
91
92   public String JavaDoc getString(int parameterIndex)
93     throws SQLException
94   {
95     Profiler profiler = _profilerPoint.start();
96
97     try {
98       return _callableStatement.getString(parameterIndex);
99     }
100     finally {
101       profiler.finish();
102     }
103   }
104
105   public boolean getBoolean(int parameterIndex)
106     throws SQLException
107   {
108     Profiler profiler = _profilerPoint.start();
109
110     try {
111       return _callableStatement.getBoolean(parameterIndex);
112     }
113     finally {
114       profiler.finish();
115     }
116   }
117
118   public byte getByte(int parameterIndex)
119     throws SQLException
120   {
121     Profiler profiler = _profilerPoint.start();
122
123     try {
124       return _callableStatement.getByte(parameterIndex);
125     }
126     finally {
127       profiler.finish();
128     }
129   }
130
131   public short getShort(int parameterIndex)
132     throws SQLException
133   {
134     Profiler profiler = _profilerPoint.start();
135
136     try {
137       return _callableStatement.getShort(parameterIndex);
138     }
139     finally {
140       profiler.finish();
141     }
142   }
143
144   public int getInt(int parameterIndex)
145     throws SQLException
146   {
147     Profiler profiler = _profilerPoint.start();
148
149     try {
150       return _callableStatement.getInt(parameterIndex);
151     }
152     finally {
153       profiler.finish();
154     }
155   }
156
157   public long getLong(int parameterIndex)
158     throws SQLException
159   {
160     Profiler profiler = _profilerPoint.start();
161
162     try {
163       return _callableStatement.getLong(parameterIndex);
164     }
165     finally {
166       profiler.finish();
167     }
168   }
169
170   public float getFloat(int parameterIndex)
171     throws SQLException
172   {
173     Profiler profiler = _profilerPoint.start();
174
175     try {
176       return _callableStatement.getFloat(parameterIndex);
177     }
178     finally {
179       profiler.finish();
180     }
181   }
182
183   public double getDouble(int parameterIndex)
184     throws SQLException
185   {
186     Profiler profiler = _profilerPoint.start();
187
188     try {
189       return _callableStatement.getDouble(parameterIndex);
190     }
191     finally {
192       profiler.finish();
193     }
194   }
195
196   public BigDecimal JavaDoc getBigDecimal(int parameterIndex, int scale)
197     throws SQLException
198   {
199     Profiler profiler = _profilerPoint.start();
200
201     try {
202       return _callableStatement.getBigDecimal(parameterIndex, scale);
203     }
204     finally {
205       profiler.finish();
206     }
207   }
208
209   public byte[] getBytes(int parameterIndex)
210     throws SQLException
211   {
212     Profiler profiler = _profilerPoint.start();
213
214     try {
215       return _callableStatement.getBytes(parameterIndex);
216     }
217     finally {
218       profiler.finish();
219     }
220   }
221
222   public Date getDate(int parameterIndex)
223     throws SQLException
224   {
225     Profiler profiler = _profilerPoint.start();
226
227     try {
228       return _callableStatement.getDate(parameterIndex);
229     }
230     finally {
231       profiler.finish();
232     }
233   }
234
235   public Time getTime(int parameterIndex)
236     throws SQLException
237   {
238     Profiler profiler = _profilerPoint.start();
239
240     try {
241       return _callableStatement.getTime(parameterIndex);
242     }
243     finally {
244       profiler.finish();
245     }
246   }
247
248   public Timestamp getTimestamp(int parameterIndex)
249     throws SQLException
250   {
251     Profiler profiler = _profilerPoint.start();
252
253     try {
254       return _callableStatement.getTimestamp(parameterIndex);
255     }
256     finally {
257       profiler.finish();
258     }
259   }
260
261   public Object JavaDoc getObject(int parameterIndex)
262     throws SQLException
263   {
264     Profiler profiler = _profilerPoint.start();
265
266     try {
267       return _callableStatement.getObject(parameterIndex);
268     }
269     finally {
270       profiler.finish();
271     }
272   }
273
274   public BigDecimal JavaDoc getBigDecimal(int parameterIndex)
275     throws SQLException
276   {
277     Profiler profiler = _profilerPoint.start();
278
279     try {
280       return _callableStatement.getBigDecimal(parameterIndex);
281     }
282     finally {
283       profiler.finish();
284     }
285   }
286
287   public Object JavaDoc getObject(int i, Map JavaDoc<String JavaDoc, Class JavaDoc<?>> map)
288     throws SQLException
289   {
290     Profiler profiler = _profilerPoint.start();
291
292     try {
293       return _callableStatement.getObject(i, map);
294     }
295     finally {
296       profiler.finish();
297     }
298   }
299
300   public Ref getRef(int i)
301     throws SQLException
302   {
303     Profiler profiler = _profilerPoint.start();
304
305     try {
306       return _callableStatement.getRef(i);
307     }
308     finally {
309       profiler.finish();
310     }
311   }
312
313   public Blob getBlob(int i)
314     throws SQLException
315   {
316     Profiler profiler = _profilerPoint.start();
317
318     try {
319       return _callableStatement.getBlob(i);
320     }
321     finally {
322       profiler.finish();
323     }
324   }
325
326   public Clob getClob(int i)
327     throws SQLException
328   {
329     Profiler profiler = _profilerPoint.start();
330
331     try {
332       return _callableStatement.getClob(i);
333     }
334     finally {
335       profiler.finish();
336     }
337   }
338
339   public Array getArray(int i)
340     throws SQLException
341   {
342     Profiler profiler = _profilerPoint.start();
343
344     try {
345       return _callableStatement.getArray(i);
346     }
347     finally {
348       profiler.finish();
349     }
350   }
351
352   public Date getDate(int parameterIndex, Calendar JavaDoc cal)
353     throws SQLException
354   {
355     Profiler profiler = _profilerPoint.start();
356
357     try {
358       return _callableStatement.getDate(parameterIndex, cal);
359     }
360     finally {
361       profiler.finish();
362     }
363   }
364
365   public Time getTime(int parameterIndex, Calendar JavaDoc cal)
366     throws SQLException
367   {
368     Profiler profiler = _profilerPoint.start();
369
370     try {
371       return _callableStatement.getTime(parameterIndex, cal);
372     }
373     finally {
374       profiler.finish();
375     }
376   }
377
378   public Timestamp getTimestamp(int parameterIndex, Calendar JavaDoc cal)
379     throws SQLException
380   {
381     Profiler profiler = _profilerPoint.start();
382
383     try {
384       return _callableStatement.getTimestamp(parameterIndex, cal);
385     }
386     finally {
387       profiler.finish();
388     }
389   }
390
391   public void registerOutParameter(int paramIndex, int sqlType, String JavaDoc typeName)
392     throws SQLException
393   {
394     Profiler profiler = _profilerPoint.start();
395
396     try {
397       _callableStatement.registerOutParameter(paramIndex, sqlType, typeName);
398     }
399     finally {
400       profiler.finish();
401     }
402   }
403
404   public void registerOutParameter(String JavaDoc parameterName, int sqlType)
405     throws SQLException
406   {
407     Profiler profiler = _profilerPoint.start();
408
409     try {
410       _callableStatement.registerOutParameter(parameterName, sqlType);
411     }
412     finally {
413       profiler.finish();
414     }
415   }
416
417   public void registerOutParameter(String JavaDoc parameterName, int sqlType, int scale)
418     throws SQLException
419   {
420     Profiler profiler = _profilerPoint.start();
421
422     try {
423       _callableStatement.registerOutParameter(parameterName, sqlType, scale);
424     }
425     finally {
426       profiler.finish();
427     }
428   }
429
430   public void registerOutParameter(String JavaDoc parameterName,
431                                    int sqlType,
432                                    String JavaDoc typeName)
433     throws SQLException
434   {
435     Profiler profiler = _profilerPoint.start();
436
437     try {
438       _callableStatement.registerOutParameter(parameterName, sqlType, typeName);
439     }
440     finally {
441       profiler.finish();
442     }
443   }
444
445   public URL JavaDoc getURL(int parameterIndex)
446     throws SQLException
447   {
448     Profiler profiler = _profilerPoint.start();
449
450     try {
451       return _callableStatement.getURL(parameterIndex);
452     }
453     finally {
454       profiler.finish();
455     }
456   }
457
458   public void setURL(String JavaDoc parameterName, URL JavaDoc val)
459     throws SQLException
460   {
461     Profiler profiler = _profilerPoint.start();
462
463     try {
464       _callableStatement.setURL(parameterName, val);
465     }
466     finally {
467       profiler.finish();
468     }
469   }
470
471   public void setNull(String JavaDoc parameterName, int sqlType)
472     throws SQLException
473   {
474     Profiler profiler = _profilerPoint.start();
475
476     try {
477       _callableStatement.setNull(parameterName, sqlType);
478     }
479     finally {
480       profiler.finish();
481     }
482   }
483
484   public void setBoolean(String JavaDoc parameterName, boolean x)
485     throws SQLException
486   {
487     Profiler profiler = _profilerPoint.start();
488
489     try {
490       _callableStatement.setBoolean(parameterName, x);
491     }
492     finally {
493       profiler.finish();
494     }
495   }
496
497   public void setByte(String JavaDoc parameterName, byte x)
498     throws SQLException
499   {
500     Profiler profiler = _profilerPoint.start();
501
502     try {
503       _callableStatement.setByte(parameterName, x);
504     }
505     finally {
506       profiler.finish();
507     }
508   }
509
510   public void setShort(String JavaDoc parameterName, short x)
511     throws SQLException
512   {
513     Profiler profiler = _profilerPoint.start();
514
515     try {
516       _callableStatement.setShort(parameterName, x);
517     }
518     finally {
519       profiler.finish();
520     }
521   }
522
523   public void setInt(String JavaDoc parameterName, int x)
524     throws SQLException
525   {
526     Profiler profiler = _profilerPoint.start();
527
528     try {
529       _callableStatement.setInt(parameterName, x);
530     }
531     finally {
532       profiler.finish();
533     }
534   }
535
536   public void setLong(String JavaDoc parameterName, long x)
537     throws SQLException
538   {
539     Profiler profiler = _profilerPoint.start();
540
541     try {
542       _callableStatement.setLong(parameterName, x);
543     }
544     finally {
545       profiler.finish();
546     }
547   }
548
549   public void setFloat(String JavaDoc parameterName, float x)
550     throws SQLException
551   {
552     Profiler profiler = _profilerPoint.start();
553
554     try {
555       _callableStatement.setFloat(parameterName, x);
556     }
557     finally {
558       profiler.finish();
559     }
560   }
561
562   public void setDouble(String JavaDoc parameterName, double x)
563     throws SQLException
564   {
565     Profiler profiler = _profilerPoint.start();
566
567     try {
568       _callableStatement.setDouble(parameterName, x);
569     }
570     finally {
571       profiler.finish();
572     }
573   }
574
575   public void setBigDecimal(String JavaDoc parameterName, BigDecimal JavaDoc x)
576     throws SQLException
577   {
578     Profiler profiler = _profilerPoint.start();
579
580     try {
581       _callableStatement.setBigDecimal(parameterName, x);
582     }
583     finally {
584       profiler.finish();
585     }
586   }
587
588   public void setString(String JavaDoc parameterName, String JavaDoc x)
589     throws SQLException
590   {
591     Profiler profiler = _profilerPoint.start();
592
593     try {
594       _callableStatement.setString(parameterName, x);
595     }
596     finally {
597       profiler.finish();
598     }
599   }
600
601   public void setBytes(String JavaDoc parameterName, byte[] x)
602     throws SQLException
603   {
604     Profiler profiler = _profilerPoint.start();
605
606     try {
607       _callableStatement.setBytes(parameterName, x);
608     }
609     finally {
610       profiler.finish();
611     }
612   }
613
614   public void setDate(String JavaDoc parameterName, Date x)
615     throws SQLException
616   {
617     Profiler profiler = _profilerPoint.start();
618
619     try {
620       _callableStatement.setDate(parameterName, x);
621     }
622     finally {
623       profiler.finish();
624     }
625   }
626
627   public void setTime(String JavaDoc parameterName, Time x)
628     throws SQLException
629   {
630     Profiler profiler = _profilerPoint.start();
631
632     try {
633       _callableStatement.setTime(parameterName, x);
634     }
635     finally {
636       profiler.finish();
637     }
638   }
639
640   public void setTimestamp(String JavaDoc parameterName, Timestamp x)
641     throws SQLException
642   {
643     Profiler profiler = _profilerPoint.start();
644
645     try {
646       _callableStatement.setTimestamp(parameterName, x);
647     }
648     finally {
649       profiler.finish();
650     }
651   }
652
653   public void setAsciiStream(String JavaDoc parameterName, InputStream JavaDoc x, int length)
654     throws SQLException
655   {
656     Profiler profiler = _profilerPoint.start();
657
658     try {
659       _callableStatement.setAsciiStream(parameterName, x, length);
660     }
661     finally {
662       profiler.finish();
663     }
664   }
665
666   public void setBinaryStream(String JavaDoc parameterName, InputStream JavaDoc x, int length)
667     throws SQLException
668   {
669     Profiler profiler = _profilerPoint.start();
670
671     try {
672       _callableStatement.setBinaryStream(parameterName, x, length);
673     }
674     finally {
675       profiler.finish();
676     }
677   }
678
679   public void setObject(String JavaDoc parameterName,
680                         Object JavaDoc x,
681                         int targetSqlType,
682                         int scale)
683     throws SQLException
684   {
685     Profiler profiler = _profilerPoint.start();
686
687     try {
688       _callableStatement.setObject(parameterName, x, targetSqlType, scale);
689     }
690     finally {
691       profiler.finish();
692     }
693   }
694
695   public void setObject(String JavaDoc parameterName, Object JavaDoc x, int targetSqlType)
696     throws SQLException
697   {
698     Profiler profiler = _profilerPoint.start();
699
700     try {
701       _callableStatement.setObject(parameterName, x, targetSqlType);
702     }
703     finally {
704       profiler.finish();
705     }
706   }
707
708   public void setObject(String JavaDoc parameterName, Object JavaDoc x)
709     throws SQLException
710   {
711     Profiler profiler = _profilerPoint.start();
712
713     try {
714       _callableStatement.setObject(parameterName, x);
715     }
716     finally {
717       profiler.finish();
718     }
719   }
720
721   public void setCharacterStream(String JavaDoc parameterName,
722                                  Reader JavaDoc reader,
723                                  int length)
724     throws SQLException
725   {
726     Profiler profiler = _profilerPoint.start();
727
728     try {
729       _callableStatement.setCharacterStream(parameterName, reader, length);
730     }
731     finally {
732       profiler.finish();
733     }
734   }
735
736   public void setDate(String JavaDoc parameterName, Date x, Calendar JavaDoc cal)
737     throws SQLException
738   {
739     Profiler profiler = _profilerPoint.start();
740
741     try {
742       _callableStatement.setDate(parameterName, x, cal);
743     }
744     finally {
745       profiler.finish();
746     }
747   }
748
749   public void setTime(String JavaDoc parameterName, Time x, Calendar JavaDoc cal)
750     throws SQLException
751   {
752     Profiler profiler = _profilerPoint.start();
753
754     try {
755       _callableStatement.setTime(parameterName, x, cal);
756     }
757     finally {
758       profiler.finish();
759     }
760   }
761
762   public void setTimestamp(String JavaDoc parameterName, Timestamp x, Calendar JavaDoc cal)
763     throws SQLException
764   {
765     Profiler profiler = _profilerPoint.start();
766
767     try {
768       _callableStatement.setTimestamp(parameterName, x, cal);
769     }
770     finally {
771       profiler.finish();
772     }
773   }
774
775   public void setNull(String JavaDoc parameterName, int sqlType, String JavaDoc typeName)
776     throws SQLException
777   {
778     Profiler profiler = _profilerPoint.start();
779
780     try {
781       _callableStatement.setNull(parameterName, sqlType, typeName);
782     }
783     finally {
784       profiler.finish();
785     }
786   }
787
788   public String JavaDoc getString(String JavaDoc parameterName)
789     throws SQLException
790   {
791     Profiler profiler = _profilerPoint.start();
792
793     try {
794       return _callableStatement.getString(parameterName);
795     }
796     finally {
797       profiler.finish();
798     }
799   }
800
801   public boolean getBoolean(String JavaDoc parameterName)
802     throws SQLException
803   {
804     Profiler profiler = _profilerPoint.start();
805
806     try {
807       return _callableStatement.getBoolean(parameterName);
808     }
809     finally {
810       profiler.finish();
811     }
812   }
813
814   public byte getByte(String JavaDoc parameterName)
815     throws SQLException
816   {
817     Profiler profiler = _profilerPoint.start();
818
819     try {
820       return _callableStatement.getByte(parameterName);
821     }
822     finally {
823       profiler.finish();
824     }
825   }
826
827   public short getShort(String JavaDoc parameterName)
828     throws SQLException
829   {
830     Profiler profiler = _profilerPoint.start();
831
832     try {
833       return _callableStatement.getShort(parameterName);
834     }
835     finally {
836       profiler.finish();
837     }
838   }
839
840   public int getInt(String JavaDoc parameterName)
841     throws SQLException
842   {
843     Profiler profiler = _profilerPoint.start();
844
845     try {
846       return _callableStatement.getInt(parameterName);
847     }
848     finally {
849       profiler.finish();
850     }
851   }
852
853   public long getLong(String JavaDoc parameterName)
854     throws SQLException
855   {
856     Profiler profiler = _profilerPoint.start();
857
858     try {
859       return _callableStatement.getLong(parameterName);
860     }
861     finally {
862       profiler.finish();
863     }
864   }
865
866   public float getFloat(String JavaDoc parameterName)
867     throws SQLException
868   {
869     Profiler profiler = _profilerPoint.start();
870
871     try {
872       return _callableStatement.getFloat(parameterName);
873     }
874     finally {
875       profiler.finish();
876     }
877   }
878
879   public double getDouble(String JavaDoc parameterName)
880     throws SQLException
881   {
882     Profiler profiler = _profilerPoint.start();
883
884     try {
885       return _callableStatement.getDouble(parameterName);
886     }
887     finally {
888       profiler.finish();
889     }
890   }
891
892   public byte[] getBytes(String JavaDoc parameterName)
893     throws SQLException
894   {
895     Profiler profiler = _profilerPoint.start();
896
897     try {
898       return _callableStatement.getBytes(parameterName);
899     }
900     finally {
901       profiler.finish();
902     }
903   }
904
905   public Date getDate(String JavaDoc parameterName)
906     throws SQLException
907   {
908     Profiler profiler = _profilerPoint.start();
909
910     try {
911       return _callableStatement.getDate(parameterName);
912     }
913     finally {
914       profiler.finish();
915     }
916   }
917
918   public Time getTime(String JavaDoc parameterName)
919     throws SQLException
920   {
921     Profiler profiler = _profilerPoint.start();
922
923     try {
924       return _callableStatement.getTime(parameterName);
925     }
926     finally {
927       profiler.finish();
928     }
929   }
930
931   public Timestamp getTimestamp(String JavaDoc parameterName)
932     throws SQLException
933   {
934     Profiler profiler = _profilerPoint.start();
935
936     try {
937       return _callableStatement.getTimestamp(parameterName);
938     }
939     finally {
940       profiler.finish();
941     }
942   }
943
944   public Object JavaDoc getObject(String JavaDoc parameterName)
945     throws SQLException
946   {
947     Profiler profiler = _profilerPoint.start();
948
949     try {
950       return _callableStatement.getObject(parameterName);
951     }
952     finally {
953       profiler.finish();
954     }
955   }
956
957   public BigDecimal JavaDoc getBigDecimal(String JavaDoc parameterName)
958     throws SQLException
959   {
960     Profiler profiler = _profilerPoint.start();
961
962     try {
963       return _callableStatement.getBigDecimal(parameterName);
964     }
965     finally {
966       profiler.finish();
967     }
968   }
969
970   public Object JavaDoc getObject(String JavaDoc parameterName, Map JavaDoc<String JavaDoc, Class JavaDoc<?>> map)
971     throws SQLException
972   {
973     Profiler profiler = _profilerPoint.start();
974
975     try {
976       return _callableStatement.getObject(parameterName, map);
977     }
978     finally {
979       profiler.finish();
980     }
981   }
982
983   public Ref getRef(String JavaDoc parameterName)
984     throws SQLException
985   {
986     Profiler profiler = _profilerPoint.start();
987
988     try {
989       return _callableStatement.getRef(parameterName);
990     }
991     finally {
992       profiler.finish();
993     }
994   }
995
996   public Blob getBlob(String JavaDoc parameterName)
997     throws SQLException
998   {
999     Profiler profiler = _profilerPoint.start();
1000
1001    try {
1002      return _callableStatement.getBlob(parameterName);
1003    }
1004    finally {
1005      profiler.finish();
1006    }
1007  }
1008
1009  public Clob getClob(String JavaDoc parameterName)
1010    throws SQLException
1011  {
1012    Profiler profiler = _profilerPoint.start();
1013
1014    try {
1015      return _callableStatement.getClob(parameterName);
1016    }
1017    finally {
1018      profiler.finish();
1019    }
1020  }
1021
1022  public Array getArray(String JavaDoc parameterName)
1023    throws SQLException
1024  {
1025    Profiler profiler = _profilerPoint.start();
1026
1027    try {
1028      return _callableStatement.getArray(parameterName);
1029    }
1030    finally {
1031      profiler.finish();
1032    }
1033  }
1034
1035  public Date getDate(String JavaDoc parameterName, Calendar JavaDoc cal)
1036    throws SQLException
1037  {
1038    Profiler profiler = _profilerPoint.start();
1039
1040    try {
1041      return _callableStatement.getDate(parameterName, cal);
1042    }
1043    finally {
1044      profiler.finish();
1045    }
1046  }
1047
1048  public Time getTime(String JavaDoc parameterName, Calendar JavaDoc cal)
1049    throws SQLException
1050  {
1051    Profiler profiler = _profilerPoint.start();
1052
1053    try {
1054      return _callableStatement.getTime(parameterName, cal);
1055    }
1056    finally {
1057      profiler.finish();
1058    }
1059  }
1060
1061  public Timestamp getTimestamp(String JavaDoc parameterName, Calendar JavaDoc cal)
1062    throws SQLException
1063  {
1064    Profiler profiler = _profilerPoint.start();
1065
1066    try {
1067      return _callableStatement.getTimestamp(parameterName, cal);
1068    }
1069    finally {
1070      profiler.finish();
1071    }
1072  }
1073
1074  public URL JavaDoc getURL(String JavaDoc parameterName)
1075    throws SQLException
1076  {
1077    Profiler profiler = _profilerPoint.start();
1078
1079    try {
1080      return _callableStatement.getURL(parameterName);
1081    }
1082    finally {
1083      profiler.finish();
1084    }
1085  }
1086
1087  public ResultSet executeQuery()
1088    throws SQLException
1089  {
1090    Profiler profiler = _profilerPoint.start();
1091
1092    try {
1093      return _callableStatement.executeQuery();
1094    }
1095    finally {
1096      profiler.finish();
1097    }
1098  }
1099
1100  public int executeUpdate()
1101    throws SQLException
1102  {
1103    Profiler profiler = _profilerPoint.start();
1104
1105    try {
1106      return _callableStatement.executeUpdate();
1107    }
1108    finally {
1109      profiler.finish();
1110    }
1111  }
1112
1113  public void setNull(int parameterIndex, int sqlType)
1114    throws SQLException
1115  {
1116    Profiler profiler = _profilerPoint.start();
1117
1118    try {
1119      _callableStatement.setNull(parameterIndex, sqlType);
1120    }
1121    finally {
1122      profiler.finish();
1123    }
1124  }
1125
1126  public void setBoolean(int parameterIndex, boolean x)
1127    throws SQLException
1128  {
1129    Profiler profiler = _profilerPoint.start();
1130
1131    try {
1132      _callableStatement.setBoolean(parameterIndex, x);
1133    }
1134    finally {
1135      profiler.finish();
1136    }
1137  }
1138
1139  public void setByte(int parameterIndex, byte x)
1140    throws SQLException
1141  {
1142    Profiler profiler = _profilerPoint.start();
1143
1144    try {
1145      _callableStatement.setByte(parameterIndex, x);
1146    }
1147    finally {
1148      profiler.finish();
1149    }
1150  }
1151
1152  public void setShort(int parameterIndex, short x)
1153    throws SQLException
1154  {
1155    Profiler profiler = _profilerPoint.start();
1156
1157    try {
1158      _callableStatement.setShort(parameterIndex, x);
1159    }
1160    finally {
1161      profiler.finish();
1162    }
1163  }
1164
1165  public void setInt(int parameterIndex, int x)
1166    throws SQLException
1167  {
1168    Profiler profiler = _profilerPoint.start();
1169
1170    try {
1171      _callableStatement.setInt(parameterIndex, x);
1172    }
1173    finally {
1174      profiler.finish();
1175    }
1176  }
1177
1178  public void setLong(int parameterIndex, long x)
1179    throws SQLException
1180  {
1181    Profiler profiler = _profilerPoint.start();
1182
1183    try {
1184      _callableStatement.setLong(parameterIndex, x);
1185    }
1186    finally {
1187      profiler.finish();
1188    }
1189  }
1190
1191  public void setFloat(int parameterIndex, float x)
1192    throws SQLException
1193  {
1194    Profiler profiler = _profilerPoint.start();
1195
1196    try {
1197      _callableStatement.setFloat(parameterIndex, x);
1198    }
1199    finally {
1200      profiler.finish();
1201    }
1202  }
1203
1204  public void setDouble(int parameterIndex, double x)
1205    throws SQLException
1206  {
1207    Profiler profiler = _profilerPoint.start();
1208
1209    try {
1210      _callableStatement.setDouble(parameterIndex, x);
1211    }
1212    finally {
1213      profiler.finish();
1214    }
1215  }
1216
1217  public void setBigDecimal(int parameterIndex, BigDecimal JavaDoc x)
1218    throws SQLException
1219  {
1220    Profiler profiler = _profilerPoint.start();
1221
1222    try {
1223      _callableStatement.setBigDecimal(parameterIndex, x);
1224    }
1225    finally {
1226      profiler.finish();
1227    }
1228  }
1229
1230  public void setString(int parameterIndex, String JavaDoc x)
1231    throws SQLException
1232  {
1233    Profiler profiler = _profilerPoint.start();
1234
1235    try {
1236      _callableStatement.setString(parameterIndex, x);
1237    }
1238    finally {
1239      profiler.finish();
1240    }
1241  }
1242
1243  public void setBytes(int parameterIndex, byte[] x)
1244    throws SQLException
1245  {
1246    Profiler profiler = _profilerPoint.start();
1247
1248    try {
1249      _callableStatement.setBytes(parameterIndex, x);
1250    }
1251    finally {
1252      profiler.finish();
1253    }
1254  }
1255
1256  public void setDate(int parameterIndex, Date x)
1257    throws SQLException
1258  {
1259    Profiler profiler = _profilerPoint.start();
1260
1261    try {
1262      _callableStatement.setDate(parameterIndex, x);
1263    }
1264    finally {
1265      profiler.finish();
1266    }
1267  }
1268
1269  public void setTime(int parameterIndex, Time x)
1270    throws SQLException
1271  {
1272    Profiler profiler = _profilerPoint.start();
1273
1274    try {
1275      _callableStatement.setTime(parameterIndex, x);
1276    }
1277    finally {
1278      profiler.finish();
1279    }
1280  }
1281
1282  public void setTimestamp(int parameterIndex, Timestamp x)
1283    throws SQLException
1284  {
1285    Profiler profiler = _profilerPoint.start();
1286
1287    try {
1288      _callableStatement.setTimestamp(parameterIndex, x);
1289    }
1290    finally {
1291      profiler.finish();
1292    }
1293  }
1294
1295  public void setAsciiStream(int parameterIndex, InputStream JavaDoc x, int length)
1296    throws SQLException
1297  {
1298    Profiler profiler = _profilerPoint.start();
1299
1300    try {
1301      _callableStatement.setAsciiStream(parameterIndex, x, length);
1302    }
1303    finally {
1304      profiler.finish();
1305    }
1306  }
1307
1308  public void setUnicodeStream(int parameterIndex, InputStream JavaDoc x, int length)
1309    throws SQLException
1310  {
1311    Profiler profiler = _profilerPoint.start();
1312
1313    try {
1314      _callableStatement.setUnicodeStream(parameterIndex, x, length);
1315    }
1316    finally {
1317      profiler.finish();
1318    }
1319  }
1320
1321  public void setBinaryStream(int parameterIndex, InputStream JavaDoc x, int length)
1322    throws SQLException
1323  {
1324    Profiler profiler = _profilerPoint.start();
1325
1326    try {
1327      _callableStatement.setBinaryStream(parameterIndex, x, length);
1328    }
1329    finally {
1330      profiler.finish();
1331    }
1332  }
1333
1334  public void clearParameters()
1335    throws SQLException
1336  {
1337    Profiler profiler = _profilerPoint.start();
1338
1339    try {
1340      _callableStatement.clearParameters();
1341    }
1342    finally {
1343      profiler.finish();
1344    }
1345  }
1346
1347  public void setObject(int parameterIndex,
1348                        Object JavaDoc x,
1349                        int targetSqlType,
1350                        int scale)
1351    throws SQLException
1352  {
1353    Profiler profiler = _profilerPoint.start();
1354
1355    try {
1356      _callableStatement.setObject(parameterIndex, x, targetSqlType, scale);
1357    }
1358    finally {
1359      profiler.finish();
1360    }
1361  }
1362
1363  public void setObject(int parameterIndex, Object JavaDoc x, int targetSqlType)
1364    throws SQLException
1365  {
1366    Profiler profiler = _profilerPoint.start();
1367
1368    try {
1369      _callableStatement.setObject(parameterIndex, x, targetSqlType);
1370    }
1371    finally {
1372      profiler.finish();
1373    }
1374  }
1375
1376  public void setObject(int parameterIndex, Object JavaDoc x)
1377    throws SQLException
1378  {
1379    Profiler profiler = _profilerPoint.start();
1380
1381    try {
1382      _callableStatement.setObject(parameterIndex, x);
1383    }
1384    finally {
1385      profiler.finish();
1386    }
1387  }
1388
1389  public boolean execute()
1390    throws SQLException
1391  {
1392    Profiler profiler = _profilerPoint.start();
1393
1394    try {
1395      return _callableStatement.execute();
1396    }
1397    finally {
1398      profiler.finish();
1399    }
1400  }
1401
1402  public void addBatch()
1403    throws SQLException
1404  {
1405    Profiler profiler = _profilerPoint.start();
1406
1407    try {
1408      _callableStatement.addBatch();
1409    }
1410    finally {
1411      profiler.finish();
1412    }
1413  }
1414
1415  public void setCharacterStream(int parameterIndex, Reader JavaDoc reader, int length)
1416    throws SQLException
1417  {
1418    Profiler profiler = _profilerPoint.start();
1419
1420    try {
1421      _callableStatement.setCharacterStream(parameterIndex, reader, length);
1422    }
1423    finally {
1424      profiler.finish();
1425    }
1426  }
1427
1428  public void setRef(int i, Ref x)
1429    throws SQLException
1430  {
1431    Profiler profiler = _profilerPoint.start();
1432
1433    try {
1434      _callableStatement.setRef(i, x);
1435    }
1436    finally {
1437      profiler.finish();
1438    }
1439  }
1440
1441  public void setBlob(int i, Blob x)
1442    throws SQLException
1443  {
1444    Profiler profiler = _profilerPoint.start();
1445
1446    try {
1447      _callableStatement.setBlob(i, x);
1448    }
1449    finally {
1450      profiler.finish();
1451    }
1452  }
1453
1454  public void setClob(int i, Clob x)
1455    throws SQLException
1456  {
1457    Profiler profiler = _profilerPoint.start();
1458
1459    try {
1460      _callableStatement.setClob(i, x);
1461    }
1462    finally {
1463      profiler.finish();
1464    }
1465  }
1466
1467  public void setArray(int i, Array x)
1468    throws SQLException
1469  {
1470    Profiler profiler = _profilerPoint.start();
1471
1472    try {
1473      _callableStatement.setArray(i, x);
1474    }
1475    finally {
1476      profiler.finish();
1477    }
1478  }
1479
1480  public ResultSetMetaData getMetaData()
1481    throws SQLException
1482  {
1483    Profiler profiler = _profilerPoint.start();
1484
1485    try {
1486      return _callableStatement.getMetaData();
1487    }
1488    finally {
1489      profiler.finish();
1490    }
1491  }
1492
1493  public void setDate(int parameterIndex, Date x, Calendar JavaDoc cal)
1494    throws SQLException
1495  {
1496    Profiler profiler = _profilerPoint.start();
1497
1498    try {
1499      _callableStatement.setDate(parameterIndex, x, cal);
1500    }
1501    finally {
1502      profiler.finish();
1503    }
1504  }
1505
1506  public void setTime(int parameterIndex, Time x, Calendar JavaDoc cal)
1507    throws SQLException
1508  {
1509    Profiler profiler = _profilerPoint.start();
1510
1511    try {
1512      _callableStatement.setTime(parameterIndex, x, cal);
1513    }
1514    finally {
1515      profiler.finish();
1516    }
1517  }
1518
1519  public void setTimestamp(int parameterIndex, Timestamp x, Calendar JavaDoc cal)
1520    throws SQLException
1521  {
1522    Profiler profiler = _profilerPoint.start();
1523
1524    try {
1525      _callableStatement.setTimestamp(parameterIndex, x, cal);
1526    }
1527    finally {
1528      profiler.finish();
1529    }
1530  }
1531
1532  public void setNull(int paramIndex, int sqlType, String JavaDoc typeName)
1533    throws SQLException
1534  {
1535    Profiler profiler = _profilerPoint.start();
1536
1537    try {
1538      _callableStatement.setNull(paramIndex, sqlType, typeName);
1539    }
1540    finally {
1541      profiler.finish();
1542    }
1543  }
1544
1545  public void setURL(int parameterIndex, URL JavaDoc x)
1546    throws SQLException
1547  {
1548    Profiler profiler = _profilerPoint.start();
1549
1550    try {
1551      _callableStatement.setURL(parameterIndex, x);
1552    }
1553    finally {
1554      profiler.finish();
1555    }
1556  }
1557
1558  public ParameterMetaData getParameterMetaData()
1559    throws SQLException
1560  {
1561    Profiler profiler = _profilerPoint.start();
1562
1563    try {
1564      return _callableStatement.getParameterMetaData();
1565    }
1566    finally {
1567      profiler.finish();
1568    }
1569  }
1570
1571  public ResultSet executeQuery(String JavaDoc sql)
1572    throws SQLException
1573  {
1574    Profiler profiler = _profilerPoint.start();
1575
1576    try {
1577      return _callableStatement.executeQuery(sql);
1578    }
1579    finally {
1580      profiler.finish();
1581    }
1582  }
1583
1584  public int executeUpdate(String JavaDoc sql)
1585    throws SQLException
1586  {
1587    Profiler profiler = _profilerPoint.start();
1588
1589    try {
1590      return _callableStatement.executeUpdate(sql);
1591    }
1592    finally {
1593      profiler.finish();
1594    }
1595  }
1596
1597  public void close()
1598    throws SQLException
1599  {
1600    Profiler profiler = _profilerPoint.start();
1601
1602    try {
1603      _callableStatement.close();
1604    }
1605    finally {
1606      profiler.finish();
1607    }
1608  }
1609
1610  public int getMaxFieldSize()
1611    throws SQLException
1612  {
1613    Profiler profiler = _profilerPoint.start();
1614
1615    try {
1616      return _callableStatement.getMaxFieldSize();
1617    }
1618    finally {
1619      profiler.finish();
1620    }
1621  }
1622
1623  public void setMaxFieldSize(int max)
1624    throws SQLException
1625  {
1626    Profiler profiler = _profilerPoint.start();
1627
1628    try {
1629      _callableStatement.setMaxFieldSize(max);
1630    }
1631    finally {
1632      profiler.finish();
1633    }
1634  }
1635
1636  public int getMaxRows()
1637    throws SQLException
1638  {
1639    Profiler profiler = _profilerPoint.start();
1640
1641    try {
1642      return _callableStatement.getMaxRows();
1643    }
1644    finally {
1645      profiler.finish();
1646    }
1647  }
1648
1649  public void setMaxRows(int max)
1650    throws SQLException
1651  {
1652    Profiler profiler = _profilerPoint.start();
1653
1654    try {
1655      _callableStatement.setMaxRows(max);
1656    }
1657    finally {
1658      profiler.finish();
1659    }
1660  }
1661
1662  public void setEscapeProcessing(boolean enable)
1663    throws SQLException
1664  {
1665    Profiler profiler = _profilerPoint.start();
1666
1667    try {
1668      _callableStatement.setEscapeProcessing(enable);
1669    }
1670    finally {
1671      profiler.finish();
1672    }
1673  }
1674
1675  public int getQueryTimeout()
1676    throws SQLException
1677  {
1678    Profiler profiler = _profilerPoint.start();
1679
1680    try {
1681      return _callableStatement.getQueryTimeout();
1682    }
1683    finally {
1684      profiler.finish();
1685    }
1686  }
1687
1688  public void setQueryTimeout(int seconds)
1689    throws SQLException
1690  {
1691    Profiler profiler = _profilerPoint.start();
1692
1693    try {
1694      _callableStatement.setQueryTimeout(seconds);
1695    }
1696    finally {
1697      profiler.finish();
1698    }
1699  }
1700
1701  public void cancel()
1702    throws SQLException
1703  {
1704    Profiler profiler = _profilerPoint.start();
1705
1706    try {
1707      _callableStatement.cancel();
1708    }
1709    finally {
1710      profiler.finish();
1711    }
1712  }
1713
1714  public SQLWarning getWarnings()
1715    throws SQLException
1716  {
1717    Profiler profiler = _profilerPoint.start();
1718
1719    try {
1720      return _callableStatement.getWarnings();
1721    }
1722    finally {
1723      profiler.finish();
1724    }
1725  }
1726
1727  public void clearWarnings()
1728    throws SQLException
1729  {
1730    Profiler profiler = _profilerPoint.start();
1731
1732    try {
1733      _callableStatement.clearWarnings();
1734    }
1735    finally {
1736      profiler.finish();
1737    }
1738  }
1739
1740  public void setCursorName(String JavaDoc name)
1741    throws SQLException
1742  {
1743    Profiler profiler = _profilerPoint.start();
1744
1745    try {
1746      _callableStatement.setCursorName(name);
1747    }
1748    finally {
1749      profiler.finish();
1750    }
1751  }
1752
1753  public boolean execute(String JavaDoc sql)
1754    throws SQLException
1755  {
1756    Profiler profiler = _profilerPoint.start();
1757
1758    try {
1759      return _callableStatement.execute(sql);
1760    }
1761    finally {
1762      profiler.finish();
1763    }
1764  }
1765
1766  public ResultSet getResultSet()
1767    throws SQLException
1768  {
1769    Profiler profiler = _profilerPoint.start();
1770
1771    try {
1772      return _callableStatement.getResultSet();
1773    }
1774    finally {
1775      profiler.finish();
1776    }
1777  }
1778
1779  public int getUpdateCount()
1780    throws SQLException
1781  {
1782    Profiler profiler = _profilerPoint.start();
1783
1784    try {
1785      return _callableStatement.getUpdateCount();
1786    }
1787    finally {
1788      profiler.finish();
1789    }
1790  }
1791
1792  public boolean getMoreResults()
1793    throws SQLException
1794  {
1795    Profiler profiler = _profilerPoint.start();
1796
1797    try {
1798      return _callableStatement.getMoreResults();
1799    }
1800    finally {
1801      profiler.finish();
1802    }
1803  }
1804
1805  public void setFetchDirection(int direction)
1806    throws SQLException
1807  {
1808    Profiler profiler = _profilerPoint.start();
1809
1810    try {
1811      _callableStatement.setFetchDirection(direction);
1812    }
1813    finally {
1814      profiler.finish();
1815    }
1816  }
1817
1818  public int getFetchDirection()
1819    throws SQLException
1820  {
1821    Profiler profiler = _profilerPoint.start();
1822
1823    try {
1824      return _callableStatement.getFetchDirection();
1825    }
1826    finally {
1827      profiler.finish();
1828    }
1829  }
1830
1831  public void setFetchSize(int rows)
1832    throws SQLException
1833  {
1834    Profiler profiler = _profilerPoint.start();
1835
1836    try {
1837      _callableStatement.setFetchSize(rows);
1838    }
1839    finally {
1840      profiler.finish();
1841    }
1842  }
1843
1844
1845  public int getFetchSize()
1846    throws SQLException
1847  {
1848    Profiler profiler = _profilerPoint.start();
1849
1850    try {
1851      return _callableStatement.getFetchSize();
1852    }
1853    finally {
1854      profiler.finish();
1855    }
1856  }
1857
1858  public int getResultSetConcurrency()
1859    throws SQLException
1860  {
1861    Profiler profiler = _profilerPoint.start();
1862
1863    try {
1864      return _callableStatement.getResultSetConcurrency();
1865    }
1866    finally {
1867      profiler.finish();
1868    }
1869  }
1870
1871  public int getResultSetType()
1872    throws SQLException
1873  {
1874    Profiler profiler = _profilerPoint.start();
1875
1876    try {
1877      return _callableStatement.getResultSetType();
1878    }
1879    finally {
1880      profiler.finish();
1881    }
1882  }
1883
1884  public void addBatch(String JavaDoc sql)
1885    throws SQLException
1886  {
1887    Profiler profiler = _profilerPoint.start();
1888
1889    try {
1890      _callableStatement.addBatch(sql);
1891    }
1892    finally {
1893      profiler.finish();
1894    }
1895  }
1896
1897  public void clearBatch()
1898    throws SQLException
1899  {
1900    Profiler profiler = _profilerPoint.start();
1901
1902    try {
1903      _callableStatement.clearBatch();
1904    }
1905    finally {
1906      profiler.finish();
1907    }
1908  }
1909
1910  public int[] executeBatch()
1911    throws SQLException
1912  {
1913    Profiler profiler = _profilerPoint.start();
1914
1915    try {
1916      return _callableStatement.executeBatch();
1917    }
1918    finally {
1919      profiler.finish();
1920    }
1921  }
1922
1923  public Connection getConnection()
1924    throws SQLException
1925  {
1926    Profiler profiler = _profilerPoint.start();
1927
1928    try {
1929      return _callableStatement.getConnection();
1930    }
1931    finally {
1932      profiler.finish();
1933    }
1934  }
1935
1936  public boolean getMoreResults(int current)
1937    throws SQLException
1938  {
1939    Profiler profiler = _profilerPoint.start();
1940
1941    try {
1942      return _callableStatement.getMoreResults(current);
1943    }
1944    finally {
1945      profiler.finish();
1946    }
1947  }
1948
1949  public ResultSet getGeneratedKeys()
1950    throws SQLException
1951  {
1952    Profiler profiler = _profilerPoint.start();
1953
1954    try {
1955      return _callableStatement.getGeneratedKeys();
1956    }
1957    finally {
1958      profiler.finish();
1959    }
1960  }
1961
1962  public int executeUpdate(String JavaDoc sql, int autoGeneratedKeys)
1963    throws SQLException
1964  {
1965    Profiler profiler = _profilerPoint.start();
1966
1967    try {
1968      return _callableStatement.executeUpdate(sql, autoGeneratedKeys);
1969    }
1970    finally {
1971      profiler.finish();
1972    }
1973  }
1974
1975  public int executeUpdate(String JavaDoc sql, int[] columnIndexes)
1976    throws SQLException
1977  {
1978    Profiler profiler = _profilerPoint.start();
1979
1980    try {
1981      return _callableStatement.executeUpdate(sql, columnIndexes);
1982    }
1983    finally {
1984      profiler.finish();
1985    }
1986  }
1987
1988  public int executeUpdate(String JavaDoc sql, String JavaDoc[] columnNames)
1989    throws SQLException
1990  {
1991    Profiler profiler = _profilerPoint.start();
1992
1993    try {
1994      return _callableStatement.executeUpdate(sql, columnNames);
1995    }
1996    finally {
1997      profiler.finish();
1998    }
1999  }
2000
2001  public boolean execute(String JavaDoc sql, int autoGeneratedKeys)
2002    throws SQLException
2003  {
2004    Profiler profiler = _profilerPoint.start();
2005
2006    try {
2007      return _callableStatement.execute(sql, autoGeneratedKeys);
2008    }
2009    finally {
2010      profiler.finish();
2011    }
2012  }
2013
2014  public boolean execute(String JavaDoc sql, int[] columnIndexes)
2015    throws SQLException
2016  {
2017    Profiler profiler = _profilerPoint.start();
2018
2019    try {
2020      return _callableStatement.execute(sql, columnIndexes);
2021    }
2022    finally {
2023      profiler.finish();
2024    }
2025  }
2026
2027  public boolean execute(String JavaDoc sql, String JavaDoc[] columnNames)
2028    throws SQLException
2029  {
2030    Profiler profiler = _profilerPoint.start();
2031
2032    try {
2033      return _callableStatement.execute(sql, columnNames);
2034    }
2035    finally {
2036      profiler.finish();
2037    }
2038  }
2039
2040  public int getResultSetHoldability()
2041    throws SQLException
2042  {
2043    Profiler profiler = _profilerPoint.start();
2044
2045    try {
2046      return _callableStatement.getResultSetHoldability();
2047    }
2048    finally {
2049      profiler.finish();
2050    }
2051  }
2052
2053  public String JavaDoc toString()
2054  {
2055    return "CallableStatementWrapper[" + _profilerPoint.getName() + "]";
2056  }
2057}
2058
Popular Tags