View Javadoc

1   /*
2    * $Source: /usr/cvsroot/melati/throwing-jdbc/src/main/java/org/melati/poem/dbms/test/sql/ThrowingCallableStatementJdbc3.java,v $
3    * $Revision: 1.3 $
4    *
5    * Copyright (C) 2008 Tim Pizey
6    *
7    * Part of Melati (http://melati.org), a framework for the rapid
8    * development of clean, maintainable web applications.
9    *
10   * Melati is free software; Permission is granted to copy, distribute
11   * and/or modify this software under the terms either:
12   *
13   * a) the GNU General Public License as published by the Free Software
14   *    Foundation; either version 2 of the License, or (at your option)
15   *    any later version,
16   *
17   *    or
18   *
19   * b) any version of the Melati Software License, as published
20   *    at http://melati.org
21   *
22   * You should have received a copy of the GNU General Public License and
23   * the Melati Software License along with this program;
24   * if not, write to the Free Software Foundation, Inc.,
25   * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA to obtain the
26   * GNU General Public License and visit http://melati.org to obtain the
27   * Melati Software License.
28   *
29   * Feel free to contact the Developers of Melati (http://melati.org),
30   * if you would like to work out a different arrangement than the options
31   * outlined here.  It is our intention to allow Melati to be used by as
32   * wide an audience as possible.
33   *
34   * This program is distributed in the hope that it will be useful,
35   * but WITHOUT ANY WARRANTY; without even the implied warranty of
36   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
37   * GNU General Public License for more details.
38   *
39   * Contact details for copyright holder:
40   *
41   *     Tim Pizey <timp At paneris.org>
42   *     http://paneris.org/~timp
43   */
44  
45  package org.melati.poem.dbms.test.sql;
46  
47  import java.io.InputStream;
48  import java.io.Reader;
49  import java.math.BigDecimal;
50  import java.net.URL;
51  import java.sql.Array;
52  import java.sql.Blob;
53  import java.sql.CallableStatement;
54  import java.sql.Clob;
55  import java.sql.Connection;
56  import java.sql.Date;
57  import java.sql.ParameterMetaData;
58  import java.sql.Ref;
59  import java.sql.ResultSet;
60  import java.sql.ResultSetMetaData;
61  import java.sql.SQLException;
62  import java.sql.SQLWarning;
63  import java.sql.Time;
64  import java.sql.Timestamp;
65  import java.util.Calendar;
66  import java.util.Map;
67  
68  /**
69   * The JDBC3 members of a {@link CallableStatement}, decorated to throw an SQLException on command.
70   * 
71   * @author timp
72   * @since  5 Feb 2008
73   *
74   */
75  public abstract class ThrowingCallableStatementJdbc3 
76      extends Thrower 
77      implements CallableStatement {
78  
79    CallableStatement it = null;
80    
81    public Array getArray(int i) throws SQLException {
82      if (shouldThrow(this.getClass().getInterfaces()[0], "getArray"))
83        throw new SQLException("CallableStatement bombed");
84      return new ThrowingArray(it.getArray(i));
85    }
86  
87    public Array getArray(String parameterName) throws SQLException {
88      if (shouldThrow(this.getClass().getInterfaces()[0], "getArray"))
89        throw new SQLException("CallableStatement bombed");
90      return new ThrowingArray(it.getArray(parameterName));
91    }
92  
93    public BigDecimal getBigDecimal(int parameterIndex) throws SQLException {
94      if (shouldThrow(this.getClass().getInterfaces()[0], "getBigDecimal"))
95        throw new SQLException("CallableStatement bombed");
96      return it.getBigDecimal(parameterIndex);
97    }
98  
99    public BigDecimal getBigDecimal(String parameterName) throws SQLException {
100     if (shouldThrow(this.getClass().getInterfaces()[0], "getBigDecimal"))
101       throw new SQLException("CallableStatement bombed");
102     return it.getBigDecimal(parameterName);
103   }
104 
105   public BigDecimal getBigDecimal(int parameterIndex, int scale)
106           throws SQLException {
107     if (shouldThrow(this.getClass().getInterfaces()[0], "getBigDecimal"))
108       throw new SQLException("CallableStatement bombed");
109     return it.getBigDecimal(parameterIndex, scale);
110   }
111 
112   public Blob getBlob(int i) throws SQLException {
113     if (shouldThrow(this.getClass().getInterfaces()[0], "getBlob"))
114       throw new SQLException("CallableStatement bombed");
115     return new ThrowingBlob(it.getBlob(i));
116   }
117 
118   public Blob getBlob(String parameterName) throws SQLException {
119     if (shouldThrow(this.getClass().getInterfaces()[0], "getBlob"))
120       throw new SQLException("CallableStatement bombed");
121     return new ThrowingBlob(it.getBlob(parameterName));
122   }
123 
124   public boolean getBoolean(int parameterIndex) throws SQLException {
125     if (shouldThrow(this.getClass().getInterfaces()[0], "getBoolean"))
126       throw new SQLException("CallableStatement bombed");
127     return it.getBoolean(parameterIndex);
128   }
129 
130   public boolean getBoolean(String parameterName) throws SQLException {
131     if (shouldThrow(this.getClass().getInterfaces()[0], "getBoolean"))
132       throw new SQLException("CallableStatement bombed");
133     return it.getBoolean(parameterName);
134   }
135 
136   public byte getByte(int parameterIndex) throws SQLException {
137     if (shouldThrow(this.getClass().getInterfaces()[0], "getByte"))
138       throw new SQLException("CallableStatement bombed");
139     return it.getByte(parameterIndex);
140   }
141 
142   public byte getByte(String parameterName) throws SQLException {
143     if (shouldThrow(this.getClass().getInterfaces()[0], "getByte"))
144       throw new SQLException("CallableStatement bombed");
145     return it.getByte(parameterName);
146   }
147 
148   public byte[] getBytes(int parameterIndex) throws SQLException {
149     if (shouldThrow(this.getClass().getInterfaces()[0], "getBytes"))
150       throw new SQLException("CallableStatement bombed");
151     return it.getBytes(parameterIndex);
152   }
153 
154   public byte[] getBytes(String parameterName) throws SQLException {
155     if (shouldThrow(this.getClass().getInterfaces()[0], "getBytes"))
156       throw new SQLException("CallableStatement bombed");
157     return it.getBytes(parameterName);
158   }
159 
160   public Clob getClob(int i) throws SQLException {
161     if (shouldThrow(this.getClass().getInterfaces()[0], "getClob"))
162       throw new SQLException("CallableStatement bombed");
163     return new ThrowingClob(it.getClob(i));
164   }
165 
166   public Clob getClob(String parameterName) throws SQLException {
167     if (shouldThrow(this.getClass().getInterfaces()[0], "getClob"))
168       throw new SQLException("CallableStatement bombed");
169     return new ThrowingClob(it.getClob(parameterName));
170   }
171 
172   public Date getDate(int parameterIndex) throws SQLException {
173     if (shouldThrow(this.getClass().getInterfaces()[0], "getDate"))
174       throw new SQLException("CallableStatement bombed");
175     return it.getDate(parameterIndex);
176   }
177 
178   public Date getDate(String parameterName) throws SQLException {
179     if (shouldThrow(this.getClass().getInterfaces()[0], "getDate"))
180       throw new SQLException("CallableStatement bombed");
181     return it.getDate(parameterName);
182   }
183 
184   public Date getDate(int parameterIndex, Calendar cal) throws SQLException {
185     if (shouldThrow(this.getClass().getInterfaces()[0], "getDate"))
186       throw new SQLException("CallableStatement bombed");
187     return it.getDate(parameterIndex, cal);
188   }
189 
190   public Date getDate(String parameterName, Calendar cal) throws SQLException {
191     if (shouldThrow(this.getClass().getInterfaces()[0], "getDate"))
192       throw new SQLException("CallableStatement bombed");
193     return it.getDate(parameterName, cal);
194   }
195 
196   public double getDouble(int parameterIndex) throws SQLException {
197     if (shouldThrow(this.getClass().getInterfaces()[0], "getDouble"))
198       throw new SQLException("CallableStatement bombed");
199     return it.getDouble(parameterIndex);
200   }
201 
202   public double getDouble(String parameterName) throws SQLException {
203     if (shouldThrow(this.getClass().getInterfaces()[0], "getDouble"))
204       throw new SQLException("CallableStatement bombed");
205     return it.getDouble(parameterName);
206   }
207 
208   public float getFloat(int parameterIndex) throws SQLException {
209     if (shouldThrow(this.getClass().getInterfaces()[0], "getFloat"))
210       throw new SQLException("CallableStatement bombed");
211     return it.getFloat(parameterIndex);
212   }
213 
214   public float getFloat(String parameterName) throws SQLException {
215     if (shouldThrow(this.getClass().getInterfaces()[0], "getFloat"))
216       throw new SQLException("CallableStatement bombed");
217     return it.getFloat(parameterName);
218   }
219 
220   public int getInt(int parameterIndex) throws SQLException {
221     if (shouldThrow(this.getClass().getInterfaces()[0], "getInt"))
222       throw new SQLException("CallableStatement bombed");
223     return it.getInt(parameterIndex);
224   }
225 
226   public int getInt(String parameterName) throws SQLException {
227     if (shouldThrow(this.getClass().getInterfaces()[0], "getInt"))
228       throw new SQLException("CallableStatement bombed");
229     return it.getInt(parameterName);
230   }
231 
232   public long getLong(int parameterIndex) throws SQLException {
233     if (shouldThrow(this.getClass().getInterfaces()[0], "getLong"))
234       throw new SQLException("CallableStatement bombed");
235     return it.getLong(parameterIndex);
236   }
237 
238   public long getLong(String parameterName) throws SQLException {
239     if (shouldThrow(this.getClass().getInterfaces()[0], "getLong"))
240       throw new SQLException("CallableStatement bombed");
241     return it.getLong(parameterName);
242   }
243 
244   public Object getObject(int parameterIndex) throws SQLException {
245     if (shouldThrow(this.getClass().getInterfaces()[0], "getObject"))
246       throw new SQLException("CallableStatement bombed");
247     return it.getObject(parameterIndex);
248   }
249 
250   public Object getObject(String parameterName) throws SQLException {
251     if (shouldThrow(this.getClass().getInterfaces()[0], "getObject"))
252       throw new SQLException("CallableStatement bombed");
253     return it.getObject(parameterName);
254   }
255 
256   public Object getObject(int arg0, Map arg1) throws SQLException {
257     if (shouldThrow(this.getClass().getInterfaces()[0], "getObject"))
258       throw new SQLException("CallableStatement bombed");
259     return it.getObject(arg0, arg1);
260   }
261 
262   public Object getObject(String arg0, Map arg1) throws SQLException {
263     if (shouldThrow(this.getClass().getInterfaces()[0], "getObject"))
264       throw new SQLException("CallableStatement bombed");
265     return it.getObject(arg0, arg1);
266   }
267 
268   public Ref getRef(int i) throws SQLException {
269     if (shouldThrow(this.getClass().getInterfaces()[0], "getRef"))
270       throw new SQLException("CallableStatement bombed");
271     return new ThrowingRef(it.getRef(i));
272   }
273 
274   public Ref getRef(String parameterName) throws SQLException {
275     if (shouldThrow(this.getClass().getInterfaces()[0], "getRef"))
276       throw new SQLException("CallableStatement bombed");
277     return new ThrowingRef(it.getRef(parameterName));
278   }
279 
280   public short getShort(int parameterIndex) throws SQLException {
281     if (shouldThrow(this.getClass().getInterfaces()[0], "getShort"))
282       throw new SQLException("CallableStatement bombed");
283     return it.getShort(parameterIndex);
284   }
285 
286   public short getShort(String parameterName) throws SQLException {
287     if (shouldThrow(this.getClass().getInterfaces()[0], "getShort"))
288       throw new SQLException("CallableStatement bombed");
289     return it.getShort(parameterName);
290   }
291 
292   public String getString(int parameterIndex) throws SQLException {
293     if (shouldThrow(this.getClass().getInterfaces()[0], "getString"))
294       throw new SQLException("CallableStatement bombed");
295     return it.getString(parameterIndex);
296   }
297 
298   public String getString(String parameterName) throws SQLException {
299     if (shouldThrow(this.getClass().getInterfaces()[0], "getString"))
300       throw new SQLException("CallableStatement bombed");
301     return it.getString(parameterName);
302   }
303 
304   public Time getTime(int parameterIndex) throws SQLException {
305     if (shouldThrow(this.getClass().getInterfaces()[0], "getTime"))
306       throw new SQLException("CallableStatement bombed");
307     return it.getTime(parameterIndex);
308   }
309 
310   public Time getTime(String parameterName) throws SQLException {
311     if (shouldThrow(this.getClass().getInterfaces()[0], "getTime"))
312       throw new SQLException("CallableStatement bombed");
313     return it.getTime(parameterName);
314   }
315 
316   public Time getTime(int parameterIndex, Calendar cal) throws SQLException {
317     if (shouldThrow(this.getClass().getInterfaces()[0], "getTime"))
318       throw new SQLException("CallableStatement bombed");
319     return it.getTime(parameterIndex, cal);
320   }
321 
322   public Time getTime(String parameterName, Calendar cal) throws SQLException {
323     if (shouldThrow(this.getClass().getInterfaces()[0], "getTime"))
324       throw new SQLException("CallableStatement bombed");
325     return it.getTime(parameterName, cal);
326   }
327 
328   public Timestamp getTimestamp(int parameterIndex) throws SQLException {
329     if (shouldThrow(this.getClass().getInterfaces()[0], "getTimestamp"))
330       throw new SQLException("CallableStatement bombed");
331     return it.getTimestamp(parameterIndex);
332   }
333 
334   public Timestamp getTimestamp(String parameterName) throws SQLException {
335     if (shouldThrow(this.getClass().getInterfaces()[0], "getTimestamp"))
336       throw new SQLException("CallableStatement bombed");
337     return it.getTimestamp(parameterName);
338   }
339 
340   public Timestamp getTimestamp(int parameterIndex, Calendar cal)
341           throws SQLException {
342     if (shouldThrow(this.getClass().getInterfaces()[0], "getTimestamp"))
343       throw new SQLException("CallableStatement bombed");
344     return it.getTimestamp(parameterIndex, cal);
345   }
346 
347   public Timestamp getTimestamp(String parameterName, Calendar cal)
348           throws SQLException {
349     if (shouldThrow(this.getClass().getInterfaces()[0], "getTimestamp"))
350       throw new SQLException("CallableStatement bombed");
351     return it.getTimestamp(parameterName, cal);
352   }
353 
354   public URL getURL(int parameterIndex) throws SQLException {
355     if (shouldThrow(this.getClass().getInterfaces()[0], "getURL"))
356       throw new SQLException("CallableStatement bombed");
357     return it.getURL(parameterIndex);
358     
359   }
360   public URL getURL(String parameterName) throws SQLException {
361     if (shouldThrow(this.getClass().getInterfaces()[0], "getURL"))
362       throw new SQLException("CallableStatement bombed");
363     return it.getURL(parameterName);    
364   }
365   public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException {
366     if (shouldThrow(this.getClass().getInterfaces()[0], "registerOutParameter"))
367       throw new SQLException("CallableStatement bombed");
368     it.registerOutParameter(parameterIndex, sqlType, scale);
369     
370   }
371   public void registerOutParameter(int paramIndex, int sqlType, String typeName) throws SQLException {
372     if (shouldThrow(this.getClass().getInterfaces()[0], "registerOutParameter"))
373       throw new SQLException("CallableStatement bombed");
374     it.registerOutParameter(paramIndex, sqlType, typeName);
375     
376   }
377   public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException {
378     if (shouldThrow(this.getClass().getInterfaces()[0], "registerOutParameter"))
379       throw new SQLException("CallableStatement bombed");
380     it.registerOutParameter(parameterIndex, sqlType);
381     
382   }
383   public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException {
384     if (shouldThrow(this.getClass().getInterfaces()[0], "registerOutParameter"))
385       throw new SQLException("CallableStatement bombed");
386     it.registerOutParameter(parameterName, sqlType, scale);
387     
388   }
389   public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException {
390     if (shouldThrow(this.getClass().getInterfaces()[0], "registerOutParameter"))
391       throw new SQLException("CallableStatement bombed");
392     it.registerOutParameter(parameterName, sqlType, typeName);
393     
394   }
395   public void registerOutParameter(String parameterName, int sqlType) throws SQLException {
396     if (shouldThrow(this.getClass().getInterfaces()[0], "registerOutParameter"))
397       throw new SQLException("CallableStatement bombed");
398     it.registerOutParameter(parameterName, sqlType);
399     
400   }
401   public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException {
402     if (shouldThrow(this.getClass().getInterfaces()[0], "setAsciiStream"))
403       throw new SQLException("CallableStatement bombed");
404     it.setAsciiStream(parameterName, x, length);
405     
406   }
407   public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException {
408     if (shouldThrow(this.getClass().getInterfaces()[0], "setBigDecimal"))
409       throw new SQLException("CallableStatement bombed");
410     it.setBigDecimal(parameterName, x);
411     
412   }
413   public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException {
414     if (shouldThrow(this.getClass().getInterfaces()[0], "setBinaryStream"))
415       throw new SQLException("CallableStatement bombed");
416     it.setBinaryStream(parameterName, x, length);
417   }
418   public void setBoolean(String parameterName, boolean x) throws SQLException {
419     if (shouldThrow(this.getClass().getInterfaces()[0], "setBoolean"))
420       throw new SQLException("CallableStatement bombed");
421     it.setBoolean(parameterName, x);
422     
423   }
424   public void setByte(String parameterName, byte x) throws SQLException {
425     if (shouldThrow(this.getClass().getInterfaces()[0], "setByte"))
426       throw new SQLException("CallableStatement bombed");
427     it.setByte(parameterName, x);
428   }
429   public void setBytes(String parameterName, byte[] x) throws SQLException {
430     if (shouldThrow(this.getClass().getInterfaces()[0], "setBytes"))
431       throw new SQLException("CallableStatement bombed");
432     it.setBytes(parameterName, x);
433   }
434   public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException {
435     if (shouldThrow(this.getClass().getInterfaces()[0], "setCharacterStream"))
436       throw new SQLException("CallableStatement bombed");
437     it.setCharacterStream(parameterName, reader, length);
438   }
439   public void setDate(String parameterName, Date x, Calendar cal) throws SQLException {
440     if (shouldThrow(this.getClass().getInterfaces()[0], "setDate"))
441       throw new SQLException("CallableStatement bombed");
442     it.setDate(parameterName, x, cal);
443   }
444   public void setDate(String parameterName, Date x) throws SQLException {
445     if (shouldThrow(this.getClass().getInterfaces()[0], "setDate"))
446       throw new SQLException("CallableStatement bombed");
447     it.setDate(parameterName, x);
448     
449   }
450   public void setDouble(String parameterName, double x) throws SQLException {
451     if (shouldThrow(this.getClass().getInterfaces()[0], "setDouble"))
452       throw new SQLException("CallableStatement bombed");
453     it.setDouble(parameterName, x);
454   }
455   public void setFloat(String parameterName, float x) throws SQLException {
456     if (shouldThrow(this.getClass().getInterfaces()[0], "setFloat"))
457       throw new SQLException("CallableStatement bombed");
458     it.setFloat(parameterName, x);
459   }
460   public void setInt(String parameterName, int x) throws SQLException {
461     if (shouldThrow(this.getClass().getInterfaces()[0], "setInt"))
462       throw new SQLException("CallableStatement bombed");
463     it.setInt(parameterName, x);
464   }
465   public void setLong(String parameterName, long x) throws SQLException {
466     if (shouldThrow(this.getClass().getInterfaces()[0], "setLong"))
467       throw new SQLException("CallableStatement bombed");
468     it.setLong(parameterName, x);
469   }
470   public void setNull(String parameterName, int sqlType, String typeName) throws SQLException {
471     if (shouldThrow(this.getClass().getInterfaces()[0], "setNull"))
472       throw new SQLException("CallableStatement bombed");
473     it.setNull(parameterName, sqlType, typeName);
474   }
475   public void setNull(String parameterName, int sqlType) throws SQLException {
476     if (shouldThrow(this.getClass().getInterfaces()[0], "setNull"))
477       throw new SQLException("CallableStatement bombed");
478     it.setNull(parameterName, sqlType);
479   }
480   public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException {
481     if (shouldThrow(this.getClass().getInterfaces()[0], "setObject"))
482       throw new SQLException("CallableStatement bombed");
483     it.setObject(parameterName, x, targetSqlType, scale);
484   }
485   public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException {
486     if (shouldThrow(this.getClass().getInterfaces()[0], "setObject"))
487       throw new SQLException("CallableStatement bombed");
488     it.setObject(parameterName, x, targetSqlType);
489   }
490   public void setObject(String parameterName, Object x) throws SQLException {
491     if (shouldThrow(this.getClass().getInterfaces()[0], "setObject"))
492       throw new SQLException("CallableStatement bombed");
493     it.setObject(parameterName, x);
494   }
495   public void setShort(String parameterName, short x) throws SQLException {
496     if (shouldThrow(this.getClass().getInterfaces()[0], "setShort"))
497       throw new SQLException("CallableStatement bombed");
498     it.setShort(parameterName, x);
499   }
500   public void setString(String parameterName, String x) throws SQLException {
501     if (shouldThrow(this.getClass().getInterfaces()[0], "setString"))
502       throw new SQLException("CallableStatement bombed");
503     it.setString(parameterName, x);
504   }
505   public void setTime(String parameterName, Time x, Calendar cal) throws SQLException {
506     if (shouldThrow(this.getClass().getInterfaces()[0], "setTime"))
507       throw new SQLException("CallableStatement bombed");
508     it.setTime(parameterName, x, cal);
509     
510   }
511   public void setTime(String parameterName, Time x) throws SQLException {
512     if (shouldThrow(this.getClass().getInterfaces()[0], "setTime"))
513       throw new SQLException("CallableStatement bombed");
514     it.setTime(parameterName, x);
515   }
516   public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException {
517     if (shouldThrow(this.getClass().getInterfaces()[0], "setTimestamp"))
518       throw new SQLException("CallableStatement bombed");
519     it.setTimestamp(parameterName, x, cal);
520     
521   }
522   public void setTimestamp(String parameterName, Timestamp x) throws SQLException {
523     if (shouldThrow(this.getClass().getInterfaces()[0], "setTimestamp"))
524       throw new SQLException("CallableStatement bombed");
525     it.setTimestamp(parameterName, x);
526   }
527   public void setURL(String parameterName, URL val) throws SQLException {
528     if (shouldThrow(this.getClass().getInterfaces()[0], "setURL"))
529       throw new SQLException("CallableStatement bombed");
530     it.setURL(parameterName, val);
531   }
532   public boolean wasNull() throws SQLException {
533     if (shouldThrow(this.getClass().getInterfaces()[0], "wasNull"))
534       throw new SQLException("CallableStatement bombed");
535     return it.wasNull();
536   }
537   public void addBatch() throws SQLException {
538     if (shouldThrow(this.getClass().getInterfaces()[0], "addBatch"))
539       throw new SQLException("CallableStatement bombed");
540     it.addBatch();
541   }
542   public void clearParameters() throws SQLException {
543     if (shouldThrow(this.getClass().getInterfaces()[0], "clearParameters"))
544       throw new SQLException("CallableStatement bombed");
545     it.clearParameters();
546   }
547   public boolean execute() throws SQLException {
548     if (shouldThrow(this.getClass().getInterfaces()[0], "execute"))
549       throw new SQLException("CallableStatement bombed");
550     return it.execute();
551   }
552   public ResultSet executeQuery() throws SQLException {
553     if (shouldThrow(this.getClass().getInterfaces()[0], "executeQuery"))
554       throw new SQLException("CallableStatement bombed");
555     return it.executeQuery();
556   }
557   public int executeUpdate() throws SQLException {
558     if (shouldThrow(this.getClass().getInterfaces()[0], "executeUpdate"))
559       throw new SQLException("CallableStatement bombed");
560     return it.executeUpdate();
561   }
562   public ResultSetMetaData getMetaData() throws SQLException {
563     if (shouldThrow(this.getClass().getInterfaces()[0], "getMetaData"))
564       throw new SQLException("CallableStatement bombed");
565     return it.getMetaData();
566   }
567   public ParameterMetaData getParameterMetaData() throws SQLException {
568     if (shouldThrow(this.getClass().getInterfaces()[0], "getParameterMetaData"))
569       throw new SQLException("CallableStatement bombed");
570     return new ThrowingParameterMetaData(it.getParameterMetaData());
571   }
572   public void setArray(int i, Array x) throws SQLException {
573     if (shouldThrow(this.getClass().getInterfaces()[0], "setArray"))
574       throw new SQLException("CallableStatement bombed");
575     it.setArray(i, x);
576   }
577   public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
578     if (shouldThrow(this.getClass().getInterfaces()[0], "setAsciiStream"))
579       throw new SQLException("CallableStatement bombed");
580     it.setAsciiStream(parameterIndex, x, length);
581   }
582   public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {
583     if (shouldThrow(this.getClass().getInterfaces()[0], "setBigDecimal"))
584       throw new SQLException("CallableStatement bombed");
585     it.setBigDecimal(parameterIndex, x);
586   }
587   public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException {
588     if (shouldThrow(this.getClass().getInterfaces()[0], "setBinaryStream"))
589       throw new SQLException("CallableStatement bombed");
590     it.setBinaryStream(parameterIndex, x, length);
591   }
592   public void setBlob(int i, Blob x) throws SQLException {
593     if (shouldThrow(this.getClass().getInterfaces()[0], "setBlob"))
594       throw new SQLException("CallableStatement bombed");
595     it.setBlob(i, x);
596   }
597   public void setBoolean(int parameterIndex, boolean x) throws SQLException {
598     if (shouldThrow(this.getClass().getInterfaces()[0], "setBoolean"))
599       throw new SQLException("CallableStatement bombed");
600     it.setBoolean(parameterIndex, x);
601   }
602   public void setByte(int parameterIndex, byte x) throws SQLException {
603     if (shouldThrow(this.getClass().getInterfaces()[0], "setByte"))
604       throw new SQLException("CallableStatement bombed");
605     it.setByte(parameterIndex, x);
606   }
607   public void setBytes(int parameterIndex, byte[] x) throws SQLException {
608     if (shouldThrow(this.getClass().getInterfaces()[0], "setBytes"))
609       throw new SQLException("CallableStatement bombed");
610     it.setBytes(parameterIndex, x);
611   }
612   public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {
613     if (shouldThrow(this.getClass().getInterfaces()[0], "setCharacterStream"))
614       throw new SQLException("CallableStatement bombed");
615     it.setCharacterStream(parameterIndex, reader, length);
616   }
617   public void setClob(int i, Clob x) throws SQLException {
618     if (shouldThrow(this.getClass().getInterfaces()[0], "setClob"))
619       throw new SQLException("CallableStatement bombed");
620     it.setClob(i, x);
621   }
622   public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException {
623     if (shouldThrow(this.getClass().getInterfaces()[0], "setDate"))
624       throw new SQLException("CallableStatement bombed");
625     it.setDate(parameterIndex, x, cal);
626     
627   }
628   public void setDate(int parameterIndex, Date x) throws SQLException {
629     if (shouldThrow(this.getClass().getInterfaces()[0], "setDate"))
630       throw new SQLException("CallableStatement bombed");
631     it.setDate(parameterIndex, x);
632   }
633   public void setDouble(int parameterIndex, double x) throws SQLException {
634     if (shouldThrow(this.getClass().getInterfaces()[0], "setDouble"))
635       throw new SQLException("CallableStatement bombed");
636     it.setDouble(parameterIndex, x);
637   }
638   public void setFloat(int parameterIndex, float x) throws SQLException {
639     if (shouldThrow(this.getClass().getInterfaces()[0], "setFloat"))
640       throw new SQLException("CallableStatement bombed");
641     it.setFloat(parameterIndex, x);
642   }
643   public void setInt(int parameterIndex, int x) throws SQLException {
644     if (shouldThrow(this.getClass().getInterfaces()[0], "setInt"))
645       throw new SQLException("CallableStatement bombed");
646     it.setInt(parameterIndex, x);
647   }
648   public void setLong(int parameterIndex, long x) throws SQLException {
649     if (shouldThrow(this.getClass().getInterfaces()[0], "setLong"))
650       throw new SQLException("CallableStatement bombed");
651     it.setLong(parameterIndex, x);
652   }
653   public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException {
654     if (shouldThrow(this.getClass().getInterfaces()[0], "setNull"))
655       throw new SQLException("CallableStatement bombed");
656     it.setNull(paramIndex, sqlType, typeName);
657   }
658   public void setNull(int parameterIndex, int sqlType) throws SQLException {
659     if (shouldThrow(this.getClass().getInterfaces()[0], "setNull"))
660       throw new SQLException("CallableStatement bombed");
661     it.setNull(parameterIndex, sqlType);
662   }
663   public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException {
664     if (shouldThrow(this.getClass().getInterfaces()[0], "setObject"))
665       throw new SQLException("CallableStatement bombed");
666     it.setObject(parameterIndex, x, targetSqlType, scale);
667   }
668   public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {
669     if (shouldThrow(this.getClass().getInterfaces()[0], "setObject"))
670       throw new SQLException("CallableStatement bombed");
671     it.setObject(parameterIndex, x, targetSqlType);
672   }
673   public void setObject(int parameterIndex, Object x) throws SQLException {
674     if (shouldThrow(this.getClass().getInterfaces()[0], "setObject"))
675       throw new SQLException("CallableStatement bombed");
676     it.setObject(parameterIndex, x);
677     
678   }
679   public void setRef(int i, Ref x) throws SQLException {
680     if (shouldThrow(this.getClass().getInterfaces()[0], "setRef"))
681       throw new SQLException("CallableStatement bombed");
682     it.setRef(i, x);
683   }
684   public void setShort(int parameterIndex, short x) throws SQLException {
685     if (shouldThrow(this.getClass().getInterfaces()[0], "setShort"))
686       throw new SQLException("CallableStatement bombed");
687     it.setShort(parameterIndex, x);
688   }
689   public void setString(int parameterIndex, String x) throws SQLException {
690     if (shouldThrow(this.getClass().getInterfaces()[0], "setString"))
691       throw new SQLException("CallableStatement bombed");
692     it.setString(parameterIndex, x);
693   }
694   public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
695     if (shouldThrow(this.getClass().getInterfaces()[0], "setTime"))
696       throw new SQLException("CallableStatement bombed");
697     it.setTime(parameterIndex, x, cal);
698   }
699   public void setTime(int parameterIndex, Time x) throws SQLException {
700     if (shouldThrow(this.getClass().getInterfaces()[0], "setTime"))
701       throw new SQLException("CallableStatement bombed");
702     it.setTime(parameterIndex, x);
703   }
704   public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {
705     if (shouldThrow(this.getClass().getInterfaces()[0], "setTimestamp"))
706       throw new SQLException("CallableStatement bombed");
707     it.setTimestamp(parameterIndex, x, cal);
708   }
709   public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
710     if (shouldThrow(this.getClass().getInterfaces()[0], "setTimestamp"))
711       throw new SQLException("CallableStatement bombed");
712     it.setTimestamp(parameterIndex, x);
713   }
714   public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException {
715     if (shouldThrow(this.getClass().getInterfaces()[0], "setUnicodeStream"))
716       throw new SQLException("CallableStatement bombed");
717     it.setUnicodeStream(parameterIndex, x, length);
718   }
719   public void setURL(int parameterIndex, URL x) throws SQLException {
720     if (shouldThrow(this.getClass().getInterfaces()[0], "setURL"))
721       throw new SQLException("CallableStatement bombed");
722     it.setURL(parameterIndex, x);
723   }
724   public void addBatch(String sql) throws SQLException {
725     if (shouldThrow(this.getClass().getInterfaces()[0], "addBatch"))
726       throw new SQLException("CallableStatement bombed");
727     it.addBatch(sql);
728   }
729   public void cancel() throws SQLException {
730     if (shouldThrow(this.getClass().getInterfaces()[0], "cancel"))
731       throw new SQLException("CallableStatement bombed");
732     it.cancel();
733   }
734   public void clearBatch() throws SQLException {
735     if (shouldThrow(this.getClass().getInterfaces()[0], "clearBatch"))
736       throw new SQLException("CallableStatement bombed");
737     it.clearBatch();
738   }
739   public void clearWarnings() throws SQLException {
740     if (shouldThrow(this.getClass().getInterfaces()[0], "clearWarnings"))
741       throw new SQLException("CallableStatement bombed");
742     it.clearWarnings();
743   }
744   public void close() throws SQLException {
745     if (shouldThrow(this.getClass().getInterfaces()[0], "close"))
746       throw new SQLException("CallableStatement bombed");
747     it.close();
748   }
749   public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
750     if (shouldThrow(this.getClass().getInterfaces()[0], "execute"))
751       throw new SQLException("CallableStatement bombed");
752     return it.execute(sql, autoGeneratedKeys);
753   }
754   public boolean execute(String sql, int[] columnIndexes) throws SQLException {
755     if (shouldThrow(this.getClass().getInterfaces()[0], "execute"))
756       throw new SQLException("CallableStatement bombed");
757     return it.execute(sql, columnIndexes);
758   }
759   public boolean execute(String sql, String[] columnNames) throws SQLException {
760     if (shouldThrow(this.getClass().getInterfaces()[0], "execute"))
761       throw new SQLException("CallableStatement bombed");
762     return it.execute(sql, columnNames);
763   }
764   public boolean execute(String sql) throws SQLException {
765     if (shouldThrow(this.getClass().getInterfaces()[0], "execute"))
766       throw new SQLException("CallableStatement bombed");
767     return it.execute(sql);
768   }
769   public int[] executeBatch() throws SQLException {
770     if (shouldThrow(this.getClass().getInterfaces()[0], "executeBatch"))
771       throw new SQLException("CallableStatement bombed");
772     return it.executeBatch();
773   }
774   public ResultSet executeQuery(String sql) throws SQLException {
775     if (shouldThrow(this.getClass().getInterfaces()[0], "executeQuery"))
776       throw new SQLException("CallableStatement bombed");
777     return new ThrowingResultSet(it.executeQuery(sql));
778   }
779   public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
780     if (shouldThrow(this.getClass().getInterfaces()[0], "executeUpdate"))
781       throw new SQLException("CallableStatement bombed");
782     return it.executeUpdate(sql, autoGeneratedKeys);
783   }
784   public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
785     if (shouldThrow(this.getClass().getInterfaces()[0], "executeUpdate"))
786       throw new SQLException("CallableStatement bombed");
787     return it.executeUpdate(sql, columnIndexes);
788   }
789   public int executeUpdate(String sql, String[] columnNames) throws SQLException {
790     if (shouldThrow(this.getClass().getInterfaces()[0], "executeUpdate"))
791       throw new SQLException("CallableStatement bombed");
792     return it.executeUpdate(sql, columnNames);
793   }
794   public int executeUpdate(String sql) throws SQLException {
795     if (shouldThrow(this.getClass().getInterfaces()[0], "executeUpdate"))
796       throw new SQLException("CallableStatement bombed");
797     return it.executeUpdate(sql);
798   }
799 
800   public Connection getConnection() throws SQLException {
801     if (shouldThrow(this.getClass().getInterfaces()[0], "getConnection"))
802       throw new SQLException("CallableStatement bombed");
803     return new ThrowingConnection(it.getConnection());
804   }
805   public int getFetchDirection() throws SQLException {
806     if (shouldThrow(this.getClass().getInterfaces()[0], "getFetchDirection"))
807       throw new SQLException("CallableStatement bombed");
808     return it.getFetchDirection();
809   }
810   public int getFetchSize() throws SQLException {
811     if (shouldThrow(this.getClass().getInterfaces()[0], "getFetchSize"))
812       throw new SQLException("CallableStatement bombed");
813     return it.getFetchSize();
814   }
815   public ResultSet getGeneratedKeys() throws SQLException {
816     if (shouldThrow(this.getClass().getInterfaces()[0], "getGeneratedKeys"))
817       throw new SQLException("CallableStatement bombed");
818     return new ThrowingResultSet(it.getGeneratedKeys());
819   }
820   public int getMaxFieldSize() throws SQLException {
821     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxFieldSize"))
822       throw new SQLException("CallableStatement bombed");
823     return it.getMaxFieldSize();
824   }
825   public int getMaxRows() throws SQLException {
826     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxRows"))
827       throw new SQLException("CallableStatement bombed");
828     return it.getMaxRows();
829   }
830   public boolean getMoreResults() throws SQLException {
831     if (shouldThrow(this.getClass().getInterfaces()[0], "getMoreResults"))
832       throw new SQLException("CallableStatement bombed");
833     return it.getMoreResults();
834   }
835   public boolean getMoreResults(int current) throws SQLException {
836     if (shouldThrow(this.getClass().getInterfaces()[0], "getMoreResults"))
837       throw new SQLException("CallableStatement bombed");
838     return it.getMoreResults(current);
839   }
840   public int getQueryTimeout() throws SQLException {
841     if (shouldThrow(this.getClass().getInterfaces()[0], "getQueryTimeout"))
842       throw new SQLException("CallableStatement bombed");
843     return it.getQueryTimeout();
844   }
845   public ResultSet getResultSet() throws SQLException {
846     if (shouldThrow(this.getClass().getInterfaces()[0], "getResultSet"))
847       throw new SQLException("CallableStatement bombed");
848     return new ThrowingResultSet(it.getResultSet());
849   }
850   public int getResultSetConcurrency() throws SQLException {
851     if (shouldThrow(this.getClass().getInterfaces()[0], "getResultSetConcurrency"))
852       throw new SQLException("CallableStatement bombed");
853     return it.getResultSetConcurrency();
854   }
855   public int getResultSetHoldability() throws SQLException {
856     if (shouldThrow(this.getClass().getInterfaces()[0], "getResultSetHoldability"))
857       throw new SQLException("CallableStatement bombed");
858     return it.getResultSetHoldability();
859   }
860   public int getResultSetType() throws SQLException {
861     if (shouldThrow(this.getClass().getInterfaces()[0], "getResultSetType"))
862       throw new SQLException("CallableStatement bombed");
863     return it.getResultSetType();
864   }
865   public int getUpdateCount() throws SQLException {
866     if (shouldThrow(this.getClass().getInterfaces()[0], "getUpdateCount"))
867       throw new SQLException("CallableStatement bombed");
868     return it.getUpdateCount();
869   }
870   public SQLWarning getWarnings() throws SQLException {
871     if (shouldThrow(this.getClass().getInterfaces()[0], "getWarnings"))
872       throw new SQLException("CallableStatement bombed");
873     return it.getWarnings();
874   }
875   public void setCursorName(String name) throws SQLException {
876     if (shouldThrow(this.getClass().getInterfaces()[0], "setCursorName"))
877       throw new SQLException("CallableStatement bombed");
878     it.setCursorName(name);
879   }
880   public void setEscapeProcessing(boolean enable) throws SQLException {
881     if (shouldThrow(this.getClass().getInterfaces()[0], "setEscapeProcessing"))
882       throw new SQLException("CallableStatement bombed");
883     it.setEscapeProcessing(enable);
884   }
885   public void setFetchDirection(int direction) throws SQLException {
886     if (shouldThrow(this.getClass().getInterfaces()[0], "setFetchDirection"))
887       throw new SQLException("CallableStatement bombed");
888     it.setFetchDirection(direction);
889     
890   }
891   public void setFetchSize(int rows) throws SQLException {
892     if (shouldThrow(this.getClass().getInterfaces()[0], "setFetchSize"))
893       throw new SQLException("CallableStatement bombed");
894     it.setFetchSize(rows);
895   }
896   public void setMaxFieldSize(int max) throws SQLException {
897     if (shouldThrow(this.getClass().getInterfaces()[0], "setMaxFieldSize"))
898       throw new SQLException("CallableStatement bombed");
899     it.setMaxFieldSize(max);
900   }
901   public void setMaxRows(int max) throws SQLException {
902     if (shouldThrow(this.getClass().getInterfaces()[0], "setMaxRows"))
903       throw new SQLException("CallableStatement bombed");
904     it.setMaxRows(max);
905   }
906   public void setQueryTimeout(int seconds) throws SQLException {
907     if (shouldThrow(this.getClass().getInterfaces()[0], "setQueryTimeout"))
908       throw new SQLException("CallableStatement bombed");
909     it.setQueryTimeout(seconds);
910   }
911 }