KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > database > CallableStatementWrapper


1 /**
2  * $RCSfile: CallableStatementWrapper.java,v $
3  * $Revision: 1.1 $
4  * $Date: 2004/10/21 06:08:42 $
5  *
6  * Copyright (C) 2004 Jive Software. All rights reserved.
7  *
8  * This software is published under the terms of the GNU Public License (GPL),
9  * a copy of which is included in this distribution.
10  */

11
12 package org.jivesoftware.database;
13
14 import java.sql.*;
15 import java.math.BigDecimal JavaDoc;
16 import java.util.Map JavaDoc;
17 import java.util.Calendar JavaDoc;
18 import java.net.URL JavaDoc;
19 import java.io.InputStream JavaDoc;
20 import java.io.Reader JavaDoc;
21
22 /**
23  * An implementation of the CallableStatement interface that wraps an underlying
24  * CallableStatement object.
25  *
26  * @author Gaston Dombiak
27  */

28 public abstract class CallableStatementWrapper extends StatementWrapper
29         implements CallableStatement {
30
31     protected CallableStatement cstmt;
32
33     public CallableStatementWrapper(CallableStatement cstmt) {
34         super(cstmt);
35         this.cstmt = cstmt;
36     }
37
38     public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException {
39         cstmt.registerOutParameter(parameterIndex, sqlType);
40     }
41
42     public void registerOutParameter(int parameterIndex, int sqlType, int scale)
43             throws SQLException {
44         cstmt.registerOutParameter(parameterIndex, sqlType, scale);
45     }
46
47     public boolean wasNull() throws SQLException {
48         return cstmt.wasNull();
49     }
50
51     public String JavaDoc getString(int parameterIndex) throws SQLException {
52         return cstmt.getString(parameterIndex);
53     }
54
55     public boolean getBoolean(int parameterIndex) throws SQLException {
56         return cstmt.getBoolean(parameterIndex);
57     }
58
59     public byte getByte(int parameterIndex) throws SQLException {
60         return cstmt.getByte(parameterIndex);
61     }
62
63     public short getShort(int parameterIndex) throws SQLException {
64         return cstmt.getShort(parameterIndex);
65     }
66
67     public int getInt(int parameterIndex) throws SQLException {
68         return cstmt.getInt(parameterIndex);
69     }
70
71     public long getLong(int parameterIndex) throws SQLException {
72         return cstmt.getLong(parameterIndex);
73     }
74
75     public float getFloat(int parameterIndex) throws SQLException {
76         return cstmt.getFloat(parameterIndex);
77     }
78
79     public double getDouble(int parameterIndex) throws SQLException {
80         return cstmt.getDouble(parameterIndex);
81     }
82
83     @Deprecated JavaDoc public BigDecimal JavaDoc getBigDecimal(int parameterIndex, int scale) throws SQLException {
84         return cstmt.getBigDecimal(parameterIndex, scale);
85     }
86
87     public byte[] getBytes(int parameterIndex) throws SQLException {
88         return cstmt.getBytes(parameterIndex);
89     }
90
91     public Date getDate(int parameterIndex) throws SQLException {
92         return cstmt.getDate(parameterIndex);
93     }
94
95     public Time getTime(int parameterIndex) throws SQLException {
96         return cstmt.getTime(parameterIndex);
97     }
98
99     public Timestamp getTimestamp(int parameterIndex) throws SQLException {
100         return cstmt.getTimestamp(parameterIndex);
101     }
102
103     public Object JavaDoc getObject(int parameterIndex) throws SQLException {
104         return cstmt.getObject(parameterIndex);
105     }
106
107     public BigDecimal JavaDoc getBigDecimal(int parameterIndex) throws SQLException {
108         return cstmt.getBigDecimal(parameterIndex);
109     }
110
111     public Object JavaDoc getObject(int i, Map JavaDoc<String JavaDoc, Class JavaDoc<?>> map) throws SQLException {
112         return cstmt.getObject(i, map);
113     }
114
115     public Ref getRef(int i) throws SQLException {
116         return cstmt.getRef(i);
117     }
118
119     public Blob getBlob(int i) throws SQLException {
120         return cstmt.getBlob(i);
121     }
122
123     public Clob getClob(int i) throws SQLException {
124         return cstmt.getClob(i);
125     }
126
127     public Array getArray(int i) throws SQLException {
128         return cstmt.getArray(i);
129     }
130
131     public Date getDate(int parameterIndex, Calendar JavaDoc cal) throws SQLException {
132         return cstmt.getDate(parameterIndex, cal);
133     }
134
135     public Time getTime(int parameterIndex, Calendar JavaDoc cal) throws SQLException {
136         return cstmt.getTime(parameterIndex, cal);
137     }
138
139     public Timestamp getTimestamp(int parameterIndex, Calendar JavaDoc cal) throws SQLException {
140         return cstmt.getTimestamp(parameterIndex, cal);
141     }
142
143     public void registerOutParameter(int paramIndex, int sqlType, String JavaDoc typeName)
144             throws SQLException {
145         cstmt.registerOutParameter(paramIndex, sqlType, typeName);
146     }
147
148     public void registerOutParameter(String JavaDoc parameterName, int sqlType) throws SQLException {
149         cstmt.registerOutParameter(parameterName, sqlType);
150     }
151
152     public void registerOutParameter(String JavaDoc parameterName, int sqlType, int scale)
153             throws SQLException {
154         cstmt.registerOutParameter(parameterName, sqlType, scale);
155     }
156
157     public void registerOutParameter(String JavaDoc parameterName, int sqlType, String JavaDoc typeName)
158             throws SQLException {
159         cstmt.registerOutParameter(parameterName, sqlType, typeName);
160     }
161
162     public URL JavaDoc getURL(int parameterIndex) throws SQLException {
163         return cstmt.getURL(parameterIndex);
164     }
165
166     public void setURL(String JavaDoc parameterName, URL JavaDoc val) throws SQLException {
167         cstmt.setURL(parameterName, val);
168     }
169
170     public void setNull(String JavaDoc parameterName, int sqlType) throws SQLException {
171         cstmt.setNull(parameterName, sqlType);
172     }
173
174     public void setBoolean(String JavaDoc parameterName, boolean x) throws SQLException {
175         cstmt.setBoolean(parameterName, x);
176     }
177
178     public void setByte(String JavaDoc parameterName, byte x) throws SQLException {
179         cstmt.setByte(parameterName, x);
180     }
181
182     public void setShort(String JavaDoc parameterName, short x) throws SQLException {
183         cstmt.setShort(parameterName, x);
184     }
185
186     public void setInt(String JavaDoc parameterName, int x) throws SQLException {
187         cstmt.setInt(parameterName, x);
188     }
189
190     public void setLong(String JavaDoc parameterName, long x) throws SQLException {
191         cstmt.setLong(parameterName, x);
192     }
193
194     public void setFloat(String JavaDoc parameterName, float x) throws SQLException {
195         cstmt.setFloat(parameterName, x);
196     }
197
198     public void setDouble(String JavaDoc parameterName, double x) throws SQLException {
199         cstmt.setDouble(parameterName, x);
200     }
201
202     public void setBigDecimal(String JavaDoc parameterName, BigDecimal JavaDoc x) throws SQLException {
203         cstmt.setBigDecimal(parameterName, x);
204     }
205
206     public void setString(String JavaDoc parameterName, String JavaDoc x) throws SQLException {
207         cstmt.setString(parameterName, x);
208     }
209
210     public void setBytes(String JavaDoc parameterName, byte x[]) throws SQLException {
211         cstmt.setBytes(parameterName, x);
212     }
213
214     public void setDate(String JavaDoc parameterName, Date x) throws SQLException {
215         cstmt.setDate(parameterName, x);
216     }
217
218     public void setTime(String JavaDoc parameterName, Time x) throws SQLException {
219         cstmt.setTime(parameterName, x);
220     }
221
222     public void setTimestamp(String JavaDoc parameterName, Timestamp x) throws SQLException {
223         cstmt.setTimestamp(parameterName, x);
224     }
225
226     public void setAsciiStream(String JavaDoc parameterName, InputStream JavaDoc x, int length)
227             throws SQLException {
228         cstmt.setAsciiStream(parameterName, x, length);
229     }
230
231     public void setBinaryStream(String JavaDoc parameterName, InputStream JavaDoc x, int length)
232             throws SQLException {
233         cstmt.setBinaryStream(parameterName, x, length);
234     }
235
236     public void setObject(String JavaDoc parameterName, Object JavaDoc x, int targetSqlType, int scale)
237             throws SQLException {
238         cstmt.setObject(parameterName, x, targetSqlType, scale);
239     }
240
241     public void setObject(String JavaDoc parameterName, Object JavaDoc x, int targetSqlType) throws SQLException {
242         cstmt.setObject(parameterName, x, targetSqlType);
243     }
244
245     public void setObject(String JavaDoc parameterName, Object JavaDoc x) throws SQLException {
246         cstmt.setObject(parameterName, x);
247     }
248
249     public void setCharacterStream(String JavaDoc parameterName, Reader JavaDoc reader, int length)
250             throws SQLException {
251         cstmt.setCharacterStream(parameterName, reader, length);
252     }
253
254     public void setDate(String JavaDoc parameterName, Date x, Calendar JavaDoc cal) throws SQLException {
255         cstmt.setDate(parameterName, x, cal);
256     }
257
258     public void setTime(String JavaDoc parameterName, Time x, Calendar JavaDoc cal) throws SQLException {
259         cstmt.setTime(parameterName, x, cal);
260     }
261
262     public void setTimestamp(String JavaDoc parameterName, Timestamp x, Calendar JavaDoc cal) throws SQLException {
263         cstmt.setTimestamp(parameterName, x, cal);
264     }
265
266     public void setNull(String JavaDoc parameterName, int sqlType, String JavaDoc typeName) throws SQLException {
267         cstmt.setNull(parameterName, sqlType, typeName);
268     }
269
270     public String JavaDoc getString(String JavaDoc parameterName) throws SQLException {
271         return cstmt.getString(parameterName);
272     }
273
274     public boolean getBoolean(String JavaDoc parameterName) throws SQLException {
275         return cstmt.getBoolean(parameterName);
276     }
277
278     public byte getByte(String JavaDoc parameterName) throws SQLException {
279         return cstmt.getByte(parameterName);
280     }
281
282     public short getShort(String JavaDoc parameterName) throws SQLException {
283         return cstmt.getShort(parameterName);
284     }
285
286     public int getInt(String JavaDoc parameterName) throws SQLException {
287         return cstmt.getInt(parameterName);
288     }
289
290     public long getLong(String JavaDoc parameterName) throws SQLException {
291         return cstmt.getLong(parameterName);
292     }
293
294     public float getFloat(String JavaDoc parameterName) throws SQLException {
295         return cstmt.getFloat(parameterName);
296     }
297
298     public double getDouble(String JavaDoc parameterName) throws SQLException {
299         return cstmt.getDouble(parameterName);
300     }
301
302     public byte[] getBytes(String JavaDoc parameterName) throws SQLException {
303         return cstmt.getBytes(parameterName);
304     }
305
306     public Date getDate(String JavaDoc parameterName) throws SQLException {
307         return cstmt.getDate(parameterName);
308     }
309
310     public Time getTime(String JavaDoc parameterName) throws SQLException {
311         return cstmt.getTime(parameterName);
312     }
313
314     public Timestamp getTimestamp(String JavaDoc parameterName) throws SQLException {
315         return cstmt.getTimestamp(parameterName);
316     }
317
318     public Object JavaDoc getObject(String JavaDoc parameterName) throws SQLException {
319         return cstmt.getObject(parameterName);
320     }
321
322     public BigDecimal JavaDoc getBigDecimal(String JavaDoc parameterName) throws SQLException {
323         return cstmt.getBigDecimal(parameterName);
324     }
325
326     public Object JavaDoc getObject(String JavaDoc parameterName, Map JavaDoc<String JavaDoc, Class JavaDoc<?>> map) throws SQLException {
327         return cstmt.getObject(parameterName, map);
328     }
329
330     public Ref getRef(String JavaDoc parameterName) throws SQLException {
331         return cstmt.getRef(parameterName);
332     }
333
334     public Blob getBlob(String JavaDoc parameterName) throws SQLException {
335         return cstmt.getBlob(parameterName);
336     }
337
338     public Clob getClob(String JavaDoc parameterName) throws SQLException {
339         return cstmt.getClob(parameterName);
340     }
341
342     public Array getArray(String JavaDoc parameterName) throws SQLException {
343         return cstmt.getArray(parameterName);
344     }
345
346     public Date getDate(String JavaDoc parameterName, Calendar JavaDoc cal) throws SQLException {
347         return cstmt.getDate(parameterName, cal);
348     }
349
350     public Time getTime(String JavaDoc parameterName, Calendar JavaDoc cal) throws SQLException {
351         return cstmt.getTime(parameterName, cal);
352     }
353
354     public Timestamp getTimestamp(String JavaDoc parameterName, Calendar JavaDoc cal) throws SQLException {
355         return cstmt.getTimestamp(parameterName, cal);
356     }
357
358     public URL JavaDoc getURL(String JavaDoc parameterName) throws SQLException {
359         return cstmt.getURL(parameterName);
360     }
361
362     public ResultSet executeQuery() throws SQLException {
363         return cstmt.executeQuery();
364     }
365
366     public int executeUpdate() throws SQLException {
367         return cstmt.executeUpdate();
368     }
369
370     public void setNull(int parameterIndex, int sqlType) throws SQLException {
371         cstmt.setNull(parameterIndex, sqlType);
372     }
373
374     public void setBoolean(int parameterIndex, boolean x) throws SQLException {
375         cstmt.setBoolean(parameterIndex, x);
376     }
377
378     public void setByte(int parameterIndex, byte x) throws SQLException {
379         cstmt.setByte(parameterIndex, x);
380     }
381
382     public void setShort(int parameterIndex, short x) throws SQLException {
383         cstmt.setShort(parameterIndex, x);
384     }
385
386     public void setInt(int parameterIndex, int x) throws SQLException {
387         cstmt.setInt(parameterIndex, x);
388     }
389
390     public void setLong(int parameterIndex, long x) throws SQLException {
391         cstmt.setLong(parameterIndex, x);
392     }
393
394     public void setFloat(int parameterIndex, float x) throws SQLException {
395         cstmt.setFloat(parameterIndex, x);
396     }
397
398     public void setDouble(int parameterIndex, double x) throws SQLException {
399         cstmt.setDouble(parameterIndex, x);
400     }
401
402     public void setBigDecimal(int parameterIndex, BigDecimal JavaDoc x) throws SQLException {
403         cstmt.setBigDecimal(parameterIndex, x);
404     }
405
406     public void setString(int parameterIndex, String JavaDoc x) throws SQLException {
407         cstmt.setString(parameterIndex, x);
408     }
409
410     public void setBytes(int parameterIndex, byte x[]) throws SQLException {
411         cstmt.setBytes(parameterIndex, x);
412     }
413
414     public void setDate(int parameterIndex, Date x) throws SQLException {
415         cstmt.setDate(parameterIndex, x);
416     }
417
418     public void setTime(int parameterIndex, Time x) throws SQLException {
419         cstmt.setTime(parameterIndex, x);
420     }
421
422     public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
423         cstmt.setTimestamp(parameterIndex, x);
424     }
425
426     public void setAsciiStream(int parameterIndex, InputStream JavaDoc x, int length) throws SQLException {
427         cstmt.setAsciiStream(parameterIndex, x, length);
428     }
429
430     @Deprecated JavaDoc public void setUnicodeStream(int parameterIndex, InputStream JavaDoc x, int length)
431             throws SQLException {
432         cstmt.setUnicodeStream(parameterIndex, x, length);
433     }
434
435     public void setBinaryStream(int parameterIndex, InputStream JavaDoc x, int length) throws SQLException {
436         cstmt.setBinaryStream(parameterIndex, x, length);
437     }
438
439     public void clearParameters() throws SQLException {
440         cstmt.clearParameters();
441     }
442
443     public void setObject(int parameterIndex, Object JavaDoc x, int targetSqlType, int scale)
444             throws SQLException {
445         cstmt.setObject(parameterIndex, x, targetSqlType, scale);
446     }
447
448     public void setObject(int parameterIndex, Object JavaDoc x, int targetSqlType) throws SQLException {
449         cstmt.setObject(parameterIndex, x, targetSqlType);
450     }
451
452     public void setObject(int parameterIndex, Object JavaDoc x) throws SQLException {
453         cstmt.setObject(parameterIndex, x);
454     }
455
456     public boolean execute() throws SQLException {
457         return cstmt.execute();
458     }
459
460     public void addBatch() throws SQLException {
461         cstmt.addBatch();
462     }
463
464     public void setCharacterStream(int parameterIndex, Reader JavaDoc reader, int length)
465             throws SQLException {
466         cstmt.setCharacterStream(parameterIndex, reader, length);
467     }
468
469     public void setRef(int i, Ref x) throws SQLException {
470         cstmt.setRef(i, x);
471     }
472
473     public void setBlob(int i, Blob x) throws SQLException {
474         cstmt.setBlob(i, x);
475     }
476
477     public void setClob(int i, Clob x) throws SQLException {
478         cstmt.setClob(i, x);
479     }
480
481     public void setArray(int i, Array x) throws SQLException {
482         cstmt.setArray(i, x);
483     }
484
485     public ResultSetMetaData getMetaData() throws SQLException {
486         return cstmt.getMetaData();
487     }
488
489     public void setDate(int parameterIndex, Date x, Calendar JavaDoc cal) throws SQLException {
490         cstmt.setDate(parameterIndex, x, cal);
491     }
492
493     public void setTime(int parameterIndex, Time x, Calendar JavaDoc cal) throws SQLException {
494         cstmt.setTime(parameterIndex, x, cal);
495     }
496
497     public void setTimestamp(int parameterIndex, Timestamp x, Calendar JavaDoc cal) throws SQLException {
498         cstmt.setTimestamp(parameterIndex, x, cal);
499     }
500
501     public void setNull(int paramIndex, int sqlType, String JavaDoc typeName) throws SQLException {
502         cstmt.setNull(paramIndex, sqlType, typeName);
503     }
504
505     public void setURL(int parameterIndex, URL JavaDoc x) throws SQLException {
506         cstmt.setURL(parameterIndex, x);
507     }
508
509     public ParameterMetaData getParameterMetaData() throws SQLException {
510         return cstmt.getParameterMetaData();
511     }
512 }
513
Popular Tags