KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > jdbclogger > oracle10g > JdbcLoggerOraclePreparedStatementWrapper


1 package net.sourceforge.jdbclogger.oracle10g;
2 /*
3  * Licensed to the Apache Software Foundation (ASF) under one or more
4  * contributor license agreements. See the NOTICE file distributed with
5  * this work for additional information regarding copyright ownership.
6  * The ASF licenses this file to You under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with
8  * the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 import net.sourceforge.jdbclogger.core.PreparedStatementWrapper;
19 import oracle.jdbc.OracleParameterMetaData;
20 import oracle.jdbc.OracleResultSetCache;
21 import oracle.jdbc.internal.OraclePreparedStatement;
22 import oracle.sql.*;
23
24 import java.io.InputStream JavaDoc;
25 import java.math.BigDecimal JavaDoc;
26 import java.net.URL JavaDoc;
27 import java.sql.*;
28 import java.util.List JavaDoc;
29
30
31 /**
32  * @author Martin Marinschek (latest modification by $Author: catalean $)
33  * @version $Revision: 85 $ $Date: 2007-07-08 00:01:17 +0300 (Sun, 08 Jul 2007) $
34  */

35 public class JdbcLoggerOraclePreparedStatementWrapper extends PreparedStatementWrapper
36         implements OraclePreparedStatement
37 {
38     private OraclePreparedStatement _oracleStatement;
39
40     public JdbcLoggerOraclePreparedStatementWrapper(OraclePreparedStatement statement,
41                                             String JavaDoc sql, List JavaDoc formatters)
42     {
43         super(statement,sql, formatters);
44
45         _oracleStatement = statement;
46     }
47
48     public void defineParameterTypeBytes(int i, int i1, int i2) throws SQLException
49     {
50         _oracleStatement.defineParameterTypeBytes(i, i1, i2);
51     }
52
53     public void defineParameterTypeChars(int i, int i1, int i2) throws SQLException
54     {
55         _oracleStatement.defineParameterTypeChars(i, i1, i2);
56     }
57
58     public void defineParameterType(int i, int i1, int i2) throws SQLException
59     {
60         _oracleStatement.defineParameterType(i, i1, i2);
61     }
62
63     public int getExecuteBatch()
64     {
65         logStatement();
66
67         return _oracleStatement.getExecuteBatch();
68     }
69
70     public void setARRAY(int i, ARRAY array) throws SQLException
71     {
72         _oracleStatement.setArray(i, array);
73     }
74
75     public void setBfile(int i, BFILE bfile) throws SQLException
76     {
77         _oracleStatement.setBfile(i, bfile);
78     }
79
80     public void setBFILE(int i, BFILE bfile) throws SQLException
81     {
82         _oracleStatement.setBFILE(i, bfile);
83     }
84
85     public void setBLOB(int i, BLOB blob) throws SQLException
86     {
87         _oracleStatement.setBLOB(i, blob);
88     }
89
90     public void setCHAR(int i, CHAR aChar) throws SQLException
91     {
92         _oracleStatement.setCHAR(i, aChar);
93     }
94
95     public void setCLOB(int i, CLOB clob) throws SQLException
96     {
97         _oracleStatement.setCLOB(i, clob);
98     }
99
100     public void setCursor(int i, ResultSet resultSet) throws SQLException
101     {
102         _oracleStatement.setCursor(i, resultSet);
103     }
104
105     public void setCustomDatum(int i, CustomDatum customDatum) throws SQLException
106     {
107         _oracleStatement.setCustomDatum(i, customDatum);
108     }
109
110     public void setORAData(int i, ORAData oraData) throws SQLException
111     {
112         _oracleStatement.setORAData(i, oraData);
113     }
114
115     public void setDATE(int i, DATE date) throws SQLException
116     {
117         _oracleStatement.setDATE(i, date);
118     }
119
120     public void setExecuteBatch(int i) throws SQLException
121     {
122         _oracleStatement.setExecuteBatch(i);
123     }
124
125     public void setFixedCHAR(int i, String JavaDoc s) throws SQLException
126     {
127         _oracleStatement.setFixedCHAR(i, s);
128     }
129
130     public void setNUMBER(int i, NUMBER number) throws SQLException
131     {
132         _oracleStatement.setNUMBER(i, number);
133     }
134
135     public void setBinaryFloat(int i, float v) throws SQLException
136     {
137         _oracleStatement.setBinaryFloat(i, v);
138     }
139
140     public void setBinaryFloat(int i, BINARY_FLOAT binary_float) throws SQLException
141     {
142         _oracleStatement.setBinaryFloat(i, binary_float);
143     }
144
145     public void setBinaryDouble(int i, double v) throws SQLException
146     {
147         _oracleStatement.setBinaryDouble(i, v);
148     }
149
150     public void setBinaryDouble(int i, BINARY_DOUBLE binary_double) throws SQLException
151     {
152         _oracleStatement.setBinaryDouble(i, binary_double);
153     }
154
155     public void setOPAQUE(int i, OPAQUE opaque) throws SQLException
156     {
157         _oracleStatement.setOPAQUE(i, opaque);
158     }
159
160     public void setOracleObject(int i, Datum datum) throws SQLException
161     {
162         _oracleStatement.setOracleObject(i, datum);
163     }
164
165     public void setStructDescriptor(int i, StructDescriptor structDescriptor) throws SQLException
166     {
167         _oracleStatement.setStructDescriptor(i, structDescriptor);
168     }
169
170     public void setRAW(int i, RAW raw) throws SQLException
171     {
172         _oracleStatement.setRAW(i, raw);
173     }
174
175     public void setREF(int i, REF ref) throws SQLException
176     {
177         _oracleStatement.setREF(i, ref);
178     }
179
180     public void setRefType(int i, REF ref) throws SQLException
181     {
182         _oracleStatement.setRefType(i, ref);
183     }
184
185     public void setROWID(int i, ROWID rowid) throws SQLException
186     {
187         _oracleStatement.setROWID(i, rowid);
188     }
189
190     public void setSTRUCT(int i, STRUCT struct) throws SQLException
191     {
192         _oracleStatement.setSTRUCT(i, struct);
193     }
194
195     public void setTIMESTAMP(int i, TIMESTAMP timestamp) throws SQLException
196     {
197         _oracleStatement.setTIMESTAMP(i, timestamp);
198     }
199
200     public void setTIMESTAMPTZ(int i, TIMESTAMPTZ timestamptz) throws SQLException
201     {
202         _oracleStatement.setTIMESTAMPTZ(i, timestamptz);
203     }
204
205     public void setTIMESTAMPLTZ(int i, TIMESTAMPLTZ timestampltz) throws SQLException
206     {
207         _oracleStatement.setTIMESTAMPLTZ(i, timestampltz);
208     }
209
210     public void setINTERVALYM(int i, INTERVALYM intervalym) throws SQLException
211     {
212         _oracleStatement.setINTERVALYM(i, intervalym);
213     }
214
215     public void setINTERVALDS(int i, INTERVALDS intervalds) throws SQLException
216     {
217         _oracleStatement.setINTERVALDS(i, intervalds);
218     }
219
220     public void setNullAtName(String JavaDoc s, int i, String JavaDoc s1) throws SQLException
221     {
222         _oracleStatement.setNullAtName(s, i, s1);
223     }
224
225     public void setNullAtName(String JavaDoc s, int i) throws SQLException
226     {
227         _oracleStatement.setNullAtName(s, i);
228     }
229
230     public void setBooleanAtName(String JavaDoc s, boolean b) throws SQLException
231     {
232         _oracleStatement.setBooleanAtName(s, b);
233     }
234
235     public void setByteAtName(String JavaDoc s, byte b) throws SQLException
236     {
237         _oracleStatement.setByteAtName(s, b);
238     }
239
240     public void setShortAtName(String JavaDoc s, short i) throws SQLException
241     {
242         _oracleStatement.setShortAtName(s, i);
243     }
244
245     public void setIntAtName(String JavaDoc s, int i) throws SQLException
246     {
247         _oracleStatement.setIntAtName(s, i);
248     }
249
250     public void setLongAtName(String JavaDoc s, long l) throws SQLException
251     {
252         _oracleStatement.setLongAtName(s, l);
253     }
254
255     public void setFloatAtName(String JavaDoc s, float v) throws SQLException
256     {
257         _oracleStatement.setFloatAtName(s, v);
258     }
259
260     public void setDoubleAtName(String JavaDoc s, double v) throws SQLException
261     {
262         _oracleStatement.setDoubleAtName(s, v);
263     }
264
265     public void setBinaryFloatAtName(String JavaDoc s, float v) throws SQLException
266     {
267         _oracleStatement.setBinaryFloatAtName(s, v);
268     }
269
270     public void setBinaryFloatAtName(String JavaDoc s, BINARY_FLOAT binary_float) throws SQLException
271     {
272         _oracleStatement.setBinaryFloatAtName(s, binary_float);
273     }
274
275     public void setBinaryDoubleAtName(String JavaDoc s, double v) throws SQLException
276     {
277         _oracleStatement.setBinaryDoubleAtName(s, v);
278     }
279
280     public void setBinaryDoubleAtName(String JavaDoc s, BINARY_DOUBLE binary_double) throws SQLException
281     {
282         _oracleStatement.setBinaryDoubleAtName(s, binary_double);
283     }
284
285     public void setBigDecimalAtName(String JavaDoc s, BigDecimal JavaDoc bigDecimal) throws SQLException
286     {
287         _oracleStatement.setBigDecimalAtName(s, bigDecimal);
288     }
289
290     public void setStringAtName(String JavaDoc s, String JavaDoc s1) throws SQLException
291     {
292         _oracleStatement.setStringAtName(s, s1);
293     }
294
295     public void setStringForClob(int i, String JavaDoc s) throws SQLException
296     {
297         _oracleStatement.setStringForClob(i, s);
298     }
299
300     public void setStringForClobAtName(String JavaDoc s, String JavaDoc s1) throws SQLException
301     {
302         _oracleStatement.setStringForClobAtName(s, s1);
303     }
304
305     public void setFixedCHARAtName(String JavaDoc s, String JavaDoc s1) throws SQLException
306     {
307         _oracleStatement.setFixedCHARAtName(s, s1);
308     }
309
310     public void setCursorAtName(String JavaDoc s, ResultSet resultSet) throws SQLException
311     {
312         _oracleStatement.setCursorAtName(s, resultSet);
313     }
314
315     public void setROWIDAtName(String JavaDoc s, ROWID rowid) throws SQLException
316     {
317         _oracleStatement.setROWIDAtName(s, rowid);
318     }
319
320     public void setArrayAtName(String JavaDoc s, Array array) throws SQLException
321     {
322         _oracleStatement.setArrayAtName(s, array);
323     }
324
325     public void setARRAYAtName(String JavaDoc s, ARRAY array) throws SQLException
326     {
327         _oracleStatement.setARRAYAtName(s, array);
328     }
329
330     public void setOPAQUEAtName(String JavaDoc s, OPAQUE opaque) throws SQLException
331     {
332         _oracleStatement.setOPAQUEAtName(s, opaque);
333     }
334
335     public void setStructDescriptorAtName(String JavaDoc s, StructDescriptor structDescriptor) throws SQLException
336     {
337         _oracleStatement.setStructDescriptorAtName(s, structDescriptor);
338     }
339
340     public void setSTRUCTAtName(String JavaDoc s, STRUCT struct) throws SQLException
341     {
342         _oracleStatement.setSTRUCTAtName(s, struct);
343     }
344
345     public void setRAWAtName(String JavaDoc s, RAW raw) throws SQLException
346     {
347         _oracleStatement.setRAWAtName(s, raw);
348     }
349
350     public void setCHARAtName(String JavaDoc s, CHAR aChar) throws SQLException
351     {
352         _oracleStatement.setCHARAtName(s, aChar);
353     }
354
355     public void setDATEAtName(String JavaDoc s, DATE date) throws SQLException
356     {
357         _oracleStatement.setDATEAtName(s, date);
358     }
359
360     public void setNUMBERAtName(String JavaDoc s, NUMBER number) throws SQLException
361     {
362         _oracleStatement.setNUMBERAtName(s, number);
363     }
364
365     public void setBLOBAtName(String JavaDoc s, BLOB blob) throws SQLException
366     {
367         _oracleStatement.setBLOBAtName(s, blob);
368     }
369
370     public void setBlobAtName(String JavaDoc s, Blob blob) throws SQLException
371     {
372         _oracleStatement.setBlobAtName(s, blob);
373     }
374
375     public void setCLOBAtName(String JavaDoc s, CLOB clob) throws SQLException
376     {
377         _oracleStatement.setCLOBAtName(s, clob);
378     }
379
380     public void setClobAtName(String JavaDoc s, Clob clob) throws SQLException
381     {
382         _oracleStatement.setClobAtName(s, clob);
383     }
384
385     public void setBFILEAtName(String JavaDoc s, BFILE bfile) throws SQLException
386     {
387         _oracleStatement.setBFILEAtName(s, bfile);
388     }
389
390     public void setBfileAtName(String JavaDoc s, BFILE bfile) throws SQLException
391     {
392         _oracleStatement.setBfileAtName(s, bfile);
393     }
394
395     public void setBytesAtName(String JavaDoc s, byte[] bytes) throws SQLException
396     {
397         _oracleStatement.setBytesAtName(s, bytes);
398     }
399
400     public void setBytesForBlob(int i, byte[] bytes) throws SQLException {
401     }
402
403     public void setBytesForBlobAtName(String JavaDoc string, byte[] bytes) throws SQLException {
404     }
405
406     public void setDateAtName(String JavaDoc s, Date date) throws SQLException
407     {
408         _oracleStatement.setDateAtName(s, date);
409     }
410
411     public void setTimeAtName(String JavaDoc s, Time time) throws SQLException
412     {
413         _oracleStatement.setTimeAtName(s, time);
414     }
415
416     public void setTimestampAtName(String JavaDoc s, Timestamp timestamp) throws SQLException
417     {
418         _oracleStatement.setTimestampAtName(s, timestamp);
419     }
420
421     public void setINTERVALYMAtName(String JavaDoc s, INTERVALYM intervalym) throws SQLException
422     {
423         _oracleStatement.setINTERVALYMAtName(s, intervalym);
424     }
425
426     public void setINTERVALDSAtName(String JavaDoc s, INTERVALDS intervalds) throws SQLException
427     {
428         _oracleStatement.setINTERVALDSAtName(s, intervalds);
429     }
430
431     public void setTIMESTAMPAtName(String JavaDoc s, TIMESTAMP timestamp) throws SQLException
432     {
433         _oracleStatement.setTIMESTAMPAtName(s, timestamp);
434     }
435
436     public void setTIMESTAMPTZAtName(String JavaDoc s, TIMESTAMPTZ timestamptz) throws SQLException
437     {
438         _oracleStatement.setTIMESTAMPTZAtName(s, timestamptz);
439     }
440
441     public void setTIMESTAMPLTZAtName(String JavaDoc s, TIMESTAMPLTZ timestampltz) throws SQLException
442     {
443         _oracleStatement.setTIMESTAMPLTZAtName(s, timestampltz);
444     }
445
446     public void setAsciiStreamAtName(String JavaDoc s, InputStream JavaDoc inputStream, int i) throws SQLException
447     {
448         _oracleStatement.setAsciiStreamAtName(s, inputStream, i);
449     }
450
451     public void setBinaryStreamAtName(String JavaDoc s, InputStream JavaDoc inputStream, int i) throws SQLException
452     {
453         _oracleStatement.setBinaryStreamAtName(s, inputStream, i);
454     }
455
456     public void setUnicodeStreamAtName(String JavaDoc s, InputStream JavaDoc inputStream, int i) throws SQLException
457     {
458         _oracleStatement.setUnicodeStreamAtName(s, inputStream, i);
459     }
460
461     public void setCustomDatumAtName(String JavaDoc s, CustomDatum customDatum) throws SQLException
462     {
463         _oracleStatement.setCustomDatumAtName(s, customDatum);
464     }
465
466     public void setORADataAtName(String JavaDoc s, ORAData oraData) throws SQLException
467     {
468         _oracleStatement.setORADataAtName(s, oraData);
469     }
470
471     public void setObjectAtName(String JavaDoc s, Object JavaDoc o, int i, int i1) throws SQLException
472     {
473         _oracleStatement.setObjectAtName(s, o, i, i1);
474     }
475
476     public void setObjectAtName(String JavaDoc s, Object JavaDoc o, int i) throws SQLException
477     {
478         _oracleStatement.setObjectAtName(s, o, i);
479     }
480
481     public void setRefTypeAtName(String JavaDoc s, REF ref) throws SQLException
482     {
483         _oracleStatement.setRefTypeAtName(s, ref);
484     }
485
486     public void setRefAtName(String JavaDoc s, Ref ref) throws SQLException
487     {
488         _oracleStatement.setRefAtName(s, ref);
489     }
490
491     public void setREFAtName(String JavaDoc s, REF ref) throws SQLException
492     {
493         _oracleStatement.setREFAtName(s, ref);
494     }
495
496     public void setObjectAtName(String JavaDoc s, Object JavaDoc o) throws SQLException
497     {
498         _oracleStatement.setObjectAtName(s, o);
499     }
500
501     public void setOracleObjectAtName(String JavaDoc s, Datum datum) throws SQLException
502     {
503         _oracleStatement.setOracleObjectAtName(s, datum);
504     }
505
506     public void setURLAtName(String JavaDoc s, URL JavaDoc url) throws SQLException
507     {
508         _oracleStatement.setURLAtName(s, url);
509     }
510
511     public void setCheckBindTypes(boolean b)
512     {
513         _oracleStatement.setCheckBindTypes(b);
514     }
515
516     public void setPlsqlIndexTable(int i, Object JavaDoc o, int i1, int i2, int i3, int i4) throws SQLException
517     {
518         _oracleStatement.setPlsqlIndexTable(i, o, i1, i2, i3, i4);
519     }
520
521     public void setFormOfUse(int i, short i1)
522     {
523         _oracleStatement.setFormOfUse(i, i1);
524     }
525
526     public void setDisableStmtCaching(boolean b)
527     {
528         _oracleStatement.setDisableStmtCaching(b);
529     }
530
531     public OracleParameterMetaData OracleGetParameterMetaData() throws SQLException
532     {
533         return _oracleStatement.OracleGetParameterMetaData();
534     }
535
536     public void registerReturnParameter(int i, int i1) throws SQLException {
537     }
538
539     public void registerReturnParameter(int i, int i1, int i2) throws SQLException {
540     }
541
542     public void registerReturnParameter(int i, int i1, String JavaDoc string) throws SQLException {
543     }
544
545     public ResultSet getReturnResultSet() throws SQLException {
546         return null;
547     }
548
549     public void setInternalBytes(int i, byte[] bytes, int i1) throws SQLException
550     {
551         _oracleStatement.setInternalBytes(i, bytes, i1);
552     }
553
554     public void enterImplicitCache() throws SQLException
555     {
556         _oracleStatement.enterImplicitCache();
557     }
558
559     public void enterExplicitCache() throws SQLException
560     {
561         _oracleStatement.enterExplicitCache();
562     }
563
564     public void exitImplicitCacheToActive() throws SQLException
565     {
566         _oracleStatement.exitImplicitCacheToActive();
567     }
568
569     public void exitExplicitCacheToActive() throws SQLException
570     {
571         _oracleStatement.exitExplicitCacheToActive();
572     }
573
574     public void exitImplicitCacheToClose() throws SQLException
575     {
576         _oracleStatement.exitImplicitCacheToClose();
577     }
578
579     public void exitExplicitCacheToClose() throws SQLException
580     {
581         _oracleStatement.exitExplicitCacheToClose();
582     }
583
584     public void setFixedString(boolean b)
585     {
586         _oracleStatement.setFixedString(b);
587     }
588
589     public boolean getFixedString()
590     {
591         return _oracleStatement.getFixedString();
592     }
593
594     public int sendBatch() throws SQLException
595     {
596         return _oracleStatement.sendBatch();
597     }
598
599     public boolean getserverCursor()
600     {
601         return _oracleStatement.getserverCursor();
602     }
603
604     public int getcacheState()
605     {
606         return _oracleStatement.getcacheState();
607     }
608
609     public int getstatementType()
610     {
611         return _oracleStatement.getstatementType();
612     }
613
614     public void clearDefines() throws SQLException
615     {
616         _oracleStatement.clearDefines();
617     }
618
619     public void defineColumnType(int i, int i1) throws SQLException
620     {
621         _oracleStatement.defineColumnType(i,i1);
622     }
623
624     public void defineColumnType(int i, int i1, int i2) throws SQLException
625     {
626         _oracleStatement.defineColumnType(i, i1, i2);
627     }
628
629     public void defineColumnType(int i, int i1, int i2, short i3) throws SQLException
630     {
631         _oracleStatement.defineColumnType(i, i1, i2, i3);
632     }
633
634     public void defineColumnTypeBytes(int i, int i1, int i2) throws SQLException
635     {
636         _oracleStatement.defineColumnTypeBytes(i,i1,i2);
637     }
638
639     public void defineColumnTypeChars(int i, int i1, int i2) throws SQLException
640     {
641         _oracleStatement.defineColumnTypeChars(i,i1,i2);
642     }
643
644     public void defineColumnType(int i, int i1, String JavaDoc s) throws SQLException
645     {
646         _oracleStatement.defineColumnType(i,i1,s);
647     }
648
649     public int getRowPrefetch()
650     {
651         return _oracleStatement.getRowPrefetch();
652     }
653
654     public void setResultSetCache(OracleResultSetCache oracleResultSetCache) throws SQLException
655     {
656         _oracleStatement.setResultSetCache(oracleResultSetCache);
657     }
658
659     public void setRowPrefetch(int i) throws SQLException
660     {
661         _oracleStatement.setRowPrefetch(i);
662     }
663
664     public void closeWithKey(String JavaDoc s) throws SQLException
665     {
666         _oracleStatement.closeWithKey(s);
667     }
668
669     public int creationState()
670     {
671         return _oracleStatement.creationState();
672     }
673
674     public boolean isNCHAR(int i) throws SQLException
675     {
676         return _oracleStatement.isNCHAR(i);
677     }
678
679 // public void setBytesForBlob(int i, byte[] b) throws SQLException
680
// {
681
// _oracleStatement.setBytesForBlob(i, b);
682
// }
683
//
684
// public void setBytesForBlobAtName(String string, byte[] b) throws SQLException
685
// {
686
// _oracleStatement.setBytesForBlobAtName(string, b);
687
// }
688
//
689
// public void registerReturnParameter(int i, int i0) throws SQLException
690
// {
691
// _oracleStatement.registerReturnParameter(i, i0);
692
// }
693
//
694
// public void registerReturnParameter(int i, int i0, int i1) throws SQLException
695
// {
696
// _oracleStatement.registerReturnParameter(i, i0, i1);
697
// }
698
//
699
// public void registerReturnParameter(int i, int i0, String string) throws SQLException
700
// {
701
// _oracleStatement.registerReturnParameter(i, i0, string);
702
// }
703
//
704
// public ResultSet getReturnResultSet() throws SQLException
705
// {
706
// return _oracleStatement.getReturnResultSet();
707
// }
708

709 }
710
Popular Tags