KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > resource > adapter > jdbc > WrappedCallableStatement


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.resource.adapter.jdbc;
23
24 import java.io.InputStream JavaDoc;
25 import java.io.Reader JavaDoc;
26 import java.math.BigDecimal JavaDoc;
27 import java.net.URL JavaDoc;
28 import java.sql.Array JavaDoc;
29 import java.sql.Blob JavaDoc;
30 import java.sql.CallableStatement JavaDoc;
31 import java.sql.Clob JavaDoc;
32 import java.sql.Date JavaDoc;
33 import java.sql.Ref JavaDoc;
34 import java.sql.SQLException JavaDoc;
35 import java.sql.Time JavaDoc;
36 import java.sql.Timestamp JavaDoc;
37 import java.util.Calendar JavaDoc;
38 import java.util.Map JavaDoc;
39
40 /**
41  * WrappedCallableStatement
42  *
43  * @author <a HREF="mailto:d_jencks@users.sourceforge.net">David Jencks</a>
44  * @author <a HREF="mailto:adrian@jboss.com">Adrian Brock</a>
45  * @version $Revision: 40746 $
46  */

47 public class WrappedCallableStatement extends WrappedPreparedStatement implements CallableStatement JavaDoc
48 {
49    private final CallableStatement JavaDoc cs;
50
51    public WrappedCallableStatement(final WrappedConnection lc, final CallableStatement JavaDoc cs)
52    {
53       super(lc, cs);
54       this.cs = cs;
55    }
56
57    public Object JavaDoc getObject(int parameterIndex) throws SQLException JavaDoc
58    {
59       checkState();
60       try
61       {
62          return cs.getObject(parameterIndex);
63       }
64       catch (Throwable JavaDoc t)
65       {
66          throw checkException(t);
67       }
68    }
69
70    public Object JavaDoc getObject(int parameterIndex, Map JavaDoc typeMap) throws SQLException JavaDoc
71    {
72       checkState();
73       try
74       {
75          return cs.getObject(parameterIndex, typeMap);
76       }
77       catch (Throwable JavaDoc t)
78       {
79          throw checkException(t);
80       }
81    }
82
83    public Object JavaDoc getObject(String JavaDoc parameterName) throws SQLException JavaDoc
84    {
85       checkState();
86       try
87       {
88          return cs.getObject(parameterName);
89       }
90       catch (Throwable JavaDoc t)
91       {
92          throw checkException(t);
93       }
94    }
95
96    public Object JavaDoc getObject(String JavaDoc parameterName, Map JavaDoc typeMap) throws SQLException JavaDoc
97    {
98       checkState();
99       try
100       {
101          return cs.getObject(parameterName, typeMap);
102       }
103       catch (Throwable JavaDoc t)
104       {
105          throw checkException(t);
106       }
107    }
108
109    public boolean getBoolean(int parameterIndex) throws SQLException JavaDoc
110    {
111       checkState();
112       try
113       {
114          return cs.getBoolean(parameterIndex);
115       }
116       catch (Throwable JavaDoc t)
117       {
118          throw checkException(t);
119       }
120    }
121
122    public boolean getBoolean(String JavaDoc parameterName) throws SQLException JavaDoc
123    {
124       checkState();
125       try
126       {
127          return cs.getBoolean(parameterName);
128       }
129       catch (Throwable JavaDoc t)
130       {
131          throw checkException(t);
132       }
133    }
134
135    public byte getByte(int parameterIndex) throws SQLException JavaDoc
136    {
137       checkState();
138       try
139       {
140          return cs.getByte(parameterIndex);
141       }
142       catch (Throwable JavaDoc t)
143       {
144          throw checkException(t);
145       }
146    }
147
148    public byte getByte(String JavaDoc parameterName) throws SQLException JavaDoc
149    {
150       checkState();
151       try
152       {
153          return cs.getByte(parameterName);
154       }
155       catch (Throwable JavaDoc t)
156       {
157          throw checkException(t);
158       }
159    }
160
161    public short getShort(int parameterIndex) throws SQLException JavaDoc
162    {
163       checkState();
164       try
165       {
166          return cs.getShort(parameterIndex);
167       }
168       catch (Throwable JavaDoc t)
169       {
170          throw checkException(t);
171       }
172    }
173
174    public short getShort(String JavaDoc parameterName) throws SQLException JavaDoc
175    {
176       checkState();
177       try
178       {
179          return cs.getShort(parameterName);
180       }
181       catch (Throwable JavaDoc t)
182       {
183          throw checkException(t);
184       }
185    }
186
187    public int getInt(int parameterIndex) throws SQLException JavaDoc
188    {
189       checkState();
190       try
191       {
192          return cs.getInt(parameterIndex);
193       }
194       catch (Throwable JavaDoc t)
195       {
196          throw checkException(t);
197       }
198    }
199
200    public int getInt(String JavaDoc parameterName) throws SQLException JavaDoc
201    {
202       checkState();
203       try
204       {
205          return cs.getInt(parameterName);
206       }
207       catch (Throwable JavaDoc t)
208       {
209          throw checkException(t);
210       }
211    }
212
213    public long getLong(int parameterIndex) throws SQLException JavaDoc
214    {
215       checkState();
216       try
217       {
218          return cs.getLong(parameterIndex);
219       }
220       catch (Throwable JavaDoc t)
221       {
222          throw checkException(t);
223       }
224    }
225
226    public long getLong(String JavaDoc parameterName) throws SQLException JavaDoc
227    {
228       checkState();
229       try
230       {
231          return cs.getLong(parameterName);
232       }
233       catch (Throwable JavaDoc t)
234       {
235          throw checkException(t);
236       }
237    }
238
239    public float getFloat(int parameterIndex) throws SQLException JavaDoc
240    {
241       checkState();
242       try
243       {
244          return cs.getFloat(parameterIndex);
245       }
246       catch (Throwable JavaDoc t)
247       {
248          throw checkException(t);
249       }
250    }
251
252    public float getFloat(String JavaDoc parameterName) throws SQLException JavaDoc
253    {
254       checkState();
255       try
256       {
257          return cs.getFloat(parameterName);
258       }
259       catch (Throwable JavaDoc t)
260       {
261          throw checkException(t);
262       }
263    }
264
265    public double getDouble(int parameterIndex) throws SQLException JavaDoc
266    {
267       checkState();
268       try
269       {
270          return cs.getDouble(parameterIndex);
271       }
272       catch (Throwable JavaDoc t)
273       {
274          throw checkException(t);
275       }
276    }
277
278    public double getDouble(String JavaDoc parameterName) throws SQLException JavaDoc
279    {
280       checkState();
281       try
282       {
283          return cs.getDouble(parameterName);
284       }
285       catch (Throwable JavaDoc t)
286       {
287          throw checkException(t);
288       }
289    }
290
291    public byte[] getBytes(int parameterIndex) throws SQLException JavaDoc
292    {
293       checkState();
294       try
295       {
296          return cs.getBytes(parameterIndex);
297       }
298       catch (Throwable JavaDoc t)
299       {
300          throw checkException(t);
301       }
302    }
303
304    public byte[] getBytes(String JavaDoc parameterName) throws SQLException JavaDoc
305    {
306       checkState();
307       try
308       {
309          return cs.getBytes(parameterName);
310       }
311       catch (Throwable JavaDoc t)
312       {
313          throw checkException(t);
314       }
315    }
316
317    public URL JavaDoc getURL(int parameterIndex) throws SQLException JavaDoc
318    {
319      checkState();
320      try
321       {
322          return cs.getURL(parameterIndex);
323       }
324       catch (Throwable JavaDoc t)
325       {
326          throw checkException(t);
327       }
328    }
329
330    public URL JavaDoc getURL(String JavaDoc parameterName) throws SQLException JavaDoc
331    {
332       checkState();
333       try
334       {
335          return cs.getURL(parameterName);
336       }
337       catch (Throwable JavaDoc t)
338       {
339          throw checkException(t);
340       }
341    }
342
343    public String JavaDoc getString(int parameterIndex) throws SQLException JavaDoc
344    {
345      checkState();
346      try
347       {
348          return cs.getString(parameterIndex);
349       }
350       catch (Throwable JavaDoc t)
351       {
352          throw checkException(t);
353       }
354    }
355
356    public String JavaDoc getString(String JavaDoc parameterName) throws SQLException JavaDoc
357    {
358       checkState();
359       try
360       {
361          return cs.getString(parameterName);
362       }
363       catch (Throwable JavaDoc t)
364       {
365          throw checkException(t);
366       }
367    }
368
369    public Ref JavaDoc getRef(int parameterIndex) throws SQLException JavaDoc
370    {
371       checkState();
372       try
373       {
374          return cs.getRef(parameterIndex);
375       }
376       catch (Throwable JavaDoc t)
377       {
378          throw checkException(t);
379       }
380    }
381
382    public Ref JavaDoc getRef(String JavaDoc parameterName) throws SQLException JavaDoc
383    {
384       checkState();
385       try
386       {
387          return cs.getRef(parameterName);
388       }
389       catch (Throwable JavaDoc t)
390       {
391          throw checkException(t);
392       }
393    }
394
395    public Time JavaDoc getTime(int parameterIndex) throws SQLException JavaDoc
396    {
397       checkState();
398       try
399       {
400          return cs.getTime(parameterIndex);
401       }
402       catch (Throwable JavaDoc t)
403       {
404          throw checkException(t);
405       }
406    }
407
408    public Time JavaDoc getTime(int parameterIndex, Calendar JavaDoc calendar) throws SQLException JavaDoc
409    {
410       checkState();
411       try
412       {
413          return cs.getTime(parameterIndex, calendar);
414       }
415       catch (Throwable JavaDoc t)
416       {
417          throw checkException(t);
418       }
419    }
420
421    public Time JavaDoc getTime(String JavaDoc parameterName) throws SQLException JavaDoc
422    {
423       checkState();
424       try
425       {
426          return cs.getTime(parameterName);
427       }
428       catch (Throwable JavaDoc t)
429       {
430          throw checkException(t);
431       }
432    }
433
434    public Time JavaDoc getTime(String JavaDoc parameterName, Calendar JavaDoc calendar) throws SQLException JavaDoc
435    {
436       checkState();
437       try
438       {
439          return cs.getTime(parameterName, calendar);
440       }
441       catch (Throwable JavaDoc t)
442       {
443          throw checkException(t);
444       }
445    }
446
447    public Date JavaDoc getDate(int parameterIndex) throws SQLException JavaDoc
448    {
449       checkState();
450       try
451       {
452          return cs.getDate(parameterIndex);
453       }
454       catch (Throwable JavaDoc t)
455       {
456          throw checkException(t);
457       }
458    }
459
460    public Date JavaDoc getDate(int parameterIndex, Calendar JavaDoc calendar) throws SQLException JavaDoc
461    {
462       checkState();
463       try
464       {
465          return cs.getDate(parameterIndex, calendar);
466       }
467       catch (Throwable JavaDoc t)
468       {
469          throw checkException(t);
470       }
471    }
472
473    public Date JavaDoc getDate(String JavaDoc parameterName) throws SQLException JavaDoc
474    {
475       checkState();
476       try
477       {
478          return cs.getDate(parameterName);
479       }
480       catch (Throwable JavaDoc t)
481       {
482          throw checkException(t);
483       }
484    }
485
486    public Date JavaDoc getDate(String JavaDoc parameterName, Calendar JavaDoc calendar) throws SQLException JavaDoc
487    {
488       checkState();
489       try
490       {
491          return cs.getDate(parameterName, calendar);
492       }
493       catch (Throwable JavaDoc t)
494       {
495          throw checkException(t);
496       }
497    }
498
499    public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException JavaDoc
500    {
501       checkState();
502       try
503       {
504          cs.registerOutParameter(parameterIndex, sqlType);
505       }
506       catch (Throwable JavaDoc t)
507       {
508          throw checkException(t);
509       }
510    }
511
512    public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException JavaDoc
513    {
514       checkState();
515       try
516       {
517          cs.registerOutParameter(parameterIndex, sqlType, scale);
518       }
519       catch (Throwable JavaDoc t)
520       {
521          throw checkException(t);
522       }
523    }
524
525    public void registerOutParameter(int parameterIndex, int sqlType, String JavaDoc typeName) throws SQLException JavaDoc
526    {
527       checkState();
528       try
529       {
530          cs.registerOutParameter(parameterIndex, sqlType, typeName);
531       }
532       catch (Throwable JavaDoc t)
533       {
534          throw checkException(t);
535       }
536    }
537
538    public void registerOutParameter(String JavaDoc parameterName, int sqlType) throws SQLException JavaDoc
539    {
540       checkState();
541       try
542       {
543          cs.registerOutParameter(parameterName, sqlType);
544       }
545       catch (Throwable JavaDoc t)
546       {
547          throw checkException(t);
548       }
549    }
550
551    public void registerOutParameter(String JavaDoc parameterName, int sqlType, int scale) throws SQLException JavaDoc
552    {
553       checkState();
554       try
555       {
556          cs.registerOutParameter(parameterName, sqlType, scale);
557       }
558       catch (Throwable JavaDoc t)
559       {
560          throw checkException(t);
561       }
562    }
563
564    public void registerOutParameter(String JavaDoc parameterName, int sqlType, String JavaDoc typeName) throws SQLException JavaDoc
565    {
566       checkState();
567       try
568       {
569          cs.registerOutParameter(parameterName, sqlType, typeName);
570       }
571       catch (Throwable JavaDoc t)
572       {
573          throw checkException(t);
574       }
575    }
576
577    public boolean wasNull() throws SQLException JavaDoc
578    {
579       checkState();
580       try
581       {
582          return cs.wasNull();
583       }
584       catch (Throwable JavaDoc t)
585       {
586          throw checkException(t);
587       }
588    }
589
590    /**
591     * @deprecated
592     */

593    public BigDecimal JavaDoc getBigDecimal(int parameterIndex, int scale) throws SQLException JavaDoc
594    {
595       checkState();
596       try
597       {
598          return cs.getBigDecimal(parameterIndex, scale);
599       }
600       catch (Throwable JavaDoc t)
601       {
602          throw checkException(t);
603       }
604    }
605
606    public BigDecimal JavaDoc getBigDecimal(int parameterIndex) throws SQLException JavaDoc
607    {
608       checkState();
609       try
610       {
611          return cs.getBigDecimal(parameterIndex);
612       }
613       catch (Throwable JavaDoc t)
614       {
615          throw checkException(t);
616       }
617    }
618
619    public BigDecimal JavaDoc getBigDecimal(String JavaDoc parameterName) throws SQLException JavaDoc
620    {
621       checkState();
622       try
623       {
624          return cs.getBigDecimal(parameterName);
625       }
626       catch (Throwable JavaDoc t)
627       {
628          throw checkException(t);
629       }
630    }
631
632    public Timestamp JavaDoc getTimestamp(int parameterIndex) throws SQLException JavaDoc
633    {
634       checkState();
635       try
636       {
637          return cs.getTimestamp(parameterIndex);
638       }
639       catch (Throwable JavaDoc t)
640       {
641          throw checkException(t);
642       }
643    }
644
645    public Timestamp JavaDoc getTimestamp(int parameterIndex, Calendar JavaDoc calendar) throws SQLException JavaDoc
646    {
647       checkState();
648       try
649       {
650          return cs.getTimestamp(parameterIndex, calendar);
651       }
652       catch (Throwable JavaDoc t)
653       {
654          throw checkException(t);
655       }
656    }
657
658    public Timestamp JavaDoc getTimestamp(String JavaDoc parameterName) throws SQLException JavaDoc
659    {
660       checkState();
661       try
662       {
663          return cs.getTimestamp(parameterName);
664       }
665       catch (Throwable JavaDoc t)
666       {
667          throw checkException(t);
668       }
669    }
670
671    public Timestamp JavaDoc getTimestamp(String JavaDoc parameterName, Calendar JavaDoc calendar) throws SQLException JavaDoc
672    {
673       checkState();
674       try
675       {
676          return cs.getTimestamp(parameterName, calendar);
677       }
678       catch (Throwable JavaDoc t)
679       {
680          throw checkException(t);
681       }
682    }
683
684    public Blob JavaDoc getBlob(int parameterIndex) throws SQLException JavaDoc
685    {
686       checkState();
687       try
688       {
689          return cs.getBlob(parameterIndex);
690       }
691       catch (Throwable JavaDoc t)
692       {
693          throw checkException(t);
694       }
695    }
696
697    public Blob JavaDoc getBlob(String JavaDoc parameterName) throws SQLException JavaDoc
698    {
699       checkState();
700       try
701       {
702          return cs.getBlob(parameterName);
703       }
704       catch (Throwable JavaDoc t)
705       {
706          throw checkException(t);
707       }
708    }
709
710    public Clob JavaDoc getClob(int parameterIndex) throws SQLException JavaDoc
711    {
712       checkState();
713       try
714       {
715          return cs.getClob(parameterIndex);
716       }
717       catch (Throwable JavaDoc t)
718       {
719          throw checkException(t);
720       }
721    }
722
723    public Clob JavaDoc getClob(String JavaDoc parameterName) throws SQLException JavaDoc
724    {
725       checkState();
726       try
727       {
728          return cs.getClob(parameterName);
729       }
730       catch (Throwable JavaDoc t)
731       {
732          throw checkException(t);
733       }
734    }
735
736    public Array JavaDoc getArray(int parameterIndex) throws SQLException JavaDoc
737    {
738       checkState();
739       try
740       {
741          return cs.getArray(parameterIndex);
742       }
743       catch (Throwable JavaDoc t)
744       {
745          throw checkException(t);
746       }
747    }
748
749    public Array JavaDoc getArray(String JavaDoc parameterName) throws SQLException JavaDoc
750    {
751       checkState();
752       try
753       {
754          return cs.getArray(parameterName);
755       }
756       catch (Throwable JavaDoc t)
757       {
758          throw checkException(t);
759       }
760    }
761
762    public void setBoolean(String JavaDoc parameterName, boolean value) throws SQLException JavaDoc
763    {
764       checkState();
765       try
766       {
767          cs.setBoolean(parameterName, value);
768       }
769       catch (Throwable JavaDoc t)
770       {
771          throw checkException(t);
772       }
773    }
774
775    public void setByte(String JavaDoc parameterName, byte value) throws SQLException JavaDoc
776    {
777       checkState();
778       try
779       {
780          cs.setByte(parameterName, value);
781       }
782       catch (Throwable JavaDoc t)
783       {
784          throw checkException(t);
785       }
786    }
787
788    public void setShort(String JavaDoc parameterName, short value) throws SQLException JavaDoc
789    {
790       checkState();
791       try
792       {
793          cs.setShort(parameterName, value);
794       }
795       catch (Throwable JavaDoc t)
796       {
797          throw checkException(t);
798       }
799    }
800
801    public void setInt(String JavaDoc parameterName, int value) throws SQLException JavaDoc
802    {
803       checkState();
804       try
805       {
806          cs.setInt(parameterName, value);
807       }
808       catch (Throwable JavaDoc t)
809       {
810          throw checkException(t);
811       }
812    }
813
814    public void setLong(String JavaDoc parameterName, long value) throws SQLException JavaDoc
815    {
816       checkState();
817       try
818       {
819          cs.setLong(parameterName, value);
820       }
821       catch (Throwable JavaDoc t)
822       {
823          throw checkException(t);
824       }
825    }
826
827    public void setFloat(String JavaDoc parameterName, float value) throws SQLException JavaDoc
828    {
829       checkState();
830       try
831       {
832          cs.setFloat(parameterName, value);
833       }
834       catch (Throwable JavaDoc t)
835       {
836          throw checkException(t);
837       }
838    }
839
840    public void setDouble(String JavaDoc parameterName, double value) throws SQLException JavaDoc
841    {
842       checkState();
843       try
844       {
845          cs.setDouble(parameterName, value);
846       }
847       catch (Throwable JavaDoc t)
848       {
849          throw checkException(t);
850       }
851    }
852
853    public void setURL(String JavaDoc parameterName, URL JavaDoc value) throws SQLException JavaDoc
854    {
855       checkState();
856       try
857       {
858          cs.setURL(parameterName, value);
859       }
860       catch (Throwable JavaDoc t)
861       {
862          throw checkException(t);
863       }
864    }
865
866    public void setTime(String JavaDoc parameterName, Time JavaDoc value) throws SQLException JavaDoc
867    {
868       checkState();
869       try
870       {
871          cs.setTime(parameterName, value);
872       }
873       catch (Throwable JavaDoc t)
874       {
875          throw checkException(t);
876       }
877    }
878
879    public void setTime(String JavaDoc parameterName, Time JavaDoc value, Calendar JavaDoc calendar) throws SQLException JavaDoc
880    {
881       checkState();
882       try
883       {
884          cs.setTime(parameterName, value, calendar);
885       }
886       catch (Throwable JavaDoc t)
887       {
888          throw checkException(t);
889       }
890    }
891
892    public void setNull(String JavaDoc parameterName, int value) throws SQLException JavaDoc
893    {
894       checkState();
895       try
896       {
897          cs.setNull(parameterName, value);
898       }
899       catch (Throwable JavaDoc t)
900       {
901          throw checkException(t);
902       }
903    }
904
905    public void setNull(String JavaDoc parameterName, int sqlType, String JavaDoc typeName) throws SQLException JavaDoc
906    {
907       checkState();
908       try
909       {
910          cs.setNull(parameterName, sqlType, typeName);
911       }
912       catch (Throwable JavaDoc t)
913       {
914          throw checkException(t);
915       }
916    }
917
918    public void setBigDecimal(String JavaDoc parameterName, BigDecimal JavaDoc value) throws SQLException JavaDoc
919    {
920       checkState();
921       try
922       {
923          cs.setBigDecimal(parameterName, value);
924       }
925       catch (Throwable JavaDoc t)
926       {
927          throw checkException(t);
928       }
929    }
930
931    public void setString(String JavaDoc parameterName, String JavaDoc value) throws SQLException JavaDoc
932    {
933       checkState();
934       try
935       {
936          cs.setString(parameterName, value);
937       }
938       catch (Throwable JavaDoc t)
939       {
940          throw checkException(t);
941       }
942    }
943
944    public void setBytes(String JavaDoc parameterName, byte[] value) throws SQLException JavaDoc
945    {
946       checkState();
947       try
948       {
949          cs.setBytes(parameterName, value);
950       }
951       catch (Throwable JavaDoc t)
952       {
953          throw checkException(t);
954       }
955    }
956
957    public void setDate(String JavaDoc parameterName, Date JavaDoc value) throws SQLException JavaDoc
958    {
959       checkState();
960       try
961       {
962          cs.setDate(parameterName, value);
963       }
964       catch (Throwable JavaDoc t)
965       {
966          throw checkException(t);
967       }
968    }
969
970    public void setDate(String JavaDoc parameterName, Date JavaDoc value, Calendar JavaDoc calendar) throws SQLException JavaDoc
971    {
972       checkState();
973       try
974       {
975          cs.setDate(parameterName, value, calendar);
976       }
977       catch (Throwable JavaDoc t)
978       {
979          throw checkException(t);
980       }
981    }
982
983    public void setTimestamp(String JavaDoc parameterName, Timestamp JavaDoc value) throws SQLException JavaDoc
984    {
985       checkState();
986       try
987       {
988          cs.setTimestamp(parameterName, value);
989       }
990       catch (Throwable JavaDoc t)
991       {
992          throw checkException(t);
993       }
994    }
995
996    public void setTimestamp(String JavaDoc parameterName, Timestamp JavaDoc value, Calendar JavaDoc calendar) throws SQLException JavaDoc
997    {
998       checkState();
999       try
1000      {
1001         cs.setTimestamp(parameterName, value, calendar);
1002      }
1003      catch (Throwable JavaDoc t)
1004      {
1005         throw checkException(t);
1006      }
1007   }
1008
1009   public void setAsciiStream(String JavaDoc parameterName, InputStream JavaDoc stream, int length) throws SQLException JavaDoc
1010   {
1011      checkState();
1012      try
1013      {
1014         cs.setAsciiStream(parameterName, stream, length);
1015      }
1016      catch (Throwable JavaDoc t)
1017      {
1018         throw checkException(t);
1019      }
1020   }
1021
1022   public void setBinaryStream(String JavaDoc parameterName, InputStream JavaDoc stream, int length) throws SQLException JavaDoc
1023   {
1024      checkState();
1025      try
1026      {
1027         cs.setBinaryStream(parameterName, stream, length);
1028      }
1029      catch (Throwable JavaDoc t)
1030      {
1031         throw checkException(t);
1032      }
1033   }
1034
1035   public void setObject(String JavaDoc parameterName, Object JavaDoc value, int sqlType, int scale) throws SQLException JavaDoc
1036   {
1037      checkState();
1038      try
1039      {
1040         cs.setObject(parameterName, value, sqlType, scale);
1041      }
1042      catch (Throwable JavaDoc t)
1043      {
1044         throw checkException(t);
1045      }
1046   }
1047
1048   public void setObject(String JavaDoc parameterName, Object JavaDoc value, int sqlType) throws SQLException JavaDoc
1049   {
1050      checkState();
1051      try
1052      {
1053         cs.setObject(parameterName, value, sqlType);
1054      }
1055      catch (Throwable JavaDoc t)
1056      {
1057         throw checkException(t);
1058      }
1059   }
1060
1061   public void setObject(String JavaDoc parameterName, Object JavaDoc value) throws SQLException JavaDoc
1062   {
1063      checkState();
1064      try
1065      {
1066         cs.setObject(parameterName, value);
1067      }
1068      catch (Throwable JavaDoc t)
1069      {
1070         throw checkException(t);
1071      }
1072   }
1073
1074   public void setCharacterStream(String JavaDoc parameterName, Reader JavaDoc reader, int length) throws SQLException JavaDoc
1075   {
1076      checkState();
1077      try
1078      {
1079         cs.setCharacterStream(parameterName, reader, length);
1080      }
1081      catch (Throwable JavaDoc t)
1082      {
1083         throw checkException(t);
1084      }
1085   }
1086}
1087
Popular Tags