KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdbc > conn > LoggingCallableStatement


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdbc.conn;
13
14 import com.versant.core.logging.LogEventStore;
15 import com.versant.core.logging.LogEventStore;
16 import com.versant.core.logging.LogEventStore;
17
18 import java.math.BigDecimal JavaDoc;
19 import java.sql.*;
20 import java.util.Calendar JavaDoc;
21 import java.util.Map JavaDoc;
22 import java.net.URL JavaDoc;
23 import java.io.InputStream JavaDoc;
24 import java.io.Reader JavaDoc;
25
26 /**
27  * A JDBC CallableStatement wrapped for logging.
28  */

29 public final class LoggingCallableStatement extends PooledPreparedStatement
30         implements CallableStatement {
31
32     protected CallableStatement cstat = null;
33
34     public LoggingCallableStatement(LoggingConnection con,
35                                     CallableStatement statement, LogEventStore pes) {
36         super(con, statement, pes, null, null);
37         this.cstat = statement;
38     }
39
40     public void registerOutParameter(int parameterIndex, int sqlType)
41             throws SQLException {
42         cstat.registerOutParameter(parameterIndex, sqlType);
43     }
44
45     public void registerOutParameter(int parameterIndex, int sqlType, int scale)
46             throws SQLException {
47         cstat.registerOutParameter(parameterIndex, sqlType, scale);
48     }
49
50     public boolean wasNull() throws SQLException {
51         return cstat.wasNull();
52     }
53
54     public String JavaDoc getString(int parameterIndex) throws SQLException {
55         return cstat.getString(parameterIndex);
56     }
57
58     public boolean getBoolean(int parameterIndex) throws SQLException {
59         return cstat.getBoolean(parameterIndex);
60     }
61
62     public byte getByte(int parameterIndex) throws SQLException {
63         return cstat.getByte(parameterIndex);
64     }
65
66     public short getShort(int parameterIndex) throws SQLException {
67         return cstat.getShort(parameterIndex);
68     }
69
70     public int getInt(int parameterIndex) throws SQLException {
71         return cstat.getInt(parameterIndex);
72     }
73
74     public long getLong(int parameterIndex) throws SQLException {
75         return cstat.getLong(parameterIndex);
76     }
77
78     public float getFloat(int parameterIndex) throws SQLException {
79         return cstat.getFloat(parameterIndex);
80     }
81
82     public double getDouble(int parameterIndex) throws SQLException {
83         return cstat.getDouble(parameterIndex);
84     }
85
86     public BigDecimal JavaDoc getBigDecimal(int parameterIndex, int scale)
87             throws SQLException {
88         return cstat.getBigDecimal(parameterIndex, scale);
89     }
90
91     public byte[] getBytes(int parameterIndex) throws SQLException {
92         return cstat.getBytes(parameterIndex);
93     }
94
95     public Date getDate(int parameterIndex) throws SQLException {
96         return cstat.getDate(parameterIndex);
97     }
98
99     public Time getTime(int parameterIndex) throws SQLException {
100         return cstat.getTime(parameterIndex);
101     }
102
103     public Timestamp getTimestamp(int parameterIndex)
104             throws SQLException {
105         return cstat.getTimestamp(parameterIndex);
106     }
107
108     public Object JavaDoc getObject(int parameterIndex) throws SQLException {
109         return cstat.getObject(parameterIndex);
110     }
111
112     public BigDecimal JavaDoc getBigDecimal(int parameterIndex) throws SQLException {
113         return cstat.getBigDecimal(parameterIndex);
114     }
115
116     public Object JavaDoc getObject(int i, Map JavaDoc map) throws SQLException {
117         return cstat.getObject(i, map);
118     }
119
120     public Ref getRef(int i) throws SQLException {
121         return cstat.getRef(i);
122     }
123
124     public Blob getBlob(int i) throws SQLException {
125         return cstat.getBlob(i);
126     }
127
128     public Clob getClob(int i) throws SQLException {
129         return cstat.getClob(i);
130     }
131
132     public Array getArray(int i) throws SQLException {
133         return cstat.getArray(i);
134     }
135
136     public Date getDate(int parameterIndex, Calendar JavaDoc cal)
137             throws SQLException {
138         return cstat.getDate(parameterIndex, cal);
139     }
140
141     public Time getTime(int parameterIndex, Calendar JavaDoc cal)
142             throws SQLException {
143         return cstat.getTime(parameterIndex, cal);
144     }
145
146     public Timestamp getTimestamp(int parameterIndex, Calendar JavaDoc cal)
147             throws SQLException {
148         return cstat.getTimestamp(parameterIndex, cal);
149     }
150
151     public void registerOutParameter(int paramIndex, int sqlType, String JavaDoc typeName)
152             throws SQLException {
153         cstat.registerOutParameter(paramIndex, sqlType, typeName);
154     }
155
156     public void registerOutParameter(String JavaDoc parameterName, int sqlType)
157             throws SQLException {
158         cstat.registerOutParameter(parameterName, sqlType);
159     }
160
161     public void registerOutParameter(String JavaDoc parameterName, int sqlType, int scale)
162             throws SQLException {
163         cstat.registerOutParameter(parameterName, sqlType, scale);
164     }
165
166     public void registerOutParameter(String JavaDoc parameterName, int sqlType, String JavaDoc typeName)
167             throws SQLException {
168         cstat.registerOutParameter(parameterName, sqlType, typeName);
169     }
170
171     public java.net.URL JavaDoc getURL(int parameterIndex) throws SQLException {
172         return cstat.getURL(parameterIndex);
173     }
174
175     public void setURL(String JavaDoc parameterName, java.net.URL JavaDoc val) throws SQLException {
176         cstat.setURL(parameterName, val);
177     }
178
179     public void setNull(String JavaDoc parameterName, int sqlType) throws SQLException {
180         cstat.setNull(parameterName, sqlType);
181     }
182
183     public void setBoolean(String JavaDoc parameterName, boolean x) throws SQLException {
184         cstat.setBoolean(parameterName, x);
185     }
186
187     public void setByte(String JavaDoc parameterName, byte x) throws SQLException {
188         cstat.setByte(parameterName, x);
189     }
190
191     public void setShort(String JavaDoc parameterName, short x) throws SQLException {
192         cstat.setShort(parameterName, x);
193     }
194
195     public void setInt(String JavaDoc parameterName, int x) throws SQLException {
196         cstat.setInt(parameterName, x);
197     }
198
199     public void setLong(String JavaDoc parameterName, long x) throws SQLException {
200         cstat.setLong(parameterName, x);
201     }
202
203     public void setFloat(String JavaDoc parameterName, float x) throws SQLException {
204         cstat.setFloat(parameterName, x);
205     }
206
207     public void setDouble(String JavaDoc parameterName, double x) throws SQLException {
208         cstat.setDouble(parameterName, x);
209     }
210
211     public void setBigDecimal(String JavaDoc parameterName, BigDecimal JavaDoc x) throws SQLException {
212         cstat.setBigDecimal(parameterName, x);
213     }
214
215     public void setString(String JavaDoc parameterName, String JavaDoc x) throws SQLException {
216         cstat.setString(parameterName, x);
217     }
218
219
220
221     public void setBytes(String JavaDoc parameterName, byte x[]) throws SQLException
222     {
223         cstat.setBytes(parameterName, x);
224     }
225
226     public void setDate(String JavaDoc parameterName, Date x)
227             throws SQLException {
228         cstat.setDate(parameterName, x);
229     }
230
231     public void setTime(String JavaDoc parameterName, Time x)
232             throws SQLException {
233         cstat.setTime(parameterName, x);
234     }
235
236     public void setTimestamp(String JavaDoc parameterName, Timestamp x)
237             throws SQLException {
238         cstat.setTimestamp(parameterName, x);
239     }
240
241     public void setAsciiStream(String JavaDoc parameterName, java.io.InputStream JavaDoc x, int length)
242             throws SQLException {
243         cstat.setAsciiStream(parameterName, x, length);
244     }
245
246     public void setBinaryStream(String JavaDoc parameterName, java.io.InputStream JavaDoc x,
247                                 int length) throws SQLException {
248         cstat.setBinaryStream(parameterName, x, length);
249     }
250
251     public void setObject(String JavaDoc parameterName, Object JavaDoc x, int targetSqlType, int scale)
252             throws SQLException {
253         cstat.setObject(parameterName, x, targetSqlType, scale);
254     }
255
256     public void setObject(String JavaDoc parameterName, Object JavaDoc x, int targetSqlType)
257             throws SQLException {
258         cstat.setObject(parameterName, x, targetSqlType);
259     }
260
261     public void setObject(String JavaDoc parameterName, Object JavaDoc x) throws SQLException {
262         cstat.setObject(parameterName, x);
263     }
264
265     public void setCharacterStream(String JavaDoc parameterName,
266                                    java.io.Reader JavaDoc reader,
267                                    int length) throws SQLException {
268         cstat.setCharacterStream(parameterName, reader, length);
269     }
270
271     public void setDate(String JavaDoc parameterName, Date x, Calendar JavaDoc cal)
272             throws SQLException {
273         cstat.setDate(parameterName, x, cal);
274     }
275
276     public void setTime(String JavaDoc parameterName, Time x, Calendar JavaDoc cal)
277             throws SQLException {
278         cstat.setTime(parameterName, x, cal);
279     }
280
281     public void setTimestamp(String JavaDoc parameterName, Timestamp x, Calendar JavaDoc cal)
282             throws SQLException {
283         cstat.setTimestamp(parameterName, x, cal);
284     }
285
286     public void setNull(String JavaDoc parameterName, int sqlType, String JavaDoc typeName)
287             throws SQLException {
288         cstat.setNull(parameterName, sqlType, typeName);
289     }
290
291     public String JavaDoc getString(String JavaDoc parameterName) throws SQLException {
292         return cstat.getString(parameterName);
293     }
294
295     public boolean getBoolean(String JavaDoc parameterName) throws SQLException {
296         return cstat.getBoolean(parameterName);
297     }
298
299     public byte getByte(String JavaDoc parameterName) throws SQLException {
300         return cstat.getByte(parameterName);
301     }
302
303     public short getShort(String JavaDoc parameterName) throws SQLException {
304         return cstat.getShort(parameterName);
305     }
306
307     public int getInt(String JavaDoc parameterName) throws SQLException {
308         return cstat.getInt(parameterName);
309     }
310
311     public long getLong(String JavaDoc parameterName) throws SQLException {
312         return cstat.getLong(parameterName);
313     }
314
315     public float getFloat(String JavaDoc parameterName) throws SQLException {
316         return cstat.getFloat(parameterName);
317     }
318
319     public double getDouble(String JavaDoc parameterName) throws SQLException {
320         return cstat.getDouble(parameterName);
321     }
322
323     public byte[] getBytes(String JavaDoc parameterName) throws SQLException {
324         return cstat.getBytes(parameterName);
325     }
326
327     public Date getDate(String JavaDoc parameterName) throws SQLException {
328         return cstat.getDate(parameterName);
329     }
330
331     public Time getTime(String JavaDoc parameterName) throws SQLException {
332         return cstat.getTime(parameterName);
333     }
334
335     public Timestamp getTimestamp(String JavaDoc parameterName) throws SQLException {
336         return cstat.getTimestamp(parameterName);
337     }
338
339     public Object JavaDoc getObject(String JavaDoc parameterName) throws SQLException {
340         return cstat.getObject(parameterName);
341     }
342
343     public BigDecimal JavaDoc getBigDecimal(String JavaDoc parameterName) throws SQLException {
344         return cstat.getBigDecimal(parameterName);
345     }
346
347     public Object JavaDoc getObject(String JavaDoc parameterName, Map JavaDoc map) throws SQLException {
348         return cstat.getObject(parameterName, map);
349     }
350
351     public Ref getRef(String JavaDoc parameterName) throws SQLException {
352         return cstat.getRef(parameterName);
353     }
354
355     public Blob getBlob(String JavaDoc parameterName) throws SQLException {
356         return cstat.getBlob(parameterName);
357     }
358
359     public Clob getClob(String JavaDoc parameterName) throws SQLException {
360         return cstat.getClob(parameterName);
361     }
362
363     public Array getArray(String JavaDoc parameterName) throws SQLException {
364         return cstat.getArray(parameterName);
365     }
366
367     public Date getDate(String JavaDoc parameterName, Calendar JavaDoc cal)
368             throws SQLException {
369         return cstat.getDate(parameterName, cal);
370     }
371
372     public Time getTime(String JavaDoc parameterName, Calendar JavaDoc cal)
373             throws SQLException {
374         return cstat.getTime(parameterName, cal);
375     }
376
377     public Timestamp getTimestamp(String JavaDoc parameterName, Calendar JavaDoc cal)
378             throws SQLException {
379         return cstat.getTimestamp(parameterName, cal);
380     }
381
382     public java.net.URL JavaDoc getURL(String JavaDoc parameterName) throws SQLException {
383         return cstat.getURL(parameterName);
384     }
385
386     public ResultSet executeQuery() throws SQLException {
387         return cstat.executeQuery();
388     }
389
390     public int executeUpdate() throws SQLException {
391         return cstat.executeUpdate();
392     }
393
394     public void setNull(int parameterIndex, int sqlType) throws SQLException {
395         cstat.setNull(parameterIndex, sqlType);
396     }
397
398     public void setBoolean(int parameterIndex, boolean x) throws SQLException {
399         cstat.setBoolean(parameterIndex, x);
400     }
401
402     public void setByte(int parameterIndex, byte x) throws SQLException {
403         cstat.setByte(parameterIndex, x);
404     }
405
406     public void setShort(int parameterIndex, short x) throws SQLException {
407         cstat.setShort(parameterIndex, x);
408     }
409
410     public void setInt(int parameterIndex, int x) throws SQLException {
411         cstat.setInt(parameterIndex, x);
412     }
413
414     public void setLong(int parameterIndex, long x) throws SQLException {
415         cstat.setLong(parameterIndex, x);
416     }
417
418     public void setFloat(int parameterIndex, float x) throws SQLException {
419         cstat.setFloat(parameterIndex, x);
420     }
421
422     public void setDouble(int parameterIndex, double x) throws SQLException {
423         cstat.setDouble(parameterIndex, x);
424     }
425
426     public void setBigDecimal(int parameterIndex, BigDecimal JavaDoc x) throws SQLException {
427         cstat.setBigDecimal(parameterIndex, x);
428     }
429
430     public void setString(int parameterIndex, String JavaDoc x) throws SQLException {
431         cstat.setString(parameterIndex, x);
432     }
433     
434     
435
436     public void setBytes(int parameterIndex, byte x[]) throws SQLException {
437         cstat.setBytes(parameterIndex, x);
438     }
439
440     public void setDate(int parameterIndex, Date x)
441             throws SQLException {
442         cstat.setDate(parameterIndex, x);
443     }
444
445     public void setTime(int parameterIndex, Time x)
446             throws SQLException {
447         cstat.setTime(parameterIndex, x);
448     }
449
450     public void setTimestamp(int parameterIndex, Timestamp x)
451             throws SQLException {
452         cstat.setTimestamp(parameterIndex, x);
453     }
454     
455     
456
457     public void setAsciiStream(int parameterIndex, java.io.InputStream JavaDoc x, int length)
458             throws SQLException {
459         cstat.setAsciiStream(parameterIndex, x, length);
460     }
461
462     public void setUnicodeStream(int parameterIndex, java.io.InputStream JavaDoc x,
463                                  int length) throws SQLException {
464         cstat.setUnicodeStream(parameterIndex, x, length);
465     }
466
467     public void setBinaryStream(int parameterIndex, java.io.InputStream JavaDoc x,
468                                 int length) throws SQLException {
469         cstat.setBinaryStream(parameterIndex, x, length);
470     }
471
472     public void clearParameters() throws SQLException {
473         cstat.clearParameters();
474     }
475
476     public void setObject(int parameterIndex, Object JavaDoc x, int targetSqlType, int scale)
477             throws SQLException {
478         cstat.setObject(parameterIndex, x, targetSqlType, scale);
479     }
480
481     public void setObject(int parameterIndex, Object JavaDoc x, int targetSqlType)
482             throws SQLException {
483         cstat.setObject(parameterIndex, x, targetSqlType);
484     }
485
486     public void setObject(int parameterIndex, Object JavaDoc x) throws SQLException {
487         cstat.setObject(parameterIndex, x);
488     }
489
490     public boolean execute() throws SQLException {
491         return cstat.execute();
492     }
493
494     public void addBatch() throws SQLException {
495         cstat.addBatch();
496     }
497
498     public void setCharacterStream(int parameterIndex,
499                                    java.io.Reader JavaDoc reader,
500                                    int length) throws SQLException {
501         cstat.setCharacterStream(parameterIndex, reader, length);
502     }
503
504     public void setRef(int i, Ref x) throws SQLException {
505         cstat.setRef(i, x);
506     }
507
508     public void setBlob(int i, Blob x) throws SQLException {
509         cstat.setBlob(i, x);
510     }
511
512     public void setClob(int i, Clob x) throws SQLException {
513         cstat.setClob(i, x);
514     }
515
516     public void setArray(int i, Array x) throws SQLException {
517         cstat.setArray(i, x);
518     }
519
520     public ResultSetMetaData getMetaData() throws SQLException {
521         return cstat.getMetaData();
522     }
523
524     public void setDate(int parameterIndex, Date x, Calendar JavaDoc cal)
525             throws SQLException {
526         cstat.setDate(parameterIndex, x, cal);
527     }
528
529     public void setTime(int parameterIndex, Time x, Calendar JavaDoc cal)
530             throws SQLException {
531         cstat.setTime(parameterIndex, x, cal);
532     }
533
534     public void setTimestamp(int parameterIndex, Timestamp x, Calendar JavaDoc cal)
535             throws SQLException {
536         cstat.setTimestamp(parameterIndex, x, cal);
537     }
538
539     public void setNull(int paramIndex, int sqlType, String JavaDoc typeName)
540             throws SQLException {
541         cstat.setNull(paramIndex, sqlType, typeName);
542     }
543
544     public void setURL(int parameterIndex, java.net.URL JavaDoc x) throws SQLException {
545         cstat.setURL(parameterIndex, x);
546     }
547
548     public ParameterMetaData getParameterMetaData() throws SQLException {
549         return cstat.getParameterMetaData();
550     }
551
552     public ResultSet executeQuery(String JavaDoc sql) throws SQLException {
553         return cstat.executeQuery(sql);
554     }
555
556     public int executeUpdate(String JavaDoc sql) throws SQLException {
557         return cstat.executeUpdate(sql);
558     }
559
560     public void close() throws SQLException {
561         cstat.close();
562     }
563
564     public int getMaxFieldSize() throws SQLException {
565         return cstat.getMaxFieldSize();
566     }
567
568     public void setMaxFieldSize(int max) throws SQLException {
569         cstat.setMaxFieldSize(max);
570     }
571
572     public int getMaxRows() throws SQLException {
573         return cstat.getMaxRows();
574     }
575
576     public void setMaxRows(int max) throws SQLException {
577         cstat.setMaxRows(max);
578     }
579
580     public void setEscapeProcessing(boolean enable) throws SQLException {
581         cstat.setEscapeProcessing(enable);
582     }
583
584     public int getQueryTimeout() throws SQLException {
585         return cstat.getQueryTimeout();
586     }
587
588     public void setQueryTimeout(int seconds) throws SQLException {
589         cstat.setQueryTimeout(seconds);
590     }
591
592     public void cancel() throws SQLException {
593         cstat.cancel();
594     }
595
596     public SQLWarning getWarnings() throws SQLException {
597         return cstat.getWarnings();
598     }
599
600     public void clearWarnings() throws SQLException {
601         cstat.clearWarnings();
602     }
603
604     public void setCursorName(String JavaDoc name) throws SQLException {
605         cstat.setCursorName(name);
606     }
607
608     public boolean execute(String JavaDoc sql) throws SQLException {
609         return cstat.execute(sql);
610     }
611
612     public ResultSet getResultSet() throws SQLException {
613         return cstat.getResultSet();
614     }
615
616     public int getUpdateCount() throws SQLException {
617         return cstat.getUpdateCount();
618     }
619
620     public boolean getMoreResults() throws SQLException {
621         return cstat.getMoreResults();
622     }
623
624     public void setFetchDirection(int direction) throws SQLException {
625         cstat.setFetchDirection(direction);
626     }
627
628     public int getFetchDirection() throws SQLException {
629         return cstat.getFetchDirection();
630     }
631
632     public void setFetchSize(int rows) throws SQLException {
633         cstat.setFetchSize(rows);
634     }
635
636     public int getFetchSize() throws SQLException {
637         return cstat.getFetchSize();
638     }
639
640     public int getResultSetConcurrency() throws SQLException {
641         return cstat.getResultSetConcurrency();
642     }
643
644     public int getResultSetType() throws SQLException {
645         return cstat.getResultSetType();
646     }
647
648     public void addBatch(String JavaDoc sql) throws SQLException {
649         cstat.addBatch(sql);
650     }
651
652     public void clearBatch() throws SQLException {
653         cstat.clearBatch();
654     }
655
656     public int[] executeBatch() throws SQLException {
657         return cstat.executeBatch();
658     }
659
660     public Connection getConnection() throws SQLException {
661         return cstat.getConnection();
662     }
663
664     public boolean getMoreResults(int current) throws SQLException {
665         return cstat.getMoreResults(current);
666     }
667
668     public ResultSet getGeneratedKeys() throws SQLException {
669         return cstat.getGeneratedKeys();
670     }
671
672     public int executeUpdate(String JavaDoc sql, int autoGeneratedKeys) throws SQLException {
673         return cstat.executeUpdate(sql, autoGeneratedKeys);
674     }
675
676     public int executeUpdate(String JavaDoc sql, int columnIndexes[]) throws SQLException {
677         return cstat.executeUpdate(sql, columnIndexes);
678     }
679
680     public int executeUpdate(String JavaDoc sql, String JavaDoc columnNames[]) throws SQLException {
681         return cstat.executeUpdate(sql, columnNames);
682     }
683
684     public boolean execute(String JavaDoc sql, int autoGeneratedKeys) throws SQLException {
685         return cstat.execute(sql, autoGeneratedKeys);
686     }
687
688     public boolean execute(String JavaDoc sql, int columnIndexes[]) throws SQLException {
689         return cstat.execute(sql, columnIndexes);
690     }
691
692     public boolean execute(String JavaDoc sql, String JavaDoc columnNames[]) throws SQLException {
693         return cstat.execute(sql, columnNames);
694     }
695
696     public int getResultSetHoldability() throws SQLException {
697         return cstat.getResultSetHoldability();
698     }
699
700
701
702 }
703
704
Popular Tags