001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018package org.apache.commons.dbcp2;
019
020import java.io.InputStream;
021import java.io.Reader;
022import java.math.BigDecimal;
023import java.sql.Array;
024import java.sql.Blob;
025import java.sql.Clob;
026import java.sql.Connection;
027import java.sql.Date;
028import java.sql.NClob;
029import java.sql.Ref;
030import java.sql.ResultSet;
031import java.sql.ResultSetMetaData;
032import java.sql.RowId;
033import java.sql.SQLException;
034import java.sql.SQLWarning;
035import java.sql.SQLXML;
036import java.sql.Statement;
037import java.sql.Time;
038import java.sql.Timestamp;
039import java.util.Calendar;
040import java.util.Map;
041
042/**
043 * A base delegating implementation of {@link ResultSet}.
044 * <p>
045 * All of the methods from the {@link ResultSet} interface simply call the corresponding method on the "delegate"
046 * provided in my constructor.
047 * </p>
048 * <p>
049 * Extends AbandonedTrace to implement result set tracking and logging of code which created the ResultSet. Tracking the
050 * ResultSet ensures that the Statement which created it can close any open ResultSet's on Statement close.
051 * </p>
052 *
053 * @since 2.0
054 */
055public final class DelegatingResultSet extends AbandonedTrace implements ResultSet {
056
057    /** My delegate. **/
058    private final ResultSet resultSet;
059
060    /** The Statement that created me, if any. **/
061    private Statement statement;
062
063    /** The Connection that created me, if any. **/
064    private Connection connection;
065
066    /**
067     * Creates a wrapper for the ResultSet which traces this ResultSet to the Statement which created it and the code
068     * which created it.
069     * <p>
070     * Private to ensure all construction is {@link #wrapResultSet(Statement, ResultSet)}
071     * </p>
072     *
073     * @param statement
074     *            The Statement which created the ResultSet.
075     * @param resultSet
076     *            The ResultSet to wrap.
077     */
078    private DelegatingResultSet(final Statement statement, final ResultSet resultSet) {
079        super((AbandonedTrace) statement);
080        this.statement = statement;
081        this.resultSet = resultSet;
082    }
083
084    /**
085     * Creates a wrapper for the ResultSet which traces this ResultSet to the Connection which created it (via, for
086     * example DatabaseMetadata, and the code which created it.
087     * <p>
088     * Private to ensure all construction is {@link #wrapResultSet(Connection, ResultSet)}
089     * </p>
090     *
091     * @param conn
092     *            Connection which created this ResultSet
093     * @param res
094     *            ResultSet to wrap
095     */
096    private DelegatingResultSet(final Connection conn, final ResultSet res) {
097        super((AbandonedTrace) conn);
098        this.connection = conn;
099        this.resultSet = res;
100    }
101
102    /**
103     * Wraps the given result set in a delegate.
104     *
105     * @param statement
106     *            The Statement which created the ResultSet.
107     * @param resultSet
108     *            The ResultSet to wrap.
109     * @return a new delegate.
110     */
111    public static ResultSet wrapResultSet(final Statement statement, final ResultSet resultSet) {
112        if (null == resultSet) {
113            return null;
114        }
115        return new DelegatingResultSet(statement, resultSet);
116    }
117
118    /**
119     * Wraps the given result set in a delegate.
120     *
121     * @param connection
122     *            The Connection which created the ResultSet.
123     * @param resultSet
124     *            The ResultSet to wrap.
125     * @return a new delegate.
126     */
127    public static ResultSet wrapResultSet(final Connection connection, final ResultSet resultSet) {
128        if (null == resultSet) {
129            return null;
130        }
131        return new DelegatingResultSet(connection, resultSet);
132    }
133
134    /**
135     * Gets my delegate.
136     *
137     * @return my delegate.
138     */
139    public ResultSet getDelegate() {
140        return resultSet;
141    }
142
143    /**
144     * If my underlying {@link ResultSet} is not a {@code DelegatingResultSet}, returns it, otherwise recursively
145     * invokes this method on my delegate.
146     * <p>
147     * Hence this method will return the first delegate that is not a {@code DelegatingResultSet}, or {@code null} when
148     * no non-{@code DelegatingResultSet} delegate can be found by traversing this chain.
149     * </p>
150     * <p>
151     * This method is useful when you may have nested {@code DelegatingResultSet}s, and you want to make sure to obtain
152     * a "genuine" {@link ResultSet}.
153     * </p>
154     *
155     * @return the innermost delegate.
156     */
157    public ResultSet getInnermostDelegate() {
158        ResultSet r = resultSet;
159        while (r != null && r instanceof DelegatingResultSet) {
160            r = ((DelegatingResultSet) r).getDelegate();
161            if (this == r) {
162                return null;
163            }
164        }
165        return r;
166    }
167
168    @Override
169    public Statement getStatement() throws SQLException {
170        return statement;
171    }
172
173    /**
174     * Wrapper for close of ResultSet which removes this result set from being traced then calls close on the original
175     * ResultSet.
176     */
177    @Override
178    public void close() throws SQLException {
179        try {
180            if (statement != null) {
181                ((AbandonedTrace) statement).removeTrace(this);
182                statement = null;
183            }
184            if (connection != null) {
185                ((AbandonedTrace) connection).removeTrace(this);
186                connection = null;
187            }
188            resultSet.close();
189        } catch (final SQLException e) {
190            handleException(e);
191        }
192    }
193
194    protected void handleException(final SQLException e) throws SQLException {
195        if (statement != null && statement instanceof DelegatingStatement) {
196            ((DelegatingStatement) statement).handleException(e);
197        } else if (connection != null && connection instanceof DelegatingConnection) {
198            ((DelegatingConnection<?>) connection).handleException(e);
199        } else {
200            throw e;
201        }
202    }
203
204    @Override
205    public boolean next() throws SQLException {
206        try {
207            return resultSet.next();
208        } catch (final SQLException e) {
209            handleException(e);
210            return false;
211        }
212    }
213
214    @Override
215    public boolean wasNull() throws SQLException {
216        try {
217            return resultSet.wasNull();
218        } catch (final SQLException e) {
219            handleException(e);
220            return false;
221        }
222    }
223
224    @Override
225    public String getString(final int columnIndex) throws SQLException {
226        try {
227            return resultSet.getString(columnIndex);
228        } catch (final SQLException e) {
229            handleException(e);
230            return null;
231        }
232    }
233
234    @Override
235    public boolean getBoolean(final int columnIndex) throws SQLException {
236        try {
237            return resultSet.getBoolean(columnIndex);
238        } catch (final SQLException e) {
239            handleException(e);
240            return false;
241        }
242    }
243
244    @Override
245    public byte getByte(final int columnIndex) throws SQLException {
246        try {
247            return resultSet.getByte(columnIndex);
248        } catch (final SQLException e) {
249            handleException(e);
250            return 0;
251        }
252    }
253
254    @Override
255    public short getShort(final int columnIndex) throws SQLException {
256        try {
257            return resultSet.getShort(columnIndex);
258        } catch (final SQLException e) {
259            handleException(e);
260            return 0;
261        }
262    }
263
264    @Override
265    public int getInt(final int columnIndex) throws SQLException {
266        try {
267            return resultSet.getInt(columnIndex);
268        } catch (final SQLException e) {
269            handleException(e);
270            return 0;
271        }
272    }
273
274    @Override
275    public long getLong(final int columnIndex) throws SQLException {
276        try {
277            return resultSet.getLong(columnIndex);
278        } catch (final SQLException e) {
279            handleException(e);
280            return 0;
281        }
282    }
283
284    @Override
285    public float getFloat(final int columnIndex) throws SQLException {
286        try {
287            return resultSet.getFloat(columnIndex);
288        } catch (final SQLException e) {
289            handleException(e);
290            return 0;
291        }
292    }
293
294    @Override
295    public double getDouble(final int columnIndex) throws SQLException {
296        try {
297            return resultSet.getDouble(columnIndex);
298        } catch (final SQLException e) {
299            handleException(e);
300            return 0;
301        }
302    }
303
304    /** @deprecated Use {@link #getBigDecimal(int)} */
305    @Deprecated
306    @Override
307    public BigDecimal getBigDecimal(final int columnIndex, final int scale) throws SQLException {
308        try {
309            return resultSet.getBigDecimal(columnIndex);
310        } catch (final SQLException e) {
311            handleException(e);
312            return null;
313        }
314    }
315
316    @Override
317    public byte[] getBytes(final int columnIndex) throws SQLException {
318        try {
319            return resultSet.getBytes(columnIndex);
320        } catch (final SQLException e) {
321            handleException(e);
322            return null;
323        }
324    }
325
326    @Override
327    public Date getDate(final int columnIndex) throws SQLException {
328        try {
329            return resultSet.getDate(columnIndex);
330        } catch (final SQLException e) {
331            handleException(e);
332            return null;
333        }
334    }
335
336    @Override
337    public Time getTime(final int columnIndex) throws SQLException {
338        try {
339            return resultSet.getTime(columnIndex);
340        } catch (final SQLException e) {
341            handleException(e);
342            return null;
343        }
344    }
345
346    @Override
347    public Timestamp getTimestamp(final int columnIndex) throws SQLException {
348        try {
349            return resultSet.getTimestamp(columnIndex);
350        } catch (final SQLException e) {
351            handleException(e);
352            return null;
353        }
354    }
355
356    @Override
357    public InputStream getAsciiStream(final int columnIndex) throws SQLException {
358        try {
359            return resultSet.getAsciiStream(columnIndex);
360        } catch (final SQLException e) {
361            handleException(e);
362            return null;
363        }
364    }
365
366    /** @deprecated Use {@link #getCharacterStream(int)} */
367    @Deprecated
368    @Override
369    public InputStream getUnicodeStream(final int columnIndex) throws SQLException {
370        try {
371            return resultSet.getUnicodeStream(columnIndex);
372        } catch (final SQLException e) {
373            handleException(e);
374            return null;
375        }
376    }
377
378    @Override
379    public InputStream getBinaryStream(final int columnIndex) throws SQLException {
380        try {
381            return resultSet.getBinaryStream(columnIndex);
382        } catch (final SQLException e) {
383            handleException(e);
384            return null;
385        }
386    }
387
388    @Override
389    public String getString(final String columnName) throws SQLException {
390        try {
391            return resultSet.getString(columnName);
392        } catch (final SQLException e) {
393            handleException(e);
394            return null;
395        }
396    }
397
398    @Override
399    public boolean getBoolean(final String columnName) throws SQLException {
400        try {
401            return resultSet.getBoolean(columnName);
402        } catch (final SQLException e) {
403            handleException(e);
404            return false;
405        }
406    }
407
408    @Override
409    public byte getByte(final String columnName) throws SQLException {
410        try {
411            return resultSet.getByte(columnName);
412        } catch (final SQLException e) {
413            handleException(e);
414            return 0;
415        }
416    }
417
418    @Override
419    public short getShort(final String columnName) throws SQLException {
420        try {
421            return resultSet.getShort(columnName);
422        } catch (final SQLException e) {
423            handleException(e);
424            return 0;
425        }
426    }
427
428    @Override
429    public int getInt(final String columnName) throws SQLException {
430        try {
431            return resultSet.getInt(columnName);
432        } catch (final SQLException e) {
433            handleException(e);
434            return 0;
435        }
436    }
437
438    @Override
439    public long getLong(final String columnName) throws SQLException {
440        try {
441            return resultSet.getLong(columnName);
442        } catch (final SQLException e) {
443            handleException(e);
444            return 0;
445        }
446    }
447
448    @Override
449    public float getFloat(final String columnName) throws SQLException {
450        try {
451            return resultSet.getFloat(columnName);
452        } catch (final SQLException e) {
453            handleException(e);
454            return 0;
455        }
456    }
457
458    @Override
459    public double getDouble(final String columnName) throws SQLException {
460        try {
461            return resultSet.getDouble(columnName);
462        } catch (final SQLException e) {
463            handleException(e);
464            return 0;
465        }
466    }
467
468    /** @deprecated Use {@link #getBigDecimal(String)} */
469    @Deprecated
470    @Override
471    public BigDecimal getBigDecimal(final String columnName, final int scale) throws SQLException {
472        try {
473            return resultSet.getBigDecimal(columnName);
474        } catch (final SQLException e) {
475            handleException(e);
476            return null;
477        }
478    }
479
480    @Override
481    public byte[] getBytes(final String columnName) throws SQLException {
482        try {
483            return resultSet.getBytes(columnName);
484        } catch (final SQLException e) {
485            handleException(e);
486            return null;
487        }
488    }
489
490    @Override
491    public Date getDate(final String columnName) throws SQLException {
492        try {
493            return resultSet.getDate(columnName);
494        } catch (final SQLException e) {
495            handleException(e);
496            return null;
497        }
498    }
499
500    @Override
501    public Time getTime(final String columnName) throws SQLException {
502        try {
503            return resultSet.getTime(columnName);
504        } catch (final SQLException e) {
505            handleException(e);
506            return null;
507        }
508    }
509
510    @Override
511    public Timestamp getTimestamp(final String columnName) throws SQLException {
512        try {
513            return resultSet.getTimestamp(columnName);
514        } catch (final SQLException e) {
515            handleException(e);
516            return null;
517        }
518    }
519
520    @Override
521    public InputStream getAsciiStream(final String columnName) throws SQLException {
522        try {
523            return resultSet.getAsciiStream(columnName);
524        } catch (final SQLException e) {
525            handleException(e);
526            return null;
527        }
528    }
529
530    /** @deprecated Use {@link #getCharacterStream(String)} */
531    @Deprecated
532    @Override
533    public InputStream getUnicodeStream(final String columnName) throws SQLException {
534        try {
535            return resultSet.getUnicodeStream(columnName);
536        } catch (final SQLException e) {
537            handleException(e);
538            return null;
539        }
540    }
541
542    @Override
543    public InputStream getBinaryStream(final String columnName) throws SQLException {
544        try {
545            return resultSet.getBinaryStream(columnName);
546        } catch (final SQLException e) {
547            handleException(e);
548            return null;
549        }
550    }
551
552    @Override
553    public SQLWarning getWarnings() throws SQLException {
554        try {
555            return resultSet.getWarnings();
556        } catch (final SQLException e) {
557            handleException(e);
558            return null;
559        }
560    }
561
562    @Override
563    public void clearWarnings() throws SQLException {
564        try {
565            resultSet.clearWarnings();
566        } catch (final SQLException e) {
567            handleException(e);
568        }
569    }
570
571    @Override
572    public String getCursorName() throws SQLException {
573        try {
574            return resultSet.getCursorName();
575        } catch (final SQLException e) {
576            handleException(e);
577            return null;
578        }
579    }
580
581    @Override
582    public ResultSetMetaData getMetaData() throws SQLException {
583        try {
584            return resultSet.getMetaData();
585        } catch (final SQLException e) {
586            handleException(e);
587            return null;
588        }
589    }
590
591    @Override
592    public Object getObject(final int columnIndex) throws SQLException {
593        try {
594            return resultSet.getObject(columnIndex);
595        } catch (final SQLException e) {
596            handleException(e);
597            return null;
598        }
599    }
600
601    @Override
602    public Object getObject(final String columnName) throws SQLException {
603        try {
604            return resultSet.getObject(columnName);
605        } catch (final SQLException e) {
606            handleException(e);
607            return null;
608        }
609    }
610
611    @Override
612    public int findColumn(final String columnName) throws SQLException {
613        try {
614            return resultSet.findColumn(columnName);
615        } catch (final SQLException e) {
616            handleException(e);
617            return 0;
618        }
619    }
620
621    @Override
622    public Reader getCharacterStream(final int columnIndex) throws SQLException {
623        try {
624            return resultSet.getCharacterStream(columnIndex);
625        } catch (final SQLException e) {
626            handleException(e);
627            return null;
628        }
629    }
630
631    @Override
632    public Reader getCharacterStream(final String columnName) throws SQLException {
633        try {
634            return resultSet.getCharacterStream(columnName);
635        } catch (final SQLException e) {
636            handleException(e);
637            return null;
638        }
639    }
640
641    @Override
642    public BigDecimal getBigDecimal(final int columnIndex) throws SQLException {
643        try {
644            return resultSet.getBigDecimal(columnIndex);
645        } catch (final SQLException e) {
646            handleException(e);
647            return null;
648        }
649    }
650
651    @Override
652    public BigDecimal getBigDecimal(final String columnName) throws SQLException {
653        try {
654            return resultSet.getBigDecimal(columnName);
655        } catch (final SQLException e) {
656            handleException(e);
657            return null;
658        }
659    }
660
661    @Override
662    public boolean isBeforeFirst() throws SQLException {
663        try {
664            return resultSet.isBeforeFirst();
665        } catch (final SQLException e) {
666            handleException(e);
667            return false;
668        }
669    }
670
671    @Override
672    public boolean isAfterLast() throws SQLException {
673        try {
674            return resultSet.isAfterLast();
675        } catch (final SQLException e) {
676            handleException(e);
677            return false;
678        }
679    }
680
681    @Override
682    public boolean isFirst() throws SQLException {
683        try {
684            return resultSet.isFirst();
685        } catch (final SQLException e) {
686            handleException(e);
687            return false;
688        }
689    }
690
691    @Override
692    public boolean isLast() throws SQLException {
693        try {
694            return resultSet.isLast();
695        } catch (final SQLException e) {
696            handleException(e);
697            return false;
698        }
699    }
700
701    @Override
702    public void beforeFirst() throws SQLException {
703        try {
704            resultSet.beforeFirst();
705        } catch (final SQLException e) {
706            handleException(e);
707        }
708    }
709
710    @Override
711    public void afterLast() throws SQLException {
712        try {
713            resultSet.afterLast();
714        } catch (final SQLException e) {
715            handleException(e);
716        }
717    }
718
719    @Override
720    public boolean first() throws SQLException {
721        try {
722            return resultSet.first();
723        } catch (final SQLException e) {
724            handleException(e);
725            return false;
726        }
727    }
728
729    @Override
730    public boolean last() throws SQLException {
731        try {
732            return resultSet.last();
733        } catch (final SQLException e) {
734            handleException(e);
735            return false;
736        }
737    }
738
739    @Override
740    public int getRow() throws SQLException {
741        try {
742            return resultSet.getRow();
743        } catch (final SQLException e) {
744            handleException(e);
745            return 0;
746        }
747    }
748
749    @Override
750    public boolean absolute(final int row) throws SQLException {
751        try {
752            return resultSet.absolute(row);
753        } catch (final SQLException e) {
754            handleException(e);
755            return false;
756        }
757    }
758
759    @Override
760    public boolean relative(final int rows) throws SQLException {
761        try {
762            return resultSet.relative(rows);
763        } catch (final SQLException e) {
764            handleException(e);
765            return false;
766        }
767    }
768
769    @Override
770    public boolean previous() throws SQLException {
771        try {
772            return resultSet.previous();
773        } catch (final SQLException e) {
774            handleException(e);
775            return false;
776        }
777    }
778
779    @Override
780    public void setFetchDirection(final int direction) throws SQLException {
781        try {
782            resultSet.setFetchDirection(direction);
783        } catch (final SQLException e) {
784            handleException(e);
785        }
786    }
787
788    @Override
789    public int getFetchDirection() throws SQLException {
790        try {
791            return resultSet.getFetchDirection();
792        } catch (final SQLException e) {
793            handleException(e);
794            return 0;
795        }
796    }
797
798    @Override
799    public void setFetchSize(final int rows) throws SQLException {
800        try {
801            resultSet.setFetchSize(rows);
802        } catch (final SQLException e) {
803            handleException(e);
804        }
805    }
806
807    @Override
808    public int getFetchSize() throws SQLException {
809        try {
810            return resultSet.getFetchSize();
811        } catch (final SQLException e) {
812            handleException(e);
813            return 0;
814        }
815    }
816
817    @Override
818    public int getType() throws SQLException {
819        try {
820            return resultSet.getType();
821        } catch (final SQLException e) {
822            handleException(e);
823            return 0;
824        }
825    }
826
827    @Override
828    public int getConcurrency() throws SQLException {
829        try {
830            return resultSet.getConcurrency();
831        } catch (final SQLException e) {
832            handleException(e);
833            return 0;
834        }
835    }
836
837    @Override
838    public boolean rowUpdated() throws SQLException {
839        try {
840            return resultSet.rowUpdated();
841        } catch (final SQLException e) {
842            handleException(e);
843            return false;
844        }
845    }
846
847    @Override
848    public boolean rowInserted() throws SQLException {
849        try {
850            return resultSet.rowInserted();
851        } catch (final SQLException e) {
852            handleException(e);
853            return false;
854        }
855    }
856
857    @Override
858    public boolean rowDeleted() throws SQLException {
859        try {
860            return resultSet.rowDeleted();
861        } catch (final SQLException e) {
862            handleException(e);
863            return false;
864        }
865    }
866
867    @Override
868    public void updateNull(final int columnIndex) throws SQLException {
869        try {
870            resultSet.updateNull(columnIndex);
871        } catch (final SQLException e) {
872            handleException(e);
873        }
874    }
875
876    @Override
877    public void updateBoolean(final int columnIndex, final boolean x) throws SQLException {
878        try {
879            resultSet.updateBoolean(columnIndex, x);
880        } catch (final SQLException e) {
881            handleException(e);
882        }
883    }
884
885    @Override
886    public void updateByte(final int columnIndex, final byte x) throws SQLException {
887        try {
888            resultSet.updateByte(columnIndex, x);
889        } catch (final SQLException e) {
890            handleException(e);
891        }
892    }
893
894    @Override
895    public void updateShort(final int columnIndex, final short x) throws SQLException {
896        try {
897            resultSet.updateShort(columnIndex, x);
898        } catch (final SQLException e) {
899            handleException(e);
900        }
901    }
902
903    @Override
904    public void updateInt(final int columnIndex, final int x) throws SQLException {
905        try {
906            resultSet.updateInt(columnIndex, x);
907        } catch (final SQLException e) {
908            handleException(e);
909        }
910    }
911
912    @Override
913    public void updateLong(final int columnIndex, final long x) throws SQLException {
914        try {
915            resultSet.updateLong(columnIndex, x);
916        } catch (final SQLException e) {
917            handleException(e);
918        }
919    }
920
921    @Override
922    public void updateFloat(final int columnIndex, final float x) throws SQLException {
923        try {
924            resultSet.updateFloat(columnIndex, x);
925        } catch (final SQLException e) {
926            handleException(e);
927        }
928    }
929
930    @Override
931    public void updateDouble(final int columnIndex, final double x) throws SQLException {
932        try {
933            resultSet.updateDouble(columnIndex, x);
934        } catch (final SQLException e) {
935            handleException(e);
936        }
937    }
938
939    @Override
940    public void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException {
941        try {
942            resultSet.updateBigDecimal(columnIndex, x);
943        } catch (final SQLException e) {
944            handleException(e);
945        }
946    }
947
948    @Override
949    public void updateString(final int columnIndex, final String x) throws SQLException {
950        try {
951            resultSet.updateString(columnIndex, x);
952        } catch (final SQLException e) {
953            handleException(e);
954        }
955    }
956
957    @Override
958    public void updateBytes(final int columnIndex, final byte[] x) throws SQLException {
959        try {
960            resultSet.updateBytes(columnIndex, x);
961        } catch (final SQLException e) {
962            handleException(e);
963        }
964    }
965
966    @Override
967    public void updateDate(final int columnIndex, final Date x) throws SQLException {
968        try {
969            resultSet.updateDate(columnIndex, x);
970        } catch (final SQLException e) {
971            handleException(e);
972        }
973    }
974
975    @Override
976    public void updateTime(final int columnIndex, final Time x) throws SQLException {
977        try {
978            resultSet.updateTime(columnIndex, x);
979        } catch (final SQLException e) {
980            handleException(e);
981        }
982    }
983
984    @Override
985    public void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException {
986        try {
987            resultSet.updateTimestamp(columnIndex, x);
988        } catch (final SQLException e) {
989            handleException(e);
990        }
991    }
992
993    @Override
994    public void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
995        try {
996            resultSet.updateAsciiStream(columnIndex, x, length);
997        } catch (final SQLException e) {
998            handleException(e);
999        }
1000    }
1001
1002    @Override
1003    public void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
1004        try {
1005            resultSet.updateBinaryStream(columnIndex, x, length);
1006        } catch (final SQLException e) {
1007            handleException(e);
1008        }
1009    }
1010
1011    @Override
1012    public void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException {
1013        try {
1014            resultSet.updateCharacterStream(columnIndex, x, length);
1015        } catch (final SQLException e) {
1016            handleException(e);
1017        }
1018    }
1019
1020    @Override
1021    public void updateObject(final int columnIndex, final Object x, final int scale) throws SQLException {
1022        try {
1023            resultSet.updateObject(columnIndex, x);
1024        } catch (final SQLException e) {
1025            handleException(e);
1026        }
1027    }
1028
1029    @Override
1030    public void updateObject(final int columnIndex, final Object x) throws SQLException {
1031        try {
1032            resultSet.updateObject(columnIndex, x);
1033        } catch (final SQLException e) {
1034            handleException(e);
1035        }
1036    }
1037
1038    @Override
1039    public void updateNull(final String columnName) throws SQLException {
1040        try {
1041            resultSet.updateNull(columnName);
1042        } catch (final SQLException e) {
1043            handleException(e);
1044        }
1045    }
1046
1047    @Override
1048    public void updateBoolean(final String columnName, final boolean x) throws SQLException {
1049        try {
1050            resultSet.updateBoolean(columnName, x);
1051        } catch (final SQLException e) {
1052            handleException(e);
1053        }
1054    }
1055
1056    @Override
1057    public void updateByte(final String columnName, final byte x) throws SQLException {
1058        try {
1059            resultSet.updateByte(columnName, x);
1060        } catch (final SQLException e) {
1061            handleException(e);
1062        }
1063    }
1064
1065    @Override
1066    public void updateShort(final String columnName, final short x) throws SQLException {
1067        try {
1068            resultSet.updateShort(columnName, x);
1069        } catch (final SQLException e) {
1070            handleException(e);
1071        }
1072    }
1073
1074    @Override
1075    public void updateInt(final String columnName, final int x) throws SQLException {
1076        try {
1077            resultSet.updateInt(columnName, x);
1078        } catch (final SQLException e) {
1079            handleException(e);
1080        }
1081    }
1082
1083    @Override
1084    public void updateLong(final String columnName, final long x) throws SQLException {
1085        try {
1086            resultSet.updateLong(columnName, x);
1087        } catch (final SQLException e) {
1088            handleException(e);
1089        }
1090    }
1091
1092    @Override
1093    public void updateFloat(final String columnName, final float x) throws SQLException {
1094        try {
1095            resultSet.updateFloat(columnName, x);
1096        } catch (final SQLException e) {
1097            handleException(e);
1098        }
1099    }
1100
1101    @Override
1102    public void updateDouble(final String columnName, final double x) throws SQLException {
1103        try {
1104            resultSet.updateDouble(columnName, x);
1105        } catch (final SQLException e) {
1106            handleException(e);
1107        }
1108    }
1109
1110    @Override
1111    public void updateBigDecimal(final String columnName, final BigDecimal x) throws SQLException {
1112        try {
1113            resultSet.updateBigDecimal(columnName, x);
1114        } catch (final SQLException e) {
1115            handleException(e);
1116        }
1117    }
1118
1119    @Override
1120    public void updateString(final String columnName, final String x) throws SQLException {
1121        try {
1122            resultSet.updateString(columnName, x);
1123        } catch (final SQLException e) {
1124            handleException(e);
1125        }
1126    }
1127
1128    @Override
1129    public void updateBytes(final String columnName, final byte[] x) throws SQLException {
1130        try {
1131            resultSet.updateBytes(columnName, x);
1132        } catch (final SQLException e) {
1133            handleException(e);
1134        }
1135    }
1136
1137    @Override
1138    public void updateDate(final String columnName, final Date x) throws SQLException {
1139        try {
1140            resultSet.updateDate(columnName, x);
1141        } catch (final SQLException e) {
1142            handleException(e);
1143        }
1144    }
1145
1146    @Override
1147    public void updateTime(final String columnName, final Time x) throws SQLException {
1148        try {
1149            resultSet.updateTime(columnName, x);
1150        } catch (final SQLException e) {
1151            handleException(e);
1152        }
1153    }
1154
1155    @Override
1156    public void updateTimestamp(final String columnName, final Timestamp x) throws SQLException {
1157        try {
1158            resultSet.updateTimestamp(columnName, x);
1159        } catch (final SQLException e) {
1160            handleException(e);
1161        }
1162    }
1163
1164    @Override
1165    public void updateAsciiStream(final String columnName, final InputStream x, final int length) throws SQLException {
1166        try {
1167            resultSet.updateAsciiStream(columnName, x, length);
1168        } catch (final SQLException e) {
1169            handleException(e);
1170        }
1171    }
1172
1173    @Override
1174    public void updateBinaryStream(final String columnName, final InputStream x, final int length) throws SQLException {
1175        try {
1176            resultSet.updateBinaryStream(columnName, x, length);
1177        } catch (final SQLException e) {
1178            handleException(e);
1179        }
1180    }
1181
1182    @Override
1183    public void updateCharacterStream(final String columnName, final Reader reader, final int length)
1184            throws SQLException {
1185        try {
1186            resultSet.updateCharacterStream(columnName, reader, length);
1187        } catch (final SQLException e) {
1188            handleException(e);
1189        }
1190    }
1191
1192    @Override
1193    public void updateObject(final String columnName, final Object x, final int scale) throws SQLException {
1194        try {
1195            resultSet.updateObject(columnName, x);
1196        } catch (final SQLException e) {
1197            handleException(e);
1198        }
1199    }
1200
1201    @Override
1202    public void updateObject(final String columnName, final Object x) throws SQLException {
1203        try {
1204            resultSet.updateObject(columnName, x);
1205        } catch (final SQLException e) {
1206            handleException(e);
1207        }
1208    }
1209
1210    @Override
1211    public void insertRow() throws SQLException {
1212        try {
1213            resultSet.insertRow();
1214        } catch (final SQLException e) {
1215            handleException(e);
1216        }
1217    }
1218
1219    @Override
1220    public void updateRow() throws SQLException {
1221        try {
1222            resultSet.updateRow();
1223        } catch (final SQLException e) {
1224            handleException(e);
1225        }
1226    }
1227
1228    @Override
1229    public void deleteRow() throws SQLException {
1230        try {
1231            resultSet.deleteRow();
1232        } catch (final SQLException e) {
1233            handleException(e);
1234        }
1235    }
1236
1237    @Override
1238    public void refreshRow() throws SQLException {
1239        try {
1240            resultSet.refreshRow();
1241        } catch (final SQLException e) {
1242            handleException(e);
1243        }
1244    }
1245
1246    @Override
1247    public void cancelRowUpdates() throws SQLException {
1248        try {
1249            resultSet.cancelRowUpdates();
1250        } catch (final SQLException e) {
1251            handleException(e);
1252        }
1253    }
1254
1255    @Override
1256    public void moveToInsertRow() throws SQLException {
1257        try {
1258            resultSet.moveToInsertRow();
1259        } catch (final SQLException e) {
1260            handleException(e);
1261        }
1262    }
1263
1264    @Override
1265    public void moveToCurrentRow() throws SQLException {
1266        try {
1267            resultSet.moveToCurrentRow();
1268        } catch (final SQLException e) {
1269            handleException(e);
1270        }
1271    }
1272
1273    @Override
1274    public Object getObject(final int i, final Map<String, Class<?>> map) throws SQLException {
1275        try {
1276            return resultSet.getObject(i, map);
1277        } catch (final SQLException e) {
1278            handleException(e);
1279            return null;
1280        }
1281    }
1282
1283    @Override
1284    public Ref getRef(final int i) throws SQLException {
1285        try {
1286            return resultSet.getRef(i);
1287        } catch (final SQLException e) {
1288            handleException(e);
1289            return null;
1290        }
1291    }
1292
1293    @Override
1294    public Blob getBlob(final int i) throws SQLException {
1295        try {
1296            return resultSet.getBlob(i);
1297        } catch (final SQLException e) {
1298            handleException(e);
1299            return null;
1300        }
1301    }
1302
1303    @Override
1304    public Clob getClob(final int i) throws SQLException {
1305        try {
1306            return resultSet.getClob(i);
1307        } catch (final SQLException e) {
1308            handleException(e);
1309            return null;
1310        }
1311    }
1312
1313    @Override
1314    public Array getArray(final int i) throws SQLException {
1315        try {
1316            return resultSet.getArray(i);
1317        } catch (final SQLException e) {
1318            handleException(e);
1319            return null;
1320        }
1321    }
1322
1323    @Override
1324    public Object getObject(final String colName, final Map<String, Class<?>> map) throws SQLException {
1325        try {
1326            return resultSet.getObject(colName, map);
1327        } catch (final SQLException e) {
1328            handleException(e);
1329            return null;
1330        }
1331    }
1332
1333    @Override
1334    public Ref getRef(final String colName) throws SQLException {
1335        try {
1336            return resultSet.getRef(colName);
1337        } catch (final SQLException e) {
1338            handleException(e);
1339            return null;
1340        }
1341    }
1342
1343    @Override
1344    public Blob getBlob(final String colName) throws SQLException {
1345        try {
1346            return resultSet.getBlob(colName);
1347        } catch (final SQLException e) {
1348            handleException(e);
1349            return null;
1350        }
1351    }
1352
1353    @Override
1354    public Clob getClob(final String colName) throws SQLException {
1355        try {
1356            return resultSet.getClob(colName);
1357        } catch (final SQLException e) {
1358            handleException(e);
1359            return null;
1360        }
1361    }
1362
1363    @Override
1364    public Array getArray(final String colName) throws SQLException {
1365        try {
1366            return resultSet.getArray(colName);
1367        } catch (final SQLException e) {
1368            handleException(e);
1369            return null;
1370        }
1371    }
1372
1373    @Override
1374    public Date getDate(final int columnIndex, final Calendar cal) throws SQLException {
1375        try {
1376            return resultSet.getDate(columnIndex, cal);
1377        } catch (final SQLException e) {
1378            handleException(e);
1379            return null;
1380        }
1381    }
1382
1383    @Override
1384    public Date getDate(final String columnName, final Calendar cal) throws SQLException {
1385        try {
1386            return resultSet.getDate(columnName, cal);
1387        } catch (final SQLException e) {
1388            handleException(e);
1389            return null;
1390        }
1391    }
1392
1393    @Override
1394    public Time getTime(final int columnIndex, final Calendar cal) throws SQLException {
1395        try {
1396            return resultSet.getTime(columnIndex, cal);
1397        } catch (final SQLException e) {
1398            handleException(e);
1399            return null;
1400        }
1401    }
1402
1403    @Override
1404    public Time getTime(final String columnName, final Calendar cal) throws SQLException {
1405        try {
1406            return resultSet.getTime(columnName, cal);
1407        } catch (final SQLException e) {
1408            handleException(e);
1409            return null;
1410        }
1411    }
1412
1413    @Override
1414    public Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException {
1415        try {
1416            return resultSet.getTimestamp(columnIndex, cal);
1417        } catch (final SQLException e) {
1418            handleException(e);
1419            return null;
1420        }
1421    }
1422
1423    @Override
1424    public Timestamp getTimestamp(final String columnName, final Calendar cal) throws SQLException {
1425        try {
1426            return resultSet.getTimestamp(columnName, cal);
1427        } catch (final SQLException e) {
1428            handleException(e);
1429            return null;
1430        }
1431    }
1432
1433    @Override
1434    public java.net.URL getURL(final int columnIndex) throws SQLException {
1435        try {
1436            return resultSet.getURL(columnIndex);
1437        } catch (final SQLException e) {
1438            handleException(e);
1439            return null;
1440        }
1441    }
1442
1443    @Override
1444    public java.net.URL getURL(final String columnName) throws SQLException {
1445        try {
1446            return resultSet.getURL(columnName);
1447        } catch (final SQLException e) {
1448            handleException(e);
1449            return null;
1450        }
1451    }
1452
1453    @Override
1454    public void updateRef(final int columnIndex, final Ref x) throws SQLException {
1455        try {
1456            resultSet.updateRef(columnIndex, x);
1457        } catch (final SQLException e) {
1458            handleException(e);
1459        }
1460    }
1461
1462    @Override
1463    public void updateRef(final String columnName, final Ref x) throws SQLException {
1464        try {
1465            resultSet.updateRef(columnName, x);
1466        } catch (final SQLException e) {
1467            handleException(e);
1468        }
1469    }
1470
1471    @Override
1472    public void updateBlob(final int columnIndex, final Blob x) throws SQLException {
1473        try {
1474            resultSet.updateBlob(columnIndex, x);
1475        } catch (final SQLException e) {
1476            handleException(e);
1477        }
1478    }
1479
1480    @Override
1481    public void updateBlob(final String columnName, final Blob x) throws SQLException {
1482        try {
1483            resultSet.updateBlob(columnName, x);
1484        } catch (final SQLException e) {
1485            handleException(e);
1486        }
1487    }
1488
1489    @Override
1490    public void updateClob(final int columnIndex, final Clob x) throws SQLException {
1491        try {
1492            resultSet.updateClob(columnIndex, x);
1493        } catch (final SQLException e) {
1494            handleException(e);
1495        }
1496    }
1497
1498    @Override
1499    public void updateClob(final String columnName, final Clob x) throws SQLException {
1500        try {
1501            resultSet.updateClob(columnName, x);
1502        } catch (final SQLException e) {
1503            handleException(e);
1504        }
1505    }
1506
1507    @Override
1508    public void updateArray(final int columnIndex, final Array x) throws SQLException {
1509        try {
1510            resultSet.updateArray(columnIndex, x);
1511        } catch (final SQLException e) {
1512            handleException(e);
1513        }
1514    }
1515
1516    @Override
1517    public void updateArray(final String columnName, final Array x) throws SQLException {
1518        try {
1519            resultSet.updateArray(columnName, x);
1520        } catch (final SQLException e) {
1521            handleException(e);
1522        }
1523    }
1524
1525    @Override
1526    public boolean isWrapperFor(final Class<?> iface) throws SQLException {
1527        if (iface.isAssignableFrom(getClass())) {
1528            return true;
1529        } else if (iface.isAssignableFrom(resultSet.getClass())) {
1530            return true;
1531        } else {
1532            return resultSet.isWrapperFor(iface);
1533        }
1534    }
1535
1536    @Override
1537    public <T> T unwrap(final Class<T> iface) throws SQLException {
1538        if (iface.isAssignableFrom(getClass())) {
1539            return iface.cast(this);
1540        } else if (iface.isAssignableFrom(resultSet.getClass())) {
1541            return iface.cast(resultSet);
1542        } else {
1543            return resultSet.unwrap(iface);
1544        }
1545    }
1546
1547    @Override
1548    public RowId getRowId(final int columnIndex) throws SQLException {
1549        try {
1550            return resultSet.getRowId(columnIndex);
1551        } catch (final SQLException e) {
1552            handleException(e);
1553            return null;
1554        }
1555    }
1556
1557    @Override
1558    public RowId getRowId(final String columnLabel) throws SQLException {
1559        try {
1560            return resultSet.getRowId(columnLabel);
1561        } catch (final SQLException e) {
1562            handleException(e);
1563            return null;
1564        }
1565    }
1566
1567    @Override
1568    public void updateRowId(final int columnIndex, final RowId value) throws SQLException {
1569        try {
1570            resultSet.updateRowId(columnIndex, value);
1571        } catch (final SQLException e) {
1572            handleException(e);
1573        }
1574    }
1575
1576    @Override
1577    public void updateRowId(final String columnLabel, final RowId value) throws SQLException {
1578        try {
1579            resultSet.updateRowId(columnLabel, value);
1580        } catch (final SQLException e) {
1581            handleException(e);
1582        }
1583    }
1584
1585    @Override
1586    public int getHoldability() throws SQLException {
1587        try {
1588            return resultSet.getHoldability();
1589        } catch (final SQLException e) {
1590            handleException(e);
1591            return 0;
1592        }
1593    }
1594
1595    @Override
1596    public boolean isClosed() throws SQLException {
1597        try {
1598            return resultSet.isClosed();
1599        } catch (final SQLException e) {
1600            handleException(e);
1601            return false;
1602        }
1603    }
1604
1605    @Override
1606    public void updateNString(final int columnIndex, final String value) throws SQLException {
1607        try {
1608            resultSet.updateNString(columnIndex, value);
1609        } catch (final SQLException e) {
1610            handleException(e);
1611        }
1612    }
1613
1614    @Override
1615    public void updateNString(final String columnLabel, final String value) throws SQLException {
1616        try {
1617            resultSet.updateNString(columnLabel, value);
1618        } catch (final SQLException e) {
1619            handleException(e);
1620        }
1621    }
1622
1623    @Override
1624    public void updateNClob(final int columnIndex, final NClob value) throws SQLException {
1625        try {
1626            resultSet.updateNClob(columnIndex, value);
1627        } catch (final SQLException e) {
1628            handleException(e);
1629        }
1630    }
1631
1632    @Override
1633    public void updateNClob(final String columnLabel, final NClob value) throws SQLException {
1634        try {
1635            resultSet.updateNClob(columnLabel, value);
1636        } catch (final SQLException e) {
1637            handleException(e);
1638        }
1639    }
1640
1641    @Override
1642    public NClob getNClob(final int columnIndex) throws SQLException {
1643        try {
1644            return resultSet.getNClob(columnIndex);
1645        } catch (final SQLException e) {
1646            handleException(e);
1647            return null;
1648        }
1649    }
1650
1651    @Override
1652    public NClob getNClob(final String columnLabel) throws SQLException {
1653        try {
1654            return resultSet.getNClob(columnLabel);
1655        } catch (final SQLException e) {
1656            handleException(e);
1657            return null;
1658        }
1659    }
1660
1661    @Override
1662    public SQLXML getSQLXML(final int columnIndex) throws SQLException {
1663        try {
1664            return resultSet.getSQLXML(columnIndex);
1665        } catch (final SQLException e) {
1666            handleException(e);
1667            return null;
1668        }
1669    }
1670
1671    @Override
1672    public SQLXML getSQLXML(final String columnLabel) throws SQLException {
1673        try {
1674            return resultSet.getSQLXML(columnLabel);
1675        } catch (final SQLException e) {
1676            handleException(e);
1677            return null;
1678        }
1679    }
1680
1681    @Override
1682    public void updateSQLXML(final int columnIndex, final SQLXML value) throws SQLException {
1683        try {
1684            resultSet.updateSQLXML(columnIndex, value);
1685        } catch (final SQLException e) {
1686            handleException(e);
1687        }
1688    }
1689
1690    @Override
1691    public void updateSQLXML(final String columnLabel, final SQLXML value) throws SQLException {
1692        try {
1693            resultSet.updateSQLXML(columnLabel, value);
1694        } catch (final SQLException e) {
1695            handleException(e);
1696        }
1697    }
1698
1699    @Override
1700    public String getNString(final int columnIndex) throws SQLException {
1701        try {
1702            return resultSet.getNString(columnIndex);
1703        } catch (final SQLException e) {
1704            handleException(e);
1705            return null;
1706        }
1707    }
1708
1709    @Override
1710    public String getNString(final String columnLabel) throws SQLException {
1711        try {
1712            return resultSet.getNString(columnLabel);
1713        } catch (final SQLException e) {
1714            handleException(e);
1715            return null;
1716        }
1717    }
1718
1719    @Override
1720    public Reader getNCharacterStream(final int columnIndex) throws SQLException {
1721        try {
1722            return resultSet.getNCharacterStream(columnIndex);
1723        } catch (final SQLException e) {
1724            handleException(e);
1725            return null;
1726        }
1727    }
1728
1729    @Override
1730    public Reader getNCharacterStream(final String columnLabel) throws SQLException {
1731        try {
1732            return resultSet.getNCharacterStream(columnLabel);
1733        } catch (final SQLException e) {
1734            handleException(e);
1735            return null;
1736        }
1737    }
1738
1739    @Override
1740    public void updateNCharacterStream(final int columnIndex, final Reader reader, final long length)
1741            throws SQLException {
1742        try {
1743            resultSet.updateNCharacterStream(columnIndex, reader, length);
1744        } catch (final SQLException e) {
1745            handleException(e);
1746        }
1747    }
1748
1749    @Override
1750    public void updateNCharacterStream(final String columnLabel, final Reader reader, final long length)
1751            throws SQLException {
1752        try {
1753            resultSet.updateNCharacterStream(columnLabel, reader, length);
1754        } catch (final SQLException e) {
1755            handleException(e);
1756        }
1757    }
1758
1759    @Override
1760    public void updateAsciiStream(final int columnIndex, final InputStream inputStream, final long length)
1761            throws SQLException {
1762        try {
1763            resultSet.updateAsciiStream(columnIndex, inputStream, length);
1764        } catch (final SQLException e) {
1765            handleException(e);
1766        }
1767    }
1768
1769    @Override
1770    public void updateBinaryStream(final int columnIndex, final InputStream inputStream, final long length)
1771            throws SQLException {
1772        try {
1773            resultSet.updateBinaryStream(columnIndex, inputStream, length);
1774        } catch (final SQLException e) {
1775            handleException(e);
1776        }
1777    }
1778
1779    @Override
1780    public void updateCharacterStream(final int columnIndex, final Reader reader, final long length)
1781            throws SQLException {
1782        try {
1783            resultSet.updateCharacterStream(columnIndex, reader, length);
1784        } catch (final SQLException e) {
1785            handleException(e);
1786        }
1787    }
1788
1789    @Override
1790    public void updateAsciiStream(final String columnLabel, final InputStream inputStream, final long length)
1791            throws SQLException {
1792        try {
1793            resultSet.updateAsciiStream(columnLabel, inputStream, length);
1794        } catch (final SQLException e) {
1795            handleException(e);
1796        }
1797    }
1798
1799    @Override
1800    public void updateBinaryStream(final String columnLabel, final InputStream inputStream, final long length)
1801            throws SQLException {
1802        try {
1803            resultSet.updateBinaryStream(columnLabel, inputStream, length);
1804        } catch (final SQLException e) {
1805            handleException(e);
1806        }
1807    }
1808
1809    @Override
1810    public void updateCharacterStream(final String columnLabel, final Reader reader, final long length)
1811            throws SQLException {
1812        try {
1813            resultSet.updateCharacterStream(columnLabel, reader, length);
1814        } catch (final SQLException e) {
1815            handleException(e);
1816        }
1817    }
1818
1819    @Override
1820    public void updateBlob(final int columnIndex, final InputStream inputStream, final long length)
1821            throws SQLException {
1822        try {
1823            resultSet.updateBlob(columnIndex, inputStream, length);
1824        } catch (final SQLException e) {
1825            handleException(e);
1826        }
1827    }
1828
1829    @Override
1830    public void updateBlob(final String columnLabel, final InputStream inputStream, final long length)
1831            throws SQLException {
1832        try {
1833            resultSet.updateBlob(columnLabel, inputStream, length);
1834        } catch (final SQLException e) {
1835            handleException(e);
1836        }
1837    }
1838
1839    @Override
1840    public void updateClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
1841        try {
1842            resultSet.updateClob(columnIndex, reader, length);
1843        } catch (final SQLException e) {
1844            handleException(e);
1845        }
1846    }
1847
1848    @Override
1849    public void updateClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
1850        try {
1851            resultSet.updateClob(columnLabel, reader, length);
1852        } catch (final SQLException e) {
1853            handleException(e);
1854        }
1855    }
1856
1857    @Override
1858    public void updateNClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
1859        try {
1860            resultSet.updateNClob(columnIndex, reader, length);
1861        } catch (final SQLException e) {
1862            handleException(e);
1863        }
1864    }
1865
1866    @Override
1867    public void updateNClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
1868        try {
1869            resultSet.updateNClob(columnLabel, reader, length);
1870        } catch (final SQLException e) {
1871            handleException(e);
1872        }
1873    }
1874
1875    @Override
1876    public void updateNCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
1877        try {
1878            resultSet.updateNCharacterStream(columnIndex, reader);
1879        } catch (final SQLException e) {
1880            handleException(e);
1881        }
1882    }
1883
1884    @Override
1885    public void updateNCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
1886        try {
1887            resultSet.updateNCharacterStream(columnLabel, reader);
1888        } catch (final SQLException e) {
1889            handleException(e);
1890        }
1891    }
1892
1893    @Override
1894    public void updateAsciiStream(final int columnIndex, final InputStream inputStream) throws SQLException {
1895        try {
1896            resultSet.updateAsciiStream(columnIndex, inputStream);
1897        } catch (final SQLException e) {
1898            handleException(e);
1899        }
1900    }
1901
1902    @Override
1903    public void updateBinaryStream(final int columnIndex, final InputStream inputStream) throws SQLException {
1904        try {
1905            resultSet.updateBinaryStream(columnIndex, inputStream);
1906        } catch (final SQLException e) {
1907            handleException(e);
1908        }
1909    }
1910
1911    @Override
1912    public void updateCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
1913        try {
1914            resultSet.updateCharacterStream(columnIndex, reader);
1915        } catch (final SQLException e) {
1916            handleException(e);
1917        }
1918    }
1919
1920    @Override
1921    public void updateAsciiStream(final String columnLabel, final InputStream inputStream) throws SQLException {
1922        try {
1923            resultSet.updateAsciiStream(columnLabel, inputStream);
1924        } catch (final SQLException e) {
1925            handleException(e);
1926        }
1927    }
1928
1929    @Override
1930    public void updateBinaryStream(final String columnLabel, final InputStream inputStream) throws SQLException {
1931        try {
1932            resultSet.updateBinaryStream(columnLabel, inputStream);
1933        } catch (final SQLException e) {
1934            handleException(e);
1935        }
1936    }
1937
1938    @Override
1939    public void updateCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
1940        try {
1941            resultSet.updateCharacterStream(columnLabel, reader);
1942        } catch (final SQLException e) {
1943            handleException(e);
1944        }
1945    }
1946
1947    @Override
1948    public void updateBlob(final int columnIndex, final InputStream inputStream) throws SQLException {
1949        try {
1950            resultSet.updateBlob(columnIndex, inputStream);
1951        } catch (final SQLException e) {
1952            handleException(e);
1953        }
1954    }
1955
1956    @Override
1957    public void updateBlob(final String columnLabel, final InputStream inputStream) throws SQLException {
1958        try {
1959            resultSet.updateBlob(columnLabel, inputStream);
1960        } catch (final SQLException e) {
1961            handleException(e);
1962        }
1963    }
1964
1965    @Override
1966    public void updateClob(final int columnIndex, final Reader reader) throws SQLException {
1967        try {
1968            resultSet.updateClob(columnIndex, reader);
1969        } catch (final SQLException e) {
1970            handleException(e);
1971        }
1972    }
1973
1974    @Override
1975    public void updateClob(final String columnLabel, final Reader reader) throws SQLException {
1976        try {
1977            resultSet.updateClob(columnLabel, reader);
1978        } catch (final SQLException e) {
1979            handleException(e);
1980        }
1981    }
1982
1983    @Override
1984    public void updateNClob(final int columnIndex, final Reader reader) throws SQLException {
1985        try {
1986            resultSet.updateNClob(columnIndex, reader);
1987        } catch (final SQLException e) {
1988            handleException(e);
1989        }
1990    }
1991
1992    @Override
1993    public void updateNClob(final String columnLabel, final Reader reader) throws SQLException {
1994        try {
1995            resultSet.updateNClob(columnLabel, reader);
1996        } catch (final SQLException e) {
1997            handleException(e);
1998        }
1999    }
2000
2001    @Override
2002    public <T> T getObject(final int columnIndex, final Class<T> type) throws SQLException {
2003        try {
2004            return resultSet.getObject(columnIndex, type);
2005        } catch (final SQLException e) {
2006            handleException(e);
2007            return null;
2008        }
2009    }
2010
2011    @Override
2012    public <T> T getObject(final String columnLabel, final Class<T> type) throws SQLException {
2013        try {
2014            return resultSet.getObject(columnLabel, type);
2015        } catch (final SQLException e) {
2016            handleException(e);
2017            return null;
2018        }
2019    }
2020
2021    @Override
2022    public String toString() {
2023        return super.toString() + "[_res=" + resultSet + ", _stmt=" + statement + ", _conn=" + connection + "]";
2024    }
2025}