You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2018/06/17 16:08:23 UTC
[1/2] commons-dbcp git commit: Sort members in AB order so it's
easier to find stuff.
Repository: commons-dbcp
Updated Branches:
refs/heads/master c5dc98d98 -> b7df9811b
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/b7df9811/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
index ce44833..cbfa857 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
@@ -54,33 +54,47 @@ import java.util.Map;
*/
public final class DelegatingResultSet extends AbandonedTrace implements ResultSet {
- /** My delegate. **/
- private final ResultSet resultSet;
-
- /** The Statement that created me, if any. **/
- private Statement statement;
-
- /** The Connection that created me, if any. **/
- private Connection connection;
+ /**
+ * Wraps the given result set in a delegate.
+ *
+ * @param connection
+ * The Connection which created the ResultSet.
+ * @param resultSet
+ * The ResultSet to wrap.
+ * @return a new delegate.
+ */
+ public static ResultSet wrapResultSet(final Connection connection, final ResultSet resultSet) {
+ if (null == resultSet) {
+ return null;
+ }
+ return new DelegatingResultSet(connection, resultSet);
+ }
/**
- * Creates a wrapper for the ResultSet which traces this ResultSet to the Statement which created it and the code
- * which created it.
- * <p>
- * Private to ensure all construction is {@link #wrapResultSet(Statement, ResultSet)}
- * </p>
+ * Wraps the given result set in a delegate.
*
* @param statement
* The Statement which created the ResultSet.
* @param resultSet
* The ResultSet to wrap.
+ * @return a new delegate.
*/
- private DelegatingResultSet(final Statement statement, final ResultSet resultSet) {
- super((AbandonedTrace) statement);
- this.statement = statement;
- this.resultSet = resultSet;
+ public static ResultSet wrapResultSet(final Statement statement, final ResultSet resultSet) {
+ if (null == resultSet) {
+ return null;
+ }
+ return new DelegatingResultSet(statement, resultSet);
}
+ /** My delegate. **/
+ private final ResultSet resultSet;
+
+ /** The Statement that created me, if any. **/
+ private Statement statement;
+
+ /** The Connection that created me, if any. **/
+ private Connection connection;
+
/**
* Creates a wrapper for the ResultSet which traces this ResultSet to the Connection which created it (via, for
* example DatabaseMetadata, and the code which created it.
@@ -100,111 +114,27 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
/**
- * Wraps the given result set in a delegate.
+ * Creates a wrapper for the ResultSet which traces this ResultSet to the Statement which created it and the code
+ * which created it.
+ * <p>
+ * Private to ensure all construction is {@link #wrapResultSet(Statement, ResultSet)}
+ * </p>
*
* @param statement
* The Statement which created the ResultSet.
* @param resultSet
* The ResultSet to wrap.
- * @return a new delegate.
- */
- public static ResultSet wrapResultSet(final Statement statement, final ResultSet resultSet) {
- if (null == resultSet) {
- return null;
- }
- return new DelegatingResultSet(statement, resultSet);
- }
-
- /**
- * Wraps the given result set in a delegate.
- *
- * @param connection
- * The Connection which created the ResultSet.
- * @param resultSet
- * The ResultSet to wrap.
- * @return a new delegate.
- */
- public static ResultSet wrapResultSet(final Connection connection, final ResultSet resultSet) {
- if (null == resultSet) {
- return null;
- }
- return new DelegatingResultSet(connection, resultSet);
- }
-
- /**
- * Gets my delegate.
- *
- * @return my delegate.
- */
- public ResultSet getDelegate() {
- return resultSet;
- }
-
- /**
- * If my underlying {@link ResultSet} is not a {@code DelegatingResultSet}, returns it, otherwise recursively
- * invokes this method on my delegate.
- * <p>
- * Hence this method will return the first delegate that is not a {@code DelegatingResultSet}, or {@code null} when
- * no non-{@code DelegatingResultSet} delegate can be found by traversing this chain.
- * </p>
- * <p>
- * This method is useful when you may have nested {@code DelegatingResultSet}s, and you want to make sure to obtain
- * a "genuine" {@link ResultSet}.
- * </p>
- *
- * @return the innermost delegate.
- */
- public ResultSet getInnermostDelegate() {
- ResultSet r = resultSet;
- while (r != null && r instanceof DelegatingResultSet) {
- r = ((DelegatingResultSet) r).getDelegate();
- if (this == r) {
- return null;
- }
- }
- return r;
- }
-
- @Override
- public Statement getStatement() throws SQLException {
- return statement;
- }
-
- /**
- * Wrapper for close of ResultSet which removes this result set from being traced then calls close on the original
- * ResultSet.
*/
- @Override
- public void close() throws SQLException {
- try {
- if (statement != null) {
- ((AbandonedTrace) statement).removeTrace(this);
- statement = null;
- }
- if (connection != null) {
- ((AbandonedTrace) connection).removeTrace(this);
- connection = null;
- }
- resultSet.close();
- } catch (final SQLException e) {
- handleException(e);
- }
- }
-
- protected void handleException(final SQLException e) throws SQLException {
- if (statement != null && statement instanceof DelegatingStatement) {
- ((DelegatingStatement) statement).handleException(e);
- } else if (connection != null && connection instanceof DelegatingConnection) {
- ((DelegatingConnection<?>) connection).handleException(e);
- } else {
- throw e;
- }
+ private DelegatingResultSet(final Statement statement, final ResultSet resultSet) {
+ super((AbandonedTrace) statement);
+ this.statement = statement;
+ this.resultSet = resultSet;
}
@Override
- public boolean next() throws SQLException {
+ public boolean absolute(final int row) throws SQLException {
try {
- return resultSet.next();
+ return resultSet.absolute(row);
} catch (final SQLException e) {
handleException(e);
return false;
@@ -212,69 +142,75 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public boolean wasNull() throws SQLException {
+ public void afterLast() throws SQLException {
try {
- return resultSet.wasNull();
+ resultSet.afterLast();
} catch (final SQLException e) {
handleException(e);
- return false;
}
}
@Override
- public String getString(final int columnIndex) throws SQLException {
+ public void beforeFirst() throws SQLException {
try {
- return resultSet.getString(columnIndex);
+ resultSet.beforeFirst();
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public boolean getBoolean(final int columnIndex) throws SQLException {
+ public void cancelRowUpdates() throws SQLException {
try {
- return resultSet.getBoolean(columnIndex);
+ resultSet.cancelRowUpdates();
} catch (final SQLException e) {
handleException(e);
- return false;
}
}
@Override
- public byte getByte(final int columnIndex) throws SQLException {
+ public void clearWarnings() throws SQLException {
try {
- return resultSet.getByte(columnIndex);
+ resultSet.clearWarnings();
} catch (final SQLException e) {
handleException(e);
- return 0;
}
}
+ /**
+ * Wrapper for close of ResultSet which removes this result set from being traced then calls close on the original
+ * ResultSet.
+ */
@Override
- public short getShort(final int columnIndex) throws SQLException {
+ public void close() throws SQLException {
try {
- return resultSet.getShort(columnIndex);
+ if (statement != null) {
+ ((AbandonedTrace) statement).removeTrace(this);
+ statement = null;
+ }
+ if (connection != null) {
+ ((AbandonedTrace) connection).removeTrace(this);
+ connection = null;
+ }
+ resultSet.close();
} catch (final SQLException e) {
handleException(e);
- return 0;
}
}
@Override
- public int getInt(final int columnIndex) throws SQLException {
+ public void deleteRow() throws SQLException {
try {
- return resultSet.getInt(columnIndex);
+ resultSet.deleteRow();
} catch (final SQLException e) {
handleException(e);
- return 0;
}
}
@Override
- public long getLong(final int columnIndex) throws SQLException {
+ public int findColumn(final String columnName) throws SQLException {
try {
- return resultSet.getLong(columnIndex);
+ return resultSet.findColumn(columnName);
} catch (final SQLException e) {
handleException(e);
return 0;
@@ -282,31 +218,29 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public float getFloat(final int columnIndex) throws SQLException {
+ public boolean first() throws SQLException {
try {
- return resultSet.getFloat(columnIndex);
+ return resultSet.first();
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return false;
}
}
@Override
- public double getDouble(final int columnIndex) throws SQLException {
+ public Array getArray(final int i) throws SQLException {
try {
- return resultSet.getDouble(columnIndex);
+ return resultSet.getArray(i);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return null;
}
}
- /** @deprecated Use {@link #getBigDecimal(int)} */
- @Deprecated
@Override
- public BigDecimal getBigDecimal(final int columnIndex, final int scale) throws SQLException {
+ public Array getArray(final String colName) throws SQLException {
try {
- return resultSet.getBigDecimal(columnIndex);
+ return resultSet.getArray(colName);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -314,9 +248,9 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public byte[] getBytes(final int columnIndex) throws SQLException {
+ public InputStream getAsciiStream(final int columnIndex) throws SQLException {
try {
- return resultSet.getBytes(columnIndex);
+ return resultSet.getAsciiStream(columnIndex);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -324,9 +258,9 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public Date getDate(final int columnIndex) throws SQLException {
+ public InputStream getAsciiStream(final String columnName) throws SQLException {
try {
- return resultSet.getDate(columnIndex);
+ return resultSet.getAsciiStream(columnName);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -334,19 +268,21 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public Time getTime(final int columnIndex) throws SQLException {
+ public BigDecimal getBigDecimal(final int columnIndex) throws SQLException {
try {
- return resultSet.getTime(columnIndex);
+ return resultSet.getBigDecimal(columnIndex);
} catch (final SQLException e) {
handleException(e);
return null;
}
}
+ /** @deprecated Use {@link #getBigDecimal(int)} */
+ @Deprecated
@Override
- public Timestamp getTimestamp(final int columnIndex) throws SQLException {
+ public BigDecimal getBigDecimal(final int columnIndex, final int scale) throws SQLException {
try {
- return resultSet.getTimestamp(columnIndex);
+ return resultSet.getBigDecimal(columnIndex);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -354,21 +290,21 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public InputStream getAsciiStream(final int columnIndex) throws SQLException {
+ public BigDecimal getBigDecimal(final String columnName) throws SQLException {
try {
- return resultSet.getAsciiStream(columnIndex);
+ return resultSet.getBigDecimal(columnName);
} catch (final SQLException e) {
handleException(e);
return null;
}
}
- /** @deprecated Use {@link #getCharacterStream(int)} */
+ /** @deprecated Use {@link #getBigDecimal(String)} */
@Deprecated
@Override
- public InputStream getUnicodeStream(final int columnIndex) throws SQLException {
+ public BigDecimal getBigDecimal(final String columnName, final int scale) throws SQLException {
try {
- return resultSet.getUnicodeStream(columnIndex);
+ return resultSet.getBigDecimal(columnName);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -386,9 +322,9 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public String getString(final String columnName) throws SQLException {
+ public InputStream getBinaryStream(final String columnName) throws SQLException {
try {
- return resultSet.getString(columnName);
+ return resultSet.getBinaryStream(columnName);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -396,59 +332,49 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public boolean getBoolean(final String columnName) throws SQLException {
- try {
- return resultSet.getBoolean(columnName);
- } catch (final SQLException e) {
- handleException(e);
- return false;
- }
- }
-
- @Override
- public byte getByte(final String columnName) throws SQLException {
+ public Blob getBlob(final int i) throws SQLException {
try {
- return resultSet.getByte(columnName);
+ return resultSet.getBlob(i);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return null;
}
}
@Override
- public short getShort(final String columnName) throws SQLException {
+ public Blob getBlob(final String colName) throws SQLException {
try {
- return resultSet.getShort(columnName);
+ return resultSet.getBlob(colName);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return null;
}
}
@Override
- public int getInt(final String columnName) throws SQLException {
+ public boolean getBoolean(final int columnIndex) throws SQLException {
try {
- return resultSet.getInt(columnName);
+ return resultSet.getBoolean(columnIndex);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return false;
}
}
@Override
- public long getLong(final String columnName) throws SQLException {
+ public boolean getBoolean(final String columnName) throws SQLException {
try {
- return resultSet.getLong(columnName);
+ return resultSet.getBoolean(columnName);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return false;
}
}
@Override
- public float getFloat(final String columnName) throws SQLException {
+ public byte getByte(final int columnIndex) throws SQLException {
try {
- return resultSet.getFloat(columnName);
+ return resultSet.getByte(columnIndex);
} catch (final SQLException e) {
handleException(e);
return 0;
@@ -456,21 +382,19 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public double getDouble(final String columnName) throws SQLException {
+ public byte getByte(final String columnName) throws SQLException {
try {
- return resultSet.getDouble(columnName);
+ return resultSet.getByte(columnName);
} catch (final SQLException e) {
handleException(e);
return 0;
}
}
- /** @deprecated Use {@link #getBigDecimal(String)} */
- @Deprecated
@Override
- public BigDecimal getBigDecimal(final String columnName, final int scale) throws SQLException {
+ public byte[] getBytes(final int columnIndex) throws SQLException {
try {
- return resultSet.getBigDecimal(columnName);
+ return resultSet.getBytes(columnIndex);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -488,9 +412,9 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public Date getDate(final String columnName) throws SQLException {
+ public Reader getCharacterStream(final int columnIndex) throws SQLException {
try {
- return resultSet.getDate(columnName);
+ return resultSet.getCharacterStream(columnIndex);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -498,9 +422,9 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public Time getTime(final String columnName) throws SQLException {
+ public Reader getCharacterStream(final String columnName) throws SQLException {
try {
- return resultSet.getTime(columnName);
+ return resultSet.getCharacterStream(columnName);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -508,9 +432,9 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public Timestamp getTimestamp(final String columnName) throws SQLException {
+ public Clob getClob(final int i) throws SQLException {
try {
- return resultSet.getTimestamp(columnName);
+ return resultSet.getClob(i);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -518,31 +442,29 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public InputStream getAsciiStream(final String columnName) throws SQLException {
+ public Clob getClob(final String colName) throws SQLException {
try {
- return resultSet.getAsciiStream(columnName);
+ return resultSet.getClob(colName);
} catch (final SQLException e) {
handleException(e);
return null;
}
}
- /** @deprecated Use {@link #getCharacterStream(String)} */
- @Deprecated
@Override
- public InputStream getUnicodeStream(final String columnName) throws SQLException {
+ public int getConcurrency() throws SQLException {
try {
- return resultSet.getUnicodeStream(columnName);
+ return resultSet.getConcurrency();
} catch (final SQLException e) {
handleException(e);
- return null;
+ return 0;
}
}
@Override
- public InputStream getBinaryStream(final String columnName) throws SQLException {
+ public String getCursorName() throws SQLException {
try {
- return resultSet.getBinaryStream(columnName);
+ return resultSet.getCursorName();
} catch (final SQLException e) {
handleException(e);
return null;
@@ -550,9 +472,9 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public SQLWarning getWarnings() throws SQLException {
+ public Date getDate(final int columnIndex) throws SQLException {
try {
- return resultSet.getWarnings();
+ return resultSet.getDate(columnIndex);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -560,18 +482,19 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public void clearWarnings() throws SQLException {
+ public Date getDate(final int columnIndex, final Calendar cal) throws SQLException {
try {
- resultSet.clearWarnings();
+ return resultSet.getDate(columnIndex, cal);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public String getCursorName() throws SQLException {
+ public Date getDate(final String columnName) throws SQLException {
try {
- return resultSet.getCursorName();
+ return resultSet.getDate(columnName);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -579,39 +502,48 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public ResultSetMetaData getMetaData() throws SQLException {
+ public Date getDate(final String columnName, final Calendar cal) throws SQLException {
try {
- return resultSet.getMetaData();
+ return resultSet.getDate(columnName, cal);
} catch (final SQLException e) {
handleException(e);
return null;
}
}
+ /**
+ * Gets my delegate.
+ *
+ * @return my delegate.
+ */
+ public ResultSet getDelegate() {
+ return resultSet;
+ }
+
@Override
- public Object getObject(final int columnIndex) throws SQLException {
+ public double getDouble(final int columnIndex) throws SQLException {
try {
- return resultSet.getObject(columnIndex);
+ return resultSet.getDouble(columnIndex);
} catch (final SQLException e) {
handleException(e);
- return null;
+ return 0;
}
}
@Override
- public Object getObject(final String columnName) throws SQLException {
+ public double getDouble(final String columnName) throws SQLException {
try {
- return resultSet.getObject(columnName);
+ return resultSet.getDouble(columnName);
} catch (final SQLException e) {
handleException(e);
- return null;
+ return 0;
}
}
@Override
- public int findColumn(final String columnName) throws SQLException {
+ public int getFetchDirection() throws SQLException {
try {
- return resultSet.findColumn(columnName);
+ return resultSet.getFetchDirection();
} catch (final SQLException e) {
handleException(e);
return 0;
@@ -619,1120 +551,1175 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public Reader getCharacterStream(final int columnIndex) throws SQLException {
+ public int getFetchSize() throws SQLException {
try {
- return resultSet.getCharacterStream(columnIndex);
+ return resultSet.getFetchSize();
} catch (final SQLException e) {
handleException(e);
- return null;
+ return 0;
}
}
@Override
- public Reader getCharacterStream(final String columnName) throws SQLException {
+ public float getFloat(final int columnIndex) throws SQLException {
try {
- return resultSet.getCharacterStream(columnName);
+ return resultSet.getFloat(columnIndex);
} catch (final SQLException e) {
handleException(e);
- return null;
+ return 0;
}
}
@Override
- public BigDecimal getBigDecimal(final int columnIndex) throws SQLException {
+ public float getFloat(final String columnName) throws SQLException {
try {
- return resultSet.getBigDecimal(columnIndex);
+ return resultSet.getFloat(columnName);
} catch (final SQLException e) {
handleException(e);
- return null;
+ return 0;
}
}
@Override
- public BigDecimal getBigDecimal(final String columnName) throws SQLException {
+ public int getHoldability() throws SQLException {
try {
- return resultSet.getBigDecimal(columnName);
+ return resultSet.getHoldability();
} catch (final SQLException e) {
handleException(e);
- return null;
+ return 0;
+ }
+ }
+
+ /**
+ * If my underlying {@link ResultSet} is not a {@code DelegatingResultSet}, returns it, otherwise recursively
+ * invokes this method on my delegate.
+ * <p>
+ * Hence this method will return the first delegate that is not a {@code DelegatingResultSet}, or {@code null} when
+ * no non-{@code DelegatingResultSet} delegate can be found by traversing this chain.
+ * </p>
+ * <p>
+ * This method is useful when you may have nested {@code DelegatingResultSet}s, and you want to make sure to obtain
+ * a "genuine" {@link ResultSet}.
+ * </p>
+ *
+ * @return the innermost delegate.
+ */
+ public ResultSet getInnermostDelegate() {
+ ResultSet r = resultSet;
+ while (r != null && r instanceof DelegatingResultSet) {
+ r = ((DelegatingResultSet) r).getDelegate();
+ if (this == r) {
+ return null;
+ }
}
+ return r;
}
@Override
- public boolean isBeforeFirst() throws SQLException {
+ public int getInt(final int columnIndex) throws SQLException {
try {
- return resultSet.isBeforeFirst();
+ return resultSet.getInt(columnIndex);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return 0;
}
}
@Override
- public boolean isAfterLast() throws SQLException {
+ public int getInt(final String columnName) throws SQLException {
try {
- return resultSet.isAfterLast();
+ return resultSet.getInt(columnName);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return 0;
}
}
@Override
- public boolean isFirst() throws SQLException {
+ public long getLong(final int columnIndex) throws SQLException {
try {
- return resultSet.isFirst();
+ return resultSet.getLong(columnIndex);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return 0;
}
}
@Override
- public boolean isLast() throws SQLException {
+ public long getLong(final String columnName) throws SQLException {
try {
- return resultSet.isLast();
+ return resultSet.getLong(columnName);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return 0;
}
}
@Override
- public void beforeFirst() throws SQLException {
+ public ResultSetMetaData getMetaData() throws SQLException {
try {
- resultSet.beforeFirst();
+ return resultSet.getMetaData();
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void afterLast() throws SQLException {
+ public Reader getNCharacterStream(final int columnIndex) throws SQLException {
try {
- resultSet.afterLast();
+ return resultSet.getNCharacterStream(columnIndex);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public boolean first() throws SQLException {
+ public Reader getNCharacterStream(final String columnLabel) throws SQLException {
try {
- return resultSet.first();
+ return resultSet.getNCharacterStream(columnLabel);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return null;
}
}
@Override
- public boolean last() throws SQLException {
+ public NClob getNClob(final int columnIndex) throws SQLException {
try {
- return resultSet.last();
+ return resultSet.getNClob(columnIndex);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return null;
}
}
@Override
- public int getRow() throws SQLException {
+ public NClob getNClob(final String columnLabel) throws SQLException {
try {
- return resultSet.getRow();
+ return resultSet.getNClob(columnLabel);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return null;
}
}
@Override
- public boolean absolute(final int row) throws SQLException {
+ public String getNString(final int columnIndex) throws SQLException {
try {
- return resultSet.absolute(row);
+ return resultSet.getNString(columnIndex);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return null;
}
}
@Override
- public boolean relative(final int rows) throws SQLException {
+ public String getNString(final String columnLabel) throws SQLException {
try {
- return resultSet.relative(rows);
+ return resultSet.getNString(columnLabel);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return null;
}
}
@Override
- public boolean previous() throws SQLException {
+ public Object getObject(final int columnIndex) throws SQLException {
try {
- return resultSet.previous();
+ return resultSet.getObject(columnIndex);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return null;
}
}
@Override
- public void setFetchDirection(final int direction) throws SQLException {
+ public <T> T getObject(final int columnIndex, final Class<T> type) throws SQLException {
try {
- resultSet.setFetchDirection(direction);
+ return resultSet.getObject(columnIndex, type);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public int getFetchDirection() throws SQLException {
+ public Object getObject(final int i, final Map<String, Class<?>> map) throws SQLException {
try {
- return resultSet.getFetchDirection();
+ return resultSet.getObject(i, map);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return null;
}
}
@Override
- public void setFetchSize(final int rows) throws SQLException {
+ public Object getObject(final String columnName) throws SQLException {
try {
- resultSet.setFetchSize(rows);
+ return resultSet.getObject(columnName);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public int getFetchSize() throws SQLException {
+ public <T> T getObject(final String columnLabel, final Class<T> type) throws SQLException {
try {
- return resultSet.getFetchSize();
+ return resultSet.getObject(columnLabel, type);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return null;
}
}
@Override
- public int getType() throws SQLException {
+ public Object getObject(final String colName, final Map<String, Class<?>> map) throws SQLException {
try {
- return resultSet.getType();
+ return resultSet.getObject(colName, map);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return null;
}
}
@Override
- public int getConcurrency() throws SQLException {
+ public Ref getRef(final int i) throws SQLException {
try {
- return resultSet.getConcurrency();
+ return resultSet.getRef(i);
} catch (final SQLException e) {
handleException(e);
- return 0;
+ return null;
}
}
@Override
- public boolean rowUpdated() throws SQLException {
+ public Ref getRef(final String colName) throws SQLException {
try {
- return resultSet.rowUpdated();
+ return resultSet.getRef(colName);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return null;
}
}
@Override
- public boolean rowInserted() throws SQLException {
+ public int getRow() throws SQLException {
try {
- return resultSet.rowInserted();
+ return resultSet.getRow();
} catch (final SQLException e) {
handleException(e);
- return false;
+ return 0;
}
}
@Override
- public boolean rowDeleted() throws SQLException {
+ public RowId getRowId(final int columnIndex) throws SQLException {
try {
- return resultSet.rowDeleted();
+ return resultSet.getRowId(columnIndex);
} catch (final SQLException e) {
handleException(e);
- return false;
+ return null;
}
}
@Override
- public void updateNull(final int columnIndex) throws SQLException {
+ public RowId getRowId(final String columnLabel) throws SQLException {
try {
- resultSet.updateNull(columnIndex);
+ return resultSet.getRowId(columnLabel);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateBoolean(final int columnIndex, final boolean x) throws SQLException {
+ public short getShort(final int columnIndex) throws SQLException {
try {
- resultSet.updateBoolean(columnIndex, x);
+ return resultSet.getShort(columnIndex);
} catch (final SQLException e) {
handleException(e);
+ return 0;
}
}
@Override
- public void updateByte(final int columnIndex, final byte x) throws SQLException {
+ public short getShort(final String columnName) throws SQLException {
try {
- resultSet.updateByte(columnIndex, x);
+ return resultSet.getShort(columnName);
} catch (final SQLException e) {
handleException(e);
+ return 0;
}
}
@Override
- public void updateShort(final int columnIndex, final short x) throws SQLException {
+ public SQLXML getSQLXML(final int columnIndex) throws SQLException {
try {
- resultSet.updateShort(columnIndex, x);
+ return resultSet.getSQLXML(columnIndex);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateInt(final int columnIndex, final int x) throws SQLException {
+ public SQLXML getSQLXML(final String columnLabel) throws SQLException {
try {
- resultSet.updateInt(columnIndex, x);
+ return resultSet.getSQLXML(columnLabel);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateLong(final int columnIndex, final long x) throws SQLException {
+ public Statement getStatement() throws SQLException {
+ return statement;
+ }
+
+ @Override
+ public String getString(final int columnIndex) throws SQLException {
try {
- resultSet.updateLong(columnIndex, x);
+ return resultSet.getString(columnIndex);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateFloat(final int columnIndex, final float x) throws SQLException {
+ public String getString(final String columnName) throws SQLException {
try {
- resultSet.updateFloat(columnIndex, x);
+ return resultSet.getString(columnName);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateDouble(final int columnIndex, final double x) throws SQLException {
+ public Time getTime(final int columnIndex) throws SQLException {
try {
- resultSet.updateDouble(columnIndex, x);
+ return resultSet.getTime(columnIndex);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException {
+ public Time getTime(final int columnIndex, final Calendar cal) throws SQLException {
try {
- resultSet.updateBigDecimal(columnIndex, x);
+ return resultSet.getTime(columnIndex, cal);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateString(final int columnIndex, final String x) throws SQLException {
+ public Time getTime(final String columnName) throws SQLException {
try {
- resultSet.updateString(columnIndex, x);
+ return resultSet.getTime(columnName);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateBytes(final int columnIndex, final byte[] x) throws SQLException {
+ public Time getTime(final String columnName, final Calendar cal) throws SQLException {
try {
- resultSet.updateBytes(columnIndex, x);
+ return resultSet.getTime(columnName, cal);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateDate(final int columnIndex, final Date x) throws SQLException {
+ public Timestamp getTimestamp(final int columnIndex) throws SQLException {
try {
- resultSet.updateDate(columnIndex, x);
+ return resultSet.getTimestamp(columnIndex);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateTime(final int columnIndex, final Time x) throws SQLException {
+ public Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException {
try {
- resultSet.updateTime(columnIndex, x);
+ return resultSet.getTimestamp(columnIndex, cal);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException {
+ public Timestamp getTimestamp(final String columnName) throws SQLException {
try {
- resultSet.updateTimestamp(columnIndex, x);
+ return resultSet.getTimestamp(columnName);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
+ public Timestamp getTimestamp(final String columnName, final Calendar cal) throws SQLException {
try {
- resultSet.updateAsciiStream(columnIndex, x, length);
+ return resultSet.getTimestamp(columnName, cal);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
+ public int getType() throws SQLException {
try {
- resultSet.updateBinaryStream(columnIndex, x, length);
+ return resultSet.getType();
} catch (final SQLException e) {
handleException(e);
+ return 0;
}
}
+ /** @deprecated Use {@link #getCharacterStream(int)} */
+ @Deprecated
@Override
- public void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException {
+ public InputStream getUnicodeStream(final int columnIndex) throws SQLException {
try {
- resultSet.updateCharacterStream(columnIndex, x, length);
+ return resultSet.getUnicodeStream(columnIndex);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
+ /** @deprecated Use {@link #getCharacterStream(String)} */
+ @Deprecated
@Override
- public void updateObject(final int columnIndex, final Object x, final int scale) throws SQLException {
+ public InputStream getUnicodeStream(final String columnName) throws SQLException {
try {
- resultSet.updateObject(columnIndex, x);
+ return resultSet.getUnicodeStream(columnName);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateObject(final int columnIndex, final Object x) throws SQLException {
+ public java.net.URL getURL(final int columnIndex) throws SQLException {
try {
- resultSet.updateObject(columnIndex, x);
+ return resultSet.getURL(columnIndex);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateNull(final String columnName) throws SQLException {
+ public java.net.URL getURL(final String columnName) throws SQLException {
try {
- resultSet.updateNull(columnName);
+ return resultSet.getURL(columnName);
} catch (final SQLException e) {
handleException(e);
+ return null;
}
}
@Override
- public void updateBoolean(final String columnName, final boolean x) throws SQLException {
+ public SQLWarning getWarnings() throws SQLException {
try {
- resultSet.updateBoolean(columnName, x);
+ return resultSet.getWarnings();
} catch (final SQLException e) {
handleException(e);
+ return null;
+ }
+ }
+
+ protected void handleException(final SQLException e) throws SQLException {
+ if (statement != null && statement instanceof DelegatingStatement) {
+ ((DelegatingStatement) statement).handleException(e);
+ } else if (connection != null && connection instanceof DelegatingConnection) {
+ ((DelegatingConnection<?>) connection).handleException(e);
+ } else {
+ throw e;
}
}
@Override
- public void updateByte(final String columnName, final byte x) throws SQLException {
+ public void insertRow() throws SQLException {
try {
- resultSet.updateByte(columnName, x);
+ resultSet.insertRow();
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateShort(final String columnName, final short x) throws SQLException {
+ public boolean isAfterLast() throws SQLException {
try {
- resultSet.updateShort(columnName, x);
+ return resultSet.isAfterLast();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateInt(final String columnName, final int x) throws SQLException {
+ public boolean isBeforeFirst() throws SQLException {
try {
- resultSet.updateInt(columnName, x);
+ return resultSet.isBeforeFirst();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateLong(final String columnName, final long x) throws SQLException {
+ public boolean isClosed() throws SQLException {
try {
- resultSet.updateLong(columnName, x);
+ return resultSet.isClosed();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateFloat(final String columnName, final float x) throws SQLException {
+ public boolean isFirst() throws SQLException {
try {
- resultSet.updateFloat(columnName, x);
+ return resultSet.isFirst();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateDouble(final String columnName, final double x) throws SQLException {
+ public boolean isLast() throws SQLException {
try {
- resultSet.updateDouble(columnName, x);
+ return resultSet.isLast();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateBigDecimal(final String columnName, final BigDecimal x) throws SQLException {
- try {
- resultSet.updateBigDecimal(columnName, x);
- } catch (final SQLException e) {
- handleException(e);
+ public boolean isWrapperFor(final Class<?> iface) throws SQLException {
+ if (iface.isAssignableFrom(getClass())) {
+ return true;
+ } else if (iface.isAssignableFrom(resultSet.getClass())) {
+ return true;
+ } else {
+ return resultSet.isWrapperFor(iface);
}
}
@Override
- public void updateString(final String columnName, final String x) throws SQLException {
+ public boolean last() throws SQLException {
try {
- resultSet.updateString(columnName, x);
+ return resultSet.last();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateBytes(final String columnName, final byte[] x) throws SQLException {
+ public void moveToCurrentRow() throws SQLException {
try {
- resultSet.updateBytes(columnName, x);
+ resultSet.moveToCurrentRow();
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateDate(final String columnName, final Date x) throws SQLException {
+ public void moveToInsertRow() throws SQLException {
try {
- resultSet.updateDate(columnName, x);
+ resultSet.moveToInsertRow();
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateTime(final String columnName, final Time x) throws SQLException {
+ public boolean next() throws SQLException {
try {
- resultSet.updateTime(columnName, x);
+ return resultSet.next();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateTimestamp(final String columnName, final Timestamp x) throws SQLException {
+ public boolean previous() throws SQLException {
try {
- resultSet.updateTimestamp(columnName, x);
+ return resultSet.previous();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateAsciiStream(final String columnName, final InputStream x, final int length) throws SQLException {
+ public void refreshRow() throws SQLException {
try {
- resultSet.updateAsciiStream(columnName, x, length);
+ resultSet.refreshRow();
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBinaryStream(final String columnName, final InputStream x, final int length) throws SQLException {
+ public boolean relative(final int rows) throws SQLException {
try {
- resultSet.updateBinaryStream(columnName, x, length);
+ return resultSet.relative(rows);
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateCharacterStream(final String columnName, final Reader reader, final int length)
- throws SQLException {
+ public boolean rowDeleted() throws SQLException {
try {
- resultSet.updateCharacterStream(columnName, reader, length);
+ return resultSet.rowDeleted();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateObject(final String columnName, final Object x, final int scale) throws SQLException {
+ public boolean rowInserted() throws SQLException {
try {
- resultSet.updateObject(columnName, x);
+ return resultSet.rowInserted();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void updateObject(final String columnName, final Object x) throws SQLException {
+ public boolean rowUpdated() throws SQLException {
try {
- resultSet.updateObject(columnName, x);
+ return resultSet.rowUpdated();
} catch (final SQLException e) {
handleException(e);
+ return false;
}
}
@Override
- public void insertRow() throws SQLException {
+ public void setFetchDirection(final int direction) throws SQLException {
try {
- resultSet.insertRow();
+ resultSet.setFetchDirection(direction);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateRow() throws SQLException {
+ public void setFetchSize(final int rows) throws SQLException {
try {
- resultSet.updateRow();
+ resultSet.setFetchSize(rows);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void deleteRow() throws SQLException {
- try {
- resultSet.deleteRow();
- } catch (final SQLException e) {
- handleException(e);
- }
+ public String toString() {
+ return super.toString() + "[_res=" + resultSet + ", _stmt=" + statement + ", _conn=" + connection + "]";
}
@Override
- public void refreshRow() throws SQLException {
- try {
- resultSet.refreshRow();
- } catch (final SQLException e) {
- handleException(e);
+ public <T> T unwrap(final Class<T> iface) throws SQLException {
+ if (iface.isAssignableFrom(getClass())) {
+ return iface.cast(this);
+ } else if (iface.isAssignableFrom(resultSet.getClass())) {
+ return iface.cast(resultSet);
+ } else {
+ return resultSet.unwrap(iface);
}
}
@Override
- public void cancelRowUpdates() throws SQLException {
+ public void updateArray(final int columnIndex, final Array x) throws SQLException {
try {
- resultSet.cancelRowUpdates();
+ resultSet.updateArray(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void moveToInsertRow() throws SQLException {
+ public void updateArray(final String columnName, final Array x) throws SQLException {
try {
- resultSet.moveToInsertRow();
+ resultSet.updateArray(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void moveToCurrentRow() throws SQLException {
+ public void updateAsciiStream(final int columnIndex, final InputStream inputStream) throws SQLException {
try {
- resultSet.moveToCurrentRow();
+ resultSet.updateAsciiStream(columnIndex, inputStream);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public Object getObject(final int i, final Map<String, Class<?>> map) throws SQLException {
+ public void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
try {
- return resultSet.getObject(i, map);
+ resultSet.updateAsciiStream(columnIndex, x, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Ref getRef(final int i) throws SQLException {
+ public void updateAsciiStream(final int columnIndex, final InputStream inputStream, final long length)
+ throws SQLException {
try {
- return resultSet.getRef(i);
+ resultSet.updateAsciiStream(columnIndex, inputStream, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Blob getBlob(final int i) throws SQLException {
+ public void updateAsciiStream(final String columnLabel, final InputStream inputStream) throws SQLException {
try {
- return resultSet.getBlob(i);
+ resultSet.updateAsciiStream(columnLabel, inputStream);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Clob getClob(final int i) throws SQLException {
+ public void updateAsciiStream(final String columnName, final InputStream x, final int length) throws SQLException {
try {
- return resultSet.getClob(i);
+ resultSet.updateAsciiStream(columnName, x, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Array getArray(final int i) throws SQLException {
+ public void updateAsciiStream(final String columnLabel, final InputStream inputStream, final long length)
+ throws SQLException {
try {
- return resultSet.getArray(i);
+ resultSet.updateAsciiStream(columnLabel, inputStream, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Object getObject(final String colName, final Map<String, Class<?>> map) throws SQLException {
+ public void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException {
try {
- return resultSet.getObject(colName, map);
+ resultSet.updateBigDecimal(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Ref getRef(final String colName) throws SQLException {
+ public void updateBigDecimal(final String columnName, final BigDecimal x) throws SQLException {
try {
- return resultSet.getRef(colName);
+ resultSet.updateBigDecimal(columnName, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Blob getBlob(final String colName) throws SQLException {
+ public void updateBinaryStream(final int columnIndex, final InputStream inputStream) throws SQLException {
try {
- return resultSet.getBlob(colName);
+ resultSet.updateBinaryStream(columnIndex, inputStream);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Clob getClob(final String colName) throws SQLException {
+ public void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
try {
- return resultSet.getClob(colName);
+ resultSet.updateBinaryStream(columnIndex, x, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Array getArray(final String colName) throws SQLException {
+ public void updateBinaryStream(final int columnIndex, final InputStream inputStream, final long length)
+ throws SQLException {
try {
- return resultSet.getArray(colName);
+ resultSet.updateBinaryStream(columnIndex, inputStream, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Date getDate(final int columnIndex, final Calendar cal) throws SQLException {
+ public void updateBinaryStream(final String columnLabel, final InputStream inputStream) throws SQLException {
try {
- return resultSet.getDate(columnIndex, cal);
+ resultSet.updateBinaryStream(columnLabel, inputStream);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Date getDate(final String columnName, final Calendar cal) throws SQLException {
+ public void updateBinaryStream(final String columnName, final InputStream x, final int length) throws SQLException {
try {
- return resultSet.getDate(columnName, cal);
+ resultSet.updateBinaryStream(columnName, x, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Time getTime(final int columnIndex, final Calendar cal) throws SQLException {
+ public void updateBinaryStream(final String columnLabel, final InputStream inputStream, final long length)
+ throws SQLException {
try {
- return resultSet.getTime(columnIndex, cal);
+ resultSet.updateBinaryStream(columnLabel, inputStream, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Time getTime(final String columnName, final Calendar cal) throws SQLException {
+ public void updateBlob(final int columnIndex, final Blob x) throws SQLException {
try {
- return resultSet.getTime(columnName, cal);
+ resultSet.updateBlob(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException {
+ public void updateBlob(final int columnIndex, final InputStream inputStream) throws SQLException {
try {
- return resultSet.getTimestamp(columnIndex, cal);
+ resultSet.updateBlob(columnIndex, inputStream);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Timestamp getTimestamp(final String columnName, final Calendar cal) throws SQLException {
+ public void updateBlob(final int columnIndex, final InputStream inputStream, final long length)
+ throws SQLException {
try {
- return resultSet.getTimestamp(columnName, cal);
+ resultSet.updateBlob(columnIndex, inputStream, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public java.net.URL getURL(final int columnIndex) throws SQLException {
+ public void updateBlob(final String columnName, final Blob x) throws SQLException {
try {
- return resultSet.getURL(columnIndex);
+ resultSet.updateBlob(columnName, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public java.net.URL getURL(final String columnName) throws SQLException {
+ public void updateBlob(final String columnLabel, final InputStream inputStream) throws SQLException {
try {
- return resultSet.getURL(columnName);
+ resultSet.updateBlob(columnLabel, inputStream);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public void updateRef(final int columnIndex, final Ref x) throws SQLException {
+ public void updateBlob(final String columnLabel, final InputStream inputStream, final long length)
+ throws SQLException {
try {
- resultSet.updateRef(columnIndex, x);
+ resultSet.updateBlob(columnLabel, inputStream, length);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateRef(final String columnName, final Ref x) throws SQLException {
+ public void updateBoolean(final int columnIndex, final boolean x) throws SQLException {
try {
- resultSet.updateRef(columnName, x);
+ resultSet.updateBoolean(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBlob(final int columnIndex, final Blob x) throws SQLException {
+ public void updateBoolean(final String columnName, final boolean x) throws SQLException {
try {
- resultSet.updateBlob(columnIndex, x);
+ resultSet.updateBoolean(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBlob(final String columnName, final Blob x) throws SQLException {
+ public void updateByte(final int columnIndex, final byte x) throws SQLException {
try {
- resultSet.updateBlob(columnName, x);
+ resultSet.updateByte(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateClob(final int columnIndex, final Clob x) throws SQLException {
+ public void updateByte(final String columnName, final byte x) throws SQLException {
try {
- resultSet.updateClob(columnIndex, x);
+ resultSet.updateByte(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateClob(final String columnName, final Clob x) throws SQLException {
+ public void updateBytes(final int columnIndex, final byte[] x) throws SQLException {
try {
- resultSet.updateClob(columnName, x);
+ resultSet.updateBytes(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateArray(final int columnIndex, final Array x) throws SQLException {
+ public void updateBytes(final String columnName, final byte[] x) throws SQLException {
try {
- resultSet.updateArray(columnIndex, x);
+ resultSet.updateBytes(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateArray(final String columnName, final Array x) throws SQLException {
+ public void updateCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
try {
- resultSet.updateArray(columnName, x);
+ resultSet.updateCharacterStream(columnIndex, reader);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public boolean isWrapperFor(final Class<?> iface) throws SQLException {
- if (iface.isAssignableFrom(getClass())) {
- return true;
- } else if (iface.isAssignableFrom(resultSet.getClass())) {
- return true;
- } else {
- return resultSet.isWrapperFor(iface);
+ public void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException {
+ try {
+ resultSet.updateCharacterStream(columnIndex, x, length);
+ } catch (final SQLException e) {
+ handleException(e);
}
}
@Override
- public <T> T unwrap(final Class<T> iface) throws SQLException {
- if (iface.isAssignableFrom(getClass())) {
- return iface.cast(this);
- } else if (iface.isAssignableFrom(resultSet.getClass())) {
- return iface.cast(resultSet);
- } else {
- return resultSet.unwrap(iface);
+ public void updateCharacterStream(final int columnIndex, final Reader reader, final long length)
+ throws SQLException {
+ try {
+ resultSet.updateCharacterStream(columnIndex, reader, length);
+ } catch (final SQLException e) {
+ handleException(e);
}
}
@Override
- public RowId getRowId(final int columnIndex) throws SQLException {
+ public void updateCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
try {
- return resultSet.getRowId(columnIndex);
+ resultSet.updateCharacterStream(columnLabel, reader);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public RowId getRowId(final String columnLabel) throws SQLException {
+ public void updateCharacterStream(final String columnName, final Reader reader, final int length)
+ throws SQLException {
try {
- return resultSet.getRowId(columnLabel);
+ resultSet.updateCharacterStream(columnName, reader, length);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public void updateRowId(final int columnIndex, final RowId value) throws SQLException {
+ public void updateCharacterStream(final String columnLabel, final Reader reader, final long length)
+ throws SQLException {
try {
- resultSet.updateRowId(columnIndex, value);
+ resultSet.updateCharacterStream(columnLabel, reader, length);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateRowId(final String columnLabel, final RowId value) throws SQLException {
+ public void updateClob(final int columnIndex, final Clob x) throws SQLException {
try {
- resultSet.updateRowId(columnLabel, value);
+ resultSet.updateClob(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public int getHoldability() throws SQLException {
+ public void updateClob(final int columnIndex, final Reader reader) throws SQLException {
try {
- return resultSet.getHoldability();
+ resultSet.updateClob(columnIndex, reader);
} catch (final SQLException e) {
handleException(e);
- return 0;
}
}
@Override
- public boolean isClosed() throws SQLException {
+ public void updateClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
try {
- return resultSet.isClosed();
+ resultSet.updateClob(columnIndex, reader, length);
} catch (final SQLException e) {
handleException(e);
- return false;
}
}
@Override
- public void updateNString(final int columnIndex, final String value) throws SQLException {
+ public void updateClob(final String columnName, final Clob x) throws SQLException {
try {
- resultSet.updateNString(columnIndex, value);
+ resultSet.updateClob(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateNString(final String columnLabel, final String value) throws SQLException {
+ public void updateClob(final String columnLabel, final Reader reader) throws SQLException {
try {
- resultSet.updateNString(columnLabel, value);
+ resultSet.updateClob(columnLabel, reader);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateNClob(final int columnIndex, final NClob value) throws SQLException {
+ public void updateClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
try {
- resultSet.updateNClob(columnIndex, value);
+ resultSet.updateClob(columnLabel, reader, length);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateNClob(final String columnLabel, final NClob value) throws SQLException {
+ public void updateDate(final int columnIndex, final Date x) throws SQLException {
try {
- resultSet.updateNClob(columnLabel, value);
+ resultSet.updateDate(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public NClob getNClob(final int columnIndex) throws SQLException {
+ public void updateDate(final String columnName, final Date x) throws SQLException {
try {
- return resultSet.getNClob(columnIndex);
+ resultSet.updateDate(columnName, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public NClob getNClob(final String columnLabel) throws SQLException {
+ public void updateDouble(final int columnIndex, final double x) throws SQLException {
try {
- return resultSet.getNClob(columnLabel);
+ resultSet.updateDouble(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public SQLXML getSQLXML(final int columnIndex) throws SQLException {
+ public void updateDouble(final String columnName, final double x) throws SQLException {
try {
- return resultSet.getSQLXML(columnIndex);
+ resultSet.updateDouble(columnName, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public SQLXML getSQLXML(final String columnLabel) throws SQLException {
+ public void updateFloat(final int columnIndex, final float x) throws SQLException {
try {
- return resultSet.getSQLXML(columnLabel);
+ resultSet.updateFloat(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public void updateSQLXML(final int columnIndex, final SQLXML value) throws SQLException {
+ public void updateFloat(final String columnName, final float x) throws SQLException {
try {
- resultSet.updateSQLXML(columnIndex, value);
+ resultSet.updateFloat(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateSQLXML(final String columnLabel, final SQLXML value) throws SQLException {
+ public void updateInt(final int columnIndex, final int x) throws SQLException {
try {
- resultSet.updateSQLXML(columnLabel, value);
+ resultSet.updateInt(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public String getNString(final int columnIndex) throws SQLException {
+ public void updateInt(final String columnName, final int x) throws SQLException {
try {
- return resultSet.getNString(columnIndex);
+ resultSet.updateInt(columnName, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public String getNString(final String columnLabel) throws SQLException {
+ public void updateLong(final int columnIndex, final long x) throws SQLException {
try {
- return resultSet.getNString(columnLabel);
+ resultSet.updateLong(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Reader getNCharacterStream(final int columnIndex) throws SQLException {
+ public void updateLong(final String columnName, final long x) throws SQLException {
try {
- return resultSet.getNCharacterStream(columnIndex);
+ resultSet.updateLong(columnName, x);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@Override
- public Reader getNCharacterStream(final String columnLabel) throws SQLException {
+ public void updateNCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
try {
- return resultSet.getNCharacterStream(columnLabel);
+ resultSet.updateNCharacterStream(columnIndex, reader);
} catch (final SQLException e) {
handleException(e);
- return null;
}
}
@@ -1747,6 +1734,15 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
+ public void updateNCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
+ try {
+ resultSet.updateNCharacterStream(columnLabel, reader);
+ } catch (final SQLException e) {
+ handleException(e);
+ }
+ }
+
+ @Override
public void updateNCharacterStream(final String columnLabel, final Reader reader, final long length)
throws SQLException {
try {
@@ -1757,269 +1753,273 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
@Override
- public void updateAsciiStream(final int columnIndex, final InputStream inputStream, final long length)
- throws SQLException {
+ public void updateNClob(final int columnIndex, final NClob value) throws SQLException {
try {
- resultSet.updateAsciiStream(columnIndex, inputStream, length);
+ resultSet.updateNClob(columnIndex, value);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBinaryStream(final int columnIndex, final InputStream inputStream, final long length)
- throws SQLException {
+ public void updateNClob(final int columnIndex, final Reader reader) throws SQLException {
try {
- resultSet.updateBinaryStream(columnIndex, inputStream, length);
+ resultSet.updateNClob(columnIndex, reader);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateCharacterStream(final int columnIndex, final Reader reader, final long length)
- throws SQLException {
+ public void updateNClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
try {
- resultSet.updateCharacterStream(columnIndex, reader, length);
+ resultSet.updateNClob(columnIndex, reader, length);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateAsciiStream(final String columnLabel, final InputStream inputStream, final long length)
- throws SQLException {
+ public void updateNClob(final String columnLabel, final NClob value) throws SQLException {
try {
- resultSet.updateAsciiStream(columnLabel, inputStream, length);
+ resultSet.updateNClob(columnLabel, value);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBinaryStream(final String columnLabel, final InputStream inputStream, final long length)
- throws SQLException {
+ public void updateNClob(final String columnLabel, final Reader reader) throws SQLException {
try {
- resultSet.updateBinaryStream(columnLabel, inputStream, length);
+ resultSet.updateNClob(columnLabel, reader);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateCharacterStream(final String columnLabel, final Reader reader, final long length)
- throws SQLException {
+ public void updateNClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
try {
- resultSet.updateCharacterStream(columnLabel, reader, length);
+ resultSet.updateNClob(columnLabel, reader, length);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBlob(final int columnIndex, final InputStream inputStream, final long length)
- throws SQLException {
+ public void updateNString(final int columnIndex, final String value) throws SQLException {
try {
- resultSet.updateBlob(columnIndex, inputStream, length);
+ resultSet.updateNString(columnIndex, value);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBlob(final String columnLabel, final InputStream inputStream, final long length)
- throws SQLException {
+ public void updateNString(final String columnLabel, final String value) throws SQLException {
try {
- resultSet.updateBlob(columnLabel, inputStream, length);
+ resultSet.updateNString(columnLabel, value);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
+ public void updateNull(final int columnIndex) throws SQLException {
try {
- resultSet.updateClob(columnIndex, reader, length);
+ resultSet.updateNull(columnIndex);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
+ public void updateNull(final String columnName) throws SQLException {
try {
- resultSet.updateClob(columnLabel, reader, length);
+ resultSet.updateNull(columnName);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateNClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
+ public void updateObject(final int columnIndex, final Object x) throws SQLException {
try {
- resultSet.updateNClob(columnIndex, reader, length);
+ resultSet.updateObject(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateNClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
+ public void updateObject(final int columnIndex, final Object x, final int scale) throws SQLException {
try {
- resultSet.updateNClob(columnLabel, reader, length);
+ resultSet.updateObject(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateNCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
+ public void updateObject(final String columnName, final Object x) throws SQLException {
try {
- resultSet.updateNCharacterStream(columnIndex, reader);
+ resultSet.updateObject(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateNCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
+ public void updateObject(final String columnName, final Object x, final int scale) throws SQLException {
try {
- resultSet.updateNCharacterStream(columnLabel, reader);
+ resultSet.updateObject(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateAsciiStream(final int columnIndex, final InputStream inputStream) throws SQLException {
+ public void updateRef(final int columnIndex, final Ref x) throws SQLException {
try {
- resultSet.updateAsciiStream(columnIndex, inputStream);
+ resultSet.updateRef(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBinaryStream(final int columnIndex, final InputStream inputStream) throws SQLException {
+ public void updateRef(final String columnName, final Ref x) throws SQLException {
try {
- resultSet.updateBinaryStream(columnIndex, inputStream);
+ resultSet.updateRef(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
+ public void updateRow() throws SQLException {
try {
- resultSet.updateCharacterStream(columnIndex, reader);
+ resultSet.updateRow();
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateAsciiStream(final String columnLabel, final InputStream inputStream) throws SQLException {
+ public void updateRowId(final int columnIndex, final RowId value) throws SQLException {
try {
- resultSet.updateAsciiStream(columnLabel, inputStream);
+ resultSet.updateRowId(columnIndex, value);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBinaryStream(final String columnLabel, final InputStream inputStream) throws SQLException {
+ public void updateRowId(final String columnLabel, final RowId value) throws SQLException {
try {
- resultSet.updateBinaryStream(columnLabel, inputStream);
+ resultSet.updateRowId(columnLabel, value);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
+ public void updateShort(final int columnIndex, final short x) throws SQLException {
try {
- resultSet.updateCharacterStream(columnLabel, reader);
+ resultSet.updateShort(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBlob(final int columnIndex, final InputStream inputStream) throws SQLException {
+ public void updateShort(final String columnName, final short x) throws SQLException {
try {
- resultSet.updateBlob(columnIndex, inputStream);
+ resultSet.updateShort(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateBlob(final String columnLabel, final InputStream inputStream) throws SQLException {
+ public void updateSQLXML(final int columnIndex, final SQLXML value) throws SQLException {
try {
- resultSet.updateBlob(columnLabel, inputStream);
+ resultSet.updateSQLXML(columnIndex, value);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateClob(final int columnIndex, final Reader reader) throws SQLException {
+ public void updateSQLXML(final String columnLabel, final SQLXML value) throws SQLException {
try {
- resultSet.updateClob(columnIndex, reader);
+ resultSet.updateSQLXML(columnLabel, value);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateClob(final String columnLabel, final Reader reader) throws SQLException {
+ public void updateString(final int columnIndex, final String x) throws SQLException {
try {
- resultSet.updateClob(columnLabel, reader);
+ resultSet.updateString(columnIndex, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateNClob(final int columnIndex, final Reader reader) throws SQLException {
+ public void updateString(final String columnName, final String x) throws SQLException {
try {
- resultSet.updateNClob(columnIndex, reader);
+ resultSet.updateString(columnName, x);
} catch (final SQLException e) {
handleException(e);
}
}
@Override
- public void updateNClob(final String columnLabel, final Reader reader) throws SQLException {
+ public void updateTime(final int columnIndex, final Time x) throws SQLExcep
<TRUNCATED>
[2/2] commons-dbcp git commit: Sort members in AB order so it's
easier to find stuff.
Posted by gg...@apache.org.
Sort members in AB order so it's easier to find stuff.
Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/b7df9811
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/b7df9811
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/b7df9811
Branch: refs/heads/master
Commit: b7df9811bf66d7f8ae855a82572fc8472b206c5b
Parents: c5dc98d
Author: Gary Gregory <ga...@gmail.com>
Authored: Sun Jun 17 10:08:21 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Sun Jun 17 10:08:21 2018 -0600
----------------------------------------------------------------------
.../commons/dbcp2/DelegatingResultSet.java | 1188 +++++++++---------
1 file changed, 594 insertions(+), 594 deletions(-)
----------------------------------------------------------------------