View Javadoc

1   /*
2    * $Source: /usr/cvsroot/melati/throwing-jdbc/src/main/java/org/melati/poem/dbms/test/sql/ThrowingResultSetJdbc3.java,v $
3    * $Revision: 1.5 $
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.Clob;
54  import java.sql.Date;
55  import java.sql.Ref;
56  import java.sql.ResultSet;
57  import java.sql.ResultSetMetaData;
58  import java.sql.SQLException;
59  import java.sql.SQLWarning;
60  import java.sql.Statement;
61  import java.sql.Time;
62  import java.sql.Timestamp;
63  import java.util.Calendar;
64  import java.util.Map;
65  
66  /**
67   * The JDBC3 methods of a {@link ResultSet}, decorated to throw an SQLException on command.
68   * 
69   * @author timp
70   * @since  5 Feb 2008
71   *
72   */
73  public abstract class ThrowingResultSetJdbc3 
74      extends Thrower 
75      implements ResultSet {
76  
77    ResultSet it = null;
78  
79  
80    /**
81     * {@inheritDoc}
82     * @see java.sql.ResultSet#absolute(int)
83     */
84    public boolean absolute(int row) throws SQLException {
85      if (shouldThrow(this.getClass().getInterfaces()[0], "absolute"))
86        throw new SQLException("ResultSet bombed");
87       return it.absolute(row);
88    }
89  
90    /**
91     * {@inheritDoc}
92     * @see java.sql.ResultSet#afterLast()
93     */
94    public void afterLast() throws SQLException {
95      if (shouldThrow(this.getClass().getInterfaces()[0], "afterLast"))
96        throw new SQLException("ResultSet bombed");
97      it.afterLast();
98    }
99  
100   /**
101    * {@inheritDoc}
102    * @see java.sql.ResultSet#beforeFirst()
103    */
104   public void beforeFirst() throws SQLException {
105     if (shouldThrow(this.getClass().getInterfaces()[0], "beforeFirst"))
106       throw new SQLException("ResultSet bombed");
107     it.beforeFirst();
108   }
109 
110   /**
111    * {@inheritDoc}
112    * @see java.sql.ResultSet#cancelRowUpdates()
113    */
114   public void cancelRowUpdates() throws SQLException {
115     if (shouldThrow(this.getClass().getInterfaces()[0], "cancelRowUpdates"))
116       throw new SQLException("ResultSet bombed");
117     it.cancelRowUpdates();
118   }
119 
120   /**
121    * {@inheritDoc}
122    * @see java.sql.ResultSet#clearWarnings()
123    */
124   public void clearWarnings() throws SQLException {
125     if (shouldThrow(this.getClass().getInterfaces()[0], "clearWarnings"))
126       throw new SQLException("ResultSet bombed");
127     it.clearWarnings();
128   }
129 
130   /**
131    * {@inheritDoc}
132    * @see java.sql.ResultSet#close()
133    */
134   public void close() throws SQLException {
135     if (shouldThrow(this.getClass().getInterfaces()[0], "close"))
136       throw new SQLException("ResultSet bombed");
137     it.close();
138   }
139 
140   /**
141    * {@inheritDoc}
142    * @see java.sql.ResultSet#deleteRow()
143    */
144   public void deleteRow() throws SQLException {
145     if (shouldThrow(this.getClass().getInterfaces()[0], "deleteRow"))
146       throw new SQLException("ResultSet bombed");
147     it.deleteRow();
148   }
149 
150   /**
151    * {@inheritDoc}
152    * @see java.sql.ResultSet#findColumn(java.lang.String)
153    */
154   public int findColumn(String columnName) throws SQLException {
155     if (shouldThrow(this.getClass().getInterfaces()[0], "findColumn"))
156       throw new SQLException("ResultSet bombed");
157     return it.findColumn(columnName);
158   }
159 
160   /**
161    * {@inheritDoc}
162    * @see java.sql.ResultSet#first()
163    */
164   public boolean first() throws SQLException {
165     if (shouldThrow(this.getClass().getInterfaces()[0], "first"))
166       throw new SQLException("ResultSet bombed");
167     return it.first();
168   }
169 
170   /**
171    * {@inheritDoc}
172    * @see java.sql.ResultSet#getArray(int)
173    */
174   public Array getArray(int i) throws SQLException {
175     if (shouldThrow(this.getClass().getInterfaces()[0], "getArray"))
176       throw new SQLException("ResultSet bombed");
177     return new ThrowingArray(it.getArray(i));
178   }
179 
180   /**
181    * {@inheritDoc}
182    * @see java.sql.ResultSet#getArray(java.lang.String)
183    */
184   public Array getArray(String colName) throws SQLException {
185     if (shouldThrow(this.getClass().getInterfaces()[0], "getArray"))
186       throw new SQLException("ResultSet bombed");
187     return new ThrowingArray(it.getArray(colName));
188   }
189 
190   /**
191    * {@inheritDoc}
192    * @see java.sql.ResultSet#getAsciiStream(int)
193    */
194   public InputStream getAsciiStream(int columnIndex) throws SQLException {
195     if (shouldThrow(this.getClass().getInterfaces()[0], "getAsciiStream"))
196       throw new SQLException("ResultSet bombed");
197     return it.getAsciiStream(columnIndex);
198   }
199 
200   /**
201    * {@inheritDoc}
202    * @see java.sql.ResultSet#getAsciiStream(java.lang.String)
203    */
204   public InputStream getAsciiStream(String columnName) throws SQLException {
205     if (shouldThrow(this.getClass().getInterfaces()[0], "getAsciiStream"))
206       throw new SQLException("ResultSet bombed");
207     return it.getAsciiStream(columnName);
208   }
209 
210   /**
211    * {@inheritDoc}
212    * @see java.sql.ResultSet#getBigDecimal(int)
213    */
214   public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
215     if (shouldThrow(this.getClass().getInterfaces()[0], "getBigDecimal"))
216       throw new SQLException("ResultSet bombed");
217     return it.getBigDecimal(columnIndex);
218   }
219 
220   /**
221    * {@inheritDoc}
222    * @see java.sql.ResultSet#getBigDecimal(java.lang.String)
223    */
224   public BigDecimal getBigDecimal(String columnName) throws SQLException {
225     if (shouldThrow(this.getClass().getInterfaces()[0], "getBigDecimal"))
226       throw new SQLException("ResultSet bombed");
227     return it.getBigDecimal(columnName);
228   }
229 
230   /**
231    * {@inheritDoc}
232    * @see java.sql.ResultSet#getBigDecimal(int, int)
233    */
234   public BigDecimal getBigDecimal(int columnIndex, int scale)
235       throws SQLException {
236     if (shouldThrow(this.getClass().getInterfaces()[0], "getBigDecimal"))
237       throw new SQLException("ResultSet bombed");
238     return it.getBigDecimal(columnIndex, scale);
239   }
240 
241   /**
242    * {@inheritDoc}
243    * @see java.sql.ResultSet#getBigDecimal(java.lang.String, int)
244    */
245   public BigDecimal getBigDecimal(String columnName, int scale)
246       throws SQLException {
247     if (shouldThrow(this.getClass().getInterfaces()[0], "getBigDecimal"))
248       throw new SQLException("ResultSet bombed");
249     return it.getBigDecimal(columnName, scale);
250   }
251 
252   /**
253    * {@inheritDoc}
254    * @see java.sql.ResultSet#getBinaryStream(int)
255    */
256   public InputStream getBinaryStream(int columnIndex) throws SQLException {
257     if (shouldThrow(this.getClass().getInterfaces()[0], "getBinaryStream"))
258       throw new SQLException("ResultSet bombed");
259     return it.getBinaryStream(columnIndex);
260   }
261 
262   /**
263    * {@inheritDoc}
264    * @see java.sql.ResultSet#getBinaryStream(java.lang.String)
265    */
266   public InputStream getBinaryStream(String columnName) throws SQLException {
267     if (shouldThrow(this.getClass().getInterfaces()[0], "getBinaryStream"))
268       throw new SQLException("ResultSet bombed");
269     return it.getBinaryStream(columnName);
270   }
271 
272   /**
273    * {@inheritDoc}
274    * @see java.sql.ResultSet#getBlob(int)
275    */
276   public Blob getBlob(int i) throws SQLException {
277     if (shouldThrow(this.getClass().getInterfaces()[0], "getBlob"))
278       throw new SQLException("ResultSet bombed");
279     return new ThrowingBlob(it.getBlob(i));
280   }
281 
282   /**
283    * {@inheritDoc}
284    * @see java.sql.ResultSet#getBlob(java.lang.String)
285    */
286   public Blob getBlob(String colName) throws SQLException {
287     if (shouldThrow(this.getClass().getInterfaces()[0], "getBlob"))
288       throw new SQLException("ResultSet bombed");
289     return new ThrowingBlob(it.getBlob(colName));
290   }
291 
292   /**
293    * {@inheritDoc}
294    * @see java.sql.ResultSet#getBoolean(int)
295    */
296   public boolean getBoolean(int columnIndex) throws SQLException {
297     if (shouldThrow(this.getClass().getInterfaces()[0], "getBoolean"))
298       throw new SQLException("ResultSet bombed");
299     return it.getBoolean(columnIndex);
300   }
301 
302   /**
303    * {@inheritDoc}
304    * @see java.sql.ResultSet#getBoolean(java.lang.String)
305    */
306   public boolean getBoolean(String columnName) throws SQLException {
307     if (shouldThrow(this.getClass().getInterfaces()[0], "getBoolean"))
308       throw new SQLException("ResultSet bombed");
309     return it.getBoolean(columnName);
310   }
311 
312   /**
313    * {@inheritDoc}
314    * @see java.sql.ResultSet#getByte(int)
315    */
316   public byte getByte(int columnIndex) throws SQLException {
317     if (shouldThrow(this.getClass().getInterfaces()[0], "getByte"))
318       throw new SQLException("ResultSet bombed");
319     return it.getByte(columnIndex);
320   }
321 
322   /**
323    * {@inheritDoc}
324    * @see java.sql.ResultSet#getByte(java.lang.String)
325    */
326   public byte getByte(String columnName) throws SQLException {
327     if (shouldThrow(this.getClass().getInterfaces()[0], "getByte"))
328       throw new SQLException("ResultSet bombed");
329     return it.getByte(columnName);
330   }
331 
332   /**
333    * {@inheritDoc}
334    * @see java.sql.ResultSet#getBytes(int)
335    */
336   public byte[] getBytes(int columnIndex) throws SQLException {
337     if (shouldThrow(this.getClass().getInterfaces()[0], "getBytes"))
338       throw new SQLException("ResultSet bombed");
339     return it.getBytes(columnIndex);
340   }
341 
342   /**
343    * {@inheritDoc}
344    * @see java.sql.ResultSet#getBytes(java.lang.String)
345    */
346   public byte[] getBytes(String columnName) throws SQLException {
347     if (shouldThrow(this.getClass().getInterfaces()[0], "getBytes"))
348       throw new SQLException("ResultSet bombed");
349     return it.getBytes(columnName);
350   }
351 
352   /**
353    * {@inheritDoc}
354    * @see java.sql.ResultSet#getCharacterStream(int)
355    */
356   public Reader getCharacterStream(int columnIndex) throws SQLException {
357     if (shouldThrow(this.getClass().getInterfaces()[0], "getCharacterStream"))
358       throw new SQLException("ResultSet bombed");
359     return it.getCharacterStream(columnIndex);
360   }
361 
362   /**
363    * {@inheritDoc}
364    * @see java.sql.ResultSet#getCharacterStream(java.lang.String)
365    */
366   public Reader getCharacterStream(String columnName) throws SQLException {
367     if (shouldThrow(this.getClass().getInterfaces()[0], "getCharacterStream"))
368       throw new SQLException("ResultSet bombed");
369     return it.getCharacterStream(columnName);
370   }
371 
372   /**
373    * {@inheritDoc}
374    * @see java.sql.ResultSet#getClob(int)
375    */
376   public Clob getClob(int i) throws SQLException {
377     if (shouldThrow(this.getClass().getInterfaces()[0], "getClob"))
378       throw new SQLException("ResultSet bombed");
379     return new ThrowingClob(it.getClob(i));
380   }
381 
382   /**
383    * {@inheritDoc}
384    * @see java.sql.ResultSet#getClob(java.lang.String)
385    */
386   public Clob getClob(String colName) throws SQLException {
387     if (shouldThrow(this.getClass().getInterfaces()[0], "getClob"))
388       throw new SQLException("ResultSet bombed");
389     return new ThrowingClob(it.getClob(colName));
390   }
391 
392   /**
393    * {@inheritDoc}
394    * @see java.sql.ResultSet#getConcurrency()
395    */
396   public int getConcurrency() throws SQLException {
397     if (shouldThrow(this.getClass().getInterfaces()[0], "getConcurrency"))
398       throw new SQLException("ResultSet bombed");
399     return it.getConcurrency();
400   }
401 
402   /**
403    * {@inheritDoc}
404    * @see java.sql.ResultSet#getCursorName()
405    */
406   public String getCursorName() throws SQLException {
407     if (shouldThrow(this.getClass().getInterfaces()[0], "getCursorName"))
408       throw new SQLException("ResultSet bombed");
409     return it.getCursorName();
410   }
411 
412   /**
413    * {@inheritDoc}
414    * @see java.sql.ResultSet#getDate(int)
415    */
416   public Date getDate(int columnIndex) throws SQLException {
417     if (shouldThrow(this.getClass().getInterfaces()[0], "getDate"))
418       throw new SQLException("ResultSet bombed");
419     return it.getDate(columnIndex);
420   }
421 
422   /**
423    * {@inheritDoc}
424    * @see java.sql.ResultSet#getDate(java.lang.String)
425    */
426   public Date getDate(String columnName) throws SQLException {
427     if (shouldThrow(this.getClass().getInterfaces()[0], "getDate"))
428       throw new SQLException("ResultSet bombed");
429     return it.getDate(columnName);
430   }
431 
432   /**
433    * {@inheritDoc}
434    * @see java.sql.ResultSet#getDate(int, java.util.Calendar)
435    */
436   public Date getDate(int columnIndex, Calendar cal) throws SQLException {
437     if (shouldThrow(this.getClass().getInterfaces()[0], "getDate"))
438       throw new SQLException("ResultSet bombed");
439     return it.getDate(columnIndex, cal);
440   }
441 
442   /**
443    * {@inheritDoc}
444    * @see java.sql.ResultSet#getDate(java.lang.String, java.util.Calendar)
445    */
446   public Date getDate(String columnName, Calendar cal) throws SQLException {
447     if (shouldThrow(this.getClass().getInterfaces()[0], "getDate"))
448       throw new SQLException("ResultSet bombed");
449     return it.getDate(columnName, cal);
450   }
451 
452   /**
453    * {@inheritDoc}
454    * @see java.sql.ResultSet#getDouble(int)
455    */
456   public double getDouble(int columnIndex) throws SQLException {
457     if (shouldThrow(this.getClass().getInterfaces()[0], "getDouble"))
458       throw new SQLException("ResultSet bombed");
459     return it.getDouble(columnIndex);
460   }
461 
462   /**
463    * {@inheritDoc}
464    * @see java.sql.ResultSet#getDouble(java.lang.String)
465    */
466   public double getDouble(String columnName) throws SQLException {
467     if (shouldThrow(this.getClass().getInterfaces()[0], "getDouble"))
468       throw new SQLException("ResultSet bombed");
469     return it.getDouble(columnName);
470   }
471 
472   /**
473    * {@inheritDoc}
474    * @see java.sql.ResultSet#getFetchDirection()
475    */
476   public int getFetchDirection() throws SQLException {
477     if (shouldThrow(this.getClass().getInterfaces()[0], "getFetchDirection"))
478       throw new SQLException("ResultSet bombed");
479     return it.getFetchDirection();
480   }
481 
482   /**
483    * {@inheritDoc}
484    * @see java.sql.ResultSet#getFetchSize()
485    */
486   public int getFetchSize() throws SQLException {
487     if (shouldThrow(this.getClass().getInterfaces()[0], "getFetchSize"))
488       throw new SQLException("ResultSet bombed");
489     return it.getFetchSize();
490   }
491 
492   /**
493    * {@inheritDoc}
494    * @see java.sql.ResultSet#getFloat(int)
495    */
496   public float getFloat(int columnIndex) throws SQLException {
497     if (shouldThrow(this.getClass().getInterfaces()[0], "getFloat"))
498       throw new SQLException("ResultSet bombed");
499     return it.getFloat(columnIndex);
500   }
501 
502   /**
503    * {@inheritDoc}
504    * @see java.sql.ResultSet#getFloat(java.lang.String)
505    */
506   public float getFloat(String columnName) throws SQLException {
507     if (shouldThrow(this.getClass().getInterfaces()[0], "getFloat"))
508       throw new SQLException("ResultSet bombed");
509     return it.getFloat(columnName);
510   }
511 
512   /**
513    * {@inheritDoc}
514    * @see java.sql.ResultSet#getInt(int)
515    */
516   public int getInt(int columnIndex) throws SQLException {
517     if (shouldThrow(this.getClass().getInterfaces()[0], "getInt"))
518       throw new SQLException("ResultSet bombed");
519     return it.getInt(columnIndex);
520   }
521 
522   /**
523    * {@inheritDoc}
524    * @see java.sql.ResultSet#getInt(java.lang.String)
525    */
526   public int getInt(String columnName) throws SQLException {
527     if (shouldThrow(this.getClass().getInterfaces()[0], "getInt"))
528       throw new SQLException("ResultSet bombed");
529     return it.getInt(columnName);
530   }
531 
532   /**
533    * {@inheritDoc}
534    * @see java.sql.ResultSet#getLong(int)
535    */
536   public long getLong(int columnIndex) throws SQLException {
537     if (shouldThrow(this.getClass().getInterfaces()[0], "getLong"))
538       throw new SQLException("ResultSet bombed");
539     return it.getLong(columnIndex);
540   }
541 
542   /**
543    * {@inheritDoc}
544    * @see java.sql.ResultSet#getLong(java.lang.String)
545    */
546   public long getLong(String columnName) throws SQLException {
547     if (shouldThrow(this.getClass().getInterfaces()[0], "getLong"))
548       throw new SQLException("ResultSet bombed");
549     return it.getLong(columnName);
550   }
551 
552   /**
553    * {@inheritDoc}
554    * @see java.sql.ResultSet#getMetaData()
555    */
556   public ResultSetMetaData getMetaData() throws SQLException {
557     if (shouldThrow(this.getClass().getInterfaces()[0], "getMetaData"))
558       throw new SQLException("ResultSet bombed");
559     return new ThrowingResultSetMetaData(it.getMetaData());
560   }
561 
562   /**
563    * {@inheritDoc}
564    * @see java.sql.ResultSet#getObject(int)
565    */
566   public Object getObject(int columnIndex) throws SQLException {
567     if (shouldThrow(this.getClass().getInterfaces()[0], "getObject"))
568       throw new SQLException("ResultSet bombed");
569     return it.getObject(columnIndex);
570   }
571 
572   /**
573    * {@inheritDoc}
574    * @see java.sql.ResultSet#getObject(java.lang.String)
575    */
576   public Object getObject(String columnName) throws SQLException {
577     if (shouldThrow(this.getClass().getInterfaces()[0], "getObject"))
578       throw new SQLException("ResultSet bombed");
579     return it.getObject(columnName);
580   }
581 
582   /**
583    * {@inheritDoc}
584    * @see java.sql.ResultSet#getObject(int, java.util.Map)
585    */
586   public Object getObject(int i, Map map) throws SQLException {
587     if (shouldThrow(this.getClass().getInterfaces()[0], "getObject"))
588       throw new SQLException("ResultSet bombed");
589 
590     return it.getObject(i, map);
591   }
592 
593   /**
594    * {@inheritDoc}
595    * @see java.sql.ResultSet#getObject(java.lang.String, java.util.Map)
596    */
597   public Object getObject(String colName, Map map) throws SQLException {
598     if (shouldThrow(this.getClass().getInterfaces()[0], "getObject"))
599       throw new SQLException("ResultSet bombed");
600     return it.getObject(colName, map);
601   }
602 
603   /**
604    * {@inheritDoc}
605    * @see java.sql.ResultSet#getRef(int)
606    */
607   public Ref getRef(int i) throws SQLException {
608     if (shouldThrow(this.getClass().getInterfaces()[0], "getRef"))
609       throw new SQLException("ResultSet bombed");
610     return new ThrowingRef(it.getRef(i));
611   }
612 
613   /**
614    * {@inheritDoc}
615    * @see java.sql.ResultSet#getRef(java.lang.String)
616    */
617   public Ref getRef(String colName) throws SQLException {
618     if (shouldThrow(this.getClass().getInterfaces()[0], "getRef"))
619       throw new SQLException("ResultSet bombed");
620     return new ThrowingRef(it.getRef(colName));
621   }
622 
623   /**
624    * {@inheritDoc}
625    * @see java.sql.ResultSet#getRow()
626    */
627   public int getRow() throws SQLException {
628     if (shouldThrow(this.getClass().getInterfaces()[0], "getRow"))
629       throw new SQLException("ResultSet bombed");
630     return it.getRow();
631   }
632 
633   /**
634    * {@inheritDoc}
635    * @see java.sql.ResultSet#getShort(int)
636    */
637   public short getShort(int columnIndex) throws SQLException {
638     if (shouldThrow(this.getClass().getInterfaces()[0], "getShort"))
639       throw new SQLException("ResultSet bombed");
640     return it.getShort(columnIndex);
641   }
642 
643   /**
644    * {@inheritDoc}
645    * @see java.sql.ResultSet#getShort(java.lang.String)
646    */
647   public short getShort(String columnName) throws SQLException {
648     if (shouldThrow(this.getClass().getInterfaces()[0], "getShort"))
649       throw new SQLException("ResultSet bombed");
650     return it.getShort(columnName);
651   }
652 
653   /**
654    * {@inheritDoc}
655    * @see java.sql.ResultSet#getStatement()
656    */
657   public Statement getStatement() throws SQLException {
658     if (shouldThrow(this.getClass().getInterfaces()[0], "getStatement"))
659       throw new SQLException("ResultSet bombed");
660     return new ThrowingStatement(it.getStatement());
661   }
662 
663   /**
664    * {@inheritDoc}
665    * @see java.sql.ResultSet#getString(int)
666    */
667   public String getString(int columnIndex) throws SQLException {
668     if (shouldThrow(this.getClass().getInterfaces()[0], "getString"))
669       throw new SQLException("ResultSet bombed");
670     return it.getString(columnIndex);
671   }
672 
673   /**
674    * {@inheritDoc}
675    * @see java.sql.ResultSet#getString(java.lang.String)
676    */
677   public String getString(String columnName) throws SQLException {
678     if (shouldThrow(this.getClass().getInterfaces()[0], "getString"))
679       throw new SQLException("ResultSet bombed");
680     return it.getString(columnName);
681   }
682 
683   /**
684    * {@inheritDoc}
685    * @see java.sql.ResultSet#getTime(int)
686    */
687   public Time getTime(int columnIndex) throws SQLException {
688     if (shouldThrow(this.getClass().getInterfaces()[0], "getTime"))
689       throw new SQLException("ResultSet bombed");
690     return it.getTime(columnIndex);
691   }
692 
693   /**
694    * {@inheritDoc}
695    * @see java.sql.ResultSet#getTime(java.lang.String)
696    */
697   public Time getTime(String columnName) throws SQLException {
698     if (shouldThrow(this.getClass().getInterfaces()[0], "getTime"))
699       throw new SQLException("ResultSet bombed");
700     return it.getTime(columnName);
701   }
702 
703   /**
704    * {@inheritDoc}
705    * @see java.sql.ResultSet#getTime(int, java.util.Calendar)
706    */
707   public Time getTime(int columnIndex, Calendar cal) throws SQLException {
708     if (shouldThrow(this.getClass().getInterfaces()[0], "getTime"))
709       throw new SQLException("ResultSet bombed");
710     return it.getTime(columnIndex, cal);
711   }
712 
713   /**
714    * {@inheritDoc}
715    * @see java.sql.ResultSet#getTime(java.lang.String, java.util.Calendar)
716    */
717   public Time getTime(String columnName, Calendar cal) throws SQLException {
718     if (shouldThrow(this.getClass().getInterfaces()[0], "getTime"))
719       throw new SQLException("ResultSet bombed");
720     return it.getTime(columnName, cal);
721   }
722 
723   /**
724    * {@inheritDoc}
725    * @see java.sql.ResultSet#getTimestamp(int)
726    */
727   public Timestamp getTimestamp(int columnIndex) throws SQLException {
728     if (shouldThrow(this.getClass().getInterfaces()[0], "getTimestamp"))
729       throw new SQLException("ResultSet bombed");
730     return it.getTimestamp(columnIndex);
731   }
732 
733   /**
734    * {@inheritDoc}
735    * @see java.sql.ResultSet#getTimestamp(java.lang.String)
736    */
737   public Timestamp getTimestamp(String columnName) throws SQLException {
738     if (shouldThrow(this.getClass().getInterfaces()[0], "getTimestamp"))
739       throw new SQLException("ResultSet bombed");
740     return it.getTimestamp(columnName);
741   }
742 
743   /**
744    * {@inheritDoc}
745    * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar)
746    */
747   public Timestamp getTimestamp(int columnIndex, Calendar cal)
748       throws SQLException {
749     if (shouldThrow(this.getClass().getInterfaces()[0], "getTimestamp"))
750       throw new SQLException("ResultSet bombed");
751     return it.getTimestamp(columnIndex, cal);
752   }
753 
754   /**
755    * {@inheritDoc}
756    * @see java.sql.ResultSet#getTimestamp(java.lang.String, java.util.Calendar)
757    */
758   public Timestamp getTimestamp(String columnName, Calendar cal)
759       throws SQLException {
760     if (shouldThrow(this.getClass().getInterfaces()[0], "getTimestamp"))
761       throw new SQLException("ResultSet bombed");
762     return it.getTimestamp(columnName, cal);
763   }
764 
765   /**
766    * {@inheritDoc}
767    * @see java.sql.ResultSet#getType()
768    */
769   public int getType() throws SQLException {
770     if (shouldThrow(this.getClass().getInterfaces()[0], "getType"))
771       throw new SQLException("ResultSet bombed");
772     return it.getType();
773   }
774 
775   /**
776    * {@inheritDoc}
777    * @see java.sql.ResultSet#getURL(int)
778    */
779   public URL getURL(int columnIndex) throws SQLException {
780     if (shouldThrow(this.getClass().getInterfaces()[0], "getURL"))
781       throw new SQLException("ResultSet bombed");
782     return it.getURL(columnIndex);
783   }
784 
785   /**
786    * {@inheritDoc}
787    * @see java.sql.ResultSet#getURL(java.lang.String)
788    */
789   public URL getURL(String columnName) throws SQLException {
790     if (shouldThrow(this.getClass().getInterfaces()[0], "getURL"))
791       throw new SQLException("ResultSet bombed");
792 
793     return it.getURL(columnName);
794   }
795 
796   /**
797    * {@inheritDoc}
798    * @see java.sql.ResultSet#getUnicodeStream(int)
799    */
800   public InputStream getUnicodeStream(int columnIndex) throws SQLException {
801     if (shouldThrow(this.getClass().getInterfaces()[0], "getUnicodeStream"))
802       throw new SQLException("ResultSet bombed");
803     return it.getUnicodeStream(columnIndex);
804   }
805 
806   /**
807    * {@inheritDoc}
808    * @see java.sql.ResultSet#getUnicodeStream(java.lang.String)
809    */
810   public InputStream getUnicodeStream(String columnName) throws SQLException {
811     if (shouldThrow(this.getClass().getInterfaces()[0], "getUnicodeStream"))
812       throw new SQLException("ResultSet bombed");
813     return it.getUnicodeStream(columnName);
814   }
815 
816   /**
817    * {@inheritDoc}
818    * @see java.sql.ResultSet#getWarnings()
819    */
820   public SQLWarning getWarnings() throws SQLException {
821     if (shouldThrow(this.getClass().getInterfaces()[0], "getWarnings"))
822       throw new SQLException("ResultSet bombed");
823     return it.getWarnings();
824   }
825 
826   /**
827    * {@inheritDoc}
828    * @see java.sql.ResultSet#insertRow()
829    */
830   public void insertRow() throws SQLException {
831     if (shouldThrow(this.getClass().getInterfaces()[0], "insertRow"))
832       throw new SQLException("ResultSet bombed");
833     it.insertRow();
834   }
835 
836   /**
837    * {@inheritDoc}
838    * @see java.sql.ResultSet#isAfterLast()
839    */
840   public boolean isAfterLast() throws SQLException {
841     if (shouldThrow(this.getClass().getInterfaces()[0], "isAfterLast"))
842       throw new SQLException("ResultSet bombed");
843     return it.isAfterLast();
844   }
845 
846   /**
847    * {@inheritDoc}
848    * @see java.sql.ResultSet#isBeforeFirst()
849    */
850   public boolean isBeforeFirst() throws SQLException {
851     if (shouldThrow(this.getClass().getInterfaces()[0], "isBeforeFirst"))
852       throw new SQLException("ResultSet bombed");
853     return it.isBeforeFirst();
854   }
855 
856   /**
857    * {@inheritDoc}
858    * @see java.sql.ResultSet#isFirst()
859    */
860   public boolean isFirst() throws SQLException {
861     if (shouldThrow(this.getClass().getInterfaces()[0], "isFirst"))
862       throw new SQLException("ResultSet bombed");
863     return it.isFirst();
864   }
865 
866   /**
867    * {@inheritDoc}
868    * @see java.sql.ResultSet#isLast()
869    */
870   public boolean isLast() throws SQLException {
871     if (shouldThrow(this.getClass().getInterfaces()[0], "isLast"))
872       throw new SQLException("ResultSet bombed");
873     return it.isLast();
874   }
875 
876   /**
877    * {@inheritDoc}
878    * @see java.sql.ResultSet#last()
879    */
880   public boolean last() throws SQLException {
881     if (shouldThrow(this.getClass().getInterfaces()[0], "last"))
882       throw new SQLException("ResultSet bombed");
883     return it.last();
884   }
885 
886   /**
887    * {@inheritDoc}
888    * @see java.sql.ResultSet#moveToCurrentRow()
889    */
890   public void moveToCurrentRow() throws SQLException {
891     if (shouldThrow(this.getClass().getInterfaces()[0], "moveToCurrentRow"))
892       throw new SQLException("ResultSet bombed");
893     it.moveToCurrentRow();
894   }
895 
896   /**
897    * {@inheritDoc}
898    * @see java.sql.ResultSet#moveToInsertRow()
899    */
900   public void moveToInsertRow() throws SQLException {
901     if (shouldThrow(this.getClass().getInterfaces()[0], "moveToInsertRow"))
902       throw new SQLException("ResultSet bombed");
903     it.moveToInsertRow();
904   }
905 
906   /**
907    * {@inheritDoc}
908    * @see java.sql.ResultSet#next()
909    */
910   public boolean next() throws SQLException {
911     if (shouldThrow(this.getClass().getInterfaces()[0], "next"))
912       throw new SQLException("ResultSet bombed");
913 
914     return it.next();
915   }
916 
917   /**
918    * {@inheritDoc}
919    * @see java.sql.ResultSet#previous()
920    */
921   public boolean previous() throws SQLException {
922     if (shouldThrow(this.getClass().getInterfaces()[0], "previous"))
923       throw new SQLException("ResultSet bombed");
924     return it.previous();
925   }
926 
927   /**
928    * {@inheritDoc}
929    * @see java.sql.ResultSet#refreshRow()
930    */
931   public void refreshRow() throws SQLException {
932     if (shouldThrow(this.getClass().getInterfaces()[0], "refreshRow"))
933       throw new SQLException("ResultSet bombed");
934     it.refreshRow();
935   }
936 
937   /**
938    * {@inheritDoc}
939    * @see java.sql.ResultSet#relative(int)
940    */
941   public boolean relative(int rows) throws SQLException {
942     if (shouldThrow(this.getClass().getInterfaces()[0], "relative"))
943       throw new SQLException("ResultSet bombed");
944     return it.relative(rows);
945   }
946 
947   /**
948    * {@inheritDoc}
949    * @see java.sql.ResultSet#rowDeleted()
950    */
951   public boolean rowDeleted() throws SQLException {
952     if (shouldThrow(this.getClass().getInterfaces()[0], "rowDeleted"))
953       throw new SQLException("ResultSet bombed");
954     return it.rowDeleted();
955   }
956 
957   /**
958    * {@inheritDoc}
959    * @see java.sql.ResultSet#rowInserted()
960    */
961   public boolean rowInserted() throws SQLException {
962     if (shouldThrow(this.getClass().getInterfaces()[0], "rowInserted"))
963       throw new SQLException("ResultSet bombed");
964     return it.rowInserted();
965   }
966 
967   /**
968    * {@inheritDoc}
969    * @see java.sql.ResultSet#rowUpdated()
970    */
971   public boolean rowUpdated() throws SQLException {
972     if (shouldThrow(this.getClass().getInterfaces()[0], "rowUpdated"))
973       throw new SQLException("ResultSet bombed");
974     return it.rowUpdated();
975   }
976 
977   /**
978    * {@inheritDoc}
979    * @see java.sql.ResultSet#setFetchDirection(int)
980    */
981   public void setFetchDirection(int direction) throws SQLException {
982     if (shouldThrow(this.getClass().getInterfaces()[0], "setFetchDirection"))
983       throw new SQLException("ResultSet bombed");
984     it.setFetchDirection(direction);
985   }
986 
987   /**
988    * {@inheritDoc}
989    * @see java.sql.ResultSet#setFetchSize(int)
990    */
991   public void setFetchSize(int rows) throws SQLException {
992     if (shouldThrow(this.getClass().getInterfaces()[0], "setFetchSize"))
993       throw new SQLException("ResultSet bombed");
994     it.setFetchSize(rows);
995   }
996 
997   /**
998    * {@inheritDoc}
999    * @see java.sql.ResultSet#updateArray(int, java.sql.Array)
1000    */
1001   public void updateArray(int columnIndex, Array x) throws SQLException {
1002     if (shouldThrow(this.getClass().getInterfaces()[0], "updateArray"))
1003       throw new SQLException("ResultSet bombed");
1004     it.updateArray(columnIndex, x);
1005   }
1006 
1007   /**
1008    * {@inheritDoc}
1009    * @see java.sql.ResultSet#updateArray(java.lang.String, java.sql.Array)
1010    */
1011   public void updateArray(String columnName, Array x) throws SQLException {
1012     if (shouldThrow(this.getClass().getInterfaces()[0], "updateArray"))
1013       throw new SQLException("ResultSet bombed");
1014     it.updateArray(columnName, x);
1015   }
1016 
1017   /**
1018    * {@inheritDoc}
1019    * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, int)
1020    */
1021   public void updateAsciiStream(int columnIndex, InputStream x, int length)
1022       throws SQLException {
1023     if (shouldThrow(this.getClass().getInterfaces()[0], "updateAsciiStream"))
1024       throw new SQLException("ResultSet bombed");
1025     it.updateAsciiStream(columnIndex, x, length);
1026   }
1027 
1028   /**
1029    * {@inheritDoc}
1030    * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream, int)
1031    */
1032   public void updateAsciiStream(String columnName, InputStream x, int length)
1033       throws SQLException {
1034     if (shouldThrow(this.getClass().getInterfaces()[0], "updateAsciiStream"))
1035       throw new SQLException("ResultSet bombed");
1036     it.updateAsciiStream(columnName, x, length);
1037   }
1038 
1039   /**
1040    * {@inheritDoc}
1041    * @see java.sql.ResultSet#updateBigDecimal(int, java.math.BigDecimal)
1042    */
1043   public void updateBigDecimal(int columnIndex, BigDecimal x)
1044       throws SQLException {
1045     if (shouldThrow(this.getClass().getInterfaces()[0], "updateBigDecimal"))
1046       throw new SQLException("ResultSet bombed");
1047     it.updateBigDecimal(columnIndex, x);
1048   }
1049 
1050   /**
1051    * {@inheritDoc}
1052    * @see java.sql.ResultSet#updateBigDecimal(java.lang.String, java.math.BigDecimal)
1053    */
1054   public void updateBigDecimal(String columnName, BigDecimal x)
1055       throws SQLException {
1056     if (shouldThrow(this.getClass().getInterfaces()[0], "updateBigDecimal"))
1057       throw new SQLException("ResultSet bombed");
1058     it.updateBigDecimal(columnName, x);
1059   }
1060 
1061   /**
1062    * {@inheritDoc}
1063    * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, int)
1064    */
1065   public void updateBinaryStream(int columnIndex, InputStream x, int length)
1066       throws SQLException {
1067     if (shouldThrow(this.getClass().getInterfaces()[0], "updateBinaryStream"))
1068       throw new SQLException("ResultSet bombed");
1069     it.updateBinaryStream(columnIndex, x, length);
1070   }
1071 
1072   /**
1073    * {@inheritDoc}
1074    * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream, int)
1075    */
1076   public void updateBinaryStream(String columnName, InputStream x, int length)
1077       throws SQLException {
1078     if (shouldThrow(this.getClass().getInterfaces()[0], "updateBinaryStream"))
1079       throw new SQLException("ResultSet bombed");
1080     it.updateBinaryStream(columnName, x, length);
1081   }
1082 
1083   /**
1084    * {@inheritDoc}
1085    * @see java.sql.ResultSet#updateBlob(int, java.sql.Blob)
1086    */
1087   public void updateBlob(int columnIndex, Blob x) throws SQLException {
1088     if (shouldThrow(this.getClass().getInterfaces()[0], "updateBlob"))
1089       throw new SQLException("ResultSet bombed");
1090     it.updateBlob(columnIndex, x);
1091   }
1092 
1093   /**
1094    * {@inheritDoc}
1095    * @see java.sql.ResultSet#updateBlob(java.lang.String, java.sql.Blob)
1096    */
1097   public void updateBlob(String columnName, Blob x) throws SQLException {
1098     if (shouldThrow(this.getClass().getInterfaces()[0], "updateBlob"))
1099       throw new SQLException("ResultSet bombed");
1100     it.updateBlob(columnName, x);
1101   }
1102 
1103   /**
1104    * {@inheritDoc}
1105    * @see java.sql.ResultSet#updateBoolean(int, boolean)
1106    */
1107   public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1108     if (shouldThrow(this.getClass().getInterfaces()[0], "updateBoolean"))
1109       throw new SQLException("ResultSet bombed");
1110     it.updateBoolean(columnIndex, x);
1111   }
1112 
1113   /**
1114    * {@inheritDoc}
1115    * @see java.sql.ResultSet#updateBoolean(java.lang.String, boolean)
1116    */
1117   public void updateBoolean(String columnName, boolean x) throws SQLException {
1118     if (shouldThrow(this.getClass().getInterfaces()[0], "updateBoolean"))
1119       throw new SQLException("ResultSet bombed");
1120     it.updateBoolean(columnName, x);
1121   }
1122 
1123   /**
1124    * {@inheritDoc}
1125    * @see java.sql.ResultSet#updateByte(int, byte)
1126    */
1127   public void updateByte(int columnIndex, byte x) throws SQLException {
1128     if (shouldThrow(this.getClass().getInterfaces()[0], "updateByte"))
1129       throw new SQLException("ResultSet bombed");
1130     it.updateByte(columnIndex, x);
1131   }
1132 
1133   /**
1134    * {@inheritDoc}
1135    * @see java.sql.ResultSet#updateByte(java.lang.String, byte)
1136    */
1137   public void updateByte(String columnName, byte x) throws SQLException {
1138     if (shouldThrow(this.getClass().getInterfaces()[0], "updateByte"))
1139       throw new SQLException("ResultSet bombed");
1140     it.updateByte(columnName, x);
1141   }
1142 
1143   /**
1144