KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > craftsman > spy > SpyCallableStatement


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

19 package craftsman.spy;
20
21 import java.io.InputStream JavaDoc;
22 import java.io.Reader JavaDoc;
23 import java.math.BigDecimal JavaDoc;
24 import java.net.URL JavaDoc;
25 import java.sql.Array JavaDoc;
26 import java.sql.Blob JavaDoc;
27 import java.sql.CallableStatement JavaDoc;
28 import java.sql.Clob JavaDoc;
29 import java.sql.Connection JavaDoc;
30 import java.sql.Date JavaDoc;
31 import java.sql.Ref JavaDoc;
32 import java.sql.SQLException JavaDoc;
33 import java.sql.Time JavaDoc;
34 import java.sql.Timestamp JavaDoc;
35 import java.sql.Types JavaDoc;
36 import java.util.ArrayList JavaDoc;
37 import java.util.Calendar JavaDoc;
38 import java.util.HashMap JavaDoc;
39 import java.util.Map JavaDoc;
40
41 /**
42  * The classe used to execute SQL stored procedures.
43  *
44  * @author Sébastien LECACHEUR
45  */

46 public class SpyCallableStatement extends SpyPreparedStatement implements CallableStatement JavaDoc {
47     /**
48      * The real JDBC callable statement instance.
49      */

50     private CallableStatement JavaDoc real = null;
51
52
53     /**
54      * Indicates if the output parameters were already logged.
55      */

56     private boolean outputParametersLogged = false;
57
58
59     /**
60      * The list of all the output parameters type.
61      */

62     private ArrayList JavaDoc outputParametersIndex = null;
63
64
65     /**
66      * The list of all the output parameters name.
67      */

68     private HashMap JavaDoc outputParametersName = null;
69
70
71     /**
72      * Constructs a new Spy JDBC callable statement.
73      * @param c Connection The used connection.
74      * @param cstm CallableStatement The real JDBC callable statement.
75      * @param sql String The callable SQL.
76      */

77     protected SpyCallableStatement ( Connection JavaDoc c, CallableStatement JavaDoc cstm, String JavaDoc sql) {
78         super(c, cstm, sql);
79         real = cstm;
80
81         // Initialize capacity with the number of '?' in sql string
82
outputParametersIndex = new ArrayList JavaDoc(getEstimatedParametersCount()+1);
83         for (int i = 0; i < getEstimatedParametersCount()+1; i++) outputParametersIndex.add(i,null);
84         outputParametersName = new HashMap JavaDoc(getEstimatedParametersCount()+1);
85     }
86
87
88     /**
89      * Registers the given output parameter.
90      *
91      * @param paramIndex int The index position of the parameter.
92      * @param type int The type of the parameter.
93      */

94     private void registerOutputParameter (int paramIndex, int type) {
95         if ( outputParametersIndex.size()<=paramIndex) {
96             outputParametersIndex.ensureCapacity(paramIndex+1);
97             for ( int i = outputParametersIndex.size(); i < paramIndex; i++) outputParametersIndex.add(i,null);
98                 outputParametersIndex.add(paramIndex,new Integer JavaDoc(type));
99         } else {
100             outputParametersIndex.set(paramIndex,new Integer JavaDoc(type));
101         }
102     }
103
104
105     /**
106      * Registers the given output parameter.
107      *
108      * @param paramName String The name of the parameter.
109      * @param type int The type of the parameter.
110      */

111     private void registerOutputParameter (String JavaDoc paramName, int type) {
112         outputParametersName.put(paramName,new Integer JavaDoc(type));
113     }
114
115
116     /**
117      * @see SpyPreparedStatement#clearParameters()
118      */

119     public void clearParameters() throws SQLException JavaDoc {
120         outputParametersIndex.clear();
121         outputParametersName.clear();
122         super.clearParameters();
123     }
124
125
126     /**
127      * Logs all the output parameters.
128      */

129     private void logOutputParameters() {
130         //TODO add input parameter
131
//TODO add output parameter registrered by name
132
/*
133          * Cannot use {@link PreparedStatement#getParameterMetaData()} because some
134          * JDBC drivers don't implement this method.
135          */

136         if ( outputParametersLogged==false) {
137             StringBuffer JavaDoc displayableSql = new StringBuffer JavaDoc(preparedSql.length());
138
139
140             if ( outputParametersIndex!=null && outputParametersName!=null) {
141                 int i = 1, limit = 0, base = 0;
142                 while ((limit = preparedSql.indexOf('?',limit)) != -1) {
143                     displayableSql.append(preparedSql.substring(base,limit));
144                     if ( outputParametersIndex.get(i)!=null) {
145                         switch ( ((Integer JavaDoc)outputParametersIndex.get(i)).intValue()) {
146                         case Types.ARRAY:
147                         case Types.BLOB:
148                         case Types.CHAR:
149                         case Types.CLOB:
150                         case Types.DATALINK:
151                         case Types.DATE:
152                         case Types.JAVA_OBJECT:
153                         case Types.LONGVARBINARY:
154                         case Types.LONGVARCHAR:
155                         case Types.REF:
156                         case Types.TIME:
157                         case Types.TIMESTAMP:
158                         case Types.VARBINARY:
159                         case Types.VARCHAR: displayableSql.append("'");
160                                                     try {
161                                                         displayableSql.append(real.getString(i));
162                                                     } catch ( SQLException JavaDoc e) {
163                                                         if ( log.isErrorEnabled()) log.error(getId()+":"+"unable to retrieve output parameter",e);
164                                                     }
165                                                     displayableSql.append("'");
166                                                     break;
167                         default: try {
168                                                         displayableSql.append(real.getString(i));
169                                                     } catch ( SQLException JavaDoc e) {
170                                                         if ( log.isErrorEnabled()) log.error(getId()+":"+"unable to retrieve output parameter",e);
171                                                     }
172                                                     break;
173                         }
174                     } else {
175                         displayableSql.append("?");
176                     }
177                     i++;
178                     limit++;
179                     base = limit;
180                 }
181
182                 if (base < preparedSql.length()) {
183                     displayableSql.append(preparedSql.substring(base));
184                 }
185             }
186
187             log.info(getId()+":"+displayableSql.toString());
188             outputParametersLogged = true;
189         }
190     }
191
192
193     /**
194      * @see CallableStatement#wasNull()
195      */

196     public boolean wasNull() throws SQLException JavaDoc {
197         return real.wasNull();
198     }
199
200
201     /**
202      * @see CallableStatement#getByte(int)
203      */

204     public byte getByte(int parameterIndex) throws SQLException JavaDoc {
205         logOutputParameters();
206         return real.getByte(parameterIndex);
207     }
208
209
210     /**
211      * @see CallableStatement#getDouble(int)
212      */

213     public double getDouble(int parameterIndex) throws SQLException JavaDoc {
214         logOutputParameters();
215         return real.getDouble(parameterIndex);
216     }
217
218
219     /**
220      * @see CallableStatement#getFloat(int)
221      */

222     public float getFloat(int parameterIndex) throws SQLException JavaDoc {
223         logOutputParameters();
224         return real.getFloat(parameterIndex);
225     }
226
227
228     /**
229      * @see CallableStatement#getInt(int)
230      */

231     public int getInt(int parameterIndex) throws SQLException JavaDoc {
232         logOutputParameters();
233         return real.getInt(parameterIndex);
234     }
235
236
237     /**
238      * @see CallableStatement#getLong(int)
239      */

240     public long getLong(int parameterIndex) throws SQLException JavaDoc {
241         logOutputParameters();
242         return real.getLong(parameterIndex);
243     }
244
245
246     /**
247      * @see CallableStatement#getShort(int)
248      */

249     public short getShort(int parameterIndex) throws SQLException JavaDoc {
250         logOutputParameters();
251         return real.getShort(parameterIndex);
252     }
253
254
255     /**
256      * @see CallableStatement#getBoolean(int)
257      */

258     public boolean getBoolean(int parameterIndex) throws SQLException JavaDoc {
259         logOutputParameters();
260         return real.getBoolean(parameterIndex);
261     }
262
263
264     /**
265      * @see CallableStatement#getBytes(int)
266      */

267     public byte[] getBytes(int parameterIndex) throws SQLException JavaDoc {
268         logOutputParameters();
269         return real.getBytes(parameterIndex);
270     }
271
272
273     /**
274      * @see CallableStatement#registerOutParameter(int, int)
275      */

276     public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException JavaDoc {
277         registerOutputParameter(parameterIndex,sqlType);
278         real.registerOutParameter(parameterIndex,sqlType);
279     }
280
281
282     /**
283      * @see CallableStatement#registerOutParameter(int, int, int)
284      */

285     public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException JavaDoc {
286         registerOutputParameter(parameterIndex,sqlType);
287         real.registerOutParameter(parameterIndex,sqlType,scale);
288     }
289
290
291     /**
292      * @see CallableStatement#getObject(int)
293      */

294     public Object JavaDoc getObject(int parameterIndex) throws SQLException JavaDoc {
295         logOutputParameters();
296         return real.getObject(parameterIndex);
297     }
298
299
300     /**
301      * @see CallableStatement#getString(int)
302      */

303     public String JavaDoc getString(int parameterIndex) throws SQLException JavaDoc {
304         logOutputParameters();
305         return real.getString(parameterIndex);
306     }
307
308
309     /**
310      * @see CallableStatement#registerOutParameter(int, int, String)
311      */

312     public void registerOutParameter(int paramIndex, int sqlType, String JavaDoc typeName) throws SQLException JavaDoc {
313         registerOutputParameter(paramIndex,sqlType);
314         real.registerOutParameter(paramIndex,sqlType,typeName);
315     }
316
317
318     /**
319      * @see CallableStatement#getByte(String)
320      */

321     public byte getByte(String JavaDoc parameterName) throws SQLException JavaDoc {
322         logOutputParameters();
323         return real.getByte(parameterName);
324     }
325
326
327     /**
328      * @see CallableStatement#getDouble(String)
329      */

330     public double getDouble(String JavaDoc parameterName) throws SQLException JavaDoc {
331         logOutputParameters();
332         return real.getDouble(parameterName);
333     }
334
335
336     /**
337      * @see CallableStatement#getFloat(String)
338      */

339     public float getFloat(String JavaDoc parameterName) throws SQLException JavaDoc {
340         logOutputParameters();
341         return real.getFloat(parameterName);
342     }
343
344
345     /**
346      * @see CallableStatement#getInt(String)
347      */

348     public int getInt(String JavaDoc parameterName) throws SQLException JavaDoc {
349         logOutputParameters();
350         return real.getInt(parameterName);
351     }
352
353
354     /**
355      * @see CallableStatement#getLong(String)
356      */

357     public long getLong(String JavaDoc parameterName) throws SQLException JavaDoc {
358         logOutputParameters();
359         return real.getLong(parameterName);
360     }
361
362
363     /**
364      * @see CallableStatement#getShort(String)
365      */

366     public short getShort(String JavaDoc parameterName) throws SQLException JavaDoc {
367         logOutputParameters();
368         return real.getShort(parameterName);
369     }
370
371
372     /**
373      * @see CallableStatement#getBoolean(String)
374      */

375     public boolean getBoolean(String JavaDoc parameterName) throws SQLException JavaDoc {
376         logOutputParameters();
377         return real.getBoolean(parameterName);
378     }
379
380
381     /**
382      * @see CallableStatement#getBytes(String)
383      */

384     public byte[] getBytes(String JavaDoc parameterName) throws SQLException JavaDoc {
385         logOutputParameters();
386         return real.getBytes(parameterName);
387     }
388
389
390     /**
391      * @see CallableStatement#setByte(String, byte)
392      */

393     public void setByte(String JavaDoc parameterName, byte x) throws SQLException JavaDoc {
394         real.setByte(parameterName,x);
395     }
396
397
398     /**
399      * @see CallableStatement#setDouble(String, double)
400      */

401     public void setDouble(String JavaDoc parameterName, double x) throws SQLException JavaDoc {
402         real.setDouble(parameterName,x);
403     }
404
405
406     /**
407      * @see CallableStatement#setFloat(String, float)
408      */

409     public void setFloat(String JavaDoc parameterName, float x) throws SQLException JavaDoc {
410         real.setFloat(parameterName,x);
411     }
412
413
414     /**
415      * @see CallableStatement#registerOutParameter(String, int)
416      */

417     public void registerOutParameter(String JavaDoc parameterName, int sqlType) throws SQLException JavaDoc {
418         registerOutputParameter(parameterName,sqlType);
419         real.registerOutParameter(parameterName,sqlType);
420     }
421
422
423     /**
424      * @see CallableStatement#setInt(String, int)
425      */

426     public void setInt(String JavaDoc parameterName, int x) throws SQLException JavaDoc {
427         real.setInt(parameterName,x);
428     }
429
430
431     /**
432      * @see CallableStatement#setNull(String, int)
433      */

434     public void setNull(String JavaDoc parameterName, int sqlType) throws SQLException JavaDoc {
435         real.setNull(parameterName,sqlType);
436     }
437
438
439     /**
440      * @see CallableStatement#registerOutParameter(String, int, int)
441      */

442     public void registerOutParameter(String JavaDoc parameterName, int sqlType, int scale) throws SQLException JavaDoc {
443         registerOutputParameter(parameterName,sqlType);
444         real.registerOutParameter(parameterName,sqlType,scale);
445     }
446
447
448     /**
449      * @see CallableStatement#setLong(String, long)
450      */

451     public void setLong(String JavaDoc parameterName, long x) throws SQLException JavaDoc {
452         real.setLong(parameterName,x);
453     }
454
455
456     /**
457      * @see CallableStatement#setShort(String, short)
458      */

459     public void setShort(String JavaDoc parameterName, short x) throws SQLException JavaDoc {
460         real.setShort(parameterName,x);
461     }
462
463
464     /**
465      * @see CallableStatement#setBoolean(String, boolean)
466      */

467     public void setBoolean(String JavaDoc parameterName, boolean x) throws SQLException JavaDoc {
468         real.setBoolean(parameterName,x);
469     }
470
471
472     /**
473      * @see CallableStatement#setBytes(String, byte[])
474      */

475     public void setBytes(String JavaDoc parameterName, byte[] x) throws SQLException JavaDoc {
476         real.setBytes(parameterName,x);
477     }
478
479
480     /**
481      * @see CallableStatement#getBigDecimal(int)
482      */

483     public BigDecimal JavaDoc getBigDecimal(int parameterIndex) throws SQLException JavaDoc {
484         logOutputParameters();
485         return real.getBigDecimal(parameterIndex);
486     }
487
488
489     /**
490      * @see CallableStatement#getBigDecimal(int, int)
491      */

492     public BigDecimal JavaDoc getBigDecimal(int parameterIndex, int scale) throws SQLException JavaDoc {
493         logOutputParameters();
494         return real.getBigDecimal(parameterIndex,scale);
495     }
496
497
498     /**
499      * @see CallableStatement#getURL(int)
500      */

501     public URL JavaDoc getURL(int parameterIndex) throws SQLException JavaDoc {
502         logOutputParameters();
503         return real.getURL(parameterIndex);
504     }
505
506
507     /**
508      * @see CallableStatement#getArray(int)
509      */

510     public Array JavaDoc getArray(int i) throws SQLException JavaDoc {
511         logOutputParameters();
512         return real.getArray(i);
513     }
514
515
516     /**
517      * @see CallableStatement#getBlob(int)
518      */

519     public Blob JavaDoc getBlob(int i) throws SQLException JavaDoc {
520         logOutputParameters();
521         return real.getBlob(i);
522     }
523
524
525     /**
526      * @see CallableStatement#getClob(int)
527      */

528     public Clob JavaDoc getClob(int i) throws SQLException JavaDoc {
529         logOutputParameters();
530         return real.getClob(i);
531     }
532
533
534     /**
535      * @see CallableStatement#getDate(int)
536      */

537     public Date JavaDoc getDate(int parameterIndex) throws SQLException JavaDoc {
538         logOutputParameters();
539         return real.getDate(parameterIndex);
540     }
541
542
543     /**
544      * @see CallableStatement#getRef(int)
545      */

546     public Ref JavaDoc getRef(int i) throws SQLException JavaDoc {
547         logOutputParameters();
548         return real.getRef(i);
549     }
550
551
552     /**
553      * @see CallableStatement#getTime(int)
554      */

555     public Time JavaDoc getTime(int parameterIndex) throws SQLException JavaDoc {
556         logOutputParameters();
557         return real.getTime(parameterIndex);
558     }
559
560
561     /**
562      * @see CallableStatement#getTimestamp(int)
563      */

564     public Timestamp JavaDoc getTimestamp(int parameterIndex) throws SQLException JavaDoc {
565         logOutputParameters();
566         return real.getTimestamp(parameterIndex);
567     }
568
569
570     /**
571      * @see CallableStatement#setAsciiStream(String, java.io.InputStream, int)
572      */

573     public void setAsciiStream(String JavaDoc parameterName, InputStream JavaDoc x, int length) throws SQLException JavaDoc {
574         real.setAsciiStream(parameterName,x,length);
575     }
576
577
578     /**
579      * @see CallableStatement#setBinaryStream(String, java.io.InputStream, int)
580      */

581     public void setBinaryStream(String JavaDoc parameterName, InputStream JavaDoc x, int length) throws SQLException JavaDoc {
582         real.setBinaryStream(parameterName,x,length);
583     }
584
585
586     /**
587      * @see CallableStatement#setCharacterStream(String, java.io.Reader, int)
588      */

589     public void setCharacterStream(String JavaDoc parameterName, Reader JavaDoc reader, int length) throws SQLException JavaDoc {
590         real.setCharacterStream(parameterName,reader,length);
591     }
592
593
594     /**
595      * @see CallableStatement#getObject(String)
596      */

597     public Object JavaDoc getObject(String JavaDoc parameterName) throws SQLException JavaDoc {
598         logOutputParameters();
599         return real.getObject(parameterName);
600     }
601
602
603     /**
604      * @see CallableStatement#setObject(String, Object)
605      */

606     public void setObject(String JavaDoc parameterName, Object JavaDoc x) throws SQLException JavaDoc {
607         real.setObject(parameterName,x);
608     }
609
610
611     /**
612      * @see CallableStatement#setObject(String, Object, int)
613      */

614     public void setObject(String JavaDoc parameterName, Object JavaDoc x, int targetSqlType) throws SQLException JavaDoc {
615         real.setObject(parameterName,x,targetSqlType);
616     }
617
618
619     /**
620      * @see CallableStatement#setObject(String, Object, int, int)
621      */

622     public void setObject(String JavaDoc parameterName, Object JavaDoc x, int targetSqlType, int scale) throws SQLException JavaDoc {
623         real.setObject(parameterName,x,targetSqlType,scale);
624     }
625
626
627     /**
628      * @see CallableStatement#getObject(int, Map)
629      */

630     public Object JavaDoc getObject(int i, Map JavaDoc map) throws SQLException JavaDoc {
631         logOutputParameters();
632         return real.getObject(i,map);
633     }
634
635
636     /**
637      * @see CallableStatement#getString(String)
638      */

639     public String JavaDoc getString(String JavaDoc parameterName) throws SQLException JavaDoc {
640         logOutputParameters();
641         return real.getString(parameterName);
642     }
643
644
645     /**
646      * @see CallableStatement#registerOutParameter(String, int, String)
647      */

648     public void registerOutParameter(String JavaDoc parameterName, int sqlType, String JavaDoc typeName) throws SQLException JavaDoc {
649         registerOutputParameter(parameterName,sqlType);
650         real.registerOutParameter(parameterName,sqlType,typeName);
651     }
652
653
654     /**
655      * @see CallableStatement#setNull(String, int, String)
656      */

657     public void setNull(String JavaDoc parameterName, int sqlType, String JavaDoc typeName) throws SQLException JavaDoc {
658         real.setNull(parameterName,sqlType,typeName);
659     }
660
661
662     /**
663      * @see CallableStatement#setString(String, String)
664      */

665     public void setString(String JavaDoc parameterName, String JavaDoc x) throws SQLException JavaDoc {
666         real.setString(parameterName,x);
667     }
668
669
670     /**
671      * @see CallableStatement#getBigDecimal(String)
672      */

673     public BigDecimal JavaDoc getBigDecimal(String JavaDoc parameterName) throws SQLException JavaDoc {
674         logOutputParameters();
675         return real.getBigDecimal(parameterName);
676     }
677
678
679     /**
680      * @see CallableStatement#setBigDecimal(String, BigDecimal)
681      */

682     public void setBigDecimal(String JavaDoc parameterName, BigDecimal JavaDoc x) throws SQLException JavaDoc {
683         real.setBigDecimal(parameterName,x);
684     }
685
686
687     /**
688      * @see CallableStatement#getURL(String)
689      */

690     public URL JavaDoc getURL(String JavaDoc parameterName) throws SQLException JavaDoc {
691         logOutputParameters();
692         return real.getURL(parameterName);
693     }
694
695
696     /**
697      * @see CallableStatement#setURL(String, java.net.URL)
698      */

699     public void setURL(String JavaDoc parameterName, URL JavaDoc val) throws SQLException JavaDoc {
700         real.setURL(parameterName,val);
701     }
702
703
704     /**
705      * @see CallableStatement#getArray(String)
706      */

707     public Array JavaDoc getArray(String JavaDoc parameterName) throws SQLException JavaDoc {
708         logOutputParameters();
709         return real.getArray(parameterName);
710     }
711
712
713     /**
714      * @see CallableStatement#getBlob(String)
715      */

716     public Blob JavaDoc getBlob(String JavaDoc parameterName) throws SQLException JavaDoc {
717         logOutputParameters();
718         return real.getBlob(parameterName);
719     }
720
721
722     /**
723      * @see CallableStatement#getClob(String)
724      */

725     public Clob JavaDoc getClob(String JavaDoc parameterName) throws SQLException JavaDoc {
726         logOutputParameters();
727         return real.getClob(parameterName);
728     }
729
730
731     /**
732      * @see CallableStatement#getDate(String)
733      */

734     public Date JavaDoc getDate(String JavaDoc parameterName) throws SQLException JavaDoc {
735         logOutputParameters();
736         return real.getDate(parameterName);
737     }
738
739
740     /**
741      * @see CallableStatement#setDate(String, Date)
742      */

743     public void setDate(String JavaDoc parameterName, Date JavaDoc x) throws SQLException JavaDoc {
744         real.setDate(parameterName,x);
745     }
746
747
748     /**
749      * @see CallableStatement#getDate(int, Calendar)
750      */

751     public Date JavaDoc getDate(int parameterIndex, Calendar JavaDoc cal) throws SQLException JavaDoc {
752         logOutputParameters();
753         return real.getDate(parameterIndex,cal);
754     }
755
756
757     /**
758      * @see CallableStatement#getRef(String)
759      */

760     public Ref JavaDoc getRef(String JavaDoc parameterName) throws SQLException JavaDoc {
761         logOutputParameters();
762         return real.getRef(parameterName);
763     }
764
765
766     /**
767      * @see CallableStatement#getTime(String)
768      */

769     public Time JavaDoc getTime(String JavaDoc parameterName) throws SQLException JavaDoc {
770         logOutputParameters();
771         return real.getTime(parameterName);
772     }
773
774
775     /**
776      * @see CallableStatement#setTime(String, Time)
777      */

778     public void setTime(String JavaDoc parameterName, Time JavaDoc x) throws SQLException JavaDoc {
779         real.setTime(parameterName,x);
780     }
781
782
783     /**
784      * @see CallableStatement#getTime(int, Calendar)
785      */

786     public Time JavaDoc getTime(int parameterIndex, Calendar JavaDoc cal) throws SQLException JavaDoc {
787         logOutputParameters();
788         return real.getTime(parameterIndex,cal);
789     }
790
791
792     /**
793      * @see CallableStatement#getTimestamp(String)
794      */

795     public Timestamp JavaDoc getTimestamp(String JavaDoc parameterName) throws SQLException JavaDoc {
796         logOutputParameters();
797         return real.getTimestamp(parameterName);
798     }
799
800
801     /**
802      * @see CallableStatement#setTimestamp(String, Timestamp)
803      */

804     public void setTimestamp(String JavaDoc parameterName, Timestamp JavaDoc x) throws SQLException JavaDoc {
805         real.setTimestamp(parameterName,x);
806     }
807
808
809     /**
810      * @see CallableStatement#getTimestamp(int, Calendar)
811      */

812     public Timestamp JavaDoc getTimestamp(int parameterIndex, Calendar JavaDoc cal) throws SQLException JavaDoc {
813         logOutputParameters();
814         return real.getTimestamp(parameterIndex,cal);
815     }
816
817
818     /**
819      * @see CallableStatement#getObject(String, Map)
820      */

821     public Object JavaDoc getObject(String JavaDoc parameterName, Map JavaDoc map) throws SQLException JavaDoc {
822         logOutputParameters();
823         return real.getObject(parameterName,map);
824     }
825
826
827     /**
828      * @see CallableStatement#getDate(String, Calendar)
829      */

830     public Date JavaDoc getDate(String JavaDoc parameterName, Calendar JavaDoc cal) throws SQLException JavaDoc {
831         logOutputParameters();
832         return real.getDate(parameterName,cal);
833     }
834
835
836     /**
837      * @see CallableStatement#getTime(String, Calendar)
838      */

839     public Time JavaDoc getTime(String JavaDoc parameterName, Calendar JavaDoc cal) throws SQLException JavaDoc {
840         logOutputParameters();
841         return real.getTime(parameterName,cal);
842     }
843
844
845     /**
846      * @see CallableStatement#getTimestamp(String, Calendar)
847      */

848     public Timestamp JavaDoc getTimestamp(String JavaDoc parameterName, Calendar JavaDoc cal) throws SQLException JavaDoc {
849         logOutputParameters();
850         return real.getTimestamp(parameterName,cal);
851     }
852
853
854     /**
855      * @see CallableStatement#setDate(String, Date, Calendar)
856      */

857     public void setDate(String JavaDoc parameterName, Date JavaDoc x, Calendar JavaDoc cal) throws SQLException JavaDoc {
858         real.setDate(parameterName,x,cal);
859     }
860
861
862     /**
863      * @see CallableStatement#setTime(String, Time, Calendar)
864      */

865     public void setTime(String JavaDoc parameterName, Time JavaDoc x, Calendar JavaDoc cal) throws SQLException JavaDoc {
866         real.setTime(parameterName,x,cal);
867     }
868
869
870     /**
871      * @see CallableStatement#setTimestamp(String, Timestamp, Calendar)
872      */

873     public void setTimestamp(String JavaDoc parameterName, Timestamp JavaDoc x, Calendar JavaDoc cal) throws SQLException JavaDoc {
874         real.setTimestamp(parameterName,x,cal);
875     }
876 }
877
Popular Tags