diff --git a/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java b/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
index 3d9bac49..48afabb0 100644
--- a/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
+++ b/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
@@ -178,14 +178,14 @@ protected void close(final Connection conn) throws SQLException {
* null and does not suppress any exceptions. Subclasses
* can override to provide special handling like logging.
*
- * @param rs
+ * @param resultSet
* ResultSet to close
* @throws SQLException
* if a database access error occurs
* @since 1.1
*/
- protected void close(final ResultSet rs) throws SQLException {
- DbUtils.close(rs);
+ protected void close(final ResultSet resultSet) throws SQLException {
+ DbUtils.close(resultSet);
}
/**
@@ -216,11 +216,11 @@ protected void closeQuietly(final Connection conn) {
/**
* Calls {@link DbUtils#closeQuietly(ResultSet)}.
*
- * @param rs ResultSet to close.
+ * @param resultSet ResultSet to close.
* @since 1.8.0
*/
- protected void closeQuietly(final ResultSet rs) {
- DbUtils.closeQuietly(rs);
+ protected void closeQuietly(final ResultSet resultSet) {
+ DbUtils.closeQuietly(resultSet);
}
/**
diff --git a/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java b/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
index 3ed453d8..948b615a 100644
--- a/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
+++ b/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
@@ -132,17 +132,17 @@ public QueryCallableStatement(final Connection conn, final boolean closeConn, fi
*/
@Override
public T call() throws SQLException {
- ResultSet rs = null;
+ ResultSet resultSet = null;
T ret = null;
try {
- rs = wrap(ps.executeQuery());
- ret = rsh.handle(rs);
+ resultSet = wrap(ps.executeQuery());
+ ret = rsh.handle(resultSet);
} catch (final SQLException e) {
rethrow(e, sql, params);
} finally {
try {
- close(rs);
+ close(resultSet);
} finally {
close(ps);
if (closeConn) {
diff --git a/src/main/java/org/apache/commons/dbutils/BaseResultSetHandler.java b/src/main/java/org/apache/commons/dbutils/BaseResultSetHandler.java
index e47cf2bf..9ea790d2 100644
--- a/src/main/java/org/apache/commons/dbutils/BaseResultSetHandler.java
+++ b/src/main/java/org/apache/commons/dbutils/BaseResultSetHandler.java
@@ -56,108 +56,108 @@ public abstract class BaseResultSetHandler implements ResultSetHandler {
/**
* The adapted ResultSet.
*/
- private ResultSet rs;
+ private ResultSet resultSet;
/**
* {@inheritDoc}
*/
protected final boolean absolute(final int row) throws SQLException {
- return rs.absolute(row);
+ return resultSet.absolute(row);
}
/**
* {@inheritDoc}
*/
protected final void afterLast() throws SQLException {
- rs.afterLast();
+ resultSet.afterLast();
}
/**
* {@inheritDoc}
*/
protected final void beforeFirst() throws SQLException {
- rs.beforeFirst();
+ resultSet.beforeFirst();
}
/**
* {@inheritDoc}
*/
protected final void cancelRowUpdates() throws SQLException {
- rs.cancelRowUpdates();
+ resultSet.cancelRowUpdates();
}
/**
* {@inheritDoc}
*/
protected final void clearWarnings() throws SQLException {
- rs.clearWarnings();
+ resultSet.clearWarnings();
}
/**
* {@inheritDoc}
*/
protected final void close() throws SQLException {
- rs.close();
+ resultSet.close();
}
/**
* {@inheritDoc}
*/
protected final void deleteRow() throws SQLException {
- rs.deleteRow();
+ resultSet.deleteRow();
}
/**
* {@inheritDoc}
*/
protected final int findColumn(final String columnLabel) throws SQLException {
- return rs.findColumn(columnLabel);
+ return resultSet.findColumn(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final boolean first() throws SQLException {
- return rs.first();
+ return resultSet.first();
}
protected final ResultSet getAdaptedResultSet() {
- return rs;
+ return resultSet;
}
/**
* {@inheritDoc}
*/
protected final Array getArray(final int columnIndex) throws SQLException {
- return rs.getArray(columnIndex);
+ return resultSet.getArray(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Array getArray(final String columnLabel) throws SQLException {
- return rs.getArray(columnLabel);
+ return resultSet.getArray(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final InputStream getAsciiStream(final int columnIndex) throws SQLException {
- return rs.getAsciiStream(columnIndex);
+ return resultSet.getAsciiStream(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final InputStream getAsciiStream(final String columnLabel) throws SQLException {
- return rs.getAsciiStream(columnLabel);
+ return resultSet.getAsciiStream(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final BigDecimal getBigDecimal(final int columnIndex) throws SQLException {
- return rs.getBigDecimal(columnIndex);
+ return resultSet.getBigDecimal(columnIndex);
}
/**
@@ -165,14 +165,14 @@ protected final BigDecimal getBigDecimal(final int columnIndex) throws SQLExcept
*/
@Deprecated
protected final BigDecimal getBigDecimal(final int columnIndex, final int scale) throws SQLException {
- return rs.getBigDecimal(columnIndex, scale);
+ return resultSet.getBigDecimal(columnIndex, scale);
}
/**
* {@inheritDoc}
*/
protected final BigDecimal getBigDecimal(final String columnLabel) throws SQLException {
- return rs.getBigDecimal(columnLabel);
+ return resultSet.getBigDecimal(columnLabel);
}
/**
@@ -180,448 +180,448 @@ protected final BigDecimal getBigDecimal(final String columnLabel) throws SQLExc
*/
@Deprecated
protected final BigDecimal getBigDecimal(final String columnLabel, final int scale) throws SQLException {
- return rs.getBigDecimal(columnLabel, scale);
+ return resultSet.getBigDecimal(columnLabel, scale);
}
/**
* {@inheritDoc}
*/
protected final InputStream getBinaryStream(final int columnIndex) throws SQLException {
- return rs.getBinaryStream(columnIndex);
+ return resultSet.getBinaryStream(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final InputStream getBinaryStream(final String columnLabel) throws SQLException {
- return rs.getBinaryStream(columnLabel);
+ return resultSet.getBinaryStream(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Blob getBlob(final int columnIndex) throws SQLException {
- return rs.getBlob(columnIndex);
+ return resultSet.getBlob(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Blob getBlob(final String columnLabel) throws SQLException {
- return rs.getBlob(columnLabel);
+ return resultSet.getBlob(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final boolean getBoolean(final int columnIndex) throws SQLException {
- return rs.getBoolean(columnIndex);
+ return resultSet.getBoolean(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final boolean getBoolean(final String columnLabel) throws SQLException {
- return rs.getBoolean(columnLabel);
+ return resultSet.getBoolean(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final byte getByte(final int columnIndex) throws SQLException {
- return rs.getByte(columnIndex);
+ return resultSet.getByte(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final byte getByte(final String columnLabel) throws SQLException {
- return rs.getByte(columnLabel);
+ return resultSet.getByte(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final byte[] getBytes(final int columnIndex) throws SQLException {
- return rs.getBytes(columnIndex);
+ return resultSet.getBytes(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final byte[] getBytes(final String columnLabel) throws SQLException {
- return rs.getBytes(columnLabel);
+ return resultSet.getBytes(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Reader getCharacterStream(final int columnIndex) throws SQLException {
- return rs.getCharacterStream(columnIndex);
+ return resultSet.getCharacterStream(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Reader getCharacterStream(final String columnLabel) throws SQLException {
- return rs.getCharacterStream(columnLabel);
+ return resultSet.getCharacterStream(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Clob getClob(final int columnIndex) throws SQLException {
- return rs.getClob(columnIndex);
+ return resultSet.getClob(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Clob getClob(final String columnLabel) throws SQLException {
- return rs.getClob(columnLabel);
+ return resultSet.getClob(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final int getConcurrency() throws SQLException {
- return rs.getConcurrency();
+ return resultSet.getConcurrency();
}
/**
* {@inheritDoc}
*/
protected final String getCursorName() throws SQLException {
- return rs.getCursorName();
+ return resultSet.getCursorName();
}
/**
* {@inheritDoc}
*/
protected final Date getDate(final int columnIndex) throws SQLException {
- return rs.getDate(columnIndex);
+ return resultSet.getDate(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Date getDate(final int columnIndex, final Calendar cal) throws SQLException {
- return rs.getDate(columnIndex, cal);
+ return resultSet.getDate(columnIndex, cal);
}
/**
* {@inheritDoc}
*/
protected final Date getDate(final String columnLabel) throws SQLException {
- return rs.getDate(columnLabel);
+ return resultSet.getDate(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Date getDate(final String columnLabel, final Calendar cal) throws SQLException {
- return rs.getDate(columnLabel, cal);
+ return resultSet.getDate(columnLabel, cal);
}
/**
* {@inheritDoc}
*/
protected final double getDouble(final int columnIndex) throws SQLException {
- return rs.getDouble(columnIndex);
+ return resultSet.getDouble(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final double getDouble(final String columnLabel) throws SQLException {
- return rs.getDouble(columnLabel);
+ return resultSet.getDouble(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final int getFetchDirection() throws SQLException {
- return rs.getFetchDirection();
+ return resultSet.getFetchDirection();
}
/**
* {@inheritDoc}
*/
protected final int getFetchSize() throws SQLException {
- return rs.getFetchSize();
+ return resultSet.getFetchSize();
}
/**
* {@inheritDoc}
*/
protected final float getFloat(final int columnIndex) throws SQLException {
- return rs.getFloat(columnIndex);
+ return resultSet.getFloat(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final float getFloat(final String columnLabel) throws SQLException {
- return rs.getFloat(columnLabel);
+ return resultSet.getFloat(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final int getHoldability() throws SQLException {
- return rs.getHoldability();
+ return resultSet.getHoldability();
}
/**
* {@inheritDoc}
*/
protected final int getInt(final int columnIndex) throws SQLException {
- return rs.getInt(columnIndex);
+ return resultSet.getInt(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final int getInt(final String columnLabel) throws SQLException {
- return rs.getInt(columnLabel);
+ return resultSet.getInt(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final long getLong(final int columnIndex) throws SQLException {
- return rs.getLong(columnIndex);
+ return resultSet.getLong(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final long getLong(final String columnLabel) throws SQLException {
- return rs.getLong(columnLabel);
+ return resultSet.getLong(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final ResultSetMetaData getMetaData() throws SQLException {
- return rs.getMetaData();
+ return resultSet.getMetaData();
}
/**
* {@inheritDoc}
*/
protected final Reader getNCharacterStream(final int columnIndex) throws SQLException {
- return rs.getNCharacterStream(columnIndex);
+ return resultSet.getNCharacterStream(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Reader getNCharacterStream(final String columnLabel) throws SQLException {
- return rs.getNCharacterStream(columnLabel);
+ return resultSet.getNCharacterStream(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final NClob getNClob(final int columnIndex) throws SQLException {
- return rs.getNClob(columnIndex);
+ return resultSet.getNClob(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final NClob getNClob(final String columnLabel) throws SQLException {
- return rs.getNClob(columnLabel);
+ return resultSet.getNClob(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final String getNString(final int columnIndex) throws SQLException {
- return rs.getNString(columnIndex);
+ return resultSet.getNString(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final String getNString(final String columnLabel) throws SQLException {
- return rs.getNString(columnLabel);
+ return resultSet.getNString(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Object getObject(final int columnIndex) throws SQLException {
- return rs.getObject(columnIndex);
+ return resultSet.getObject(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Object getObject(final int columnIndex, final Map> map) throws SQLException {
- return rs.getObject(columnIndex, map);
+ return resultSet.getObject(columnIndex, map);
}
/**
* {@inheritDoc}
*/
protected final Object getObject(final String columnLabel) throws SQLException {
- return rs.getObject(columnLabel);
+ return resultSet.getObject(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Object getObject(final String columnLabel, final Map> map) throws SQLException {
- return rs.getObject(columnLabel, map);
+ return resultSet.getObject(columnLabel, map);
}
/**
* {@inheritDoc}
*/
protected final Ref getRef(final int columnIndex) throws SQLException {
- return rs.getRef(columnIndex);
+ return resultSet.getRef(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Ref getRef(final String columnLabel) throws SQLException {
- return rs.getRef(columnLabel);
+ return resultSet.getRef(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final int getRow() throws SQLException {
- return rs.getRow();
+ return resultSet.getRow();
}
/**
* {@inheritDoc}
*/
protected final RowId getRowId(final int columnIndex) throws SQLException {
- return rs.getRowId(columnIndex);
+ return resultSet.getRowId(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final RowId getRowId(final String columnLabel) throws SQLException {
- return rs.getRowId(columnLabel);
+ return resultSet.getRowId(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final short getShort(final int columnIndex) throws SQLException {
- return rs.getShort(columnIndex);
+ return resultSet.getShort(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final short getShort(final String columnLabel) throws SQLException {
- return rs.getShort(columnLabel);
+ return resultSet.getShort(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final SQLXML getSQLXML(final int columnIndex) throws SQLException {
- return rs.getSQLXML(columnIndex);
+ return resultSet.getSQLXML(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final SQLXML getSQLXML(final String columnLabel) throws SQLException {
- return rs.getSQLXML(columnLabel);
+ return resultSet.getSQLXML(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Statement getStatement() throws SQLException {
- return rs.getStatement();
+ return resultSet.getStatement();
}
/**
* {@inheritDoc}
*/
protected final String getString(final int columnIndex) throws SQLException {
- return rs.getString(columnIndex);
+ return resultSet.getString(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final String getString(final String columnLabel) throws SQLException {
- return rs.getString(columnLabel);
+ return resultSet.getString(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Time getTime(final int columnIndex) throws SQLException {
- return rs.getTime(columnIndex);
+ return resultSet.getTime(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Time getTime(final int columnIndex, final Calendar cal) throws SQLException {
- return rs.getTime(columnIndex, cal);
+ return resultSet.getTime(columnIndex, cal);
}
/**
* {@inheritDoc}
*/
protected final Time getTime(final String columnLabel) throws SQLException {
- return rs.getTime(columnLabel);
+ return resultSet.getTime(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Time getTime(final String columnLabel, final Calendar cal) throws SQLException {
- return rs.getTime(columnLabel, cal);
+ return resultSet.getTime(columnLabel, cal);
}
/**
* {@inheritDoc}
*/
protected final Timestamp getTimestamp(final int columnIndex) throws SQLException {
- return rs.getTimestamp(columnIndex);
+ return resultSet.getTimestamp(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException {
- return rs.getTimestamp(columnIndex, cal);
+ return resultSet.getTimestamp(columnIndex, cal);
}
/**
* {@inheritDoc}
*/
protected final Timestamp getTimestamp(final String columnLabel) throws SQLException {
- return rs.getTimestamp(columnLabel);
+ return resultSet.getTimestamp(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final Timestamp getTimestamp(final String columnLabel, final Calendar cal) throws SQLException {
- return rs.getTimestamp(columnLabel, cal);
+ return resultSet.getTimestamp(columnLabel, cal);
}
/**
* {@inheritDoc}
*/
protected final int getType() throws SQLException {
- return rs.getType();
+ return resultSet.getType();
}
/**
@@ -629,7 +629,7 @@ protected final int getType() throws SQLException {
*/
@Deprecated
protected final InputStream getUnicodeStream(final int columnIndex) throws SQLException {
- return rs.getUnicodeStream(columnIndex);
+ return resultSet.getUnicodeStream(columnIndex);
}
/**
@@ -637,28 +637,28 @@ protected final InputStream getUnicodeStream(final int columnIndex) throws SQLEx
*/
@Deprecated
protected final InputStream getUnicodeStream(final String columnLabel) throws SQLException {
- return rs.getUnicodeStream(columnLabel);
+ return resultSet.getUnicodeStream(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final URL getURL(final int columnIndex) throws SQLException {
- return rs.getURL(columnIndex);
+ return resultSet.getURL(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final URL getURL(final String columnLabel) throws SQLException {
- return rs.getURL(columnLabel);
+ return resultSet.getURL(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final SQLWarning getWarnings() throws SQLException {
- return rs.getWarnings();
+ return resultSet.getWarnings();
}
/**
@@ -675,16 +675,16 @@ protected final SQLWarning getWarnings() throws SQLException {
*/
@Override
public final T handle(final ResultSet rs) throws SQLException {
- if (this.rs != null) {
+ if (this.resultSet != null) {
throw new IllegalStateException("Re-entry not allowed!");
}
- this.rs = rs;
+ this.resultSet = rs;
try {
return handle();
} finally {
- this.rs = null;
+ this.resultSet = null;
}
}
@@ -692,728 +692,728 @@ public final T handle(final ResultSet rs) throws SQLException {
* {@inheritDoc}
*/
protected final void insertRow() throws SQLException {
- rs.insertRow();
+ resultSet.insertRow();
}
/**
* {@inheritDoc}
*/
protected final boolean isAfterLast() throws SQLException {
- return rs.isAfterLast();
+ return resultSet.isAfterLast();
}
/**
* {@inheritDoc}
*/
protected final boolean isBeforeFirst() throws SQLException {
- return rs.isBeforeFirst();
+ return resultSet.isBeforeFirst();
}
/**
* {@inheritDoc}
*/
protected final boolean isClosed() throws SQLException {
- return rs.isClosed();
+ return resultSet.isClosed();
}
/**
* {@inheritDoc}
*/
protected final boolean isFirst() throws SQLException {
- return rs.isFirst();
+ return resultSet.isFirst();
}
/**
* {@inheritDoc}
*/
protected final boolean isLast() throws SQLException {
- return rs.isLast();
+ return resultSet.isLast();
}
/**
* {@inheritDoc}
*/
protected final boolean isWrapperFor(final Class> iface) throws SQLException {
- return rs.isWrapperFor(iface);
+ return resultSet.isWrapperFor(iface);
}
/**
* {@inheritDoc}
*/
protected final boolean last() throws SQLException {
- return rs.last();
+ return resultSet.last();
}
/**
* {@inheritDoc}
*/
protected final void moveToCurrentRow() throws SQLException {
- rs.moveToCurrentRow();
+ resultSet.moveToCurrentRow();
}
/**
* {@inheritDoc}
*/
protected final void moveToInsertRow() throws SQLException {
- rs.moveToInsertRow();
+ resultSet.moveToInsertRow();
}
/**
* {@inheritDoc}
*/
protected final boolean next() throws SQLException {
- return rs.next();
+ return resultSet.next();
}
/**
* {@inheritDoc}
*/
protected final boolean previous() throws SQLException {
- return rs.previous();
+ return resultSet.previous();
}
/**
* {@inheritDoc}
*/
protected final void refreshRow() throws SQLException {
- rs.refreshRow();
+ resultSet.refreshRow();
}
/**
* {@inheritDoc}
*/
protected final boolean relative(final int rows) throws SQLException {
- return rs.relative(rows);
+ return resultSet.relative(rows);
}
/**
* {@inheritDoc}
*/
protected final boolean rowDeleted() throws SQLException {
- return rs.rowDeleted();
+ return resultSet.rowDeleted();
}
/**
* {@inheritDoc}
*/
protected final boolean rowInserted() throws SQLException {
- return rs.rowInserted();
+ return resultSet.rowInserted();
}
/**
* {@inheritDoc}
*/
protected final boolean rowUpdated() throws SQLException {
- return rs.rowUpdated();
+ return resultSet.rowUpdated();
}
/**
* {@inheritDoc}
*/
protected final void setFetchDirection(final int direction) throws SQLException {
- rs.setFetchDirection(direction);
+ resultSet.setFetchDirection(direction);
}
/**
* {@inheritDoc}
*/
protected final void setFetchSize(final int rows) throws SQLException {
- rs.setFetchSize(rows);
+ resultSet.setFetchSize(rows);
}
/**
* {@inheritDoc}
*/
protected final E unwrap(final Class iface) throws SQLException {
- return rs.unwrap(iface);
+ return resultSet.unwrap(iface);
}
/**
* {@inheritDoc}
*/
protected final void updateArray(final int columnIndex, final Array x) throws SQLException {
- rs.updateArray(columnIndex, x);
+ resultSet.updateArray(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateArray(final String columnLabel, final Array x) throws SQLException {
- rs.updateArray(columnLabel, x);
+ resultSet.updateArray(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateAsciiStream(final int columnIndex, final InputStream x) throws SQLException {
- rs.updateAsciiStream(columnIndex, x);
+ resultSet.updateAsciiStream(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
- rs.updateAsciiStream(columnIndex, x, length);
+ resultSet.updateAsciiStream(columnIndex, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateAsciiStream(final int columnIndex, final InputStream x, final long length) throws SQLException {
- rs.updateAsciiStream(columnIndex, x, length);
+ resultSet.updateAsciiStream(columnIndex, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateAsciiStream(final String columnLabel, final InputStream x) throws SQLException {
- rs.updateAsciiStream(columnLabel, x);
+ resultSet.updateAsciiStream(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateAsciiStream(final String columnLabel, final InputStream x, final int length) throws SQLException {
- rs.updateAsciiStream(columnLabel, x, length);
+ resultSet.updateAsciiStream(columnLabel, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateAsciiStream(final String columnLabel, final InputStream x, final long length) throws SQLException {
- rs.updateAsciiStream(columnLabel, x, length);
+ resultSet.updateAsciiStream(columnLabel, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException {
- rs.updateBigDecimal(columnIndex, x);
+ resultSet.updateBigDecimal(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateBigDecimal(final String columnLabel, final BigDecimal x) throws SQLException {
- rs.updateBigDecimal(columnLabel, x);
+ resultSet.updateBigDecimal(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateBinaryStream(final int columnIndex, final InputStream x) throws SQLException {
- rs.updateBinaryStream(columnIndex, x);
+ resultSet.updateBinaryStream(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
- rs.updateBinaryStream(columnIndex, x, length);
+ resultSet.updateBinaryStream(columnIndex, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateBinaryStream(final int columnIndex, final InputStream x, final long length) throws SQLException {
- rs.updateBinaryStream(columnIndex, x, length);
+ resultSet.updateBinaryStream(columnIndex, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateBinaryStream(final String columnLabel, final InputStream x) throws SQLException {
- rs.updateBinaryStream(columnLabel, x);
+ resultSet.updateBinaryStream(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateBinaryStream(final String columnLabel, final InputStream x, final int length) throws SQLException {
- rs.updateBinaryStream(columnLabel, x, length);
+ resultSet.updateBinaryStream(columnLabel, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateBinaryStream(final String columnLabel, final InputStream x, final long length) throws SQLException {
- rs.updateBinaryStream(columnLabel, x, length);
+ resultSet.updateBinaryStream(columnLabel, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateBlob(final int columnIndex, final Blob x) throws SQLException {
- rs.updateBlob(columnIndex, x);
+ resultSet.updateBlob(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateBlob(final int columnIndex, final InputStream inputStream) throws SQLException {
- rs.updateBlob(columnIndex, inputStream);
+ resultSet.updateBlob(columnIndex, inputStream);
}
/**
* {@inheritDoc}
*/
protected final void updateBlob(final int columnIndex, final InputStream inputStream, final long length) throws SQLException {
- rs.updateBlob(columnIndex, inputStream, length);
+ resultSet.updateBlob(columnIndex, inputStream, length);
}
/**
* {@inheritDoc}
*/
protected final void updateBlob(final String columnLabel, final Blob x) throws SQLException {
- rs.updateBlob(columnLabel, x);
+ resultSet.updateBlob(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateBlob(final String columnLabel, final InputStream inputStream) throws SQLException {
- rs.updateBlob(columnLabel, inputStream);
+ resultSet.updateBlob(columnLabel, inputStream);
}
/**
* {@inheritDoc}
*/
protected final void updateBlob(final String columnLabel, final InputStream inputStream, final long length) throws SQLException {
- rs.updateBlob(columnLabel, inputStream, length);
+ resultSet.updateBlob(columnLabel, inputStream, length);
}
/**
* {@inheritDoc}
*/
protected final void updateBoolean(final int columnIndex, final boolean x) throws SQLException {
- rs.updateBoolean(columnIndex, x);
+ resultSet.updateBoolean(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateBoolean(final String columnLabel, final boolean x) throws SQLException {
- rs.updateBoolean(columnLabel, x);
+ resultSet.updateBoolean(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateByte(final int columnIndex, final byte x) throws SQLException {
- rs.updateByte(columnIndex, x);
+ resultSet.updateByte(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateByte(final String columnLabel, final byte x) throws SQLException {
- rs.updateByte(columnLabel, x);
+ resultSet.updateByte(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateBytes(final int columnIndex, final byte[] x) throws SQLException {
- rs.updateBytes(columnIndex, x);
+ resultSet.updateBytes(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateBytes(final String columnLabel, final byte[] x) throws SQLException {
- rs.updateBytes(columnLabel, x);
+ resultSet.updateBytes(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateCharacterStream(final int columnIndex, final Reader x) throws SQLException {
- rs.updateCharacterStream(columnIndex, x);
+ resultSet.updateCharacterStream(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException {
- rs.updateCharacterStream(columnIndex, x, length);
+ resultSet.updateCharacterStream(columnIndex, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateCharacterStream(final int columnIndex, final Reader x, final long length) throws SQLException {
- rs.updateCharacterStream(columnIndex, x, length);
+ resultSet.updateCharacterStream(columnIndex, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
- rs.updateCharacterStream(columnLabel, reader);
+ resultSet.updateCharacterStream(columnLabel, reader);
}
/**
* {@inheritDoc}
*/
protected final void updateCharacterStream(final String columnLabel, final Reader reader, final int length) throws SQLException {
- rs.updateCharacterStream(columnLabel, reader, length);
+ resultSet.updateCharacterStream(columnLabel, reader, length);
}
/**
* {@inheritDoc}
*/
protected final void updateCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException {
- rs.updateCharacterStream(columnLabel, reader, length);
+ resultSet.updateCharacterStream(columnLabel, reader, length);
}
/**
* {@inheritDoc}
*/
protected final void updateClob(final int columnIndex, final Clob x) throws SQLException {
- rs.updateClob(columnIndex, x);
+ resultSet.updateClob(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateClob(final int columnIndex, final Reader reader) throws SQLException {
- rs.updateClob(columnIndex, reader);
+ resultSet.updateClob(columnIndex, reader);
}
/**
* {@inheritDoc}
*/
protected final void updateClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
- rs.updateClob(columnIndex, reader, length);
+ resultSet.updateClob(columnIndex, reader, length);
}
/**
* {@inheritDoc}
*/
protected final void updateClob(final String columnLabel, final Clob x) throws SQLException {
- rs.updateClob(columnLabel, x);
+ resultSet.updateClob(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateClob(final String columnLabel, final Reader reader) throws SQLException {
- rs.updateClob(columnLabel, reader);
+ resultSet.updateClob(columnLabel, reader);
}
/**
* {@inheritDoc}
*/
protected final void updateClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
- rs.updateClob(columnLabel, reader, length);
+ resultSet.updateClob(columnLabel, reader, length);
}
/**
* {@inheritDoc}
*/
protected final void updateDate(final int columnIndex, final Date x) throws SQLException {
- rs.updateDate(columnIndex, x);
+ resultSet.updateDate(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateDate(final String columnLabel, final Date x) throws SQLException {
- rs.updateDate(columnLabel, x);
+ resultSet.updateDate(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateDouble(final int columnIndex, final double x) throws SQLException {
- rs.updateDouble(columnIndex, x);
+ resultSet.updateDouble(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateDouble(final String columnLabel, final double x) throws SQLException {
- rs.updateDouble(columnLabel, x);
+ resultSet.updateDouble(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateFloat(final int columnIndex, final float x) throws SQLException {
- rs.updateFloat(columnIndex, x);
+ resultSet.updateFloat(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateFloat(final String columnLabel, final float x) throws SQLException {
- rs.updateFloat(columnLabel, x);
+ resultSet.updateFloat(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateInt(final int columnIndex, final int x) throws SQLException {
- rs.updateInt(columnIndex, x);
+ resultSet.updateInt(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateInt(final String columnLabel, final int x) throws SQLException {
- rs.updateInt(columnLabel, x);
+ resultSet.updateInt(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateLong(final int columnIndex, final long x) throws SQLException {
- rs.updateLong(columnIndex, x);
+ resultSet.updateLong(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateLong(final String columnLabel, final long x) throws SQLException {
- rs.updateLong(columnLabel, x);
+ resultSet.updateLong(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateNCharacterStream(final int columnIndex, final Reader x) throws SQLException {
- rs.updateNCharacterStream(columnIndex, x);
+ resultSet.updateNCharacterStream(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateNCharacterStream(final int columnIndex, final Reader x, final long length) throws SQLException {
- rs.updateNCharacterStream(columnIndex, x, length);
+ resultSet.updateNCharacterStream(columnIndex, x, length);
}
/**
* {@inheritDoc}
*/
protected final void updateNCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
- rs.updateNCharacterStream(columnLabel, reader);
+ resultSet.updateNCharacterStream(columnLabel, reader);
}
/**
* {@inheritDoc}
*/
protected final void updateNCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException {
- rs.updateNCharacterStream(columnLabel, reader, length);
+ resultSet.updateNCharacterStream(columnLabel, reader, length);
}
/**
* {@inheritDoc}
*/
protected final void updateNClob(final int columnIndex, final NClob nClob) throws SQLException {
- rs.updateNClob(columnIndex, nClob);
+ resultSet.updateNClob(columnIndex, nClob);
}
/**
* {@inheritDoc}
*/
protected final void updateNClob(final int columnIndex, final Reader reader) throws SQLException {
- rs.updateNClob(columnIndex, reader);
+ resultSet.updateNClob(columnIndex, reader);
}
/**
* {@inheritDoc}
*/
protected final void updateNClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
- rs.updateNClob(columnIndex, reader, length);
+ resultSet.updateNClob(columnIndex, reader, length);
}
/**
* {@inheritDoc}
*/
protected final void updateNClob(final String columnLabel, final NClob nClob) throws SQLException {
- rs.updateNClob(columnLabel, nClob);
+ resultSet.updateNClob(columnLabel, nClob);
}
/**
* {@inheritDoc}
*/
protected final void updateNClob(final String columnLabel, final Reader reader) throws SQLException {
- rs.updateNClob(columnLabel, reader);
+ resultSet.updateNClob(columnLabel, reader);
}
/**
* {@inheritDoc}
*/
protected final void updateNClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
- rs.updateNClob(columnLabel, reader, length);
+ resultSet.updateNClob(columnLabel, reader, length);
}
/**
* {@inheritDoc}
*/
protected final void updateNString(final int columnIndex, final String nString) throws SQLException {
- rs.updateNString(columnIndex, nString);
+ resultSet.updateNString(columnIndex, nString);
}
/**
* {@inheritDoc}
*/
protected final void updateNString(final String columnLabel, final String nString) throws SQLException {
- rs.updateNString(columnLabel, nString);
+ resultSet.updateNString(columnLabel, nString);
}
/**
* {@inheritDoc}
*/
protected final void updateNull(final int columnIndex) throws SQLException {
- rs.updateNull(columnIndex);
+ resultSet.updateNull(columnIndex);
}
/**
* {@inheritDoc}
*/
protected final void updateNull(final String columnLabel) throws SQLException {
- rs.updateNull(columnLabel);
+ resultSet.updateNull(columnLabel);
}
/**
* {@inheritDoc}
*/
protected final void updateObject(final int columnIndex, final Object x) throws SQLException {
- rs.updateObject(columnIndex, x);
+ resultSet.updateObject(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateObject(final int columnIndex, final Object x, final int scaleOrLength) throws SQLException {
- rs.updateObject(columnIndex, x, scaleOrLength);
+ resultSet.updateObject(columnIndex, x, scaleOrLength);
}
/**
* {@inheritDoc}
*/
protected final void updateObject(final String columnLabel, final Object x) throws SQLException {
- rs.updateObject(columnLabel, x);
+ resultSet.updateObject(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateObject(final String columnLabel, final Object x, final int scaleOrLength) throws SQLException {
- rs.updateObject(columnLabel, x, scaleOrLength);
+ resultSet.updateObject(columnLabel, x, scaleOrLength);
}
/**
* {@inheritDoc}
*/
protected final void updateRef(final int columnIndex, final Ref x) throws SQLException {
- rs.updateRef(columnIndex, x);
+ resultSet.updateRef(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateRef(final String columnLabel, final Ref x) throws SQLException {
- rs.updateRef(columnLabel, x);
+ resultSet.updateRef(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateRow() throws SQLException {
- rs.updateRow();
+ resultSet.updateRow();
}
/**
* {@inheritDoc}
*/
protected final void updateRowId(final int columnIndex, final RowId x) throws SQLException {
- rs.updateRowId(columnIndex, x);
+ resultSet.updateRowId(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateRowId(final String columnLabel, final RowId x) throws SQLException {
- rs.updateRowId(columnLabel, x);
+ resultSet.updateRowId(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateShort(final int columnIndex, final short x) throws SQLException {
- rs.updateShort(columnIndex, x);
+ resultSet.updateShort(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateShort(final String columnLabel, final short x) throws SQLException {
- rs.updateShort(columnLabel, x);
+ resultSet.updateShort(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateSQLXML(final int columnIndex, final SQLXML xmlObject) throws SQLException {
- rs.updateSQLXML(columnIndex, xmlObject);
+ resultSet.updateSQLXML(columnIndex, xmlObject);
}
/**
* {@inheritDoc}
*/
protected final void updateSQLXML(final String columnLabel, final SQLXML xmlObject) throws SQLException {
- rs.updateSQLXML(columnLabel, xmlObject);
+ resultSet.updateSQLXML(columnLabel, xmlObject);
}
/**
* {@inheritDoc}
*/
protected final void updateString(final int columnIndex, final String x) throws SQLException {
- rs.updateString(columnIndex, x);
+ resultSet.updateString(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateString(final String columnLabel, final String x) throws SQLException {
- rs.updateString(columnLabel, x);
+ resultSet.updateString(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateTime(final int columnIndex, final Time x) throws SQLException {
- rs.updateTime(columnIndex, x);
+ resultSet.updateTime(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateTime(final String columnLabel, final Time x) throws SQLException {
- rs.updateTime(columnLabel, x);
+ resultSet.updateTime(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException {
- rs.updateTimestamp(columnIndex, x);
+ resultSet.updateTimestamp(columnIndex, x);
}
/**
* {@inheritDoc}
*/
protected final void updateTimestamp(final String columnLabel, final Timestamp x) throws SQLException {
- rs.updateTimestamp(columnLabel, x);
+ resultSet.updateTimestamp(columnLabel, x);
}
/**
* {@inheritDoc}
*/
protected final boolean wasNull() throws SQLException {
- return rs.wasNull();
+ return resultSet.wasNull();
}
}
\ No newline at end of file
diff --git a/src/main/java/org/apache/commons/dbutils/BasicRowProcessor.java b/src/main/java/org/apache/commons/dbutils/BasicRowProcessor.java
index f2f310b1..6f0e86a3 100644
--- a/src/main/java/org/apache/commons/dbutils/BasicRowProcessor.java
+++ b/src/main/java/org/apache/commons/dbutils/BasicRowProcessor.java
@@ -189,18 +189,18 @@ public BasicRowProcessor(final BeanProcessor convert) {
* will be set to {@code null} if the column was SQL NULL.
*
* @see org.apache.commons.dbutils.RowProcessor#toArray(java.sql.ResultSet)
- * @param rs ResultSet that supplies the array data
+ * @param resultSet ResultSet that supplies the array data
* @throws SQLException if a database access error occurs
* @return the newly created array
*/
@Override
- public Object[] toArray(final ResultSet rs) throws SQLException {
- final ResultSetMetaData meta = rs.getMetaData();
+ public Object[] toArray(final ResultSet resultSet) throws SQLException {
+ final ResultSetMetaData meta = resultSet.getMetaData();
final int cols = meta.getColumnCount();
final Object[] result = new Object[cols];
for (int i = 0; i < cols; i++) {
- result[i] = rs.getObject(i + 1);
+ result[i] = resultSet.getObject(i + 1);
}
return result;
@@ -212,14 +212,14 @@ public Object[] toArray(final ResultSet rs) throws SQLException {
* @see org.apache.commons.dbutils.RowProcessor#toBean(java.sql.ResultSet, Class)
* @see org.apache.commons.dbutils.BeanProcessor#toBean(java.sql.ResultSet, Class)
* @param The type of bean to create
- * @param rs ResultSet that supplies the bean data
+ * @param resultSet ResultSet that supplies the bean data
* @param type Class from which to create the bean instance
* @throws SQLException if a database access error occurs
* @return the newly created bean
*/
@Override
- public T toBean(final ResultSet rs, final Class extends T> type) throws SQLException {
- return this.convert.toBean(rs, type);
+ public T toBean(final ResultSet resultSet, final Class extends T> type) throws SQLException {
+ return this.convert.toBean(resultSet, type);
}
/**
@@ -228,15 +228,15 @@ public T toBean(final ResultSet rs, final Class extends T> type) throws SQ
* @see org.apache.commons.dbutils.RowProcessor#toBeanList(java.sql.ResultSet, Class)
* @see org.apache.commons.dbutils.BeanProcessor#toBeanList(java.sql.ResultSet, Class)
* @param The type of bean to create
- * @param rs ResultSet that supplies the bean data
+ * @param resultSet ResultSet that supplies the bean data
* @param type Class from which to create the bean instance
* @throws SQLException if a database access error occurs
* @return A {@code List} of beans with the given type in the order
* they were returned by the {@code ResultSet}.
*/
@Override
- public List toBeanList(final ResultSet rs, final Class extends T> type) throws SQLException {
- return this.convert.toBeanList(rs, type);
+ public List toBeanList(final ResultSet resultSet, final Class extends T> type) throws SQLException {
+ return this.convert.toBeanList(resultSet, type);
}
@@ -250,14 +250,14 @@ public List toBeanList(final ResultSet rs, final Class extends T> type)
* the entry set of the returned map will return the first column of the ResultSet, then the second and so forth.
*
*
- * @param rs ResultSet that supplies the map data
+ * @param resultSet ResultSet that supplies the map data
* @return the newly created Map
* @throws SQLException if a database access error occurs
* @see org.apache.commons.dbutils.RowProcessor#toMap(java.sql.ResultSet)
*/
@Override
- public Map toMap(final ResultSet rs) throws SQLException {
- final ResultSetMetaData rsmd = rs.getMetaData();
+ public Map toMap(final ResultSet resultSet) throws SQLException {
+ final ResultSetMetaData rsmd = resultSet.getMetaData();
final int cols = rsmd.getColumnCount();
final Map result = createCaseInsensitiveHashMap(cols);
@@ -270,7 +270,7 @@ public Map toMap(final ResultSet rs) throws SQLException {
// The column index can't be null
propKey = Integer.toString(i);
}
- result.put(propKey, rs.getObject(i));
+ result.put(propKey, resultSet.getObject(i));
}
return result;
diff --git a/src/main/java/org/apache/commons/dbutils/BeanProcessor.java b/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
index 63e54d60..c5af4779 100644
--- a/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
+++ b/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
@@ -159,19 +159,19 @@ private void callSetter(final Object target, final PropertyDescriptor prop, Obje
/**
* Creates a new object and initializes its fields from the ResultSet.
* @param The type of bean to create
- * @param rs The result set.
+ * @param resultSet The result set.
* @param type The bean type (the return type of the object).
* @param props The property descriptors.
* @param columnToProperty The column indices in the result set.
* @return An initialized object.
* @throws SQLException if a database error occurs.
*/
- private T createBean(final ResultSet rs, final Class type,
+ private T createBean(final ResultSet resultSet, final Class type,
final PropertyDescriptor[] props, final int[] columnToProperty)
throws SQLException {
final T bean = this.newInstance(type);
- return populateBean(rs, bean, props, columnToProperty);
+ return populateBean(resultSet, bean, props, columnToProperty);
}
/**
@@ -324,31 +324,31 @@ protected T newInstance(final Class c) throws SQLException {
/**
* Initializes the fields of the provided bean from the ResultSet.
* @param The type of bean
- * @param rs The result set.
+ * @param resultSet The result set.
* @param bean The bean to be populated.
* @return An initialized object.
* @throws SQLException if a database error occurs.
*/
- public T populateBean(final ResultSet rs, final T bean) throws SQLException {
+ public T populateBean(final ResultSet resultSet, final T bean) throws SQLException {
final PropertyDescriptor[] props = this.propertyDescriptors(bean.getClass());
- final ResultSetMetaData rsmd = rs.getMetaData();
+ final ResultSetMetaData rsmd = resultSet.getMetaData();
final int[] columnToProperty = this.mapColumnsToProperties(rsmd, props);
- return populateBean(rs, bean, props, columnToProperty);
+ return populateBean(resultSet, bean, props, columnToProperty);
}
/**
* This method populates a bean from the ResultSet based upon the underlying meta-data.
*
* @param The type of bean
- * @param rs The result set.
+ * @param resultSet The result set.
* @param bean The bean to be populated.
* @param props The property descriptors.
* @param columnToProperty The column indices in the result set.
* @return An initialized object.
* @throws SQLException if a database error occurs.
*/
- private T populateBean(final ResultSet rs, final T bean,
+ private T populateBean(final ResultSet resultSet, final T bean,
final PropertyDescriptor[] props, final int[] columnToProperty)
throws SQLException {
@@ -363,7 +363,7 @@ private T populateBean(final ResultSet rs, final T bean,
Object value = null;
if (propType != null) {
- value = this.processColumn(rs, i, propType);
+ value = this.processColumn(resultSet, i, propType);
if (value == null && propType.isPrimitive()) {
value = primitiveDefaults.get(propType);
@@ -389,7 +389,7 @@ private T populateBean(final ResultSet rs, final T bean,
* {@code ResultSet} types, {@code getObject} is called.
*
*
- * @param rs The {@code ResultSet} currently being processed. It is
+ * @param resultSet The {@code ResultSet} currently being processed. It is
* positioned on a valid row before being passed into this method.
*
* @param index The current column index being processed.
@@ -403,10 +403,10 @@ private T populateBean(final ResultSet rs, final T bean,
* index after optional type processing or {@code null} if the column
* value was SQL NULL.
*/
- protected Object processColumn(final ResultSet rs, final int index, final Class> propType)
+ protected Object processColumn(final ResultSet resultSet, final int index, final Class> propType)
throws SQLException {
- Object retval = rs.getObject(index);
+ Object retval = resultSet.getObject(index);
if ( !propType.isPrimitive() && retval == null ) {
return null;
@@ -414,7 +414,7 @@ protected Object processColumn(final ResultSet rs, final int index, final Class<
for (final ColumnHandler> handler : columnHandlers) {
if (handler.match(propType)) {
- retval = handler.apply(rs, index);
+ retval = handler.apply(resultSet, index);
break;
}
}
@@ -511,25 +511,25 @@ public T toBean(final ResultSet rs, final Class extends T> type) throws SQ
* as the {@code ResultSet} get* methods.
* </p>
* @param The type of bean to create
- * @param rs ResultSet that supplies the bean data
+ * @param resultSet ResultSet that supplies the bean data
* @param type Class from which to create the bean instance
* @throws SQLException if a database access error occurs
* @return the newly created List of beans
*/
- public List toBeanList(final ResultSet rs, final Class extends T> type) throws SQLException {
+ public List toBeanList(final ResultSet resultSet, final Class extends T> type) throws SQLException {
final List results = new ArrayList<>();
- if (!rs.next()) {
+ if (!resultSet.next()) {
return results;
}
final PropertyDescriptor[] props = this.propertyDescriptors(type);
- final ResultSetMetaData rsmd = rs.getMetaData();
+ final ResultSetMetaData rsmd = resultSet.getMetaData();
final int[] columnToProperty = this.mapColumnsToProperties(rsmd, props);
do {
- results.add(this.createBean(rs, type, props, columnToProperty));
- } while (rs.next());
+ results.add(this.createBean(resultSet, type, props, columnToProperty));
+ } while (resultSet.next());
return results;
}
diff --git a/src/main/java/org/apache/commons/dbutils/ColumnHandler.java b/src/main/java/org/apache/commons/dbutils/ColumnHandler.java
index 6f79a767..c63829b1 100644
--- a/src/main/java/org/apache/commons/dbutils/ColumnHandler.java
+++ b/src/main/java/org/apache/commons/dbutils/ColumnHandler.java
@@ -31,13 +31,13 @@ public interface ColumnHandler {
* {@code propType}. This method is called only if this handler responded {@code true} after a call to
* {@link #match(Class)}.
*
- * @param rs The result set to get data from. This should be moved to the correct row already.
+ * @param resultSet The result set to get data from. This should be moved to the correct row already.
* @param columnIndex The position of the column to retrieve.
* @return The converted value or the original value if something doesn't work out.
* @throws SQLException if the columnIndex is not valid; if a database access error occurs or this method is
* called on a closed result set
*/
- T apply(ResultSet rs, int columnIndex) throws SQLException;
+ T apply(ResultSet resultSet, int columnIndex) throws SQLException;
/**
* Test whether this {@code ColumnHandler} wants to handle a column targeted for a value type matching
diff --git a/src/main/java/org/apache/commons/dbutils/DbUtils.java b/src/main/java/org/apache/commons/dbutils/DbUtils.java
index 4cad2bfc..c39e4a5c 100644
--- a/src/main/java/org/apache/commons/dbutils/DbUtils.java
+++ b/src/main/java/org/apache/commons/dbutils/DbUtils.java
@@ -142,12 +142,12 @@ public static void close(final Connection conn) throws SQLException {
/**
* Close a {@code ResultSet}, avoid closing if null.
*
- * @param rs ResultSet to close.
+ * @param resultSet ResultSet to close.
* @throws SQLException if a database access error occurs
*/
- public static void close(final ResultSet rs) throws SQLException {
- if (rs != null) {
- rs.close();
+ public static void close(final ResultSet resultSet) throws SQLException {
+ if (resultSet != null) {
+ resultSet.close();
}
}
@@ -205,11 +205,11 @@ public static void closeQuietly(final Connection conn, final Statement stmt,
* Close a {@code ResultSet}, avoid closing if null and hide any
* SQLExceptions that occur.
*
- * @param rs ResultSet to close.
+ * @param resultSet ResultSet to close.
*/
- public static void closeQuietly(final ResultSet rs) {
+ public static void closeQuietly(final ResultSet resultSet) {
try {
- close(rs);
+ close(resultSet);
} catch (final SQLException e) { // NOPMD
// quiet
}
diff --git a/src/main/java/org/apache/commons/dbutils/QueryLoader.java b/src/main/java/org/apache/commons/dbutils/QueryLoader.java
index c670404d..432540c0 100644
--- a/src/main/java/org/apache/commons/dbutils/QueryLoader.java
+++ b/src/main/java/org/apache/commons/dbutils/QueryLoader.java
@@ -126,8 +126,7 @@ protected Map loadQueries(final String path) throws IOException
// Copy to HashMap for better performance
@SuppressWarnings({"rawtypes", "unchecked" }) // load() always creates entries
- final
- HashMap hashMap = new HashMap(props);
+ final HashMap hashMap = new HashMap(props);
return hashMap;
}
diff --git a/src/main/java/org/apache/commons/dbutils/QueryRunner.java b/src/main/java/org/apache/commons/dbutils/QueryRunner.java
index 93f6877c..ca5e5ee8 100644
--- a/src/main/java/org/apache/commons/dbutils/QueryRunner.java
+++ b/src/main/java/org/apache/commons/dbutils/QueryRunner.java
@@ -280,8 +280,8 @@ public List execute(final Connection conn, final String sql, final Result
while (moreResultSets) {
try (@SuppressWarnings("resource")
// assume the ResultSet wrapper properly closes
- ResultSet rs = this.wrap(stmt.getResultSet())) {
- results.add(rsh.handle(rs));
+ ResultSet resultSet = this.wrap(stmt.getResultSet())) {
+ results.add(rsh.handle(resultSet));
moreResultSets = stmt.getMoreResults();
}
}
@@ -490,8 +490,8 @@ public T insertBatch(final Connection conn, final String sql, final ResultSe
stmt.addBatch();
}
stmt.executeBatch();
- try (ResultSet rs = stmt.getGeneratedKeys()) {
- generatedKeys = rsh.handle(rs);
+ try (ResultSet resultSet = stmt.getGeneratedKeys()) {
+ generatedKeys = rsh.handle(resultSet);
}
} catch (final SQLException e) {
this.rethrow(e, sql, (Object[])params);
@@ -595,7 +595,7 @@ public T query(final Connection conn, final String sql, final ResultSetHandl
}
Statement stmt = null;
- ResultSet rs = null;
+ ResultSet resultSet = null;
T result = null;
try {
@@ -603,18 +603,18 @@ public T query(final Connection conn, final String sql, final ResultSetHandl
final PreparedStatement ps = this.prepareStatement(conn, sql);
stmt = ps;
this.fillStatement(ps, params);
- rs = this.wrap(ps.executeQuery());
+ resultSet = this.wrap(ps.executeQuery());
} else {
stmt = conn.createStatement();
- rs = this.wrap(stmt.executeQuery(sql));
+ resultSet = this.wrap(stmt.executeQuery(sql));
}
- result = rsh.handle(rs);
+ result = rsh.handle(resultSet);
} catch (final SQLException e) {
this.rethrow(e, sql, params);
} finally {
- closeQuietly(rs);
+ closeQuietly(resultSet);
closeQuietly(stmt);
}
diff --git a/src/main/java/org/apache/commons/dbutils/ResultSetHandler.java b/src/main/java/org/apache/commons/dbutils/ResultSetHandler.java
index 17dcd39c..060b75f9 100644
--- a/src/main/java/org/apache/commons/dbutils/ResultSetHandler.java
+++ b/src/main/java/org/apache/commons/dbutils/ResultSetHandler.java
@@ -29,7 +29,7 @@ public interface ResultSetHandler {
/**
* Turn the {@code ResultSet} into an Object.
*
- * @param rs The {@code ResultSet} to handle. It has not been touched
+ * @param resultSet The {@code ResultSet} to handle. It has not been touched
* before being passed to this method.
*
* @return An Object initialized with {@code ResultSet} data. It is
@@ -38,6 +38,6 @@ public interface ResultSetHandler {
*
* @throws SQLException if a database access error occurs
*/
- T handle(ResultSet rs) throws SQLException;
+ T handle(ResultSet resultSet) throws SQLException;
}
\ No newline at end of file
diff --git a/src/main/java/org/apache/commons/dbutils/ResultSetIterator.java b/src/main/java/org/apache/commons/dbutils/ResultSetIterator.java
index 4fe5fe2a..7535023b 100644
--- a/src/main/java/org/apache/commons/dbutils/ResultSetIterator.java
+++ b/src/main/java/org/apache/commons/dbutils/ResultSetIterator.java
@@ -37,17 +37,17 @@ public class ResultSetIterator implements Iterator