DelegatingResultSet.java

  1. /*
  2.  * Licensed to the Apache Software Foundation (ASF) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * The ASF licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *      http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.apache.commons.dbcp2;

  18. import java.io.InputStream;
  19. import java.io.Reader;
  20. import java.math.BigDecimal;
  21. import java.sql.Array;
  22. import java.sql.Blob;
  23. import java.sql.Clob;
  24. import java.sql.Connection;
  25. import java.sql.Date;
  26. import java.sql.NClob;
  27. import java.sql.Ref;
  28. import java.sql.ResultSet;
  29. import java.sql.ResultSetMetaData;
  30. import java.sql.RowId;
  31. import java.sql.SQLException;
  32. import java.sql.SQLType;
  33. import java.sql.SQLWarning;
  34. import java.sql.SQLXML;
  35. import java.sql.Statement;
  36. import java.sql.Time;
  37. import java.sql.Timestamp;
  38. import java.util.Calendar;
  39. import java.util.Map;

  40. /**
  41.  * A base delegating implementation of {@link ResultSet}.
  42.  * <p>
  43.  * All of the methods from the {@link ResultSet} interface simply call the corresponding method on the "delegate"
  44.  * provided in my constructor.
  45.  * </p>
  46.  * <p>
  47.  * Extends AbandonedTrace to implement result set tracking and logging of code which created the ResultSet. Tracking the
  48.  * ResultSet ensures that the Statement which created it can close any open ResultSet's on Statement close.
  49.  * </p>
  50.  *
  51.  * @since 2.0
  52.  */
  53. public final class DelegatingResultSet extends AbandonedTrace implements ResultSet {

  54.     /**
  55.      * Wraps the given result set in a delegate.
  56.      *
  57.      * @param connection
  58.      *            The Connection which created the ResultSet.
  59.      * @param resultSet
  60.      *            The ResultSet to wrap.
  61.      * @return a new delegate.
  62.      */
  63.     public static ResultSet wrapResultSet(final Connection connection, final ResultSet resultSet) {
  64.         if (null == resultSet) {
  65.             return null;
  66.         }
  67.         return new DelegatingResultSet(connection, resultSet);
  68.     }

  69.     /**
  70.      * Wraps the given result set in a delegate.
  71.      *
  72.      * @param statement
  73.      *            The Statement which created the ResultSet.
  74.      * @param resultSet
  75.      *            The ResultSet to wrap.
  76.      * @return a new delegate.
  77.      */
  78.     public static ResultSet wrapResultSet(final Statement statement, final ResultSet resultSet) {
  79.         if (null == resultSet) {
  80.             return null;
  81.         }
  82.         return new DelegatingResultSet(statement, resultSet);
  83.     }

  84.     /** My delegate. **/
  85.     private final ResultSet resultSet;

  86.     /** The Statement that created me, if any. **/
  87.     private Statement statement;

  88.     /** The Connection that created me, if any. **/
  89.     private Connection connection;

  90.     /**
  91.      * Creates a wrapper for the ResultSet which traces this ResultSet to the Connection which created it (via, for
  92.      * example DatabaseMetadata), and the code which created it.
  93.      * <p>
  94.      * Private to ensure all construction is {@link #wrapResultSet(Connection, ResultSet)}
  95.      * </p>
  96.      *
  97.      * @param connection
  98.      *            Connection which created this ResultSet
  99.      * @param resultSet
  100.      *            ResultSet to wrap
  101.      */
  102.     private DelegatingResultSet(final Connection connection, final ResultSet resultSet) {
  103.         super((AbandonedTrace) connection);
  104.         this.connection = connection;
  105.         this.resultSet = resultSet;
  106.     }

  107.     /**
  108.      * Creates a wrapper for the ResultSet which traces this ResultSet to the Statement which created it and the code
  109.      * which created it.
  110.      * <p>
  111.      * Private to ensure all construction is {@link #wrapResultSet(Statement, ResultSet)}
  112.      * </p>
  113.      *
  114.      * @param statement
  115.      *            The Statement which created the ResultSet.
  116.      * @param resultSet
  117.      *            The ResultSet to wrap.
  118.      */
  119.     private DelegatingResultSet(final Statement statement, final ResultSet resultSet) {
  120.         super((AbandonedTrace) statement);
  121.         this.statement = statement;
  122.         this.resultSet = resultSet;
  123.     }

  124.     @Override
  125.     public boolean absolute(final int row) throws SQLException {
  126.         try {
  127.             return resultSet.absolute(row);
  128.         } catch (final SQLException e) {
  129.             handleException(e);
  130.             return false;
  131.         }
  132.     }

  133.     @Override
  134.     public void afterLast() throws SQLException {
  135.         try {
  136.             resultSet.afterLast();
  137.         } catch (final SQLException e) {
  138.             handleException(e);
  139.         }
  140.     }

  141.     @Override
  142.     public void beforeFirst() throws SQLException {
  143.         try {
  144.             resultSet.beforeFirst();
  145.         } catch (final SQLException e) {
  146.             handleException(e);
  147.         }
  148.     }

  149.     @Override
  150.     public void cancelRowUpdates() throws SQLException {
  151.         try {
  152.             resultSet.cancelRowUpdates();
  153.         } catch (final SQLException e) {
  154.             handleException(e);
  155.         }
  156.     }

  157.     @Override
  158.     public void clearWarnings() throws SQLException {
  159.         try {
  160.             resultSet.clearWarnings();
  161.         } catch (final SQLException e) {
  162.             handleException(e);
  163.         }
  164.     }

  165.     /**
  166.      * Wrapper for close of ResultSet which removes this result set from being traced then calls close on the original
  167.      * ResultSet.
  168.      */
  169.     @Override
  170.     public void close() throws SQLException {
  171.         try {
  172.             if (statement != null) {
  173.                 removeThisTrace(statement);
  174.                 statement = null;
  175.             }
  176.             if (connection != null) {
  177.                 removeThisTrace(connection);
  178.                 connection = null;
  179.             }
  180.             resultSet.close();
  181.         } catch (final SQLException e) {
  182.             handleException(e);
  183.         }
  184.     }

  185.     @Override
  186.     public void deleteRow() throws SQLException {
  187.         try {
  188.             resultSet.deleteRow();
  189.         } catch (final SQLException e) {
  190.             handleException(e);
  191.         }
  192.     }

  193.     @Override
  194.     public int findColumn(final String columnName) throws SQLException {
  195.         try {
  196.             return resultSet.findColumn(columnName);
  197.         } catch (final SQLException e) {
  198.             handleException(e);
  199.             return 0;
  200.         }
  201.     }

  202.     @Override
  203.     public boolean first() throws SQLException {
  204.         try {
  205.             return resultSet.first();
  206.         } catch (final SQLException e) {
  207.             handleException(e);
  208.             return false;
  209.         }
  210.     }

  211.     @Override
  212.     public Array getArray(final int i) throws SQLException {
  213.         try {
  214.             return resultSet.getArray(i);
  215.         } catch (final SQLException e) {
  216.             handleException(e);
  217.             return null;
  218.         }
  219.     }

  220.     @Override
  221.     public Array getArray(final String colName) throws SQLException {
  222.         try {
  223.             return resultSet.getArray(colName);
  224.         } catch (final SQLException e) {
  225.             handleException(e);
  226.             return null;
  227.         }
  228.     }

  229.     @Override
  230.     public InputStream getAsciiStream(final int columnIndex) throws SQLException {
  231.         try {
  232.             return resultSet.getAsciiStream(columnIndex);
  233.         } catch (final SQLException e) {
  234.             handleException(e);
  235.             return null;
  236.         }
  237.     }

  238.     @Override
  239.     public InputStream getAsciiStream(final String columnName) throws SQLException {
  240.         try {
  241.             return resultSet.getAsciiStream(columnName);
  242.         } catch (final SQLException e) {
  243.             handleException(e);
  244.             return null;
  245.         }
  246.     }

  247.     @Override
  248.     public BigDecimal getBigDecimal(final int columnIndex) throws SQLException {
  249.         try {
  250.             return resultSet.getBigDecimal(columnIndex);
  251.         } catch (final SQLException e) {
  252.             handleException(e);
  253.             return null;
  254.         }
  255.     }

  256.     /** @deprecated Use {@link #getBigDecimal(int)} */
  257.     @Deprecated
  258.     @Override
  259.     public BigDecimal getBigDecimal(final int columnIndex, final int scale) throws SQLException {
  260.         try {
  261.             return resultSet.getBigDecimal(columnIndex);
  262.         } catch (final SQLException e) {
  263.             handleException(e);
  264.             return null;
  265.         }
  266.     }

  267.     @Override
  268.     public BigDecimal getBigDecimal(final String columnName) throws SQLException {
  269.         try {
  270.             return resultSet.getBigDecimal(columnName);
  271.         } catch (final SQLException e) {
  272.             handleException(e);
  273.             return null;
  274.         }
  275.     }

  276.     /** @deprecated Use {@link #getBigDecimal(String)} */
  277.     @Deprecated
  278.     @Override
  279.     public BigDecimal getBigDecimal(final String columnName, final int scale) throws SQLException {
  280.         try {
  281.             return resultSet.getBigDecimal(columnName);
  282.         } catch (final SQLException e) {
  283.             handleException(e);
  284.             return null;
  285.         }
  286.     }

  287.     @Override
  288.     public InputStream getBinaryStream(final int columnIndex) throws SQLException {
  289.         try {
  290.             return resultSet.getBinaryStream(columnIndex);
  291.         } catch (final SQLException e) {
  292.             handleException(e);
  293.             return null;
  294.         }
  295.     }

  296.     @Override
  297.     public InputStream getBinaryStream(final String columnName) throws SQLException {
  298.         try {
  299.             return resultSet.getBinaryStream(columnName);
  300.         } catch (final SQLException e) {
  301.             handleException(e);
  302.             return null;
  303.         }
  304.     }

  305.     @Override
  306.     public Blob getBlob(final int i) throws SQLException {
  307.         try {
  308.             return resultSet.getBlob(i);
  309.         } catch (final SQLException e) {
  310.             handleException(e);
  311.             return null;
  312.         }
  313.     }

  314.     @Override
  315.     public Blob getBlob(final String colName) throws SQLException {
  316.         try {
  317.             return resultSet.getBlob(colName);
  318.         } catch (final SQLException e) {
  319.             handleException(e);
  320.             return null;
  321.         }
  322.     }

  323.     @Override
  324.     public boolean getBoolean(final int columnIndex) throws SQLException {
  325.         try {
  326.             return resultSet.getBoolean(columnIndex);
  327.         } catch (final SQLException e) {
  328.             handleException(e);
  329.             return false;
  330.         }
  331.     }

  332.     @Override
  333.     public boolean getBoolean(final String columnName) throws SQLException {
  334.         try {
  335.             return resultSet.getBoolean(columnName);
  336.         } catch (final SQLException e) {
  337.             handleException(e);
  338.             return false;
  339.         }
  340.     }

  341.     @Override
  342.     public byte getByte(final int columnIndex) throws SQLException {
  343.         try {
  344.             return resultSet.getByte(columnIndex);
  345.         } catch (final SQLException e) {
  346.             handleException(e);
  347.             return 0;
  348.         }
  349.     }

  350.     @Override
  351.     public byte getByte(final String columnName) throws SQLException {
  352.         try {
  353.             return resultSet.getByte(columnName);
  354.         } catch (final SQLException e) {
  355.             handleException(e);
  356.             return 0;
  357.         }
  358.     }

  359.     @Override
  360.     public byte[] getBytes(final int columnIndex) throws SQLException {
  361.         try {
  362.             return resultSet.getBytes(columnIndex);
  363.         } catch (final SQLException e) {
  364.             handleException(e);
  365.             return null;
  366.         }
  367.     }

  368.     @Override
  369.     public byte[] getBytes(final String columnName) throws SQLException {
  370.         try {
  371.             return resultSet.getBytes(columnName);
  372.         } catch (final SQLException e) {
  373.             handleException(e);
  374.             return null;
  375.         }
  376.     }

  377.     @Override
  378.     public Reader getCharacterStream(final int columnIndex) throws SQLException {
  379.         try {
  380.             return resultSet.getCharacterStream(columnIndex);
  381.         } catch (final SQLException e) {
  382.             handleException(e);
  383.             return null;
  384.         }
  385.     }

  386.     @Override
  387.     public Reader getCharacterStream(final String columnName) throws SQLException {
  388.         try {
  389.             return resultSet.getCharacterStream(columnName);
  390.         } catch (final SQLException e) {
  391.             handleException(e);
  392.             return null;
  393.         }
  394.     }

  395.     @Override
  396.     public Clob getClob(final int i) throws SQLException {
  397.         try {
  398.             return resultSet.getClob(i);
  399.         } catch (final SQLException e) {
  400.             handleException(e);
  401.             return null;
  402.         }
  403.     }

  404.     @Override
  405.     public Clob getClob(final String colName) throws SQLException {
  406.         try {
  407.             return resultSet.getClob(colName);
  408.         } catch (final SQLException e) {
  409.             handleException(e);
  410.             return null;
  411.         }
  412.     }

  413.     @Override
  414.     public int getConcurrency() throws SQLException {
  415.         try {
  416.             return resultSet.getConcurrency();
  417.         } catch (final SQLException e) {
  418.             handleException(e);
  419.             return 0;
  420.         }
  421.     }

  422.     @Override
  423.     public String getCursorName() throws SQLException {
  424.         try {
  425.             return resultSet.getCursorName();
  426.         } catch (final SQLException e) {
  427.             handleException(e);
  428.             return null;
  429.         }
  430.     }

  431.     @Override
  432.     public Date getDate(final int columnIndex) throws SQLException {
  433.         try {
  434.             return resultSet.getDate(columnIndex);
  435.         } catch (final SQLException e) {
  436.             handleException(e);
  437.             return null;
  438.         }
  439.     }

  440.     @Override
  441.     public Date getDate(final int columnIndex, final Calendar cal) throws SQLException {
  442.         try {
  443.             return resultSet.getDate(columnIndex, cal);
  444.         } catch (final SQLException e) {
  445.             handleException(e);
  446.             return null;
  447.         }
  448.     }

  449.     @Override
  450.     public Date getDate(final String columnName) throws SQLException {
  451.         try {
  452.             return resultSet.getDate(columnName);
  453.         } catch (final SQLException e) {
  454.             handleException(e);
  455.             return null;
  456.         }
  457.     }

  458.     @Override
  459.     public Date getDate(final String columnName, final Calendar cal) throws SQLException {
  460.         try {
  461.             return resultSet.getDate(columnName, cal);
  462.         } catch (final SQLException e) {
  463.             handleException(e);
  464.             return null;
  465.         }
  466.     }

  467.     /**
  468.      * Gets my delegate.
  469.      *
  470.      * @return my delegate.
  471.      */
  472.     public ResultSet getDelegate() {
  473.         return resultSet;
  474.     }

  475.     @Override
  476.     public double getDouble(final int columnIndex) throws SQLException {
  477.         try {
  478.             return resultSet.getDouble(columnIndex);
  479.         } catch (final SQLException e) {
  480.             handleException(e);
  481.             return 0;
  482.         }
  483.     }

  484.     @Override
  485.     public double getDouble(final String columnName) throws SQLException {
  486.         try {
  487.             return resultSet.getDouble(columnName);
  488.         } catch (final SQLException e) {
  489.             handleException(e);
  490.             return 0;
  491.         }
  492.     }

  493.     @Override
  494.     public int getFetchDirection() throws SQLException {
  495.         try {
  496.             return resultSet.getFetchDirection();
  497.         } catch (final SQLException e) {
  498.             handleException(e);
  499.             return 0;
  500.         }
  501.     }

  502.     @Override
  503.     public int getFetchSize() throws SQLException {
  504.         try {
  505.             return resultSet.getFetchSize();
  506.         } catch (final SQLException e) {
  507.             handleException(e);
  508.             return 0;
  509.         }
  510.     }

  511.     @Override
  512.     public float getFloat(final int columnIndex) throws SQLException {
  513.         try {
  514.             return resultSet.getFloat(columnIndex);
  515.         } catch (final SQLException e) {
  516.             handleException(e);
  517.             return 0;
  518.         }
  519.     }

  520.     @Override
  521.     public float getFloat(final String columnName) throws SQLException {
  522.         try {
  523.             return resultSet.getFloat(columnName);
  524.         } catch (final SQLException e) {
  525.             handleException(e);
  526.             return 0;
  527.         }
  528.     }

  529.     @Override
  530.     public int getHoldability() throws SQLException {
  531.         try {
  532.             return resultSet.getHoldability();
  533.         } catch (final SQLException e) {
  534.             handleException(e);
  535.             return 0;
  536.         }
  537.     }

  538.     /**
  539.      * If my underlying {@link ResultSet} is not a {@code DelegatingResultSet}, returns it, otherwise recursively
  540.      * invokes this method on my delegate.
  541.      * <p>
  542.      * Hence this method will return the first delegate that is not a {@code DelegatingResultSet}, or {@code null} when
  543.      * no non-{@code DelegatingResultSet} delegate can be found by traversing this chain.
  544.      * </p>
  545.      * <p>
  546.      * This method is useful when you may have nested {@code DelegatingResultSet}s, and you want to make sure to obtain
  547.      * a "genuine" {@link ResultSet}.
  548.      * </p>
  549.      *
  550.      * @return the innermost delegate.
  551.      */
  552.     @SuppressWarnings("resource")
  553.     public ResultSet getInnermostDelegate() {
  554.         ResultSet r = resultSet;
  555.         while (r instanceof DelegatingResultSet) {
  556.             r = ((DelegatingResultSet) r).getDelegate();
  557.             if (this == r) {
  558.                 return null;
  559.             }
  560.         }
  561.         return r;
  562.     }

  563.     @Override
  564.     public int getInt(final int columnIndex) throws SQLException {
  565.         try {
  566.             return resultSet.getInt(columnIndex);
  567.         } catch (final SQLException e) {
  568.             handleException(e);
  569.             return 0;
  570.         }
  571.     }

  572.     @Override
  573.     public int getInt(final String columnName) throws SQLException {
  574.         try {
  575.             return resultSet.getInt(columnName);
  576.         } catch (final SQLException e) {
  577.             handleException(e);
  578.             return 0;
  579.         }
  580.     }

  581.     @Override
  582.     public long getLong(final int columnIndex) throws SQLException {
  583.         try {
  584.             return resultSet.getLong(columnIndex);
  585.         } catch (final SQLException e) {
  586.             handleException(e);
  587.             return 0;
  588.         }
  589.     }

  590.     @Override
  591.     public long getLong(final String columnName) throws SQLException {
  592.         try {
  593.             return resultSet.getLong(columnName);
  594.         } catch (final SQLException e) {
  595.             handleException(e);
  596.             return 0;
  597.         }
  598.     }

  599.     @Override
  600.     public ResultSetMetaData getMetaData() throws SQLException {
  601.         try {
  602.             return resultSet.getMetaData();
  603.         } catch (final SQLException e) {
  604.             handleException(e);
  605.             return null;
  606.         }
  607.     }

  608.     @Override
  609.     public Reader getNCharacterStream(final int columnIndex) throws SQLException {
  610.         try {
  611.             return resultSet.getNCharacterStream(columnIndex);
  612.         } catch (final SQLException e) {
  613.             handleException(e);
  614.             return null;
  615.         }
  616.     }

  617.     @Override
  618.     public Reader getNCharacterStream(final String columnLabel) throws SQLException {
  619.         try {
  620.             return resultSet.getNCharacterStream(columnLabel);
  621.         } catch (final SQLException e) {
  622.             handleException(e);
  623.             return null;
  624.         }
  625.     }

  626.     @Override
  627.     public NClob getNClob(final int columnIndex) throws SQLException {
  628.         try {
  629.             return resultSet.getNClob(columnIndex);
  630.         } catch (final SQLException e) {
  631.             handleException(e);
  632.             return null;
  633.         }
  634.     }

  635.     @Override
  636.     public NClob getNClob(final String columnLabel) throws SQLException {
  637.         try {
  638.             return resultSet.getNClob(columnLabel);
  639.         } catch (final SQLException e) {
  640.             handleException(e);
  641.             return null;
  642.         }
  643.     }

  644.     @Override
  645.     public String getNString(final int columnIndex) throws SQLException {
  646.         try {
  647.             return resultSet.getNString(columnIndex);
  648.         } catch (final SQLException e) {
  649.             handleException(e);
  650.             return null;
  651.         }
  652.     }

  653.     @Override
  654.     public String getNString(final String columnLabel) throws SQLException {
  655.         try {
  656.             return resultSet.getNString(columnLabel);
  657.         } catch (final SQLException e) {
  658.             handleException(e);
  659.             return null;
  660.         }
  661.     }

  662.     @Override
  663.     public Object getObject(final int columnIndex) throws SQLException {
  664.         try {
  665.             return resultSet.getObject(columnIndex);
  666.         } catch (final SQLException e) {
  667.             handleException(e);
  668.             return null;
  669.         }
  670.     }

  671.     @Override
  672.     public <T> T getObject(final int columnIndex, final Class<T> type) throws SQLException {
  673.         try {
  674.             return Jdbc41Bridge.getObject(resultSet, columnIndex, type);
  675.         } catch (final SQLException e) {
  676.             handleException(e);
  677.             return null;
  678.         }
  679.     }

  680.     @Override
  681.     public Object getObject(final int i, final Map<String, Class<?>> map) throws SQLException {
  682.         try {
  683.             return resultSet.getObject(i, map);
  684.         } catch (final SQLException e) {
  685.             handleException(e);
  686.             return null;
  687.         }
  688.     }

  689.     @Override
  690.     public Object getObject(final String columnName) throws SQLException {
  691.         try {
  692.             return resultSet.getObject(columnName);
  693.         } catch (final SQLException e) {
  694.             handleException(e);
  695.             return null;
  696.         }
  697.     }

  698.     @Override
  699.     public <T> T getObject(final String columnLabel, final Class<T> type) throws SQLException {
  700.         try {
  701.             return Jdbc41Bridge.getObject(resultSet, columnLabel, type);
  702.         } catch (final SQLException e) {
  703.             handleException(e);
  704.             return null;
  705.         }
  706.     }

  707.     @Override
  708.     public Object getObject(final String colName, final Map<String, Class<?>> map) throws SQLException {
  709.         try {
  710.             return resultSet.getObject(colName, map);
  711.         } catch (final SQLException e) {
  712.             handleException(e);
  713.             return null;
  714.         }
  715.     }

  716.     @Override
  717.     public Ref getRef(final int i) throws SQLException {
  718.         try {
  719.             return resultSet.getRef(i);
  720.         } catch (final SQLException e) {
  721.             handleException(e);
  722.             return null;
  723.         }
  724.     }

  725.     @Override
  726.     public Ref getRef(final String colName) throws SQLException {
  727.         try {
  728.             return resultSet.getRef(colName);
  729.         } catch (final SQLException e) {
  730.             handleException(e);
  731.             return null;
  732.         }
  733.     }

  734.     @Override
  735.     public int getRow() throws SQLException {
  736.         try {
  737.             return resultSet.getRow();
  738.         } catch (final SQLException e) {
  739.             handleException(e);
  740.             return 0;
  741.         }
  742.     }

  743.     @Override
  744.     public RowId getRowId(final int columnIndex) throws SQLException {
  745.         try {
  746.             return resultSet.getRowId(columnIndex);
  747.         } catch (final SQLException e) {
  748.             handleException(e);
  749.             return null;
  750.         }
  751.     }

  752.     @Override
  753.     public RowId getRowId(final String columnLabel) throws SQLException {
  754.         try {
  755.             return resultSet.getRowId(columnLabel);
  756.         } catch (final SQLException e) {
  757.             handleException(e);
  758.             return null;
  759.         }
  760.     }

  761.     @Override
  762.     public short getShort(final int columnIndex) throws SQLException {
  763.         try {
  764.             return resultSet.getShort(columnIndex);
  765.         } catch (final SQLException e) {
  766.             handleException(e);
  767.             return 0;
  768.         }
  769.     }

  770.     @Override
  771.     public short getShort(final String columnName) throws SQLException {
  772.         try {
  773.             return resultSet.getShort(columnName);
  774.         } catch (final SQLException e) {
  775.             handleException(e);
  776.             return 0;
  777.         }
  778.     }

  779.     @Override
  780.     public SQLXML getSQLXML(final int columnIndex) throws SQLException {
  781.         try {
  782.             return resultSet.getSQLXML(columnIndex);
  783.         } catch (final SQLException e) {
  784.             handleException(e);
  785.             return null;
  786.         }
  787.     }

  788.     @Override
  789.     public SQLXML getSQLXML(final String columnLabel) throws SQLException {
  790.         try {
  791.             return resultSet.getSQLXML(columnLabel);
  792.         } catch (final SQLException e) {
  793.             handleException(e);
  794.             return null;
  795.         }
  796.     }

  797.     @Override
  798.     public Statement getStatement() throws SQLException {
  799.         return statement;
  800.     }

  801.     @Override
  802.     public String getString(final int columnIndex) throws SQLException {
  803.         try {
  804.             return resultSet.getString(columnIndex);
  805.         } catch (final SQLException e) {
  806.             handleException(e);
  807.             return null;
  808.         }
  809.     }

  810.     @Override
  811.     public String getString(final String columnName) throws SQLException {
  812.         try {
  813.             return resultSet.getString(columnName);
  814.         } catch (final SQLException e) {
  815.             handleException(e);
  816.             return null;
  817.         }
  818.     }

  819.     @Override
  820.     public Time getTime(final int columnIndex) throws SQLException {
  821.         try {
  822.             return resultSet.getTime(columnIndex);
  823.         } catch (final SQLException e) {
  824.             handleException(e);
  825.             return null;
  826.         }
  827.     }

  828.     @Override
  829.     public Time getTime(final int columnIndex, final Calendar cal) throws SQLException {
  830.         try {
  831.             return resultSet.getTime(columnIndex, cal);
  832.         } catch (final SQLException e) {
  833.             handleException(e);
  834.             return null;
  835.         }
  836.     }

  837.     @Override
  838.     public Time getTime(final String columnName) throws SQLException {
  839.         try {
  840.             return resultSet.getTime(columnName);
  841.         } catch (final SQLException e) {
  842.             handleException(e);
  843.             return null;
  844.         }
  845.     }

  846.     @Override
  847.     public Time getTime(final String columnName, final Calendar cal) throws SQLException {
  848.         try {
  849.             return resultSet.getTime(columnName, cal);
  850.         } catch (final SQLException e) {
  851.             handleException(e);
  852.             return null;
  853.         }
  854.     }

  855.     @Override
  856.     public Timestamp getTimestamp(final int columnIndex) throws SQLException {
  857.         try {
  858.             return resultSet.getTimestamp(columnIndex);
  859.         } catch (final SQLException e) {
  860.             handleException(e);
  861.             return null;
  862.         }
  863.     }

  864.     @Override
  865.     public Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException {
  866.         try {
  867.             return resultSet.getTimestamp(columnIndex, cal);
  868.         } catch (final SQLException e) {
  869.             handleException(e);
  870.             return null;
  871.         }
  872.     }

  873.     @Override
  874.     public Timestamp getTimestamp(final String columnName) throws SQLException {
  875.         try {
  876.             return resultSet.getTimestamp(columnName);
  877.         } catch (final SQLException e) {
  878.             handleException(e);
  879.             return null;
  880.         }
  881.     }

  882.     @Override
  883.     public Timestamp getTimestamp(final String columnName, final Calendar cal) throws SQLException {
  884.         try {
  885.             return resultSet.getTimestamp(columnName, cal);
  886.         } catch (final SQLException e) {
  887.             handleException(e);
  888.             return null;
  889.         }
  890.     }

  891.     @Override
  892.     public int getType() throws SQLException {
  893.         try {
  894.             return resultSet.getType();
  895.         } catch (final SQLException e) {
  896.             handleException(e);
  897.             return 0;
  898.         }
  899.     }

  900.     /** @deprecated Use {@link #getCharacterStream(int)} */
  901.     @Deprecated
  902.     @Override
  903.     public InputStream getUnicodeStream(final int columnIndex) throws SQLException {
  904.         try {
  905.             return resultSet.getUnicodeStream(columnIndex);
  906.         } catch (final SQLException e) {
  907.             handleException(e);
  908.             return null;
  909.         }
  910.     }

  911.     /** @deprecated Use {@link #getCharacterStream(String)} */
  912.     @Deprecated
  913.     @Override
  914.     public InputStream getUnicodeStream(final String columnName) throws SQLException {
  915.         try {
  916.             return resultSet.getUnicodeStream(columnName);
  917.         } catch (final SQLException e) {
  918.             handleException(e);
  919.             return null;
  920.         }
  921.     }

  922.     @Override
  923.     public java.net.URL getURL(final int columnIndex) throws SQLException {
  924.         try {
  925.             return resultSet.getURL(columnIndex);
  926.         } catch (final SQLException e) {
  927.             handleException(e);
  928.             return null;
  929.         }
  930.     }

  931.     @Override
  932.     public java.net.URL getURL(final String columnName) throws SQLException {
  933.         try {
  934.             return resultSet.getURL(columnName);
  935.         } catch (final SQLException e) {
  936.             handleException(e);
  937.             return null;
  938.         }
  939.     }

  940.     @Override
  941.     public SQLWarning getWarnings() throws SQLException {
  942.         try {
  943.             return resultSet.getWarnings();
  944.         } catch (final SQLException e) {
  945.             handleException(e);
  946.             return null;
  947.         }
  948.     }

  949.     protected void handleException(final SQLException e) throws SQLException {
  950.         if (statement instanceof DelegatingStatement) {
  951.             ((DelegatingStatement) statement).handleException(e);
  952.         } else if (connection instanceof DelegatingConnection) {
  953.             ((DelegatingConnection<?>) connection).handleException(e);
  954.         } else {
  955.             throw e;
  956.         }
  957.     }

  958.     @Override
  959.     public void insertRow() throws SQLException {
  960.         try {
  961.             resultSet.insertRow();
  962.         } catch (final SQLException e) {
  963.             handleException(e);
  964.         }
  965.     }

  966.     @Override
  967.     public boolean isAfterLast() throws SQLException {
  968.         try {
  969.             return resultSet.isAfterLast();
  970.         } catch (final SQLException e) {
  971.             handleException(e);
  972.             return false;
  973.         }
  974.     }

  975.     @Override
  976.     public boolean isBeforeFirst() throws SQLException {
  977.         try {
  978.             return resultSet.isBeforeFirst();
  979.         } catch (final SQLException e) {
  980.             handleException(e);
  981.             return false;
  982.         }
  983.     }

  984.     @Override
  985.     public boolean isClosed() throws SQLException {
  986.         try {
  987.             return resultSet.isClosed();
  988.         } catch (final SQLException e) {
  989.             handleException(e);
  990.             return false;
  991.         }
  992.     }

  993.     @Override
  994.     public boolean isFirst() throws SQLException {
  995.         try {
  996.             return resultSet.isFirst();
  997.         } catch (final SQLException e) {
  998.             handleException(e);
  999.             return false;
  1000.         }
  1001.     }

  1002.     @Override
  1003.     public boolean isLast() throws SQLException {
  1004.         try {
  1005.             return resultSet.isLast();
  1006.         } catch (final SQLException e) {
  1007.             handleException(e);
  1008.             return false;
  1009.         }
  1010.     }

  1011.     @Override
  1012.     public boolean isWrapperFor(final Class<?> iface) throws SQLException {
  1013.         if (iface.isAssignableFrom(getClass())) {
  1014.             return true;
  1015.         }
  1016.         if (iface.isAssignableFrom(resultSet.getClass())) {
  1017.             return true;
  1018.         }
  1019.         return resultSet.isWrapperFor(iface);
  1020.     }

  1021.     @Override
  1022.     public boolean last() throws SQLException {
  1023.         try {
  1024.             return resultSet.last();
  1025.         } catch (final SQLException e) {
  1026.             handleException(e);
  1027.             return false;
  1028.         }
  1029.     }

  1030.     @Override
  1031.     public void moveToCurrentRow() throws SQLException {
  1032.         try {
  1033.             resultSet.moveToCurrentRow();
  1034.         } catch (final SQLException e) {
  1035.             handleException(e);
  1036.         }
  1037.     }

  1038.     @Override
  1039.     public void moveToInsertRow() throws SQLException {
  1040.         try {
  1041.             resultSet.moveToInsertRow();
  1042.         } catch (final SQLException e) {
  1043.             handleException(e);
  1044.         }
  1045.     }

  1046.     @Override
  1047.     public boolean next() throws SQLException {
  1048.         try {
  1049.             return resultSet.next();
  1050.         } catch (final SQLException e) {
  1051.             handleException(e);
  1052.             return false;
  1053.         }
  1054.     }

  1055.     @Override
  1056.     public boolean previous() throws SQLException {
  1057.         try {
  1058.             return resultSet.previous();
  1059.         } catch (final SQLException e) {
  1060.             handleException(e);
  1061.             return false;
  1062.         }
  1063.     }

  1064.     @Override
  1065.     public void refreshRow() throws SQLException {
  1066.         try {
  1067.             resultSet.refreshRow();
  1068.         } catch (final SQLException e) {
  1069.             handleException(e);
  1070.         }
  1071.     }

  1072.     @Override
  1073.     public boolean relative(final int rows) throws SQLException {
  1074.         try {
  1075.             return resultSet.relative(rows);
  1076.         } catch (final SQLException e) {
  1077.             handleException(e);
  1078.             return false;
  1079.         }
  1080.     }

  1081.     @Override
  1082.     public boolean rowDeleted() throws SQLException {
  1083.         try {
  1084.             return resultSet.rowDeleted();
  1085.         } catch (final SQLException e) {
  1086.             handleException(e);
  1087.             return false;
  1088.         }
  1089.     }

  1090.     @Override
  1091.     public boolean rowInserted() throws SQLException {
  1092.         try {
  1093.             return resultSet.rowInserted();
  1094.         } catch (final SQLException e) {
  1095.             handleException(e);
  1096.             return false;
  1097.         }
  1098.     }

  1099.     @Override
  1100.     public boolean rowUpdated() throws SQLException {
  1101.         try {
  1102.             return resultSet.rowUpdated();
  1103.         } catch (final SQLException e) {
  1104.             handleException(e);
  1105.             return false;
  1106.         }
  1107.     }

  1108.     @Override
  1109.     public void setFetchDirection(final int direction) throws SQLException {
  1110.         try {
  1111.             resultSet.setFetchDirection(direction);
  1112.         } catch (final SQLException e) {
  1113.             handleException(e);
  1114.         }
  1115.     }

  1116.     @Override
  1117.     public void setFetchSize(final int rows) throws SQLException {
  1118.         try {
  1119.             resultSet.setFetchSize(rows);
  1120.         } catch (final SQLException e) {
  1121.             handleException(e);
  1122.         }
  1123.     }

  1124.     @Override
  1125.     public synchronized String toString() {
  1126.         return super.toString() + "[resultSet=" + resultSet + ", statement=" + statement + ", connection=" + connection + "]";
  1127.     }

  1128.     @Override
  1129.     public <T> T unwrap(final Class<T> iface) throws SQLException {
  1130.         if (iface.isAssignableFrom(getClass())) {
  1131.             return iface.cast(this);
  1132.         }
  1133.         if (iface.isAssignableFrom(resultSet.getClass())) {
  1134.             return iface.cast(resultSet);
  1135.         }
  1136.         return resultSet.unwrap(iface);
  1137.     }

  1138.     @Override
  1139.     public void updateArray(final int columnIndex, final Array x) throws SQLException {
  1140.         try {
  1141.             resultSet.updateArray(columnIndex, x);
  1142.         } catch (final SQLException e) {
  1143.             handleException(e);
  1144.         }
  1145.     }

  1146.     @Override
  1147.     public void updateArray(final String columnName, final Array x) throws SQLException {
  1148.         try {
  1149.             resultSet.updateArray(columnName, x);
  1150.         } catch (final SQLException e) {
  1151.             handleException(e);
  1152.         }
  1153.     }

  1154.     @Override
  1155.     public void updateAsciiStream(final int columnIndex, final InputStream inputStream) throws SQLException {
  1156.         try {
  1157.             resultSet.updateAsciiStream(columnIndex, inputStream);
  1158.         } catch (final SQLException e) {
  1159.             handleException(e);
  1160.         }
  1161.     }

  1162.     @Override
  1163.     public void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
  1164.         try {
  1165.             resultSet.updateAsciiStream(columnIndex, x, length);
  1166.         } catch (final SQLException e) {
  1167.             handleException(e);
  1168.         }
  1169.     }

  1170.     @Override
  1171.     public void updateAsciiStream(final int columnIndex, final InputStream inputStream, final long length)
  1172.             throws SQLException {
  1173.         try {
  1174.             resultSet.updateAsciiStream(columnIndex, inputStream, length);
  1175.         } catch (final SQLException e) {
  1176.             handleException(e);
  1177.         }
  1178.     }

  1179.     @Override
  1180.     public void updateAsciiStream(final String columnLabel, final InputStream inputStream) throws SQLException {
  1181.         try {
  1182.             resultSet.updateAsciiStream(columnLabel, inputStream);
  1183.         } catch (final SQLException e) {
  1184.             handleException(e);
  1185.         }
  1186.     }

  1187.     @Override
  1188.     public void updateAsciiStream(final String columnName, final InputStream x, final int length) throws SQLException {
  1189.         try {
  1190.             resultSet.updateAsciiStream(columnName, x, length);
  1191.         } catch (final SQLException e) {
  1192.             handleException(e);
  1193.         }
  1194.     }

  1195.     @Override
  1196.     public void updateAsciiStream(final String columnLabel, final InputStream inputStream, final long length)
  1197.             throws SQLException {
  1198.         try {
  1199.             resultSet.updateAsciiStream(columnLabel, inputStream, length);
  1200.         } catch (final SQLException e) {
  1201.             handleException(e);
  1202.         }
  1203.     }

  1204.     @Override
  1205.     public void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException {
  1206.         try {
  1207.             resultSet.updateBigDecimal(columnIndex, x);
  1208.         } catch (final SQLException e) {
  1209.             handleException(e);
  1210.         }
  1211.     }

  1212.     @Override
  1213.     public void updateBigDecimal(final String columnName, final BigDecimal x) throws SQLException {
  1214.         try {
  1215.             resultSet.updateBigDecimal(columnName, x);
  1216.         } catch (final SQLException e) {
  1217.             handleException(e);
  1218.         }
  1219.     }

  1220.     @Override
  1221.     public void updateBinaryStream(final int columnIndex, final InputStream inputStream) throws SQLException {
  1222.         try {
  1223.             resultSet.updateBinaryStream(columnIndex, inputStream);
  1224.         } catch (final SQLException e) {
  1225.             handleException(e);
  1226.         }
  1227.     }

  1228.     @Override
  1229.     public void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
  1230.         try {
  1231.             resultSet.updateBinaryStream(columnIndex, x, length);
  1232.         } catch (final SQLException e) {
  1233.             handleException(e);
  1234.         }
  1235.     }

  1236.     @Override
  1237.     public void updateBinaryStream(final int columnIndex, final InputStream inputStream, final long length)
  1238.             throws SQLException {
  1239.         try {
  1240.             resultSet.updateBinaryStream(columnIndex, inputStream, length);
  1241.         } catch (final SQLException e) {
  1242.             handleException(e);
  1243.         }
  1244.     }

  1245.     @Override
  1246.     public void updateBinaryStream(final String columnLabel, final InputStream inputStream) throws SQLException {
  1247.         try {
  1248.             resultSet.updateBinaryStream(columnLabel, inputStream);
  1249.         } catch (final SQLException e) {
  1250.             handleException(e);
  1251.         }
  1252.     }

  1253.     @Override
  1254.     public void updateBinaryStream(final String columnName, final InputStream x, final int length) throws SQLException {
  1255.         try {
  1256.             resultSet.updateBinaryStream(columnName, x, length);
  1257.         } catch (final SQLException e) {
  1258.             handleException(e);
  1259.         }
  1260.     }

  1261.     @Override
  1262.     public void updateBinaryStream(final String columnLabel, final InputStream inputStream, final long length)
  1263.             throws SQLException {
  1264.         try {
  1265.             resultSet.updateBinaryStream(columnLabel, inputStream, length);
  1266.         } catch (final SQLException e) {
  1267.             handleException(e);
  1268.         }
  1269.     }

  1270.     @Override
  1271.     public void updateBlob(final int columnIndex, final Blob x) throws SQLException {
  1272.         try {
  1273.             resultSet.updateBlob(columnIndex, x);
  1274.         } catch (final SQLException e) {
  1275.             handleException(e);
  1276.         }
  1277.     }

  1278.     @Override
  1279.     public void updateBlob(final int columnIndex, final InputStream inputStream) throws SQLException {
  1280.         try {
  1281.             resultSet.updateBlob(columnIndex, inputStream);
  1282.         } catch (final SQLException e) {
  1283.             handleException(e);
  1284.         }
  1285.     }

  1286.     @Override
  1287.     public void updateBlob(final int columnIndex, final InputStream inputStream, final long length)
  1288.             throws SQLException {
  1289.         try {
  1290.             resultSet.updateBlob(columnIndex, inputStream, length);
  1291.         } catch (final SQLException e) {
  1292.             handleException(e);
  1293.         }
  1294.     }

  1295.     @Override
  1296.     public void updateBlob(final String columnName, final Blob x) throws SQLException {
  1297.         try {
  1298.             resultSet.updateBlob(columnName, x);
  1299.         } catch (final SQLException e) {
  1300.             handleException(e);
  1301.         }
  1302.     }

  1303.     @Override
  1304.     public void updateBlob(final String columnLabel, final InputStream inputStream) throws SQLException {
  1305.         try {
  1306.             resultSet.updateBlob(columnLabel, inputStream);
  1307.         } catch (final SQLException e) {
  1308.             handleException(e);
  1309.         }
  1310.     }

  1311.     @Override
  1312.     public void updateBlob(final String columnLabel, final InputStream inputStream, final long length)
  1313.             throws SQLException {
  1314.         try {
  1315.             resultSet.updateBlob(columnLabel, inputStream, length);
  1316.         } catch (final SQLException e) {
  1317.             handleException(e);
  1318.         }
  1319.     }

  1320.     @Override
  1321.     public void updateBoolean(final int columnIndex, final boolean x) throws SQLException {
  1322.         try {
  1323.             resultSet.updateBoolean(columnIndex, x);
  1324.         } catch (final SQLException e) {
  1325.             handleException(e);
  1326.         }
  1327.     }

  1328.     @Override
  1329.     public void updateBoolean(final String columnName, final boolean x) throws SQLException {
  1330.         try {
  1331.             resultSet.updateBoolean(columnName, x);
  1332.         } catch (final SQLException e) {
  1333.             handleException(e);
  1334.         }
  1335.     }

  1336.     @Override
  1337.     public void updateByte(final int columnIndex, final byte x) throws SQLException {
  1338.         try {
  1339.             resultSet.updateByte(columnIndex, x);
  1340.         } catch (final SQLException e) {
  1341.             handleException(e);
  1342.         }
  1343.     }

  1344.     @Override
  1345.     public void updateByte(final String columnName, final byte x) throws SQLException {
  1346.         try {
  1347.             resultSet.updateByte(columnName, x);
  1348.         } catch (final SQLException e) {
  1349.             handleException(e);
  1350.         }
  1351.     }

  1352.     @Override
  1353.     public void updateBytes(final int columnIndex, final byte[] x) throws SQLException {
  1354.         try {
  1355.             resultSet.updateBytes(columnIndex, x);
  1356.         } catch (final SQLException e) {
  1357.             handleException(e);
  1358.         }
  1359.     }

  1360.     @Override
  1361.     public void updateBytes(final String columnName, final byte[] x) throws SQLException {
  1362.         try {
  1363.             resultSet.updateBytes(columnName, x);
  1364.         } catch (final SQLException e) {
  1365.             handleException(e);
  1366.         }
  1367.     }

  1368.     @Override
  1369.     public void updateCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
  1370.         try {
  1371.             resultSet.updateCharacterStream(columnIndex, reader);
  1372.         } catch (final SQLException e) {
  1373.             handleException(e);
  1374.         }
  1375.     }

  1376.     @Override
  1377.     public void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException {
  1378.         try {
  1379.             resultSet.updateCharacterStream(columnIndex, x, length);
  1380.         } catch (final SQLException e) {
  1381.             handleException(e);
  1382.         }
  1383.     }

  1384.     @Override
  1385.     public void updateCharacterStream(final int columnIndex, final Reader reader, final long length)
  1386.             throws SQLException {
  1387.         try {
  1388.             resultSet.updateCharacterStream(columnIndex, reader, length);
  1389.         } catch (final SQLException e) {
  1390.             handleException(e);
  1391.         }
  1392.     }

  1393.     @Override
  1394.     public void updateCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
  1395.         try {
  1396.             resultSet.updateCharacterStream(columnLabel, reader);
  1397.         } catch (final SQLException e) {
  1398.             handleException(e);
  1399.         }
  1400.     }

  1401.     @Override
  1402.     public void updateCharacterStream(final String columnName, final Reader reader, final int length)
  1403.             throws SQLException {
  1404.         try {
  1405.             resultSet.updateCharacterStream(columnName, reader, length);
  1406.         } catch (final SQLException e) {
  1407.             handleException(e);
  1408.         }
  1409.     }

  1410.     @Override
  1411.     public void updateCharacterStream(final String columnLabel, final Reader reader, final long length)
  1412.             throws SQLException {
  1413.         try {
  1414.             resultSet.updateCharacterStream(columnLabel, reader, length);
  1415.         } catch (final SQLException e) {
  1416.             handleException(e);
  1417.         }
  1418.     }

  1419.     @Override
  1420.     public void updateClob(final int columnIndex, final Clob x) throws SQLException {
  1421.         try {
  1422.             resultSet.updateClob(columnIndex, x);
  1423.         } catch (final SQLException e) {
  1424.             handleException(e);
  1425.         }
  1426.     }

  1427.     @Override
  1428.     public void updateClob(final int columnIndex, final Reader reader) throws SQLException {
  1429.         try {
  1430.             resultSet.updateClob(columnIndex, reader);
  1431.         } catch (final SQLException e) {
  1432.             handleException(e);
  1433.         }
  1434.     }

  1435.     @Override
  1436.     public void updateClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
  1437.         try {
  1438.             resultSet.updateClob(columnIndex, reader, length);
  1439.         } catch (final SQLException e) {
  1440.             handleException(e);
  1441.         }
  1442.     }

  1443.     @Override
  1444.     public void updateClob(final String columnName, final Clob x) throws SQLException {
  1445.         try {
  1446.             resultSet.updateClob(columnName, x);
  1447.         } catch (final SQLException e) {
  1448.             handleException(e);
  1449.         }
  1450.     }

  1451.     @Override
  1452.     public void updateClob(final String columnLabel, final Reader reader) throws SQLException {
  1453.         try {
  1454.             resultSet.updateClob(columnLabel, reader);
  1455.         } catch (final SQLException e) {
  1456.             handleException(e);
  1457.         }
  1458.     }

  1459.     @Override
  1460.     public void updateClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
  1461.         try {
  1462.             resultSet.updateClob(columnLabel, reader, length);
  1463.         } catch (final SQLException e) {
  1464.             handleException(e);
  1465.         }
  1466.     }

  1467.     @Override
  1468.     public void updateDate(final int columnIndex, final Date x) throws SQLException {
  1469.         try {
  1470.             resultSet.updateDate(columnIndex, x);
  1471.         } catch (final SQLException e) {
  1472.             handleException(e);
  1473.         }
  1474.     }

  1475.     @Override
  1476.     public void updateDate(final String columnName, final Date x) throws SQLException {
  1477.         try {
  1478.             resultSet.updateDate(columnName, x);
  1479.         } catch (final SQLException e) {
  1480.             handleException(e);
  1481.         }
  1482.     }

  1483.     @Override
  1484.     public void updateDouble(final int columnIndex, final double x) throws SQLException {
  1485.         try {
  1486.             resultSet.updateDouble(columnIndex, x);
  1487.         } catch (final SQLException e) {
  1488.             handleException(e);
  1489.         }
  1490.     }

  1491.     @Override
  1492.     public void updateDouble(final String columnName, final double x) throws SQLException {
  1493.         try {
  1494.             resultSet.updateDouble(columnName, x);
  1495.         } catch (final SQLException e) {
  1496.             handleException(e);
  1497.         }
  1498.     }

  1499.     @Override
  1500.     public void updateFloat(final int columnIndex, final float x) throws SQLException {
  1501.         try {
  1502.             resultSet.updateFloat(columnIndex, x);
  1503.         } catch (final SQLException e) {
  1504.             handleException(e);
  1505.         }
  1506.     }

  1507.     @Override
  1508.     public void updateFloat(final String columnName, final float x) throws SQLException {
  1509.         try {
  1510.             resultSet.updateFloat(columnName, x);
  1511.         } catch (final SQLException e) {
  1512.             handleException(e);
  1513.         }
  1514.     }

  1515.     @Override
  1516.     public void updateInt(final int columnIndex, final int x) throws SQLException {
  1517.         try {
  1518.             resultSet.updateInt(columnIndex, x);
  1519.         } catch (final SQLException e) {
  1520.             handleException(e);
  1521.         }
  1522.     }

  1523.     @Override
  1524.     public void updateInt(final String columnName, final int x) throws SQLException {
  1525.         try {
  1526.             resultSet.updateInt(columnName, x);
  1527.         } catch (final SQLException e) {
  1528.             handleException(e);
  1529.         }
  1530.     }

  1531.     @Override
  1532.     public void updateLong(final int columnIndex, final long x) throws SQLException {
  1533.         try {
  1534.             resultSet.updateLong(columnIndex, x);
  1535.         } catch (final SQLException e) {
  1536.             handleException(e);
  1537.         }
  1538.     }

  1539.     @Override
  1540.     public void updateLong(final String columnName, final long x) throws SQLException {
  1541.         try {
  1542.             resultSet.updateLong(columnName, x);
  1543.         } catch (final SQLException e) {
  1544.             handleException(e);
  1545.         }
  1546.     }

  1547.     @Override
  1548.     public void updateNCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
  1549.         try {
  1550.             resultSet.updateNCharacterStream(columnIndex, reader);
  1551.         } catch (final SQLException e) {
  1552.             handleException(e);
  1553.         }
  1554.     }

  1555.     @Override
  1556.     public void updateNCharacterStream(final int columnIndex, final Reader reader, final long length)
  1557.             throws SQLException {
  1558.         try {
  1559.             resultSet.updateNCharacterStream(columnIndex, reader, length);
  1560.         } catch (final SQLException e) {
  1561.             handleException(e);
  1562.         }
  1563.     }

  1564.     @Override
  1565.     public void updateNCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
  1566.         try {
  1567.             resultSet.updateNCharacterStream(columnLabel, reader);
  1568.         } catch (final SQLException e) {
  1569.             handleException(e);
  1570.         }
  1571.     }

  1572.     @Override
  1573.     public void updateNCharacterStream(final String columnLabel, final Reader reader, final long length)
  1574.             throws SQLException {
  1575.         try {
  1576.             resultSet.updateNCharacterStream(columnLabel, reader, length);
  1577.         } catch (final SQLException e) {
  1578.             handleException(e);
  1579.         }
  1580.     }

  1581.     @Override
  1582.     public void updateNClob(final int columnIndex, final NClob value) throws SQLException {
  1583.         try {
  1584.             resultSet.updateNClob(columnIndex, value);
  1585.         } catch (final SQLException e) {
  1586.             handleException(e);
  1587.         }
  1588.     }

  1589.     @Override
  1590.     public void updateNClob(final int columnIndex, final Reader reader) throws SQLException {
  1591.         try {
  1592.             resultSet.updateNClob(columnIndex, reader);
  1593.         } catch (final SQLException e) {
  1594.             handleException(e);
  1595.         }
  1596.     }

  1597.     @Override
  1598.     public void updateNClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
  1599.         try {
  1600.             resultSet.updateNClob(columnIndex, reader, length);
  1601.         } catch (final SQLException e) {
  1602.             handleException(e);
  1603.         }
  1604.     }

  1605.     @Override
  1606.     public void updateNClob(final String columnLabel, final NClob value) throws SQLException {
  1607.         try {
  1608.             resultSet.updateNClob(columnLabel, value);
  1609.         } catch (final SQLException e) {
  1610.             handleException(e);
  1611.         }
  1612.     }

  1613.     @Override
  1614.     public void updateNClob(final String columnLabel, final Reader reader) throws SQLException {
  1615.         try {
  1616.             resultSet.updateNClob(columnLabel, reader);
  1617.         } catch (final SQLException e) {
  1618.             handleException(e);
  1619.         }
  1620.     }

  1621.     @Override
  1622.     public void updateNClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
  1623.         try {
  1624.             resultSet.updateNClob(columnLabel, reader, length);
  1625.         } catch (final SQLException e) {
  1626.             handleException(e);
  1627.         }
  1628.     }

  1629.     @Override
  1630.     public void updateNString(final int columnIndex, final String value) throws SQLException {
  1631.         try {
  1632.             resultSet.updateNString(columnIndex, value);
  1633.         } catch (final SQLException e) {
  1634.             handleException(e);
  1635.         }
  1636.     }

  1637.     @Override
  1638.     public void updateNString(final String columnLabel, final String value) throws SQLException {
  1639.         try {
  1640.             resultSet.updateNString(columnLabel, value);
  1641.         } catch (final SQLException e) {
  1642.             handleException(e);
  1643.         }
  1644.     }

  1645.     @Override
  1646.     public void updateNull(final int columnIndex) throws SQLException {
  1647.         try {
  1648.             resultSet.updateNull(columnIndex);
  1649.         } catch (final SQLException e) {
  1650.             handleException(e);
  1651.         }
  1652.     }

  1653.     @Override
  1654.     public void updateNull(final String columnName) throws SQLException {
  1655.         try {
  1656.             resultSet.updateNull(columnName);
  1657.         } catch (final SQLException e) {
  1658.             handleException(e);
  1659.         }
  1660.     }

  1661.     @Override
  1662.     public void updateObject(final int columnIndex, final Object x) throws SQLException {
  1663.         try {
  1664.             resultSet.updateObject(columnIndex, x);
  1665.         } catch (final SQLException e) {
  1666.             handleException(e);
  1667.         }
  1668.     }

  1669.     @Override
  1670.     public void updateObject(final int columnIndex, final Object x, final int scale) throws SQLException {
  1671.         try {
  1672.             resultSet.updateObject(columnIndex, x);
  1673.         } catch (final SQLException e) {
  1674.             handleException(e);
  1675.         }
  1676.     }

  1677.     /**
  1678.      * @since 2.5.0
  1679.      */
  1680.     @Override
  1681.     public void updateObject(final int columnIndex, final Object x, final SQLType targetSqlType) throws SQLException {
  1682.         try {
  1683.             resultSet.updateObject(columnIndex, x, targetSqlType);
  1684.         } catch (final SQLException e) {
  1685.             handleException(e);
  1686.         }
  1687.     }

  1688.     /**
  1689.      * @since 2.5.0
  1690.      */
  1691.     @Override
  1692.     public void updateObject(final int columnIndex, final Object x, final SQLType targetSqlType, final int scaleOrLength) throws SQLException {
  1693.         try {
  1694.             resultSet.updateObject(columnIndex, x, targetSqlType, scaleOrLength);
  1695.         } catch (final SQLException e) {
  1696.             handleException(e);
  1697.         }
  1698.     }

  1699.     @Override
  1700.     public void updateObject(final String columnName, final Object x) throws SQLException {
  1701.         try {
  1702.             resultSet.updateObject(columnName, x);
  1703.         } catch (final SQLException e) {
  1704.             handleException(e);
  1705.         }
  1706.     }

  1707.     @Override
  1708.     public void updateObject(final String columnName, final Object x, final int scale) throws SQLException {
  1709.         try {
  1710.             resultSet.updateObject(columnName, x);
  1711.         } catch (final SQLException e) {
  1712.             handleException(e);
  1713.         }
  1714.     }

  1715.     /**
  1716.      * @since 2.5.0
  1717.      */
  1718.     @Override
  1719.     public void updateObject(final String columnLabel, final Object x, final SQLType targetSqlType) throws SQLException {
  1720.         try {
  1721.             resultSet.updateObject(columnLabel, x, targetSqlType);
  1722.         } catch (final SQLException e) {
  1723.             handleException(e);
  1724.         }
  1725.     }

  1726.     /**
  1727.      * @since 2.5.0
  1728.      */
  1729.     @Override
  1730.     public void updateObject(final String columnLabel, final Object x, final SQLType targetSqlType, final int scaleOrLength)
  1731.             throws SQLException {
  1732.         try {
  1733.             resultSet.updateObject(columnLabel, x, targetSqlType, scaleOrLength);
  1734.         } catch (final SQLException e) {
  1735.             handleException(e);
  1736.         }
  1737.     }

  1738.     @Override
  1739.     public void updateRef(final int columnIndex, final Ref x) throws SQLException {
  1740.         try {
  1741.             resultSet.updateRef(columnIndex, x);
  1742.         } catch (final SQLException e) {
  1743.             handleException(e);
  1744.         }
  1745.     }

  1746.     @Override
  1747.     public void updateRef(final String columnName, final Ref x) throws SQLException {
  1748.         try {
  1749.             resultSet.updateRef(columnName, x);
  1750.         } catch (final SQLException e) {
  1751.             handleException(e);
  1752.         }
  1753.     }

  1754.     @Override
  1755.     public void updateRow() throws SQLException {
  1756.         try {
  1757.             resultSet.updateRow();
  1758.         } catch (final SQLException e) {
  1759.             handleException(e);
  1760.         }
  1761.     }

  1762.     @Override
  1763.     public void updateRowId(final int columnIndex, final RowId value) throws SQLException {
  1764.         try {
  1765.             resultSet.updateRowId(columnIndex, value);
  1766.         } catch (final SQLException e) {
  1767.             handleException(e);
  1768.         }
  1769.     }

  1770.     @Override
  1771.     public void updateRowId(final String columnLabel, final RowId value) throws SQLException {
  1772.         try {
  1773.             resultSet.updateRowId(columnLabel, value);
  1774.         } catch (final SQLException e) {
  1775.             handleException(e);
  1776.         }
  1777.     }

  1778.     @Override
  1779.     public void updateShort(final int columnIndex, final short x) throws SQLException {
  1780.         try {
  1781.             resultSet.updateShort(columnIndex, x);
  1782.         } catch (final SQLException e) {
  1783.             handleException(e);
  1784.         }
  1785.     }

  1786.     @Override
  1787.     public void updateShort(final String columnName, final short x) throws SQLException {
  1788.         try {
  1789.             resultSet.updateShort(columnName, x);
  1790.         } catch (final SQLException e) {
  1791.             handleException(e);
  1792.         }
  1793.     }

  1794.     @Override
  1795.     public void updateSQLXML(final int columnIndex, final SQLXML value) throws SQLException {
  1796.         try {
  1797.             resultSet.updateSQLXML(columnIndex, value);
  1798.         } catch (final SQLException e) {
  1799.             handleException(e);
  1800.         }
  1801.     }

  1802.     @Override
  1803.     public void updateSQLXML(final String columnLabel, final SQLXML value) throws SQLException {
  1804.         try {
  1805.             resultSet.updateSQLXML(columnLabel, value);
  1806.         } catch (final SQLException e) {
  1807.             handleException(e);
  1808.         }
  1809.     }

  1810.     @Override
  1811.     public void updateString(final int columnIndex, final String x) throws SQLException {
  1812.         try {
  1813.             resultSet.updateString(columnIndex, x);
  1814.         } catch (final SQLException e) {
  1815.             handleException(e);
  1816.         }
  1817.     }

  1818.     @Override
  1819.     public void updateString(final String columnName, final String x) throws SQLException {
  1820.         try {
  1821.             resultSet.updateString(columnName, x);
  1822.         } catch (final SQLException e) {
  1823.             handleException(e);
  1824.         }
  1825.     }

  1826.     @Override
  1827.     public void updateTime(final int columnIndex, final Time x) throws SQLException {
  1828.         try {
  1829.             resultSet.updateTime(columnIndex, x);
  1830.         } catch (final SQLException e) {
  1831.             handleException(e);
  1832.         }
  1833.     }

  1834.     @Override
  1835.     public void updateTime(final String columnName, final Time x) throws SQLException {
  1836.         try {
  1837.             resultSet.updateTime(columnName, x);
  1838.         } catch (final SQLException e) {
  1839.             handleException(e);
  1840.         }
  1841.     }

  1842.     @Override
  1843.     public void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException {
  1844.         try {
  1845.             resultSet.updateTimestamp(columnIndex, x);
  1846.         } catch (final SQLException e) {
  1847.             handleException(e);
  1848.         }
  1849.     }

  1850.     @Override
  1851.     public void updateTimestamp(final String columnName, final Timestamp x) throws SQLException {
  1852.         try {
  1853.             resultSet.updateTimestamp(columnName, x);
  1854.         } catch (final SQLException e) {
  1855.             handleException(e);
  1856.         }
  1857.     }

  1858.     @Override
  1859.     public boolean wasNull() throws SQLException {
  1860.         try {
  1861.             return resultSet.wasNull();
  1862.         } catch (final SQLException e) {
  1863.             handleException(e);
  1864.             return false;
  1865.         }
  1866.     }
  1867. }