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/10 18:07:32 UTC
[1/4] commons-dbcp git commit: Some ivars use _ as a prefix and some
others do not. Normalize to not use a _ prefix.
Repository: commons-dbcp
Updated Branches:
refs/heads/master 6658eba68 -> 87266fdb9
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
index 46671d5..310bb01 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
@@ -44,9 +44,9 @@ import java.util.List;
*/
public class DelegatingStatement extends AbandonedTrace implements Statement {
/** My delegate. */
- private Statement _stmt = null;
+ private Statement statement = null;
/** The connection that created me. **/
- private DelegatingConnection<?> _conn = null;
+ private DelegatingConnection<?> connection = null;
/**
* Create a wrapper for the Statement which traces this
@@ -58,8 +58,8 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
*/
public DelegatingStatement(final DelegatingConnection<?> c, final Statement s) {
super(c);
- _stmt = s;
- _conn = c;
+ statement = s;
+ connection = c;
}
/**
@@ -68,7 +68,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
* @see #getInnermostDelegate
*/
public Statement getDelegate() {
- return _stmt;
+ return statement;
}
@@ -89,7 +89,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
* @see #getDelegate
*/
public Statement getInnermostDelegate() {
- Statement s = _stmt;
+ Statement s = statement;
while(s != null && s instanceof DelegatingStatement) {
s = ((DelegatingStatement)s).getDelegate();
if(this == s) {
@@ -101,17 +101,17 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
/** Sets my delegate. */
public void setDelegate(final Statement s) {
- _stmt = s;
+ statement = s;
}
- private boolean _closed = false;
+ private boolean closed = false;
protected boolean isClosedInternal() {
- return _closed;
+ return closed;
}
protected void setClosedInternal(final boolean closed) {
- this._closed = closed;
+ this.closed = closed;
}
protected void checkOpen() throws SQLException {
@@ -133,9 +133,9 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
}
try {
try {
- if (_conn != null) {
- _conn.removeTrace(this);
- _conn = null;
+ if (connection != null) {
+ connection.removeTrace(this);
+ connection = null;
}
// The JDBC spec requires that a statement close any open
@@ -151,8 +151,8 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
clearTrace();
}
- if (_stmt != null) {
- _stmt.close();
+ if (statement != null) {
+ statement.close();
}
}
catch (final SQLException e) {
@@ -160,14 +160,14 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
}
}
finally {
- _closed = true;
- _stmt = null;
+ closed = true;
+ statement = null;
}
}
protected void handleException(final SQLException e) throws SQLException {
- if (_conn != null) {
- _conn.handleException(e);
+ if (connection != null) {
+ connection.handleException(e);
}
else {
throw e;
@@ -180,8 +180,8 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
* @since 2.4.0 made public, was protected in 2.3.0.
*/
public void activate() throws SQLException {
- if(_stmt instanceof DelegatingStatement) {
- ((DelegatingStatement)_stmt).activate();
+ if(statement instanceof DelegatingStatement) {
+ ((DelegatingStatement)statement).activate();
}
}
@@ -191,8 +191,8 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
* @since 2.4.0 made public, was protected in 2.3.0.
*/
public void passivate() throws SQLException {
- if(_stmt instanceof DelegatingStatement) {
- ((DelegatingStatement)_stmt).passivate();
+ if(statement instanceof DelegatingStatement) {
+ ((DelegatingStatement)statement).passivate();
}
}
@@ -203,17 +203,17 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
}
protected DelegatingConnection<?> getConnectionInternal() {
- return _conn;
+ return connection;
}
@Override
public ResultSet executeQuery(final String sql) throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return DelegatingResultSet.wrapResultSet(this,_stmt.executeQuery(sql));
+ return DelegatingResultSet.wrapResultSet(this,statement.executeQuery(sql));
}
catch (final SQLException e) {
handleException(e);
@@ -225,7 +225,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
public ResultSet getResultSet() throws SQLException {
checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(this,_stmt.getResultSet());
+ return DelegatingResultSet.wrapResultSet(this,statement.getResultSet());
}
catch (final SQLException e) {
handleException(e);
@@ -236,11 +236,11 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public int executeUpdate(final String sql) throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return _stmt.executeUpdate(sql);
+ return statement.executeUpdate(sql);
} catch (final SQLException e) {
handleException(e); return 0;
}
@@ -248,56 +248,56 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public int getMaxFieldSize() throws SQLException
- { checkOpen(); try { return _stmt.getMaxFieldSize(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return statement.getMaxFieldSize(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public void setMaxFieldSize(final int max) throws SQLException
- { checkOpen(); try { _stmt.setMaxFieldSize(max); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.setMaxFieldSize(max); } catch (final SQLException e) { handleException(e); } }
@Override
public int getMaxRows() throws SQLException
- { checkOpen(); try { return _stmt.getMaxRows(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return statement.getMaxRows(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public void setMaxRows(final int max) throws SQLException
- { checkOpen(); try { _stmt.setMaxRows(max); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.setMaxRows(max); } catch (final SQLException e) { handleException(e); } }
@Override
public void setEscapeProcessing(final boolean enable) throws SQLException
- { checkOpen(); try { _stmt.setEscapeProcessing(enable); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.setEscapeProcessing(enable); } catch (final SQLException e) { handleException(e); } }
@Override
public int getQueryTimeout() throws SQLException
- { checkOpen(); try { return _stmt.getQueryTimeout(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return statement.getQueryTimeout(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public void setQueryTimeout(final int seconds) throws SQLException
- { checkOpen(); try { _stmt.setQueryTimeout(seconds); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.setQueryTimeout(seconds); } catch (final SQLException e) { handleException(e); } }
@Override
public void cancel() throws SQLException
- { checkOpen(); try { _stmt.cancel(); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.cancel(); } catch (final SQLException e) { handleException(e); } }
@Override
public SQLWarning getWarnings() throws SQLException
- { checkOpen(); try { return _stmt.getWarnings(); } catch (final SQLException e) { handleException(e); throw new AssertionError(); } }
+ { checkOpen(); try { return statement.getWarnings(); } catch (final SQLException e) { handleException(e); throw new AssertionError(); } }
@Override
public void clearWarnings() throws SQLException
- { checkOpen(); try { _stmt.clearWarnings(); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.clearWarnings(); } catch (final SQLException e) { handleException(e); } }
@Override
public void setCursorName(final String name) throws SQLException
- { checkOpen(); try { _stmt.setCursorName(name); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.setCursorName(name); } catch (final SQLException e) { handleException(e); } }
@Override
public boolean execute(final String sql) throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return _stmt.execute(sql);
+ return statement.execute(sql);
} catch (final SQLException e) {
handleException(e);
return false;
@@ -306,52 +306,52 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public int getUpdateCount() throws SQLException
- { checkOpen(); try { return _stmt.getUpdateCount(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return statement.getUpdateCount(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public boolean getMoreResults() throws SQLException
- { checkOpen(); try { return _stmt.getMoreResults(); } catch (final SQLException e) { handleException(e); return false; } }
+ { checkOpen(); try { return statement.getMoreResults(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public void setFetchDirection(final int direction) throws SQLException
- { checkOpen(); try { _stmt.setFetchDirection(direction); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.setFetchDirection(direction); } catch (final SQLException e) { handleException(e); } }
@Override
public int getFetchDirection() throws SQLException
- { checkOpen(); try { return _stmt.getFetchDirection(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return statement.getFetchDirection(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public void setFetchSize(final int rows) throws SQLException
- { checkOpen(); try { _stmt.setFetchSize(rows); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.setFetchSize(rows); } catch (final SQLException e) { handleException(e); } }
@Override
public int getFetchSize() throws SQLException
- { checkOpen(); try { return _stmt.getFetchSize(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return statement.getFetchSize(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public int getResultSetConcurrency() throws SQLException
- { checkOpen(); try { return _stmt.getResultSetConcurrency(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return statement.getResultSetConcurrency(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public int getResultSetType() throws SQLException
- { checkOpen(); try { return _stmt.getResultSetType(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return statement.getResultSetType(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public void addBatch(final String sql) throws SQLException
- { checkOpen(); try { _stmt.addBatch(sql); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.addBatch(sql); } catch (final SQLException e) { handleException(e); } }
@Override
public void clearBatch() throws SQLException
- { checkOpen(); try { _stmt.clearBatch(); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { statement.clearBatch(); } catch (final SQLException e) { handleException(e); } }
@Override
public int[] executeBatch() throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return _stmt.executeBatch();
+ return statement.executeBatch();
} catch (final SQLException e) {
handleException(e);
throw new AssertionError();
@@ -365,18 +365,18 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
*/
@Override
public String toString() {
- return _stmt == null ? "NULL" : _stmt.toString();
+ return statement == null ? "NULL" : statement.toString();
}
@Override
public boolean getMoreResults(final int current) throws SQLException
- { checkOpen(); try { return _stmt.getMoreResults(current); } catch (final SQLException e) { handleException(e); return false; } }
+ { checkOpen(); try { return statement.getMoreResults(current); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public ResultSet getGeneratedKeys() throws SQLException {
checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(this, _stmt.getGeneratedKeys());
+ return DelegatingResultSet.wrapResultSet(this, statement.getGeneratedKeys());
} catch (final SQLException e) {
handleException(e);
throw new AssertionError();
@@ -386,11 +386,11 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public int executeUpdate(final String sql, final int autoGeneratedKeys) throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return _stmt.executeUpdate(sql, autoGeneratedKeys);
+ return statement.executeUpdate(sql, autoGeneratedKeys);
} catch (final SQLException e) {
handleException(e);
return 0;
@@ -400,11 +400,11 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public int executeUpdate(final String sql, final int columnIndexes[]) throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return _stmt.executeUpdate(sql, columnIndexes);
+ return statement.executeUpdate(sql, columnIndexes);
} catch (final SQLException e) {
handleException(e);
return 0;
@@ -414,11 +414,11 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public int executeUpdate(final String sql, final String columnNames[]) throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return _stmt.executeUpdate(sql, columnNames);
+ return statement.executeUpdate(sql, columnNames);
} catch (final SQLException e) {
handleException(e);
return 0;
@@ -428,11 +428,11 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public boolean execute(final String sql, final int autoGeneratedKeys) throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return _stmt.execute(sql, autoGeneratedKeys);
+ return statement.execute(sql, autoGeneratedKeys);
} catch (final SQLException e) {
handleException(e);
return false;
@@ -442,11 +442,11 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public boolean execute(final String sql, final int columnIndexes[]) throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return _stmt.execute(sql, columnIndexes);
+ return statement.execute(sql, columnIndexes);
} catch (final SQLException e) {
handleException(e);
return false;
@@ -456,11 +456,11 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public boolean execute(final String sql, final String columnNames[]) throws SQLException {
checkOpen();
- if (_conn != null) {
- _conn.setLastUsed();
+ if (connection != null) {
+ connection.setLastUsed();
}
try {
- return _stmt.execute(sql, columnNames);
+ return statement.execute(sql, columnNames);
} catch (final SQLException e) {
handleException(e);
return false;
@@ -469,14 +469,14 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
@Override
public int getResultSetHoldability() throws SQLException
- { checkOpen(); try { return _stmt.getResultSetHoldability(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return statement.getResultSetHoldability(); } catch (final SQLException e) { handleException(e); return 0; } }
/*
* Note was protected prior to JDBC 4
*/
@Override
public boolean isClosed() throws SQLException {
- return _closed;
+ return closed;
}
@@ -484,10 +484,10 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
public boolean isWrapperFor(final Class<?> iface) throws SQLException {
if (iface.isAssignableFrom(getClass())) {
return true;
- } else if (iface.isAssignableFrom(_stmt.getClass())) {
+ } else if (iface.isAssignableFrom(statement.getClass())) {
return true;
} else {
- return _stmt.isWrapperFor(iface);
+ return statement.isWrapperFor(iface);
}
}
@@ -495,10 +495,10 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
public <T> T unwrap(final Class<T> iface) throws SQLException {
if (iface.isAssignableFrom(getClass())) {
return iface.cast(this);
- } else if (iface.isAssignableFrom(_stmt.getClass())) {
- return iface.cast(_stmt);
+ } else if (iface.isAssignableFrom(statement.getClass())) {
+ return iface.cast(statement);
} else {
- return _stmt.unwrap(iface);
+ return statement.unwrap(iface);
}
}
@@ -506,7 +506,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
public void setPoolable(final boolean poolable) throws SQLException {
checkOpen();
try {
- _stmt.setPoolable(poolable);
+ statement.setPoolable(poolable);
}
catch (final SQLException e) {
handleException(e);
@@ -517,7 +517,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
public boolean isPoolable() throws SQLException {
checkOpen();
try {
- return _stmt.isPoolable();
+ return statement.isPoolable();
}
catch (final SQLException e) {
handleException(e);
@@ -529,7 +529,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
public void closeOnCompletion() throws SQLException {
checkOpen();
try {
- _stmt.closeOnCompletion();
+ statement.closeOnCompletion();
} catch (final SQLException e) {
handleException(e);
}
@@ -539,7 +539,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
public boolean isCloseOnCompletion() throws SQLException {
checkOpen();
try {
- return _stmt.isCloseOnCompletion();
+ return statement.isCloseOnCompletion();
} catch (final SQLException e) {
handleException(e);
return false;
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
index b1d439c..ba48766 100644
--- a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
@@ -27,24 +27,24 @@ import java.util.Properties;
* @since 2.0
*/
public class DriverConnectionFactory implements ConnectionFactory {
+
+ private final String connectionUri;
+ private final Driver driver;
+ private final Properties properties;
+
public DriverConnectionFactory(final Driver driver, final String connectUri, final Properties props) {
- _driver = driver;
- _connectUri = connectUri;
- _props = props;
+ this.driver = driver;
+ this.connectionUri = connectUri;
+ this.properties = props;
}
-
@Override
public Connection createConnection() throws SQLException {
- return _driver.connect(_connectUri,_props);
+ return driver.connect(connectionUri,properties);
}
- private final Driver _driver;
- private final String _connectUri;
- private final Properties _props;
-
@Override
public String toString() {
- return this.getClass().getName() + " [" + String.valueOf(_driver) + ";" +
- String.valueOf(_connectUri) + ";" + String.valueOf(_props) + "]";
+ return this.getClass().getName() + " [" + String.valueOf(driver) + ";" +
+ String.valueOf(connectionUri) + ";" + String.valueOf(properties) + "]";
}
}
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
index b7fab34..562c017 100644
--- a/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
@@ -43,54 +43,54 @@ public class DriverManagerConnectionFactory implements ConnectionFactory {
/**
* Constructor for DriverManagerConnectionFactory.
- * @param connectUri a database url of the form
+ * @param connectionUri a database url of the form
* <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>
* @since 2.2
*/
- public DriverManagerConnectionFactory(final String connectUri) {
- _connectUri = connectUri;
- _props = new Properties();
+ public DriverManagerConnectionFactory(final String connectionUri) {
+ this.connectionUri = connectionUri;
+ this.propeties = new Properties();
}
/**
* Constructor for DriverManagerConnectionFactory.
- * @param connectUri a database url of the form
+ * @param connectionUri a database url of the form
* <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>
- * @param props a list of arbitrary string tag/value pairs as
+ * @param properties a list of arbitrary string tag/value pairs as
* connection arguments; normally at least a "user" and "password"
* property should be included.
*/
- public DriverManagerConnectionFactory(final String connectUri, final Properties props) {
- _connectUri = connectUri;
- _props = props;
+ public DriverManagerConnectionFactory(final String connectionUri, final Properties properties) {
+ this.connectionUri = connectionUri;
+ this.propeties = properties;
}
/**
* Constructor for DriverManagerConnectionFactory.
- * @param connectUri a database url of the form
+ * @param connectionUri a database url of the form
* <code>jdbc:<em>subprotocol</em>:<em>subname</em></code>
- * @param uname the database user
- * @param passwd the user's password
+ * @param userName the database user
+ * @param userPassword the user's password
*/
- public DriverManagerConnectionFactory(final String connectUri, final String uname, final String passwd) {
- _connectUri = connectUri;
- _uname = uname;
- _passwd = passwd;
+ public DriverManagerConnectionFactory(final String connectionUri, final String userName, final String userPassword) {
+ this.connectionUri = connectionUri;
+ this.userName = userName;
+ this.userPassword = userPassword;
}
@Override
public Connection createConnection() throws SQLException {
- if(null == _props) {
- if(_uname == null && _passwd == null) {
- return DriverManager.getConnection(_connectUri);
+ if (null == propeties) {
+ if (userName == null && userPassword == null) {
+ return DriverManager.getConnection(connectionUri);
}
- return DriverManager.getConnection(_connectUri,_uname,_passwd);
+ return DriverManager.getConnection(connectionUri, userName, userPassword);
}
- return DriverManager.getConnection(_connectUri,_props);
+ return DriverManager.getConnection(connectionUri, propeties);
}
- private String _connectUri = null;
- private String _uname = null;
- private String _passwd = null;
- private Properties _props = null;
+ private String connectionUri = null;
+ private String userName = null;
+ private String userPassword = null;
+ private Properties propeties = null;
}
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
index 3de19b8..36b3c09 100644
--- a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
+++ b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
@@ -31,31 +31,31 @@ import org.apache.commons.dbcp2.PoolingConnection.StatementType;
public class PStmtKey {
/** SQL defining Prepared or Callable Statement */
- private final String _sql;
+ private final String sql;
/** Result set type */
- private final Integer _resultSetType;
+ private final Integer resultSetType;
/** Result set concurrency */
- private final Integer _resultSetConcurrency;
+ private final Integer resultSetConcurrency;
/** Result set holdability */
- private final Integer _resultSetHoldability;
+ private final Integer resultSetHoldability;
/** Database catalog */
- private final String _catalog;
+ private final String catalog;
/** Auto generated keys */
- private final Integer _autoGeneratedKeys;
+ private final Integer autoGeneratedKeys;
/** column indexes */
- private final int[] _columnIndexes;
+ private final int[] columnIndexes;
/** column names */
- private final String[] _columnNames;
+ private final String[] columnNames;
/** Statement type */
- private final StatementType _stmtType;
+ private final StatementType statementType;
/** Statement builder */
private StatementBuilder builder;
@@ -69,20 +69,20 @@ public class PStmtKey {
}
public PStmtKey(final String sql, final String catalog, final StatementType stmtType) {
- _sql = sql;
- _catalog = catalog;
- _stmtType = stmtType;
- _autoGeneratedKeys = null;
- _columnIndexes = null;
- _columnNames = null;
- _resultSetType = null;
- _resultSetConcurrency = null;
- _resultSetHoldability = null;
+ this.sql = sql;
+ this.catalog = catalog;
+ this.statementType = stmtType;
+ this.autoGeneratedKeys = null;
+ this.columnIndexes = null;
+ this.columnNames = null;
+ this.resultSetType = null;
+ this.resultSetConcurrency = null;
+ this.resultSetHoldability = null;
// create builder
if (stmtType == StatementType.PREPARED_STATEMENT) {
- builder = new PreparedStatementSQL();
+ this.builder = new PreparedStatementSQL();
} else if (stmtType == StatementType.CALLABLE_STATEMENT) {
- builder = new PreparedCallSQL();
+ this.builder = new PreparedCallSQL();
}
}
@@ -91,47 +91,47 @@ public class PStmtKey {
}
public PStmtKey(final String sql, final String catalog, final StatementType stmtType, final Integer autoGeneratedKeys) {
- _sql = sql;
- _catalog = catalog;
- _stmtType = stmtType;
- _autoGeneratedKeys = autoGeneratedKeys;
- _columnIndexes = null;
- _columnNames = null;
- _resultSetType = null;
- _resultSetConcurrency = null;
- _resultSetHoldability = null;
+ this.sql = sql;
+ this.catalog = catalog;
+ this.statementType = stmtType;
+ this.autoGeneratedKeys = autoGeneratedKeys;
+ this.columnIndexes = null;
+ this.columnNames = null;
+ this.resultSetType = null;
+ this.resultSetConcurrency = null;
+ this.resultSetHoldability = null;
// create builder
if (stmtType == StatementType.PREPARED_STATEMENT) {
- builder = new PreparedStatementWithAutoGeneratedKeys();
+ this.builder = new PreparedStatementWithAutoGeneratedKeys();
} else if (stmtType == StatementType.CALLABLE_STATEMENT) {
- builder = new PreparedCallSQL();
+ this.builder = new PreparedCallSQL();
}
}
public PStmtKey(final String sql, final String catalog, final int[] columnIndexes) {
- _sql = sql;
- _catalog = catalog;
- _stmtType = StatementType.PREPARED_STATEMENT;
- _autoGeneratedKeys = null;
- _columnIndexes = columnIndexes == null ? null : Arrays.copyOf(columnIndexes, columnIndexes.length);
- _columnNames = null;
- _resultSetType = null;
- _resultSetConcurrency = null;
- _resultSetHoldability = null;
+ this.sql = sql;
+ this.catalog = catalog;
+ this.statementType = StatementType.PREPARED_STATEMENT;
+ this.autoGeneratedKeys = null;
+ this.columnIndexes = columnIndexes == null ? null : Arrays.copyOf(columnIndexes, columnIndexes.length);
+ this.columnNames = null;
+ this.resultSetType = null;
+ this.resultSetConcurrency = null;
+ this.resultSetHoldability = null;
// create builder
- builder = new PreparedStatementWithColumnIndexes();
+ this.builder = new PreparedStatementWithColumnIndexes();
}
public PStmtKey(final String sql, final String catalog, final String[] columnNames) {
- _sql = sql;
- _catalog = catalog;
- _stmtType = StatementType.PREPARED_STATEMENT;
- _autoGeneratedKeys = null;
- _columnIndexes = null;
- _columnNames = columnNames == null ? null : Arrays.copyOf(columnNames, columnNames.length);
- _resultSetType = null;
- _resultSetConcurrency = null;
- _resultSetHoldability = null;
+ this.sql = sql;
+ this.catalog = catalog;
+ this.statementType = StatementType.PREPARED_STATEMENT;
+ this.autoGeneratedKeys = null;
+ this.columnIndexes = null;
+ this.columnNames = columnNames == null ? null : Arrays.copyOf(columnNames, columnNames.length);
+ this.resultSetType = null;
+ this.resultSetConcurrency = null;
+ this.resultSetHoldability = null;
// create builder
builder = new PreparedStatementWithColumnNames();
}
@@ -145,20 +145,20 @@ public class PStmtKey {
}
public PStmtKey(final String sql, final String catalog, final int resultSetType, final int resultSetConcurrency, final StatementType stmtType) {
- _sql = sql;
- _catalog = catalog;
- _resultSetType = Integer.valueOf(resultSetType);
- _resultSetConcurrency = Integer.valueOf(resultSetConcurrency);
- _resultSetHoldability = null;
- _stmtType = stmtType;
- _autoGeneratedKeys = null;
- _columnIndexes = null;
- _columnNames = null;
+ this.sql = sql;
+ this.catalog = catalog;
+ this.resultSetType = Integer.valueOf(resultSetType);
+ this.resultSetConcurrency = Integer.valueOf(resultSetConcurrency);
+ this.resultSetHoldability = null;
+ this.statementType = stmtType;
+ this.autoGeneratedKeys = null;
+ this.columnIndexes = null;
+ this.columnNames = null;
// create builder
if (stmtType == StatementType.PREPARED_STATEMENT) {
- builder = new PreparedStatementWithResultSetConcurrency();
+ this.builder = new PreparedStatementWithResultSetConcurrency();
} else if (stmtType == StatementType.CALLABLE_STATEMENT) {
- builder = new PreparedCallWithResultSetConcurrency();
+ this.builder = new PreparedCallWithResultSetConcurrency();
}
}
@@ -169,58 +169,58 @@ public class PStmtKey {
public PStmtKey(final String sql, final String catalog, final int resultSetType, final int resultSetConcurrency,
final int resultSetHoldability, final StatementType stmtType) {
- _sql = sql;
- _catalog = catalog;
- _resultSetType = Integer.valueOf(resultSetType);
- _resultSetConcurrency = Integer.valueOf(resultSetConcurrency);
- _resultSetHoldability = Integer.valueOf(resultSetHoldability);
- _stmtType = stmtType;
- _autoGeneratedKeys = null;
- _columnIndexes = null;
- _columnNames = null;
+ this.sql = sql;
+ this.catalog = catalog;
+ this.resultSetType = Integer.valueOf(resultSetType);
+ this.resultSetConcurrency = Integer.valueOf(resultSetConcurrency);
+ this.resultSetHoldability = Integer.valueOf(resultSetHoldability);
+ this.statementType = stmtType;
+ this.autoGeneratedKeys = null;
+ this.columnIndexes = null;
+ this.columnNames = null;
// create builder
if (stmtType == StatementType.PREPARED_STATEMENT) {
- builder = new PreparedStatementWithResultSetHoldability();
+ this.builder = new PreparedStatementWithResultSetHoldability();
} else if (stmtType == StatementType.CALLABLE_STATEMENT) {
- builder = new PreparedCallWithResultSetHoldability();
+ this.builder = new PreparedCallWithResultSetHoldability();
}
}
public String getSql() {
- return _sql;
+ return sql;
}
public Integer getResultSetType() {
- return _resultSetType;
+ return resultSetType;
}
public Integer getResultSetConcurrency() {
- return _resultSetConcurrency;
+ return resultSetConcurrency;
}
public Integer getResultSetHoldability() {
- return _resultSetHoldability;
+ return resultSetHoldability;
}
public Integer getAutoGeneratedKeys() {
- return _autoGeneratedKeys;
+ return autoGeneratedKeys;
}
public int[] getColumnIndexes() {
- return _columnIndexes;
+ return columnIndexes;
}
public String[] getColumnNames() {
- return _columnNames;
+ return columnNames;
}
public String getCatalog() {
- return _catalog;
+ return catalog;
}
public StatementType getStmtType() {
- return _stmtType;
+ return statementType;
}
@Override
@@ -235,55 +235,55 @@ public class PStmtKey {
return false;
}
final PStmtKey other = (PStmtKey) obj;
- if (_catalog == null) {
- if (other._catalog != null) {
+ if (catalog == null) {
+ if (other.catalog != null) {
return false;
}
- } else if (!_catalog.equals(other._catalog)) {
+ } else if (!catalog.equals(other.catalog)) {
return false;
}
- if (_resultSetConcurrency == null) {
- if (other._resultSetConcurrency != null) {
+ if (resultSetConcurrency == null) {
+ if (other.resultSetConcurrency != null) {
return false;
}
- } else if (!_resultSetConcurrency.equals(other._resultSetConcurrency)) {
+ } else if (!resultSetConcurrency.equals(other.resultSetConcurrency)) {
return false;
}
- if (_resultSetType == null) {
- if (other._resultSetType != null) {
+ if (resultSetType == null) {
+ if (other.resultSetType != null) {
return false;
}
- } else if (!_resultSetType.equals(other._resultSetType)) {
+ } else if (!resultSetType.equals(other.resultSetType)) {
return false;
}
- if (_resultSetHoldability == null) {
- if (other._resultSetHoldability != null) {
+ if (resultSetHoldability == null) {
+ if (other.resultSetHoldability != null) {
return false;
}
- } else if (!_resultSetHoldability.equals(other._resultSetHoldability)) {
+ } else if (!resultSetHoldability.equals(other.resultSetHoldability)) {
return false;
}
- if (_autoGeneratedKeys == null) {
- if (other._autoGeneratedKeys != null) {
+ if (autoGeneratedKeys == null) {
+ if (other.autoGeneratedKeys != null) {
return false;
}
- } else if (!_autoGeneratedKeys.equals(other._autoGeneratedKeys)) {
+ } else if (!autoGeneratedKeys.equals(other.autoGeneratedKeys)) {
return false;
}
- if (!Arrays.equals(_columnIndexes, other._columnIndexes)) {
+ if (!Arrays.equals(columnIndexes, other.columnIndexes)) {
return false;
}
- if (!Arrays.equals(_columnNames, other._columnNames)) {
+ if (!Arrays.equals(columnNames, other.columnNames)) {
return false;
}
- if (_sql == null) {
- if (other._sql != null) {
+ if (sql == null) {
+ if (other.sql != null) {
return false;
}
- } else if (!_sql.equals(other._sql)) {
+ } else if (!sql.equals(other.sql)) {
return false;
}
- if (_stmtType != other._stmtType) {
+ if (statementType != other.statementType) {
return false;
}
return true;
@@ -293,15 +293,15 @@ public class PStmtKey {
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + (_catalog == null ? 0 : _catalog.hashCode());
- result = prime * result + (_resultSetConcurrency == null ? 0 : _resultSetConcurrency.hashCode());
- result = prime * result + (_resultSetType == null ? 0 : _resultSetType.hashCode());
- result = prime * result + (_resultSetHoldability == null ? 0 : _resultSetHoldability.hashCode());
- result = prime * result + (_sql == null ? 0 : _sql.hashCode());
- result = prime * result + (_autoGeneratedKeys == null ? 0 : _autoGeneratedKeys.hashCode());
- result = prime * result + Arrays.hashCode(_columnIndexes);
- result = prime * result + Arrays.hashCode(_columnNames);
- result = prime * result + _stmtType.hashCode();
+ result = prime * result + (catalog == null ? 0 : catalog.hashCode());
+ result = prime * result + (resultSetConcurrency == null ? 0 : resultSetConcurrency.hashCode());
+ result = prime * result + (resultSetType == null ? 0 : resultSetType.hashCode());
+ result = prime * result + (resultSetHoldability == null ? 0 : resultSetHoldability.hashCode());
+ result = prime * result + (sql == null ? 0 : sql.hashCode());
+ result = prime * result + (autoGeneratedKeys == null ? 0 : autoGeneratedKeys.hashCode());
+ result = prime * result + Arrays.hashCode(columnIndexes);
+ result = prime * result + Arrays.hashCode(columnNames);
+ result = prime * result + statementType.hashCode();
return result;
}
@@ -309,23 +309,23 @@ public class PStmtKey {
public String toString() {
final StringBuffer buf = new StringBuffer();
buf.append("PStmtKey: sql=");
- buf.append(_sql);
+ buf.append(sql);
buf.append(", catalog=");
- buf.append(_catalog);
+ buf.append(catalog);
buf.append(", resultSetType=");
- buf.append(_resultSetType);
+ buf.append(resultSetType);
buf.append(", resultSetConcurrency=");
- buf.append(_resultSetConcurrency);
+ buf.append(resultSetConcurrency);
buf.append(", resultSetHoldability=");
- buf.append(_resultSetHoldability);
+ buf.append(resultSetHoldability);
buf.append(", autoGeneratedKeys=");
- buf.append(_autoGeneratedKeys);
+ buf.append(autoGeneratedKeys);
buf.append(", columnIndexes=");
- buf.append(Arrays.toString(_columnIndexes));
+ buf.append(Arrays.toString(columnIndexes));
buf.append(", columnNames=");
- buf.append(Arrays.toString(_columnNames));
+ buf.append(Arrays.toString(columnNames));
buf.append(", statementType=");
- buf.append(_stmtType);
+ buf.append(statementType);
return buf.toString();
}
@@ -349,7 +349,7 @@ public class PStmtKey {
private class PreparedStatementSQL implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareStatement(_sql);
+ final PreparedStatement statement = connection.prepareStatement(sql);
return statement;
}
}
@@ -361,7 +361,7 @@ public class PStmtKey {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
final PreparedStatement statement = connection.prepareStatement(
- _sql, _autoGeneratedKeys.intValue());
+ sql, autoGeneratedKeys.intValue());
return statement;
}
}
@@ -373,7 +373,7 @@ public class PStmtKey {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
final PreparedStatement statement = connection.prepareStatement(
- _sql, _columnIndexes);
+ sql, columnIndexes);
return statement;
}
}
@@ -385,7 +385,7 @@ public class PStmtKey {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
final PreparedStatement statement = connection.prepareStatement(
- _sql, _resultSetType.intValue(), _resultSetConcurrency.intValue());
+ sql, resultSetType.intValue(), resultSetConcurrency.intValue());
return statement;
}
}
@@ -397,8 +397,8 @@ public class PStmtKey {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
final PreparedStatement statement = connection.prepareStatement(
- _sql, _resultSetType.intValue(), _resultSetConcurrency.intValue(),
- _resultSetHoldability.intValue());
+ sql, resultSetType.intValue(), resultSetConcurrency.intValue(),
+ resultSetHoldability.intValue());
return statement;
}
}
@@ -410,7 +410,7 @@ public class PStmtKey {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
final PreparedStatement statement = connection.prepareStatement(
- _sql, _columnNames);
+ sql, columnNames);
return statement;
}
}
@@ -421,7 +421,7 @@ public class PStmtKey {
private class PreparedCallSQL implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareCall(_sql);
+ final PreparedStatement statement = connection.prepareCall(sql);
return statement;
}
}
@@ -433,7 +433,7 @@ public class PStmtKey {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
final PreparedStatement statement = connection.prepareCall(
- _sql, _resultSetType.intValue(), _resultSetConcurrency.intValue());
+ sql, resultSetType.intValue(), resultSetConcurrency.intValue());
return statement;
}
}
@@ -445,8 +445,8 @@ public class PStmtKey {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
final PreparedStatement statement = connection.prepareCall(
- _sql, _resultSetType.intValue(), _resultSetConcurrency.intValue(),
- _resultSetHoldability.intValue());
+ sql, resultSetType.intValue(), resultSetConcurrency.intValue(),
+ resultSetHoldability.intValue());
return statement;
}
}
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java b/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
index 023da51..b9dccad 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
@@ -39,27 +39,27 @@ public class PoolableCallableStatement extends DelegatingCallableStatement {
/**
* The {@link KeyedObjectPool} from which this CallableStatement was obtained.
*/
- private final KeyedObjectPool<PStmtKey, DelegatingPreparedStatement> _pool;
+ private final KeyedObjectPool<PStmtKey, DelegatingPreparedStatement> pool;
/**
* Key for this statement in the containing {@link KeyedObjectPool}.
*/
- private final PStmtKey _key;
+ private final PStmtKey key;
/**
* Constructor.
*
- * @param stmt the underlying {@link CallableStatement}
+ * @param callableStatement the underlying {@link CallableStatement}
* @param key the key for this statement in the {@link KeyedObjectPool}
* @param pool the {@link KeyedObjectPool} from which this CallableStatement was obtained
- * @param conn the {@link DelegatingConnection} that created this CallableStatement
+ * @param connection the {@link DelegatingConnection} that created this CallableStatement
*/
- public PoolableCallableStatement(final CallableStatement stmt, final PStmtKey key,
+ public PoolableCallableStatement(final CallableStatement callableStatement, final PStmtKey key,
final KeyedObjectPool<PStmtKey, DelegatingPreparedStatement> pool,
- final DelegatingConnection<Connection> conn) {
- super(conn, stmt);
- _pool = pool;
- _key = key;
+ final DelegatingConnection<Connection> connection) {
+ super(connection, callableStatement);
+ this.pool = pool;
+ this.key = key;
// Remove from trace now because this statement will be
// added by the activate method.
@@ -76,7 +76,7 @@ public class PoolableCallableStatement extends DelegatingCallableStatement {
// calling close twice should have no effect
if (!isClosed()) {
try {
- _pool.returnObject(_key, this);
+ pool.returnObject(key, this);
} catch (final SQLException e) {
throw e;
} catch (final RuntimeException e) {
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
index f598232..8602413 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
@@ -53,9 +53,9 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
}
/** The pool to which I should return. */
- private final ObjectPool<PoolableConnection> _pool;
+ private final ObjectPool<PoolableConnection> pool;
- private final ObjectNameWrapper _jmxObjectName;
+ private final ObjectNameWrapper jmxObjectName;
// Use a prepared statement for validation, retaining the last used SQL to
// check if the validation query has changed.
@@ -66,16 +66,16 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
* Indicate that unrecoverable SQLException was thrown when using this connection. Such a connection should be
* considered broken and not pass validation in the future.
*/
- private boolean _fatalSqlExceptionThrown = false;
+ private boolean fatalSqlExceptionThrown = false;
/**
* SQL_STATE codes considered to signal fatal conditions. Overrides the defaults in
* {@link Utils#DISCONNECTION_SQL_CODES} (plus anything starting with {@link Utils#DISCONNECTION_SQL_CODE_PREFIX}).
*/
- private final Collection<String> _disconnectionSqlCodes;
+ private final Collection<String> disconnectionSqlCodes;
/** Whether or not to fast fail validation after fatal connection errors */
- private final boolean _fastFailValidation;
+ private final boolean fastFailValidation;
/**
*
@@ -95,10 +95,10 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
final ObjectName jmxObjectName, final Collection<String> disconnectSqlCodes,
final boolean fastFailValidation) {
super(conn);
- _pool = pool;
- _jmxObjectName = ObjectNameWrapper.wrap(jmxObjectName);
- _disconnectionSqlCodes = disconnectSqlCodes;
- _fastFailValidation = fastFailValidation;
+ this.pool = pool;
+ this.jmxObjectName = ObjectNameWrapper.wrap(jmxObjectName);
+ this.disconnectionSqlCodes = disconnectSqlCodes;
+ this.fastFailValidation = fastFailValidation;
if (jmxObjectName != null) {
try {
@@ -168,7 +168,7 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
isUnderlyingConnectionClosed = getDelegateInternal().isClosed();
} catch (final SQLException e) {
try {
- _pool.invalidateObject(this);
+ pool.invalidateObject(this);
} catch (final IllegalStateException ise) {
// pool is closed, so close the connection
passivate();
@@ -188,7 +188,7 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
// Abnormal close: underlying connection closed unexpectedly, so we
// must destroy this proxy
try {
- _pool.invalidateObject(this);
+ pool.invalidateObject(this);
} catch (final IllegalStateException e) {
// pool is closed, so close the connection
passivate();
@@ -200,7 +200,7 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
// Normal close: underlying connection is still open, so we
// simply need to return this proxy to the pool
try {
- _pool.returnObject(this);
+ pool.returnObject(this);
} catch (final IllegalStateException e) {
// pool is closed, so close the connection
passivate();
@@ -220,8 +220,8 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
*/
@Override
public void reallyClose() throws SQLException {
- if (_jmxObjectName != null) {
- _jmxObjectName.unregisterMBean();
+ if (jmxObjectName != null) {
+ jmxObjectName.unregisterMBean();
}
if (validationPreparedStatement != null) {
@@ -262,7 +262,7 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
* if validation fails or an SQLException occurs during validation
*/
public void validate(final String sql, int timeout) throws SQLException {
- if (_fastFailValidation && _fatalSqlExceptionThrown) {
+ if (fastFailValidation && fatalSqlExceptionThrown) {
throw new SQLException(Utils.getMessage("poolableConnection.validate.fastFail"));
}
@@ -313,10 +313,10 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
boolean fatalException = false;
final String sqlState = e.getSQLState();
if (sqlState != null) {
- fatalException = _disconnectionSqlCodes == null
+ fatalException = disconnectionSqlCodes == null
? sqlState.startsWith(Utils.DISCONNECTION_SQL_CODE_PREFIX)
|| Utils.DISCONNECTION_SQL_CODES.contains(sqlState)
- : _disconnectionSqlCodes.contains(sqlState);
+ : disconnectionSqlCodes.contains(sqlState);
if (!fatalException) {
final SQLException nextException = e.getNextException();
if (nextException != null && nextException != e) {
@@ -329,7 +329,7 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
@Override
protected void handleException(final SQLException e) throws SQLException {
- _fatalSqlExceptionThrown |= isDisconnectionSqlException(e);
+ fatalSqlExceptionThrown |= isDisconnectionSqlException(e);
super.handleException(e);
}
}
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
index 791f953..e366e6d 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
@@ -58,7 +58,7 @@ public class PoolableConnectionFactory
*/
public PoolableConnectionFactory(final ConnectionFactory connFactory,
final ObjectName dataSourceJmxObjectName) {
- _connFactory = connFactory;
+ this.connectionFactory = connFactory;
this.dataSourceJmxName = dataSourceJmxObjectName;
}
@@ -70,7 +70,7 @@ public class PoolableConnectionFactory
* @param validationQuery a query to use to {@link #validateObject validate} {@link Connection}s.
*/
public void setValidationQuery(final String validationQuery) {
- _validationQuery = validationQuery;
+ this.validationQuery = validationQuery;
}
/**
@@ -79,10 +79,10 @@ public class PoolableConnectionFactory
* executing a validation query. Use a value less than or equal to 0 for
* no timeout.
*
- * @param timeout new validation query timeout value in seconds
+ * @param timeoutSeconds new validation query timeout value in seconds
*/
- public void setValidationQueryTimeout(final int timeout) {
- _validationQueryTimeout = timeout;
+ public void setValidationQueryTimeout(final int timeoutSeconds) {
+ this.validationQueryTimeoutSeconds = timeoutSeconds;
}
/**
@@ -91,7 +91,7 @@ public class PoolableConnectionFactory
* @param connectionInitSqls SQL statement to initialize {@link Connection}s.
*/
public void setConnectionInitSql(final Collection<String> connectionInitSqls) {
- _connectionInitSqls = connectionInitSqls;
+ this.connectionInitSqls = connectionInitSqls;
}
/**
@@ -99,14 +99,14 @@ public class PoolableConnectionFactory
* @param pool the {@link ObjectPool} in which to pool those {@link Connection}s
*/
public synchronized void setPool(final ObjectPool<PoolableConnection> pool) {
- if(null != _pool && pool != _pool) {
+ if(null != this.pool && pool != this.pool) {
try {
- _pool.close();
+ this.pool.close();
} catch(final Exception e) {
// ignored !?!
}
}
- _pool = pool;
+ this.pool = pool;
}
/**
@@ -114,7 +114,7 @@ public class PoolableConnectionFactory
* @return the connection pool
*/
public synchronized ObjectPool<PoolableConnection> getPool() {
- return _pool;
+ return pool;
}
/**
@@ -122,7 +122,7 @@ public class PoolableConnectionFactory
* @param defaultReadOnly the default "read only" setting for borrowed {@link Connection}s
*/
public void setDefaultReadOnly(final Boolean defaultReadOnly) {
- _defaultReadOnly = defaultReadOnly;
+ this.defaultReadOnly = defaultReadOnly;
}
/**
@@ -130,7 +130,7 @@ public class PoolableConnectionFactory
* @param defaultAutoCommit the default "auto commit" setting for borrowed {@link Connection}s
*/
public void setDefaultAutoCommit(final Boolean defaultAutoCommit) {
- _defaultAutoCommit = defaultAutoCommit;
+ this.defaultAutoCommit = defaultAutoCommit;
}
/**
@@ -138,7 +138,7 @@ public class PoolableConnectionFactory
* @param defaultTransactionIsolation the default "Transaction Isolation" setting for returned {@link Connection}s
*/
public void setDefaultTransactionIsolation(final int defaultTransactionIsolation) {
- _defaultTransactionIsolation = defaultTransactionIsolation;
+ this.defaultTransactionIsolation = defaultTransactionIsolation;
}
/**
@@ -146,11 +146,11 @@ public class PoolableConnectionFactory
* @param defaultCatalog the default "catalog" setting for borrowed {@link Connection}s
*/
public void setDefaultCatalog(final String defaultCatalog) {
- _defaultCatalog = defaultCatalog;
+ this.defaultCatalog = defaultCatalog;
}
public void setCacheState(final boolean cacheState) {
- this._cacheState = cacheState;
+ this.cacheState = cacheState;
}
public void setPoolStatements(final boolean poolStatements) {
@@ -220,7 +220,7 @@ public class PoolableConnectionFactory
* @since 2.1
*/
public Collection<String> getDisconnectionSqlCodes() {
- return _disconnectionSqlCodes;
+ return disconnectionSqlCodes;
}
/**
@@ -229,7 +229,7 @@ public class PoolableConnectionFactory
* @since 2.1
*/
public void setDisconnectionSqlCodes(final Collection<String> disconnectionSqlCodes) {
- _disconnectionSqlCodes = disconnectionSqlCodes;
+ this.disconnectionSqlCodes = disconnectionSqlCodes;
}
/**
@@ -242,7 +242,7 @@ public class PoolableConnectionFactory
* @since 2.1
*/
public boolean isFastFailValidation() {
- return _fastFailValidation;
+ return fastFailValidation;
}
/**
@@ -252,12 +252,12 @@ public class PoolableConnectionFactory
* @since 2.1
*/
public void setFastFailValidation(final boolean fastFailValidation) {
- _fastFailValidation = fastFailValidation;
+ this.fastFailValidation = fastFailValidation;
}
@Override
public PooledObject<PoolableConnection> makeObject() throws Exception {
- Connection conn = _connFactory.createConnection();
+ Connection conn = connectionFactory.createConnection();
if (conn == null) {
throw new IllegalStateException("Connection factory returned null from createConnection");
}
@@ -296,7 +296,7 @@ public class PoolableConnectionFactory
final KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> stmtPool =
new GenericKeyedObjectPool<>((PoolingConnection)conn, config);
((PoolingConnection)conn).setStatementPool(stmtPool);
- ((PoolingConnection) conn).setCacheState(_cacheState);
+ ((PoolingConnection) conn).setCacheState(cacheState);
}
// Register this connection with JMX
@@ -308,15 +308,15 @@ public class PoolableConnectionFactory
Constants.JMX_CONNECTION_BASE_EXT + connIndex);
}
- final PoolableConnection pc = new PoolableConnection(conn, _pool, connJmxName,
- _disconnectionSqlCodes, _fastFailValidation);
- pc.setCacheState(_cacheState);
+ final PoolableConnection pc = new PoolableConnection(conn, pool, connJmxName,
+ disconnectionSqlCodes, fastFailValidation);
+ pc.setCacheState(cacheState);
return new DefaultPooledObject<>(pc);
}
protected void initializeConnection(final Connection conn) throws SQLException {
- final Collection<String> sqls = _connectionInitSqls;
+ final Collection<String> sqls = connectionInitSqls;
if(conn.isClosed()) {
throw new SQLException("initializeConnection: connection closed");
}
@@ -359,7 +359,7 @@ public class PoolableConnectionFactory
if(conn.isClosed()) {
throw new SQLException("validateConnection: connection closed");
}
- conn.validate(_validationQuery, _validationQueryTimeout);
+ conn.validate(validationQuery, validationQueryTimeoutSeconds);
}
@Override
@@ -402,21 +402,21 @@ public class PoolableConnectionFactory
final PoolableConnection conn = p.getObject();
conn.activate();
- if (_defaultAutoCommit != null &&
- conn.getAutoCommit() != _defaultAutoCommit.booleanValue()) {
- conn.setAutoCommit(_defaultAutoCommit.booleanValue());
+ if (defaultAutoCommit != null &&
+ conn.getAutoCommit() != defaultAutoCommit.booleanValue()) {
+ conn.setAutoCommit(defaultAutoCommit.booleanValue());
}
- if (_defaultTransactionIsolation != UNKNOWN_TRANSACTIONISOLATION &&
- conn.getTransactionIsolation() != _defaultTransactionIsolation) {
- conn.setTransactionIsolation(_defaultTransactionIsolation);
+ if (defaultTransactionIsolation != UNKNOWN_TRANSACTIONISOLATION &&
+ conn.getTransactionIsolation() != defaultTransactionIsolation) {
+ conn.setTransactionIsolation(defaultTransactionIsolation);
}
- if (_defaultReadOnly != null &&
- conn.isReadOnly() != _defaultReadOnly.booleanValue()) {
- conn.setReadOnly(_defaultReadOnly.booleanValue());
+ if (defaultReadOnly != null &&
+ conn.isReadOnly() != defaultReadOnly.booleanValue()) {
+ conn.setReadOnly(defaultReadOnly.booleanValue());
}
- if (_defaultCatalog != null &&
- !_defaultCatalog.equals(conn.getCatalog())) {
- conn.setCatalog(_defaultCatalog);
+ if (defaultCatalog != null &&
+ !defaultCatalog.equals(conn.getCatalog())) {
+ conn.setCatalog(defaultCatalog);
}
conn.setDefaultQueryTimeout(defaultQueryTimeoutSeconds);
}
@@ -435,7 +435,7 @@ public class PoolableConnectionFactory
}
protected ConnectionFactory getConnectionFactory() {
- return _connFactory;
+ return connectionFactory;
}
protected boolean getPoolStatements() {
@@ -447,7 +447,7 @@ public class PoolableConnectionFactory
}
protected boolean getCacheState() {
- return _cacheState;
+ return cacheState;
}
protected ObjectName getDataSourceJmxName() {
@@ -458,21 +458,21 @@ public class PoolableConnectionFactory
return connectionIndex;
}
- private final ConnectionFactory _connFactory;
+ private final ConnectionFactory connectionFactory;
private final ObjectName dataSourceJmxName;
- private volatile String _validationQuery = null;
- private volatile int _validationQueryTimeout = -1;
- private Collection<String> _connectionInitSqls = null;
- private Collection<String> _disconnectionSqlCodes = null;
- private boolean _fastFailValidation = false;
- private volatile ObjectPool<PoolableConnection> _pool = null;
- private Boolean _defaultReadOnly = null;
- private Boolean _defaultAutoCommit = null;
+ private volatile String validationQuery = null;
+ private volatile int validationQueryTimeoutSeconds = -1;
+ private Collection<String> connectionInitSqls = null;
+ private Collection<String> disconnectionSqlCodes = null;
+ private boolean fastFailValidation = false;
+ private volatile ObjectPool<PoolableConnection> pool = null;
+ private Boolean defaultReadOnly = null;
+ private Boolean defaultAutoCommit = null;
private boolean enableAutoCommitOnReturn = true;
private boolean rollbackOnReturn = true;
- private int _defaultTransactionIsolation = UNKNOWN_TRANSACTIONISOLATION;
- private String _defaultCatalog;
- private boolean _cacheState;
+ private int defaultTransactionIsolation = UNKNOWN_TRANSACTIONISOLATION;
+ private String defaultCatalog;
+ private boolean cacheState;
private boolean poolStatements = false;
private int maxOpenPreparedStatements =
GenericKeyedObjectPoolConfig.DEFAULT_MAX_TOTAL_PER_KEY;
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
index 5e1d9e1..1665595 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
@@ -43,12 +43,12 @@ public class PoolablePreparedStatement<K> extends DelegatingPreparedStatement {
/**
* The {@link KeyedObjectPool} from which I was obtained.
*/
- private final KeyedObjectPool<K, PoolablePreparedStatement<K>> _pool;
+ private final KeyedObjectPool<K, PoolablePreparedStatement<K>> pool;
/**
* My "key" as used by {@link KeyedObjectPool}.
*/
- private final K _key;
+ private final K key;
private volatile boolean batchAdded = false;
@@ -63,8 +63,8 @@ public class PoolablePreparedStatement<K> extends DelegatingPreparedStatement {
final KeyedObjectPool<K, PoolablePreparedStatement<K>> pool,
final DelegatingConnection<?> conn) {
super(conn, stmt);
- _pool = pool;
- _key = key;
+ this.pool = pool;
+ this.key = key;
// Remove from trace now because this statement will be
// added by the activate method.
@@ -99,7 +99,7 @@ public class PoolablePreparedStatement<K> extends DelegatingPreparedStatement {
// calling close twice should have no effect
if (!isClosed()) {
try {
- _pool.returnObject(_key, this);
+ pool.returnObject(key, this);
} catch(final SQLException e) {
throw e;
} catch(final RuntimeException e) {
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
index 8745950..4987bed 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
@@ -66,7 +66,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
}
/** Pool of {@link PreparedStatement}s. and {@link CallableStatement}s */
- private KeyedObjectPool<PStmtKey, DelegatingPreparedStatement> _pstmtPool = null;
+ private KeyedObjectPool<PStmtKey, DelegatingPreparedStatement> pstmtPool = null;
/**
* Constructor.
@@ -98,9 +98,9 @@ public class PoolingConnection extends DelegatingConnection<Connection>
@Override
public synchronized void close() throws SQLException {
try {
- if (null != _pstmtPool) {
- final KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> oldpool = _pstmtPool;
- _pstmtPool = null;
+ if (null != pstmtPool) {
+ final KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> oldpool = pstmtPool;
+ pstmtPool = null;
try {
oldpool.close();
} catch(final RuntimeException e) {
@@ -291,11 +291,11 @@ public class PoolingConnection extends DelegatingConnection<Connection>
if (key.getStmtType() == StatementType.PREPARED_STATEMENT ) {
final PreparedStatement statement = (PreparedStatement) key.createStatement(getDelegate());
@SuppressWarnings({"rawtypes", "unchecked"}) // Unable to find way to avoid this
- final PoolablePreparedStatement pps = new PoolablePreparedStatement(statement, key, _pstmtPool, this);
+ final PoolablePreparedStatement pps = new PoolablePreparedStatement(statement, key, pstmtPool, this);
return new DefaultPooledObject<DelegatingPreparedStatement>(pps);
}
final CallableStatement statement = (CallableStatement) key.createStatement(getDelegate());
- final PoolableCallableStatement pcs = new PoolableCallableStatement(statement, key, _pstmtPool, this);
+ final PoolableCallableStatement pcs = new PoolableCallableStatement(statement, key, pstmtPool, this);
return new DefaultPooledObject<DelegatingPreparedStatement>(pcs);
}
@@ -332,7 +332,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
@Override
public CallableStatement prepareCall(final String sql) throws SQLException {
try {
- return (CallableStatement) _pstmtPool.borrowObject(createKey(sql, StatementType.CALLABLE_STATEMENT));
+ return (CallableStatement) pstmtPool.borrowObject(createKey(sql, StatementType.CALLABLE_STATEMENT));
} catch (final NoSuchElementException e) {
throw new SQLException("MaxOpenCallableStatements limit reached", e);
} catch (final RuntimeException e) {
@@ -353,7 +353,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
@Override
public CallableStatement prepareCall(final String sql, final int resultSetType, final int resultSetConcurrency) throws SQLException {
try {
- return (CallableStatement) _pstmtPool.borrowObject(createKey(sql, resultSetType,
+ return (CallableStatement) pstmtPool.borrowObject(createKey(sql, resultSetType,
resultSetConcurrency, StatementType.CALLABLE_STATEMENT));
} catch (final NoSuchElementException e) {
throw new SQLException("MaxOpenCallableStatements limit reached", e);
@@ -377,7 +377,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
public CallableStatement prepareCall(final String sql, final int resultSetType,
final int resultSetConcurrency, final int resultSetHoldability) throws SQLException {
try {
- return (CallableStatement) _pstmtPool.borrowObject(createKey(sql, resultSetType,
+ return (CallableStatement) pstmtPool.borrowObject(createKey(sql, resultSetType,
resultSetConcurrency, resultSetHoldability, StatementType.CALLABLE_STATEMENT));
} catch (final NoSuchElementException e) {
throw new SQLException("MaxOpenCallableStatements limit reached", e);
@@ -395,12 +395,12 @@ public class PoolingConnection extends DelegatingConnection<Connection>
*/
@Override
public PreparedStatement prepareStatement(final String sql) throws SQLException {
- if (null == _pstmtPool) {
+ if (null == pstmtPool) {
throw new SQLException(
"Statement pool is null - closed or invalid PoolingConnection.");
}
try {
- return _pstmtPool.borrowObject(createKey(sql));
+ return pstmtPool.borrowObject(createKey(sql));
} catch(final NoSuchElementException e) {
throw new SQLException("MaxOpenPreparedStatements limit reached", e);
} catch(final RuntimeException e) {
@@ -412,12 +412,12 @@ public class PoolingConnection extends DelegatingConnection<Connection>
@Override
public PreparedStatement prepareStatement(final String sql, final int autoGeneratedKeys) throws SQLException {
- if (null == _pstmtPool) {
+ if (null == pstmtPool) {
throw new SQLException(
"Statement pool is null - closed or invalid PoolingConnection.");
}
try {
- return _pstmtPool.borrowObject(createKey(sql, autoGeneratedKeys));
+ return pstmtPool.borrowObject(createKey(sql, autoGeneratedKeys));
}
catch (final NoSuchElementException e) {
throw new SQLException("MaxOpenPreparedStatements limit reached", e);
@@ -439,12 +439,12 @@ public class PoolingConnection extends DelegatingConnection<Connection>
@Override
public PreparedStatement prepareStatement(final String sql, final int columnIndexes[])
throws SQLException {
- if (null == _pstmtPool) {
+ if (null == pstmtPool) {
throw new SQLException(
"Statement pool is null - closed or invalid PoolingConnection.");
}
try {
- return _pstmtPool.borrowObject(createKey(sql, columnIndexes));
+ return pstmtPool.borrowObject(createKey(sql, columnIndexes));
} catch(final NoSuchElementException e) {
throw new SQLException("MaxOpenPreparedStatements limit reached", e);
} catch(final RuntimeException e) {
@@ -463,12 +463,12 @@ public class PoolingConnection extends DelegatingConnection<Connection>
*/
@Override
public PreparedStatement prepareStatement(final String sql, final int resultSetType, final int resultSetConcurrency) throws SQLException {
- if (null == _pstmtPool) {
+ if (null == pstmtPool) {
throw new SQLException(
"Statement pool is null - closed or invalid PoolingConnection.");
}
try {
- return _pstmtPool.borrowObject(createKey(sql,resultSetType,resultSetConcurrency));
+ return pstmtPool.borrowObject(createKey(sql,resultSetType,resultSetConcurrency));
} catch(final NoSuchElementException e) {
throw new SQLException("MaxOpenPreparedStatements limit reached", e);
} catch(final RuntimeException e) {
@@ -489,12 +489,12 @@ public class PoolingConnection extends DelegatingConnection<Connection>
@Override
public PreparedStatement prepareStatement(final String sql, final int resultSetType,
final int resultSetConcurrency, final int resultSetHoldability) throws SQLException {
- if (null == _pstmtPool) {
+ if (null == pstmtPool) {
throw new SQLException(
"Statement pool is null - closed or invalid PoolingConnection.");
}
try {
- return _pstmtPool.borrowObject(createKey(sql, resultSetType, resultSetConcurrency, resultSetHoldability));
+ return pstmtPool.borrowObject(createKey(sql, resultSetType, resultSetConcurrency, resultSetHoldability));
} catch(final NoSuchElementException e) {
throw new SQLException("MaxOpenPreparedStatements limit reached", e);
} catch(final RuntimeException e) {
@@ -513,12 +513,12 @@ public class PoolingConnection extends DelegatingConnection<Connection>
@Override
public PreparedStatement prepareStatement(final String sql, final String columnNames[])
throws SQLException {
- if (null == _pstmtPool) {
+ if (null == pstmtPool) {
throw new SQLException(
"Statement pool is null - closed or invalid PoolingConnection.");
}
try {
- return _pstmtPool.borrowObject(createKey(sql, columnNames));
+ return pstmtPool.borrowObject(createKey(sql, columnNames));
} catch(final NoSuchElementException e) {
throw new SQLException("MaxOpenPreparedStatements limit reached", e);
} catch(final RuntimeException e) {
@@ -530,13 +530,13 @@ public class PoolingConnection extends DelegatingConnection<Connection>
public void setStatementPool(
final KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> pool) {
- _pstmtPool = pool;
+ pstmtPool = pool;
}
@Override
public String toString() {
- if (_pstmtPool != null ) {
- return "PoolingConnection: " + _pstmtPool.toString();
+ if (pstmtPool != null ) {
+ return "PoolingConnection: " + pstmtPool.toString();
}
return "PoolingConnection: null";
}
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
index 2f17c45..568c66e 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
@@ -53,18 +53,18 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
if (null == pool) {
throw new NullPointerException("Pool must not be null.");
}
- _pool = pool;
+ this.pool = pool;
// Verify that _pool's factory refers back to it. If not, log a warning and try to fix.
- if (_pool instanceof GenericObjectPool<?>) {
- final PoolableConnectionFactory pcf = (PoolableConnectionFactory) ((GenericObjectPool<?>) _pool).getFactory();
+ if (this.pool instanceof GenericObjectPool<?>) {
+ final PoolableConnectionFactory pcf = (PoolableConnectionFactory) ((GenericObjectPool<?>) this.pool).getFactory();
if (pcf == null) {
throw new NullPointerException("PoolableConnectionFactory must not be null.");
}
- if (pcf.getPool() != _pool) {
+ if (pcf.getPool() != this.pool) {
log.warn(Utils.getMessage("poolingDataSource.factoryConfig"));
@SuppressWarnings("unchecked") // PCF must have a pool of PCs
final
- ObjectPool<PoolableConnection> p = (ObjectPool<PoolableConnection>) _pool;
+ ObjectPool<PoolableConnection> p = (ObjectPool<PoolableConnection>) this.pool;
pcf.setPool(p);
}
}
@@ -77,7 +77,7 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
@Override
public void close() throws Exception {
try {
- _pool.close();
+ pool.close();
} catch(final RuntimeException rte) {
throw new RuntimeException(Utils.getMessage("pool.close.fail"), rte);
} catch(final Exception e) {
@@ -131,7 +131,7 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
@Override
public Connection getConnection() throws SQLException {
try {
- final C conn = _pool.borrowObject();
+ final C conn = pool.borrowObject();
if (conn == null) {
return null;
}
@@ -167,7 +167,7 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
*/
@Override
public PrintWriter getLogWriter() {
- return _logWriter;
+ return logWriter;
}
/**
@@ -196,16 +196,16 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
*/
@Override
public void setLogWriter(final PrintWriter out) {
- _logWriter = out;
+ logWriter = out;
}
/** My log writer. */
- private PrintWriter _logWriter = null;
+ private PrintWriter logWriter = null;
- private final ObjectPool<C> _pool;
+ private final ObjectPool<C> pool;
protected ObjectPool<C> getPool() {
- return _pool;
+ return pool;
}
/**
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java b/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java
index 9cc47d6..d7f7f70 100644
--- a/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java
+++ b/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java
@@ -252,8 +252,8 @@ public class TestAbandonedBasicDataSource extends TestBasicDataSource {
final PoolingConnection poolingConn = (PoolingConnection) poolableConn.getDelegate();
@SuppressWarnings("unchecked")
final
- GenericKeyedObjectPool<PStmtKey,DelegatingPreparedStatement> gkop =
- (GenericKeyedObjectPool<PStmtKey,DelegatingPreparedStatement>) TesterUtils.getField(poolingConn, "_pstmtPool");
+ GenericKeyedObjectPool<PStmtKey, DelegatingPreparedStatement> gkop =
+ (GenericKeyedObjectPool<PStmtKey, DelegatingPreparedStatement>) TesterUtils.getField(poolingConn, "pstmtPool");
Assert.assertEquals(0, conn.getTrace().size());
Assert.assertEquals(0, gkop.getNumActive());
createStatement(conn);
[4/4] commons-dbcp git commit: Some ivars use _ as a prefix and some
others do not. Normalize to not use a _ prefix.
Posted by gg...@apache.org.
Some ivars use _ as a prefix and some others do not. Normalize to not
use a _ prefix.
Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/87266fdb
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/87266fdb
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/87266fdb
Branch: refs/heads/master
Commit: 87266fdb96e7b98dbf4fd2198ed3b8f245726203
Parents: 6658eba
Author: Gary Gregory <ga...@gmail.com>
Authored: Sun Jun 10 12:07:27 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Sun Jun 10 12:07:27 2018 -0600
----------------------------------------------------------------------
.../commons/dbcp2/DelegatingConnection.java | 192 ++++----
.../dbcp2/DelegatingDatabaseMetaData.java | 481 +++++++++----------
.../commons/dbcp2/DelegatingResultSet.java | 428 ++++++++---------
.../commons/dbcp2/DelegatingStatement.java | 180 +++----
.../commons/dbcp2/DriverConnectionFactory.java | 22 +-
.../dbcp2/DriverManagerConnectionFactory.java | 50 +-
.../java/org/apache/commons/dbcp2/PStmtKey.java | 262 +++++-----
.../dbcp2/PoolableCallableStatement.java | 20 +-
.../commons/dbcp2/PoolableConnection.java | 36 +-
.../dbcp2/PoolableConnectionFactory.java | 104 ++--
.../dbcp2/PoolablePreparedStatement.java | 10 +-
.../apache/commons/dbcp2/PoolingConnection.java | 48 +-
.../apache/commons/dbcp2/PoolingDataSource.java | 24 +-
.../dbcp2/TestAbandonedBasicDataSource.java | 4 +-
14 files changed, 930 insertions(+), 931 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index 068b86d..a67cd09 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -71,13 +71,13 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
Collections.<String, ClientInfoStatus>emptyMap();
/** My delegate {@link Connection}. */
- private volatile C _conn;
+ private volatile C connection;
- private volatile boolean _closed;
+ private volatile boolean closed;
- private boolean _cacheState = true;
- private Boolean _autoCommitCached;
- private Boolean _readOnlyCached;
+ private boolean cacheState = true;
+ private Boolean autoCommitCached;
+ private Boolean readOnlyCached;
private Integer defaultQueryTimeoutSeconds;
/**
@@ -88,7 +88,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
*/
public DelegatingConnection(final C c) {
super();
- _conn = c;
+ connection = c;
}
@@ -142,7 +142,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
}
protected final C getDelegateInternal() {
- return _conn;
+ return connection;
}
/**
@@ -186,7 +186,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
* time including in ways that break backwards compatibility.
*/
public final Connection getInnermostDelegateInternal() {
- Connection c = _conn;
+ Connection c = connection;
while(c != null && c instanceof DelegatingConnection) {
c = ((DelegatingConnection<?>)c).getDelegateInternal();
if(this == c) {
@@ -198,7 +198,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
/** Sets my delegate. */
public void setDelegate(final C c) {
- _conn = c;
+ connection = c;
}
/**
@@ -213,31 +213,31 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
*/
@Override
public void close() throws SQLException {
- if (!_closed) {
+ if (!closed) {
closeInternal();
}
}
protected boolean isClosedInternal() {
- return _closed;
+ return closed;
}
protected void setClosedInternal(final boolean closed) {
- this._closed = closed;
+ this.closed = closed;
}
protected final void closeInternal() throws SQLException {
try {
passivate();
} finally {
- if (_conn != null) {
+ if (connection != null) {
try {
- _conn.close();
+ connection.close();
} finally {
- _closed = true;
+ closed = true;
}
} else {
- _closed = true;
+ closed = true;
}
}
}
@@ -258,7 +258,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingStatement ds =
- new DelegatingStatement(this, _conn.createStatement());
+ new DelegatingStatement(this, connection.createStatement());
initializeStatement(ds);
return ds;
}
@@ -274,7 +274,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingStatement ds = new DelegatingStatement(
- this, _conn.createStatement(resultSetType,resultSetConcurrency));
+ this, connection.createStatement(resultSetType,resultSetConcurrency));
initializeStatement(ds);
return ds;
}
@@ -289,7 +289,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
- this, _conn.prepareStatement(sql));
+ this, connection.prepareStatement(sql));
initializeStatement(dps);
return dps;
}
@@ -306,7 +306,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
- this, _conn.prepareStatement(sql,resultSetType,resultSetConcurrency));
+ this, connection.prepareStatement(sql,resultSetType,resultSetConcurrency));
initializeStatement(dps);
return dps;
}
@@ -321,7 +321,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingCallableStatement dcs =
- new DelegatingCallableStatement(this, _conn.prepareCall(sql));
+ new DelegatingCallableStatement(this, connection.prepareCall(sql));
initializeStatement(dcs);
return dcs;
}
@@ -338,7 +338,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingCallableStatement dcs = new DelegatingCallableStatement(
- this, _conn.prepareCall(sql, resultSetType,resultSetConcurrency));
+ this, connection.prepareCall(sql, resultSetType,resultSetConcurrency));
initializeStatement(dcs);
return dcs;
}
@@ -353,7 +353,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void clearWarnings() throws SQLException {
checkOpen();
try {
- _conn.clearWarnings();
+ connection.clearWarnings();
} catch (final SQLException e) {
handleException(e);
}
@@ -364,7 +364,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void commit() throws SQLException {
checkOpen();
try {
- _conn.commit();
+ connection.commit();
} catch (final SQLException e) {
handleException(e);
}
@@ -377,18 +377,18 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
* @return the state caching flag
*/
public boolean getCacheState() {
- return _cacheState;
+ return cacheState;
}
@Override
public boolean getAutoCommit() throws SQLException {
checkOpen();
- if (_cacheState && _autoCommitCached != null) {
- return _autoCommitCached.booleanValue();
+ if (cacheState && autoCommitCached != null) {
+ return autoCommitCached.booleanValue();
}
try {
- _autoCommitCached = Boolean.valueOf(_conn.getAutoCommit());
- return _autoCommitCached.booleanValue();
+ autoCommitCached = Boolean.valueOf(connection.getAutoCommit());
+ return autoCommitCached.booleanValue();
} catch (final SQLException e) {
handleException(e);
return false;
@@ -400,7 +400,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public String getCatalog() throws SQLException {
checkOpen();
try {
- return _conn.getCatalog();
+ return connection.getCatalog();
} catch (final SQLException e) {
handleException(e);
return null;
@@ -412,7 +412,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public DatabaseMetaData getMetaData() throws SQLException {
checkOpen();
try {
- return new DelegatingDatabaseMetaData(this, _conn.getMetaData());
+ return new DelegatingDatabaseMetaData(this, connection.getMetaData());
} catch (final SQLException e) {
handleException(e);
return null;
@@ -424,7 +424,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public int getTransactionIsolation() throws SQLException {
checkOpen();
try {
- return _conn.getTransactionIsolation();
+ return connection.getTransactionIsolation();
} catch (final SQLException e) {
handleException(e);
return -1;
@@ -436,7 +436,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public Map<String,Class<?>> getTypeMap() throws SQLException {
checkOpen();
try {
- return _conn.getTypeMap();
+ return connection.getTypeMap();
} catch (final SQLException e) {
handleException(e);
return null;
@@ -448,7 +448,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public SQLWarning getWarnings() throws SQLException {
checkOpen();
try {
- return _conn.getWarnings();
+ return connection.getWarnings();
} catch (final SQLException e) {
handleException(e);
return null;
@@ -459,12 +459,12 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
@Override
public boolean isReadOnly() throws SQLException {
checkOpen();
- if (_cacheState && _readOnlyCached != null) {
- return _readOnlyCached.booleanValue();
+ if (cacheState && readOnlyCached != null) {
+ return readOnlyCached.booleanValue();
}
try {
- _readOnlyCached = Boolean.valueOf(_conn.isReadOnly());
- return _readOnlyCached.booleanValue();
+ readOnlyCached = Boolean.valueOf(connection.isReadOnly());
+ return readOnlyCached.booleanValue();
} catch (final SQLException e) {
handleException(e);
return false;
@@ -476,7 +476,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public String nativeSQL(final String sql) throws SQLException {
checkOpen();
try {
- return _conn.nativeSQL(sql);
+ return connection.nativeSQL(sql);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -488,7 +488,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void rollback() throws SQLException {
checkOpen();
try {
- _conn.rollback();
+ connection.rollback();
} catch (final SQLException e) {
handleException(e);
}
@@ -524,7 +524,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
* @param cacheState The new value for the state caching flag
*/
public void setCacheState(final boolean cacheState) {
- this._cacheState = cacheState;
+ this.cacheState = cacheState;
}
/**
@@ -532,10 +532,10 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
* connection may have been accessed directly.
*/
public void clearCachedState() {
- _autoCommitCached = null;
- _readOnlyCached = null;
- if (_conn instanceof DelegatingConnection) {
- ((DelegatingConnection<?>)_conn).clearCachedState();
+ autoCommitCached = null;
+ readOnlyCached = null;
+ if (connection instanceof DelegatingConnection) {
+ ((DelegatingConnection<?>)connection).clearCachedState();
}
}
@@ -543,30 +543,30 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void setAutoCommit(final boolean autoCommit) throws SQLException {
checkOpen();
try {
- _conn.setAutoCommit(autoCommit);
- if (_cacheState) {
- _autoCommitCached = Boolean.valueOf(autoCommit);
+ connection.setAutoCommit(autoCommit);
+ if (cacheState) {
+ autoCommitCached = Boolean.valueOf(autoCommit);
}
} catch (final SQLException e) {
- _autoCommitCached = null;
+ autoCommitCached = null;
handleException(e);
}
}
@Override
public void setCatalog(final String catalog) throws SQLException
- { checkOpen(); try { _conn.setCatalog(catalog); } catch (final SQLException e) { handleException(e); } }
+ { checkOpen(); try { connection.setCatalog(catalog); } catch (final SQLException e) { handleException(e); } }
@Override
public void setReadOnly(final boolean readOnly) throws SQLException {
checkOpen();
try {
- _conn.setReadOnly(readOnly);
- if (_cacheState) {
- _readOnlyCached = Boolean.valueOf(readOnly);
+ connection.setReadOnly(readOnly);
+ if (cacheState) {
+ readOnlyCached = Boolean.valueOf(readOnly);
}
} catch (final SQLException e) {
- _readOnlyCached = null;
+ readOnlyCached = null;
handleException(e);
}
}
@@ -576,7 +576,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void setTransactionIsolation(final int level) throws SQLException {
checkOpen();
try {
- _conn.setTransactionIsolation(level);
+ connection.setTransactionIsolation(level);
} catch (final SQLException e) {
handleException(e);
}
@@ -587,7 +587,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void setTypeMap(final Map<String,Class<?>> map) throws SQLException {
checkOpen();
try {
- _conn.setTypeMap(map);
+ connection.setTypeMap(map);
} catch (final SQLException e) {
handleException(e);
}
@@ -595,15 +595,15 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
@Override
public boolean isClosed() throws SQLException {
- return _closed || _conn == null || _conn.isClosed();
+ return closed || connection == null || connection.isClosed();
}
protected void checkOpen() throws SQLException {
- if(_closed) {
- if (null != _conn) {
+ if(closed) {
+ if (null != connection) {
String label = "";
try {
- label = _conn.toString();
+ label = connection.toString();
} catch (final Exception ex) {
// ignore, leave label empty
}
@@ -616,10 +616,10 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
}
protected void activate() {
- _closed = false;
+ closed = false;
setLastUsed();
- if(_conn instanceof DelegatingConnection) {
- ((DelegatingConnection<?>)_conn).activate();
+ if(connection instanceof DelegatingConnection) {
+ ((DelegatingConnection<?>)connection).activate();
}
}
@@ -650,7 +650,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public int getHoldability() throws SQLException {
checkOpen();
try {
- return _conn.getHoldability();
+ return connection.getHoldability();
} catch (final SQLException e) {
handleException(e);
return 0;
@@ -662,7 +662,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void setHoldability(final int holdability) throws SQLException {
checkOpen();
try {
- _conn.setHoldability(holdability);
+ connection.setHoldability(holdability);
} catch (final SQLException e) {
handleException(e);
}
@@ -673,7 +673,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public Savepoint setSavepoint() throws SQLException {
checkOpen();
try {
- return _conn.setSavepoint();
+ return connection.setSavepoint();
} catch (final SQLException e) {
handleException(e);
return null;
@@ -685,7 +685,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public Savepoint setSavepoint(final String name) throws SQLException {
checkOpen();
try {
- return _conn.setSavepoint(name);
+ return connection.setSavepoint(name);
} catch (final SQLException e) {
handleException(e);
return null;
@@ -697,7 +697,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void rollback(final Savepoint savepoint) throws SQLException {
checkOpen();
try {
- _conn.rollback(savepoint);
+ connection.rollback(savepoint);
} catch (final SQLException e) {
handleException(e);
}
@@ -709,7 +709,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
throws SQLException {
checkOpen();
try {
- _conn.releaseSavepoint(savepoint);
+ connection.releaseSavepoint(savepoint);
} catch (final SQLException e) {
handleException(e);
}
@@ -723,7 +723,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingStatement ds = new DelegatingStatement(this,
- _conn.createStatement(resultSetType, resultSetConcurrency,
+ connection.createStatement(resultSetType, resultSetConcurrency,
resultSetHoldability));
initializeStatement(ds);
return ds;
@@ -741,7 +741,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
- this, _conn.prepareStatement(sql, resultSetType,
+ this, connection.prepareStatement(sql, resultSetType,
resultSetConcurrency, resultSetHoldability));
initializeStatement(dps);
return dps;
@@ -759,7 +759,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingCallableStatement dcs = new DelegatingCallableStatement(
- this, _conn.prepareCall(sql, resultSetType,
+ this, connection.prepareCall(sql, resultSetType,
resultSetConcurrency, resultSetHoldability));
initializeStatement(dcs);
return dcs;
@@ -775,7 +775,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
- this, _conn.prepareStatement(sql, autoGeneratedKeys));
+ this, connection.prepareStatement(sql, autoGeneratedKeys));
initializeStatement(dps);
return dps;
}
@@ -790,7 +790,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
- this, _conn.prepareStatement(sql, columnIndexes));
+ this, connection.prepareStatement(sql, columnIndexes));
initializeStatement(dps);
return dps;
}
@@ -805,7 +805,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
checkOpen();
try {
final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
- this, _conn.prepareStatement(sql, columnNames));
+ this, connection.prepareStatement(sql, columnNames));
initializeStatement(dps);
return dps;
}
@@ -820,10 +820,10 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public boolean isWrapperFor(final Class<?> iface) throws SQLException {
if (iface.isAssignableFrom(getClass())) {
return true;
- } else if (iface.isAssignableFrom(_conn.getClass())) {
+ } else if (iface.isAssignableFrom(connection.getClass())) {
return true;
} else {
- return _conn.isWrapperFor(iface);
+ return connection.isWrapperFor(iface);
}
}
@@ -831,10 +831,10 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public <T> T unwrap(final Class<T> iface) throws SQLException {
if (iface.isAssignableFrom(getClass())) {
return iface.cast(this);
- } else if (iface.isAssignableFrom(_conn.getClass())) {
- return iface.cast(_conn);
+ } else if (iface.isAssignableFrom(connection.getClass())) {
+ return iface.cast(connection);
} else {
- return _conn.unwrap(iface);
+ return connection.unwrap(iface);
}
}
@@ -842,7 +842,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public Array createArrayOf(final String typeName, final Object[] elements) throws SQLException {
checkOpen();
try {
- return _conn.createArrayOf(typeName, elements);
+ return connection.createArrayOf(typeName, elements);
}
catch (final SQLException e) {
handleException(e);
@@ -854,7 +854,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public Blob createBlob() throws SQLException {
checkOpen();
try {
- return _conn.createBlob();
+ return connection.createBlob();
}
catch (final SQLException e) {
handleException(e);
@@ -866,7 +866,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public Clob createClob() throws SQLException {
checkOpen();
try {
- return _conn.createClob();
+ return connection.createClob();
}
catch (final SQLException e) {
handleException(e);
@@ -878,7 +878,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public NClob createNClob() throws SQLException {
checkOpen();
try {
- return _conn.createNClob();
+ return connection.createNClob();
}
catch (final SQLException e) {
handleException(e);
@@ -890,7 +890,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public SQLXML createSQLXML() throws SQLException {
checkOpen();
try {
- return _conn.createSQLXML();
+ return connection.createSQLXML();
}
catch (final SQLException e) {
handleException(e);
@@ -902,7 +902,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public Struct createStruct(final String typeName, final Object[] attributes) throws SQLException {
checkOpen();
try {
- return _conn.createStruct(typeName, attributes);
+ return connection.createStruct(typeName, attributes);
}
catch (final SQLException e) {
handleException(e);
@@ -916,7 +916,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
return false;
}
try {
- return _conn.isValid(timeout);
+ return connection.isValid(timeout);
}
catch (final SQLException e) {
handleException(e);
@@ -928,7 +928,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void setClientInfo(final String name, final String value) throws SQLClientInfoException {
try {
checkOpen();
- _conn.setClientInfo(name, value);
+ connection.setClientInfo(name, value);
}
catch (final SQLClientInfoException e) {
throw e;
@@ -942,7 +942,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void setClientInfo(final Properties properties) throws SQLClientInfoException {
try {
checkOpen();
- _conn.setClientInfo(properties);
+ connection.setClientInfo(properties);
}
catch (final SQLClientInfoException e) {
throw e;
@@ -956,7 +956,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public Properties getClientInfo() throws SQLException {
checkOpen();
try {
- return _conn.getClientInfo();
+ return connection.getClientInfo();
}
catch (final SQLException e) {
handleException(e);
@@ -968,7 +968,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public String getClientInfo(final String name) throws SQLException {
checkOpen();
try {
- return _conn.getClientInfo(name);
+ return connection.getClientInfo(name);
}
catch (final SQLException e) {
handleException(e);
@@ -980,7 +980,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void setSchema(final String schema) throws SQLException {
checkOpen();
try {
- _conn.setSchema(schema);
+ connection.setSchema(schema);
}
catch (final SQLException e) {
handleException(e);
@@ -991,7 +991,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public String getSchema() throws SQLException {
checkOpen();
try {
- return _conn.getSchema();
+ return connection.getSchema();
}
catch (final SQLException e) {
handleException(e);
@@ -1003,7 +1003,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public void abort(final Executor executor) throws SQLException {
checkOpen();
try {
- _conn.abort(executor);
+ connection.abort(executor);
}
catch (final SQLException e) {
handleException(e);
@@ -1015,7 +1015,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
throws SQLException {
checkOpen();
try {
- _conn.setNetworkTimeout(executor, milliseconds);
+ connection.setNetworkTimeout(executor, milliseconds);
}
catch (final SQLException e) {
handleException(e);
@@ -1026,7 +1026,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
public int getNetworkTimeout() throws SQLException {
checkOpen();
try {
- return _conn.getNetworkTimeout();
+ return connection.getNetworkTimeout();
}
catch (final SQLException e) {
handleException(e);
[3/4] commons-dbcp git commit: Some ivars use _ as a prefix and some
others do not. Normalize to not use a _ prefix.
Posted by gg...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java b/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
index 22ee27f..c19f13c 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
@@ -34,20 +34,19 @@ import java.sql.SQLException;
public class DelegatingDatabaseMetaData implements DatabaseMetaData {
/** My delegate {@link DatabaseMetaData} */
- private final DatabaseMetaData _meta;
+ private final DatabaseMetaData databaseMetaData;
/** The connection that created me. **/
- private final DelegatingConnection<?> _conn;
+ private final DelegatingConnection<?> connection;
- public DelegatingDatabaseMetaData(final DelegatingConnection<?> c,
- final DatabaseMetaData m) {
+ public DelegatingDatabaseMetaData(final DelegatingConnection<?> connection, final DatabaseMetaData databaseMetaData) {
super();
- _conn = c;
- _meta = m;
+ this.connection = connection;
+ this.databaseMetaData = databaseMetaData;
}
public DatabaseMetaData getDelegate() {
- return _meta;
+ return databaseMetaData;
}
/**
@@ -66,7 +65,7 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
* sure to obtain a "genuine" {@link ResultSet}.
*/
public DatabaseMetaData getInnermostDelegate() {
- DatabaseMetaData m = _meta;
+ DatabaseMetaData m = databaseMetaData;
while(m != null && m instanceof DelegatingDatabaseMetaData) {
m = ((DelegatingDatabaseMetaData)m).getDelegate();
if(this == m) {
@@ -77,8 +76,8 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
}
protected void handleException(final SQLException e) throws SQLException {
- if (_conn != null) {
- _conn.handleException(e);
+ if (connection != null) {
+ connection.handleException(e);
}
else {
throw e;
@@ -87,37 +86,37 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public boolean allProceduresAreCallable() throws SQLException {
- try { return _meta.allProceduresAreCallable(); }
+ try { return databaseMetaData.allProceduresAreCallable(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean allTablesAreSelectable() throws SQLException {
- try { return _meta.allTablesAreSelectable(); }
+ try { return databaseMetaData.allTablesAreSelectable(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
- try { return _meta.dataDefinitionCausesTransactionCommit(); }
+ try { return databaseMetaData.dataDefinitionCausesTransactionCommit(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
- try { return _meta.dataDefinitionIgnoredInTransactions(); }
+ try { return databaseMetaData.dataDefinitionIgnoredInTransactions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean deletesAreDetected(final int type) throws SQLException {
- try { return _meta.deletesAreDetected(type); }
+ try { return databaseMetaData.deletesAreDetected(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
- try { return _meta.doesMaxRowSizeIncludeBlobs(); }
+ try { return databaseMetaData.doesMaxRowSizeIncludeBlobs(); }
catch (final SQLException e) { handleException(e); return false; }
}
@@ -125,9 +124,9 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
public ResultSet getAttributes(final String catalog, final String schemaPattern,
final String typeNamePattern, final String attributeNamePattern)
throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,_meta.getAttributes(
+ return DelegatingResultSet.wrapResultSet(connection,databaseMetaData.getAttributes(
catalog, schemaPattern, typeNamePattern,
attributeNamePattern));
}
@@ -140,10 +139,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public ResultSet getBestRowIdentifier(final String catalog, final String schema,
final String table, final int scope, final boolean nullable) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getBestRowIdentifier(catalog, schema, table, scope,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getBestRowIdentifier(catalog, schema, table, scope,
nullable));
}
catch (final SQLException e) {
@@ -154,22 +153,22 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public String getCatalogSeparator() throws SQLException {
- try { return _meta.getCatalogSeparator(); }
+ try { return databaseMetaData.getCatalogSeparator(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public String getCatalogTerm() throws SQLException {
- try { return _meta.getCatalogTerm(); }
+ try { return databaseMetaData.getCatalogTerm(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getCatalogs() throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getCatalogs());
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getCatalogs());
}
catch (final SQLException e) {
handleException(e);
@@ -180,10 +179,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public ResultSet getColumnPrivileges(final String catalog, final String schema,
final String table, final String columnNamePattern) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getColumnPrivileges(catalog, schema, table,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getColumnPrivileges(catalog, schema, table,
columnNamePattern));
}
catch (final SQLException e) {
@@ -196,10 +195,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
public ResultSet getColumns(final String catalog, final String schemaPattern,
final String tableNamePattern, final String columnNamePattern)
throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getColumns(catalog, schemaPattern, tableNamePattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getColumns(catalog, schemaPattern, tableNamePattern,
columnNamePattern));
}
catch (final SQLException e) {
@@ -210,17 +209,17 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public Connection getConnection() throws SQLException {
- return _conn;
+ return connection;
}
@Override
public ResultSet getCrossReference(final String parentCatalog,
final String parentSchema, final String parentTable, final String foreignCatalog,
final String foreignSchema, final String foreignTable) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getCrossReference(parentCatalog, parentSchema,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getCrossReference(parentCatalog, parentSchema,
parentTable, foreignCatalog, foreignSchema,
foreignTable));
}
@@ -232,59 +231,59 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public int getDatabaseMajorVersion() throws SQLException {
- try { return _meta.getDatabaseMajorVersion(); }
+ try { return databaseMetaData.getDatabaseMajorVersion(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getDatabaseMinorVersion() throws SQLException {
- try { return _meta.getDatabaseMinorVersion(); }
+ try { return databaseMetaData.getDatabaseMinorVersion(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public String getDatabaseProductName() throws SQLException {
- try { return _meta.getDatabaseProductName(); }
+ try { return databaseMetaData.getDatabaseProductName(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public String getDatabaseProductVersion() throws SQLException {
- try { return _meta.getDatabaseProductVersion(); }
+ try { return databaseMetaData.getDatabaseProductVersion(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public int getDefaultTransactionIsolation() throws SQLException {
- try { return _meta.getDefaultTransactionIsolation(); }
+ try { return databaseMetaData.getDefaultTransactionIsolation(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
- public int getDriverMajorVersion() {return _meta.getDriverMajorVersion();}
+ public int getDriverMajorVersion() {return databaseMetaData.getDriverMajorVersion();}
@Override
- public int getDriverMinorVersion() {return _meta.getDriverMinorVersion();}
+ public int getDriverMinorVersion() {return databaseMetaData.getDriverMinorVersion();}
@Override
public String getDriverName() throws SQLException {
- try { return _meta.getDriverName(); }
+ try { return databaseMetaData.getDriverName(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public String getDriverVersion() throws SQLException {
- try { return _meta.getDriverVersion(); }
+ try { return databaseMetaData.getDriverVersion(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getExportedKeys(final String catalog, final String schema, final String table)
throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getExportedKeys(catalog, schema, table));
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getExportedKeys(catalog, schema, table));
}
catch (final SQLException e) {
handleException(e);
@@ -294,23 +293,23 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public String getExtraNameCharacters() throws SQLException {
- try { return _meta.getExtraNameCharacters(); }
+ try { return databaseMetaData.getExtraNameCharacters(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public String getIdentifierQuoteString() throws SQLException {
- try { return _meta.getIdentifierQuoteString(); }
+ try { return databaseMetaData.getIdentifierQuoteString(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getImportedKeys(final String catalog, final String schema, final String table)
throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getImportedKeys(catalog, schema, table));
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getImportedKeys(catalog, schema, table));
}
catch (final SQLException e) {
handleException(e);
@@ -321,10 +320,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public ResultSet getIndexInfo(final String catalog, final String schema, final String table,
final boolean unique, final boolean approximate) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getIndexInfo(catalog, schema, table, unique,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getIndexInfo(catalog, schema, table, unique,
approximate));
}
catch (final SQLException e) {
@@ -335,149 +334,149 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public int getJDBCMajorVersion() throws SQLException {
- try { return _meta.getJDBCMajorVersion(); }
+ try { return databaseMetaData.getJDBCMajorVersion(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getJDBCMinorVersion() throws SQLException {
- try { return _meta.getJDBCMinorVersion(); }
+ try { return databaseMetaData.getJDBCMinorVersion(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxBinaryLiteralLength() throws SQLException {
- try { return _meta.getMaxBinaryLiteralLength(); }
+ try { return databaseMetaData.getMaxBinaryLiteralLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxCatalogNameLength() throws SQLException {
- try { return _meta.getMaxCatalogNameLength(); }
+ try { return databaseMetaData.getMaxCatalogNameLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxCharLiteralLength() throws SQLException {
- try { return _meta.getMaxCharLiteralLength(); }
+ try { return databaseMetaData.getMaxCharLiteralLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxColumnNameLength() throws SQLException {
- try { return _meta.getMaxColumnNameLength(); }
+ try { return databaseMetaData.getMaxColumnNameLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxColumnsInGroupBy() throws SQLException {
- try { return _meta.getMaxColumnsInGroupBy(); }
+ try { return databaseMetaData.getMaxColumnsInGroupBy(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxColumnsInIndex() throws SQLException {
- try { return _meta.getMaxColumnsInIndex(); }
+ try { return databaseMetaData.getMaxColumnsInIndex(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxColumnsInOrderBy() throws SQLException {
- try { return _meta.getMaxColumnsInOrderBy(); }
+ try { return databaseMetaData.getMaxColumnsInOrderBy(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxColumnsInSelect() throws SQLException {
- try { return _meta.getMaxColumnsInSelect(); }
+ try { return databaseMetaData.getMaxColumnsInSelect(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxColumnsInTable() throws SQLException {
- try { return _meta.getMaxColumnsInTable(); }
+ try { return databaseMetaData.getMaxColumnsInTable(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxConnections() throws SQLException {
- try { return _meta.getMaxConnections(); }
+ try { return databaseMetaData.getMaxConnections(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxCursorNameLength() throws SQLException {
- try { return _meta.getMaxCursorNameLength(); }
+ try { return databaseMetaData.getMaxCursorNameLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxIndexLength() throws SQLException {
- try { return _meta.getMaxIndexLength(); }
+ try { return databaseMetaData.getMaxIndexLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxProcedureNameLength() throws SQLException {
- try { return _meta.getMaxProcedureNameLength(); }
+ try { return databaseMetaData.getMaxProcedureNameLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxRowSize() throws SQLException {
- try { return _meta.getMaxRowSize(); }
+ try { return databaseMetaData.getMaxRowSize(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxSchemaNameLength() throws SQLException {
- try { return _meta.getMaxSchemaNameLength(); }
+ try { return databaseMetaData.getMaxSchemaNameLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxStatementLength() throws SQLException {
- try { return _meta.getMaxStatementLength(); }
+ try { return databaseMetaData.getMaxStatementLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxStatements() throws SQLException {
- try { return _meta.getMaxStatements(); }
+ try { return databaseMetaData.getMaxStatements(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxTableNameLength() throws SQLException {
- try { return _meta.getMaxTableNameLength(); }
+ try { return databaseMetaData.getMaxTableNameLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxTablesInSelect() throws SQLException {
- try { return _meta.getMaxTablesInSelect(); }
+ try { return databaseMetaData.getMaxTablesInSelect(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public int getMaxUserNameLength() throws SQLException {
- try { return _meta.getMaxUserNameLength(); }
+ try { return databaseMetaData.getMaxUserNameLength(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public String getNumericFunctions() throws SQLException {
- try { return _meta.getNumericFunctions(); }
+ try { return databaseMetaData.getNumericFunctions(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getPrimaryKeys(final String catalog, final String schema, final String table)
throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getPrimaryKeys(catalog, schema, table));
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getPrimaryKeys(catalog, schema, table));
}
catch (final SQLException e) {
handleException(e);
@@ -489,10 +488,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
public ResultSet getProcedureColumns(final String catalog, final String schemaPattern,
final String procedureNamePattern, final String columnNamePattern)
throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getProcedureColumns(catalog, schemaPattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getProcedureColumns(catalog, schemaPattern,
procedureNamePattern, columnNamePattern));
}
catch (final SQLException e) {
@@ -503,17 +502,17 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public String getProcedureTerm() throws SQLException {
- try { return _meta.getProcedureTerm(); }
+ try { return databaseMetaData.getProcedureTerm(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getProcedures(final String catalog, final String schemaPattern,
final String procedureNamePattern) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getProcedures(catalog, schemaPattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getProcedures(catalog, schemaPattern,
procedureNamePattern));
}
catch (final SQLException e) {
@@ -524,34 +523,34 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public int getResultSetHoldability() throws SQLException {
- try { return _meta.getResultSetHoldability(); }
+ try { return databaseMetaData.getResultSetHoldability(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public String getSQLKeywords() throws SQLException {
- try { return _meta.getSQLKeywords(); }
+ try { return databaseMetaData.getSQLKeywords(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public int getSQLStateType() throws SQLException {
- try { return _meta.getSQLStateType(); }
+ try { return databaseMetaData.getSQLStateType(); }
catch (final SQLException e) { handleException(e); return 0; }
}
@Override
public String getSchemaTerm() throws SQLException {
- try { return _meta.getSchemaTerm(); }
+ try { return databaseMetaData.getSchemaTerm(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getSchemas() throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getSchemas());
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getSchemas());
}
catch (final SQLException e) {
handleException(e);
@@ -561,23 +560,23 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public String getSearchStringEscape() throws SQLException {
- try { return _meta.getSearchStringEscape(); }
+ try { return databaseMetaData.getSearchStringEscape(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public String getStringFunctions() throws SQLException {
- try { return _meta.getStringFunctions(); }
+ try { return databaseMetaData.getStringFunctions(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getSuperTables(final String catalog, final String schemaPattern,
final String tableNamePattern) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getSuperTables(catalog, schemaPattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getSuperTables(catalog, schemaPattern,
tableNamePattern));
}
catch (final SQLException e) {
@@ -589,10 +588,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public ResultSet getSuperTypes(final String catalog, final String schemaPattern,
final String typeNamePattern) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getSuperTypes(catalog, schemaPattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getSuperTypes(catalog, schemaPattern,
typeNamePattern));
}
catch (final SQLException e) {
@@ -603,17 +602,17 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public String getSystemFunctions() throws SQLException {
- try { return _meta.getSystemFunctions(); }
+ try { return databaseMetaData.getSystemFunctions(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getTablePrivileges(final String catalog, final String schemaPattern,
final String tableNamePattern) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getTablePrivileges(catalog, schemaPattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getTablePrivileges(catalog, schemaPattern,
tableNamePattern));
}
catch (final SQLException e) {
@@ -624,10 +623,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public ResultSet getTableTypes() throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getTableTypes());
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getTableTypes());
}
catch (final SQLException e) {
handleException(e);
@@ -638,10 +637,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public ResultSet getTables(final String catalog, final String schemaPattern,
final String tableNamePattern, final String[] types) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getTables(catalog, schemaPattern, tableNamePattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getTables(catalog, schemaPattern, tableNamePattern,
types));
}
catch (final SQLException e) {
@@ -652,16 +651,16 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public String getTimeDateFunctions() throws SQLException {
- try { return _meta.getTimeDateFunctions(); }
+ try { return databaseMetaData.getTimeDateFunctions(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getTypeInfo() throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getTypeInfo());
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getTypeInfo());
}
catch (final SQLException e) {
handleException(e);
@@ -672,10 +671,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public ResultSet getUDTs(final String catalog, final String schemaPattern,
final String typeNamePattern, final int[] types) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getUDTs(catalog, schemaPattern, typeNamePattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getUDTs(catalog, schemaPattern, typeNamePattern,
types));
}
catch (final SQLException e) {
@@ -686,23 +685,23 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public String getURL() throws SQLException {
- try { return _meta.getURL(); }
+ try { return databaseMetaData.getURL(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public String getUserName() throws SQLException {
- try { return _meta.getUserName(); }
+ try { return databaseMetaData.getUserName(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getVersionColumns(final String catalog, final String schema,
final String table) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getVersionColumns(catalog, schema, table));
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getVersionColumns(catalog, schema, table));
}
catch (final SQLException e) {
handleException(e);
@@ -712,547 +711,547 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public boolean insertsAreDetected(final int type) throws SQLException {
- try { return _meta.insertsAreDetected(type); }
+ try { return databaseMetaData.insertsAreDetected(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean isCatalogAtStart() throws SQLException {
- try { return _meta.isCatalogAtStart(); }
+ try { return databaseMetaData.isCatalogAtStart(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean isReadOnly() throws SQLException {
- try { return _meta.isReadOnly(); }
+ try { return databaseMetaData.isReadOnly(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean locatorsUpdateCopy() throws SQLException {
- try { return _meta.locatorsUpdateCopy(); }
+ try { return databaseMetaData.locatorsUpdateCopy(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean nullPlusNonNullIsNull() throws SQLException {
- try { return _meta.nullPlusNonNullIsNull(); }
+ try { return databaseMetaData.nullPlusNonNullIsNull(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean nullsAreSortedAtEnd() throws SQLException {
- try { return _meta.nullsAreSortedAtEnd(); }
+ try { return databaseMetaData.nullsAreSortedAtEnd(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean nullsAreSortedAtStart() throws SQLException {
- try { return _meta.nullsAreSortedAtStart(); }
+ try { return databaseMetaData.nullsAreSortedAtStart(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean nullsAreSortedHigh() throws SQLException {
- try { return _meta.nullsAreSortedHigh(); }
+ try { return databaseMetaData.nullsAreSortedHigh(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean nullsAreSortedLow() throws SQLException {
- try { return _meta.nullsAreSortedLow(); }
+ try { return databaseMetaData.nullsAreSortedLow(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean othersDeletesAreVisible(final int type) throws SQLException {
- try { return _meta.othersDeletesAreVisible(type); }
+ try { return databaseMetaData.othersDeletesAreVisible(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean othersInsertsAreVisible(final int type) throws SQLException {
- try { return _meta.othersInsertsAreVisible(type); }
+ try { return databaseMetaData.othersInsertsAreVisible(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean othersUpdatesAreVisible(final int type) throws SQLException {
- try { return _meta.othersUpdatesAreVisible(type); }
+ try { return databaseMetaData.othersUpdatesAreVisible(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean ownDeletesAreVisible(final int type) throws SQLException {
- try { return _meta.ownDeletesAreVisible(type); }
+ try { return databaseMetaData.ownDeletesAreVisible(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean ownInsertsAreVisible(final int type) throws SQLException {
- try { return _meta.ownInsertsAreVisible(type); }
+ try { return databaseMetaData.ownInsertsAreVisible(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean ownUpdatesAreVisible(final int type) throws SQLException {
- try { return _meta.ownUpdatesAreVisible(type); }
+ try { return databaseMetaData.ownUpdatesAreVisible(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean storesLowerCaseIdentifiers() throws SQLException {
- try { return _meta.storesLowerCaseIdentifiers(); }
+ try { return databaseMetaData.storesLowerCaseIdentifiers(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
- try { return _meta.storesLowerCaseQuotedIdentifiers(); }
+ try { return databaseMetaData.storesLowerCaseQuotedIdentifiers(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean storesMixedCaseIdentifiers() throws SQLException {
- try { return _meta.storesMixedCaseIdentifiers(); }
+ try { return databaseMetaData.storesMixedCaseIdentifiers(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
- try { return _meta.storesMixedCaseQuotedIdentifiers(); }
+ try { return databaseMetaData.storesMixedCaseQuotedIdentifiers(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean storesUpperCaseIdentifiers() throws SQLException {
- try { return _meta.storesUpperCaseIdentifiers(); }
+ try { return databaseMetaData.storesUpperCaseIdentifiers(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
- try { return _meta.storesUpperCaseQuotedIdentifiers(); }
+ try { return databaseMetaData.storesUpperCaseQuotedIdentifiers(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsANSI92EntryLevelSQL() throws SQLException {
- try { return _meta.supportsANSI92EntryLevelSQL(); }
+ try { return databaseMetaData.supportsANSI92EntryLevelSQL(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsANSI92FullSQL() throws SQLException {
- try { return _meta.supportsANSI92FullSQL(); }
+ try { return databaseMetaData.supportsANSI92FullSQL(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsANSI92IntermediateSQL() throws SQLException {
- try { return _meta.supportsANSI92IntermediateSQL(); }
+ try { return databaseMetaData.supportsANSI92IntermediateSQL(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsAlterTableWithAddColumn() throws SQLException {
- try { return _meta.supportsAlterTableWithAddColumn(); }
+ try { return databaseMetaData.supportsAlterTableWithAddColumn(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsAlterTableWithDropColumn() throws SQLException {
- try { return _meta.supportsAlterTableWithDropColumn(); }
+ try { return databaseMetaData.supportsAlterTableWithDropColumn(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsBatchUpdates() throws SQLException {
- try { return _meta.supportsBatchUpdates(); }
+ try { return databaseMetaData.supportsBatchUpdates(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsCatalogsInDataManipulation() throws SQLException {
- try { return _meta.supportsCatalogsInDataManipulation(); }
+ try { return databaseMetaData.supportsCatalogsInDataManipulation(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
- try { return _meta.supportsCatalogsInIndexDefinitions(); }
+ try { return databaseMetaData.supportsCatalogsInIndexDefinitions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
- try { return _meta.supportsCatalogsInPrivilegeDefinitions(); }
+ try { return databaseMetaData.supportsCatalogsInPrivilegeDefinitions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsCatalogsInProcedureCalls() throws SQLException {
- try { return _meta.supportsCatalogsInProcedureCalls(); }
+ try { return databaseMetaData.supportsCatalogsInProcedureCalls(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsCatalogsInTableDefinitions() throws SQLException {
- try { return _meta.supportsCatalogsInTableDefinitions(); }
+ try { return databaseMetaData.supportsCatalogsInTableDefinitions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsColumnAliasing() throws SQLException {
- try { return _meta.supportsColumnAliasing(); }
+ try { return databaseMetaData.supportsColumnAliasing(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsConvert() throws SQLException {
- try { return _meta.supportsConvert(); }
+ try { return databaseMetaData.supportsConvert(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsConvert(final int fromType, final int toType)
throws SQLException {
- try { return _meta.supportsConvert(fromType, toType); }
+ try { return databaseMetaData.supportsConvert(fromType, toType); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsCoreSQLGrammar() throws SQLException {
- try { return _meta.supportsCoreSQLGrammar(); }
+ try { return databaseMetaData.supportsCoreSQLGrammar(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsCorrelatedSubqueries() throws SQLException {
- try { return _meta.supportsCorrelatedSubqueries(); }
+ try { return databaseMetaData.supportsCorrelatedSubqueries(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsDataDefinitionAndDataManipulationTransactions()
throws SQLException {
- try { return _meta.supportsDataDefinitionAndDataManipulationTransactions(); }
+ try { return databaseMetaData.supportsDataDefinitionAndDataManipulationTransactions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsDataManipulationTransactionsOnly()
throws SQLException {
- try { return _meta.supportsDataManipulationTransactionsOnly(); }
+ try { return databaseMetaData.supportsDataManipulationTransactionsOnly(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsDifferentTableCorrelationNames() throws SQLException {
- try { return _meta.supportsDifferentTableCorrelationNames(); }
+ try { return databaseMetaData.supportsDifferentTableCorrelationNames(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsExpressionsInOrderBy() throws SQLException {
- try { return _meta.supportsExpressionsInOrderBy(); }
+ try { return databaseMetaData.supportsExpressionsInOrderBy(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsExtendedSQLGrammar() throws SQLException {
- try { return _meta.supportsExtendedSQLGrammar(); }
+ try { return databaseMetaData.supportsExtendedSQLGrammar(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsFullOuterJoins() throws SQLException {
- try { return _meta.supportsFullOuterJoins(); }
+ try { return databaseMetaData.supportsFullOuterJoins(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsGetGeneratedKeys() throws SQLException {
- try { return _meta.supportsGetGeneratedKeys(); }
+ try { return databaseMetaData.supportsGetGeneratedKeys(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsGroupBy() throws SQLException {
- try { return _meta.supportsGroupBy(); }
+ try { return databaseMetaData.supportsGroupBy(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsGroupByBeyondSelect() throws SQLException {
- try { return _meta.supportsGroupByBeyondSelect(); }
+ try { return databaseMetaData.supportsGroupByBeyondSelect(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsGroupByUnrelated() throws SQLException {
- try { return _meta.supportsGroupByUnrelated(); }
+ try { return databaseMetaData.supportsGroupByUnrelated(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsIntegrityEnhancementFacility() throws SQLException {
- try { return _meta.supportsIntegrityEnhancementFacility(); }
+ try { return databaseMetaData.supportsIntegrityEnhancementFacility(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsLikeEscapeClause() throws SQLException {
- try { return _meta.supportsLikeEscapeClause(); }
+ try { return databaseMetaData.supportsLikeEscapeClause(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsLimitedOuterJoins() throws SQLException {
- try { return _meta.supportsLimitedOuterJoins(); }
+ try { return databaseMetaData.supportsLimitedOuterJoins(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsMinimumSQLGrammar() throws SQLException {
- try { return _meta.supportsMinimumSQLGrammar(); }
+ try { return databaseMetaData.supportsMinimumSQLGrammar(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsMixedCaseIdentifiers() throws SQLException {
- try { return _meta.supportsMixedCaseIdentifiers(); }
+ try { return databaseMetaData.supportsMixedCaseIdentifiers(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
- try { return _meta.supportsMixedCaseQuotedIdentifiers(); }
+ try { return databaseMetaData.supportsMixedCaseQuotedIdentifiers(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsMultipleOpenResults() throws SQLException {
- try { return _meta.supportsMultipleOpenResults(); }
+ try { return databaseMetaData.supportsMultipleOpenResults(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsMultipleResultSets() throws SQLException {
- try { return _meta.supportsMultipleResultSets(); }
+ try { return databaseMetaData.supportsMultipleResultSets(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsMultipleTransactions() throws SQLException {
- try { return _meta.supportsMultipleTransactions(); }
+ try { return databaseMetaData.supportsMultipleTransactions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsNamedParameters() throws SQLException {
- try { return _meta.supportsNamedParameters(); }
+ try { return databaseMetaData.supportsNamedParameters(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsNonNullableColumns() throws SQLException {
- try { return _meta.supportsNonNullableColumns(); }
+ try { return databaseMetaData.supportsNonNullableColumns(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
- try { return _meta.supportsOpenCursorsAcrossCommit(); }
+ try { return databaseMetaData.supportsOpenCursorsAcrossCommit(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
- try { return _meta.supportsOpenCursorsAcrossRollback(); }
+ try { return databaseMetaData.supportsOpenCursorsAcrossRollback(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
- try { return _meta.supportsOpenStatementsAcrossCommit(); }
+ try { return databaseMetaData.supportsOpenStatementsAcrossCommit(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
- try { return _meta.supportsOpenStatementsAcrossRollback(); }
+ try { return databaseMetaData.supportsOpenStatementsAcrossRollback(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsOrderByUnrelated() throws SQLException {
- try { return _meta.supportsOrderByUnrelated(); }
+ try { return databaseMetaData.supportsOrderByUnrelated(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsOuterJoins() throws SQLException {
- try { return _meta.supportsOuterJoins(); }
+ try { return databaseMetaData.supportsOuterJoins(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsPositionedDelete() throws SQLException {
- try { return _meta.supportsPositionedDelete(); }
+ try { return databaseMetaData.supportsPositionedDelete(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsPositionedUpdate() throws SQLException {
- try { return _meta.supportsPositionedUpdate(); }
+ try { return databaseMetaData.supportsPositionedUpdate(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsResultSetConcurrency(final int type, final int concurrency)
throws SQLException {
- try { return _meta.supportsResultSetConcurrency(type, concurrency); }
+ try { return databaseMetaData.supportsResultSetConcurrency(type, concurrency); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsResultSetHoldability(final int holdability)
throws SQLException {
- try { return _meta.supportsResultSetHoldability(holdability); }
+ try { return databaseMetaData.supportsResultSetHoldability(holdability); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsResultSetType(final int type) throws SQLException {
- try { return _meta.supportsResultSetType(type); }
+ try { return databaseMetaData.supportsResultSetType(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSavepoints() throws SQLException {
- try { return _meta.supportsSavepoints(); }
+ try { return databaseMetaData.supportsSavepoints(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSchemasInDataManipulation() throws SQLException {
- try { return _meta.supportsSchemasInDataManipulation(); }
+ try { return databaseMetaData.supportsSchemasInDataManipulation(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSchemasInIndexDefinitions() throws SQLException {
- try { return _meta.supportsSchemasInIndexDefinitions(); }
+ try { return databaseMetaData.supportsSchemasInIndexDefinitions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
- try { return _meta.supportsSchemasInPrivilegeDefinitions(); }
+ try { return databaseMetaData.supportsSchemasInPrivilegeDefinitions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSchemasInProcedureCalls() throws SQLException {
- try { return _meta.supportsSchemasInProcedureCalls(); }
+ try { return databaseMetaData.supportsSchemasInProcedureCalls(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSchemasInTableDefinitions() throws SQLException {
- try { return _meta.supportsSchemasInTableDefinitions(); }
+ try { return databaseMetaData.supportsSchemasInTableDefinitions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSelectForUpdate() throws SQLException {
- try { return _meta.supportsSelectForUpdate(); }
+ try { return databaseMetaData.supportsSelectForUpdate(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsStatementPooling() throws SQLException {
- try { return _meta.supportsStatementPooling(); }
+ try { return databaseMetaData.supportsStatementPooling(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsStoredProcedures() throws SQLException {
- try { return _meta.supportsStoredProcedures(); }
+ try { return databaseMetaData.supportsStoredProcedures(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSubqueriesInComparisons() throws SQLException {
- try { return _meta.supportsSubqueriesInComparisons(); }
+ try { return databaseMetaData.supportsSubqueriesInComparisons(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSubqueriesInExists() throws SQLException {
- try { return _meta.supportsSubqueriesInExists(); }
+ try { return databaseMetaData.supportsSubqueriesInExists(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSubqueriesInIns() throws SQLException {
- try { return _meta.supportsSubqueriesInIns(); }
+ try { return databaseMetaData.supportsSubqueriesInIns(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsSubqueriesInQuantifieds() throws SQLException {
- try { return _meta.supportsSubqueriesInQuantifieds(); }
+ try { return databaseMetaData.supportsSubqueriesInQuantifieds(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsTableCorrelationNames() throws SQLException {
- try { return _meta.supportsTableCorrelationNames(); }
+ try { return databaseMetaData.supportsTableCorrelationNames(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsTransactionIsolationLevel(final int level)
throws SQLException {
- try { return _meta.supportsTransactionIsolationLevel(level); }
+ try { return databaseMetaData.supportsTransactionIsolationLevel(level); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsTransactions() throws SQLException {
- try { return _meta.supportsTransactions(); }
+ try { return databaseMetaData.supportsTransactions(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsUnion() throws SQLException {
- try { return _meta.supportsUnion(); }
+ try { return databaseMetaData.supportsUnion(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsUnionAll() throws SQLException {
- try { return _meta.supportsUnionAll(); }
+ try { return databaseMetaData.supportsUnionAll(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean updatesAreDetected(final int type) throws SQLException {
- try { return _meta.updatesAreDetected(type); }
+ try { return databaseMetaData.updatesAreDetected(type); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean usesLocalFilePerTable() throws SQLException {
- try { return _meta.usesLocalFilePerTable(); }
+ try { return databaseMetaData.usesLocalFilePerTable(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean usesLocalFiles() throws SQLException {
- try { return _meta.usesLocalFiles(); }
+ try { return databaseMetaData.usesLocalFiles(); }
catch (final SQLException e) { handleException(e); return false; }
}
@@ -1262,10 +1261,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
public boolean isWrapperFor(final Class<?> iface) throws SQLException {
if (iface.isAssignableFrom(getClass())) {
return true;
- } else if (iface.isAssignableFrom(_meta.getClass())) {
+ } else if (iface.isAssignableFrom(databaseMetaData.getClass())) {
return true;
} else {
- return _meta.isWrapperFor(iface);
+ return databaseMetaData.isWrapperFor(iface);
}
}
@@ -1273,26 +1272,26 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
public <T> T unwrap(final Class<T> iface) throws SQLException {
if (iface.isAssignableFrom(getClass())) {
return iface.cast(this);
- } else if (iface.isAssignableFrom(_meta.getClass())) {
- return iface.cast(_meta);
+ } else if (iface.isAssignableFrom(databaseMetaData.getClass())) {
+ return iface.cast(databaseMetaData);
} else {
- return _meta.unwrap(iface);
+ return databaseMetaData.unwrap(iface);
}
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
- try { return _meta.getRowIdLifetime(); }
+ try { return databaseMetaData.getRowIdLifetime(); }
catch (final SQLException e) { handleException(e); throw new AssertionError(); }
}
@Override
public ResultSet getSchemas(final String catalog, final String schemaPattern)
throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getSchemas(catalog, schemaPattern));
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getSchemas(catalog, schemaPattern));
}
catch (final SQLException e) {
handleException(e);
@@ -1302,22 +1301,22 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
- try { return _meta.autoCommitFailureClosesAllResultSets(); }
+ try { return databaseMetaData.autoCommitFailureClosesAllResultSets(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
- try { return _meta.supportsStoredFunctionsUsingCallSyntax(); }
+ try { return databaseMetaData.supportsStoredFunctionsUsingCallSyntax(); }
catch (final SQLException e) { handleException(e); return false; }
}
@Override
public ResultSet getClientInfoProperties() throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getClientInfoProperties());
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getClientInfoProperties());
}
catch (final SQLException e) {
handleException(e);
@@ -1328,10 +1327,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public ResultSet getFunctions(final String catalog, final String schemaPattern,
final String functionNamePattern) throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getFunctions(catalog, schemaPattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getFunctions(catalog, schemaPattern,
functionNamePattern));
}
catch (final SQLException e) {
@@ -1344,10 +1343,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
public ResultSet getFunctionColumns(final String catalog, final String schemaPattern,
final String functionNamePattern, final String columnNamePattern)
throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getFunctionColumns(catalog, schemaPattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getFunctionColumns(catalog, schemaPattern,
functionNamePattern, columnNamePattern));
}
catch (final SQLException e) {
@@ -1362,10 +1361,10 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
public ResultSet getPseudoColumns(final String catalog, final String schemaPattern,
final String tableNamePattern, final String columnNamePattern)
throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(_conn,
- _meta.getPseudoColumns(catalog, schemaPattern,
+ return DelegatingResultSet.wrapResultSet(connection,
+ databaseMetaData.getPseudoColumns(catalog, schemaPattern,
tableNamePattern, columnNamePattern));
}
catch (final SQLException e) {
@@ -1376,9 +1375,9 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
@Override
public boolean generatedKeyAlwaysReturned() throws SQLException {
- _conn.checkOpen();
+ connection.checkOpen();
try {
- return _meta.generatedKeyAlwaysReturned();
+ return databaseMetaData.generatedKeyAlwaysReturned();
}
catch (final SQLException e) {
handleException(e);
[2/4] commons-dbcp git commit: Some ivars use _ as a prefix and some
others do not. Normalize to not use a _ prefix.
Posted by gg...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/87266fdb/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 4d90a17..9fdb548 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
@@ -59,13 +59,13 @@ import java.util.Map;
public final class DelegatingResultSet extends AbandonedTrace implements ResultSet {
/** My delegate. **/
- private final ResultSet _res;
+ private final ResultSet resultSet;
/** The Statement that created me, if any. **/
- private Statement _stmt;
+ private Statement statement;
/** The Connection that created me, if any. **/
- private Connection _conn;
+ private Connection connection;
/**
* Create a wrapper for the ResultSet which traces this
@@ -80,8 +80,8 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
*/
private DelegatingResultSet(final Statement stmt, final ResultSet res) {
super((AbandonedTrace)stmt);
- this._stmt = stmt;
- this._res = res;
+ this.statement = stmt;
+ this.resultSet = res;
}
/**
@@ -97,8 +97,8 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
*/
private DelegatingResultSet(final Connection conn, final ResultSet res) {
super((AbandonedTrace)conn);
- this._conn = conn;
- this._res = res;
+ this.connection = conn;
+ this.resultSet = res;
}
public static ResultSet wrapResultSet(final Statement stmt, final ResultSet rset) {
@@ -116,7 +116,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
public ResultSet getDelegate() {
- return _res;
+ return resultSet;
}
/**
@@ -135,7 +135,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
* sure to obtain a "genuine" {@link ResultSet}.
*/
public ResultSet getInnermostDelegate() {
- ResultSet r = _res;
+ ResultSet r = resultSet;
while(r != null && r instanceof DelegatingResultSet) {
r = ((DelegatingResultSet)r).getDelegate();
if(this == r) {
@@ -147,7 +147,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public Statement getStatement() throws SQLException {
- return _stmt;
+ return statement;
}
/**
@@ -158,15 +158,15 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void close() throws SQLException {
try {
- if(_stmt != null) {
- ((AbandonedTrace)_stmt).removeTrace(this);
- _stmt = null;
+ if(statement != null) {
+ ((AbandonedTrace)statement).removeTrace(this);
+ statement = null;
}
- if(_conn != null) {
- ((AbandonedTrace)_conn).removeTrace(this);
- _conn = null;
+ if(connection != null) {
+ ((AbandonedTrace)connection).removeTrace(this);
+ connection = null;
}
- _res.close();
+ resultSet.close();
}
catch (final SQLException e) {
handleException(e);
@@ -174,11 +174,11 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
}
protected void handleException(final SQLException e) throws SQLException {
- if (_stmt != null && _stmt instanceof DelegatingStatement) {
- ((DelegatingStatement)_stmt).handleException(e);
+ if (statement != null && statement instanceof DelegatingStatement) {
+ ((DelegatingStatement)statement).handleException(e);
}
- else if (_conn != null && _conn instanceof DelegatingConnection) {
- ((DelegatingConnection<?>)_conn).handleException(e);
+ else if (connection != null && connection instanceof DelegatingConnection) {
+ ((DelegatingConnection<?>)connection).handleException(e);
}
else {
throw e;
@@ -187,570 +187,570 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public boolean next() throws SQLException
- { try { return _res.next(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.next(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public boolean wasNull() throws SQLException
- { try { return _res.wasNull(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.wasNull(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public String getString(final int columnIndex) throws SQLException
- { try { return _res.getString(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getString(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public boolean getBoolean(final int columnIndex) throws SQLException
- { try { return _res.getBoolean(columnIndex); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.getBoolean(columnIndex); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public byte getByte(final int columnIndex) throws SQLException
- { try { return _res.getByte(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getByte(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public short getShort(final int columnIndex) throws SQLException
- { try { return _res.getShort(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getShort(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public int getInt(final int columnIndex) throws SQLException
- { try { return _res.getInt(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getInt(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public long getLong(final int columnIndex) throws SQLException
- { try { return _res.getLong(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getLong(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public float getFloat(final int columnIndex) throws SQLException
- { try { return _res.getFloat(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getFloat(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public double getDouble(final int columnIndex) throws SQLException
- { try { return _res.getDouble(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getDouble(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
/** @deprecated Use {@link #getBigDecimal(int)} */
@Deprecated
@Override
public BigDecimal getBigDecimal(final int columnIndex, final int scale) throws SQLException
- { try { return _res.getBigDecimal(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBigDecimal(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public byte[] getBytes(final int columnIndex) throws SQLException
- { try { return _res.getBytes(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBytes(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Date getDate(final int columnIndex) throws SQLException
- { try { return _res.getDate(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getDate(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Time getTime(final int columnIndex) throws SQLException
- { try { return _res.getTime(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getTime(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Timestamp getTimestamp(final int columnIndex) throws SQLException
- { try { return _res.getTimestamp(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getTimestamp(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public InputStream getAsciiStream(final int columnIndex) throws SQLException
- { try { return _res.getAsciiStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getAsciiStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
/** @deprecated Use {@link #getCharacterStream(int)} */
@Deprecated
@Override
public InputStream getUnicodeStream(final int columnIndex) throws SQLException
- { try { return _res.getUnicodeStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getUnicodeStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public InputStream getBinaryStream(final int columnIndex) throws SQLException
- { try { return _res.getBinaryStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBinaryStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public String getString(final String columnName) throws SQLException
- { try { return _res.getString(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getString(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public boolean getBoolean(final String columnName) throws SQLException
- { try { return _res.getBoolean(columnName); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.getBoolean(columnName); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public byte getByte(final String columnName) throws SQLException
- { try { return _res.getByte(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getByte(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public short getShort(final String columnName) throws SQLException
- { try { return _res.getShort(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getShort(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public int getInt(final String columnName) throws SQLException
- { try { return _res.getInt(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getInt(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public long getLong(final String columnName) throws SQLException
- { try { return _res.getLong(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getLong(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public float getFloat(final String columnName) throws SQLException
- { try { return _res.getFloat(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getFloat(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public double getDouble(final String columnName) throws SQLException
- { try { return _res.getDouble(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getDouble(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
- { try { return _res.getBigDecimal(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBigDecimal(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public byte[] getBytes(final String columnName) throws SQLException
- { try { return _res.getBytes(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBytes(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Date getDate(final String columnName) throws SQLException
- { try { return _res.getDate(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getDate(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Time getTime(final String columnName) throws SQLException
- { try { return _res.getTime(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getTime(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Timestamp getTimestamp(final String columnName) throws SQLException
- { try { return _res.getTimestamp(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getTimestamp(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public InputStream getAsciiStream(final String columnName) throws SQLException
- { try { return _res.getAsciiStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getAsciiStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
/** @deprecated Use {@link #getCharacterStream(String)} */
@Deprecated
@Override
public InputStream getUnicodeStream(final String columnName) throws SQLException
- { try { return _res.getUnicodeStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getUnicodeStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public InputStream getBinaryStream(final String columnName) throws SQLException
- { try { return _res.getBinaryStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBinaryStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public SQLWarning getWarnings() throws SQLException
- { try { return _res.getWarnings(); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getWarnings(); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public void clearWarnings() throws SQLException
- { try { _res.clearWarnings(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.clearWarnings(); } catch (final SQLException e) { handleException(e); } }
@Override
public String getCursorName() throws SQLException
- { try { return _res.getCursorName(); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getCursorName(); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public ResultSetMetaData getMetaData() throws SQLException
- { try { return _res.getMetaData(); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getMetaData(); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Object getObject(final int columnIndex) throws SQLException
- { try { return _res.getObject(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getObject(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Object getObject(final String columnName) throws SQLException
- { try { return _res.getObject(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getObject(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public int findColumn(final String columnName) throws SQLException
- { try { return _res.findColumn(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.findColumn(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public Reader getCharacterStream(final int columnIndex) throws SQLException
- { try { return _res.getCharacterStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getCharacterStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Reader getCharacterStream(final String columnName) throws SQLException
- { try { return _res.getCharacterStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getCharacterStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public BigDecimal getBigDecimal(final int columnIndex) throws SQLException
- { try { return _res.getBigDecimal(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBigDecimal(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public BigDecimal getBigDecimal(final String columnName) throws SQLException
- { try { return _res.getBigDecimal(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBigDecimal(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public boolean isBeforeFirst() throws SQLException
- { try { return _res.isBeforeFirst(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.isBeforeFirst(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public boolean isAfterLast() throws SQLException
- { try { return _res.isAfterLast(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.isAfterLast(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public boolean isFirst() throws SQLException
- { try { return _res.isFirst(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.isFirst(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public boolean isLast() throws SQLException
- { try { return _res.isLast(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.isLast(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public void beforeFirst() throws SQLException
- { try { _res.beforeFirst(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.beforeFirst(); } catch (final SQLException e) { handleException(e); } }
@Override
public void afterLast() throws SQLException
- { try { _res.afterLast(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.afterLast(); } catch (final SQLException e) { handleException(e); } }
@Override
public boolean first() throws SQLException
- { try { return _res.first(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.first(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public boolean last() throws SQLException
- { try { return _res.last(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.last(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public int getRow() throws SQLException
- { try { return _res.getRow(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getRow(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public boolean absolute(final int row) throws SQLException
- { try { return _res.absolute(row); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.absolute(row); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public boolean relative(final int rows) throws SQLException
- { try { return _res.relative(rows); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.relative(rows); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public boolean previous() throws SQLException
- { try { return _res.previous(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.previous(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public void setFetchDirection(final int direction) throws SQLException
- { try { _res.setFetchDirection(direction); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.setFetchDirection(direction); } catch (final SQLException e) { handleException(e); } }
@Override
public int getFetchDirection() throws SQLException
- { try { return _res.getFetchDirection(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getFetchDirection(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public void setFetchSize(final int rows) throws SQLException
- { try { _res.setFetchSize(rows); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.setFetchSize(rows); } catch (final SQLException e) { handleException(e); } }
@Override
public int getFetchSize() throws SQLException
- { try { return _res.getFetchSize(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getFetchSize(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public int getType() throws SQLException
- { try { return _res.getType(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getType(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public int getConcurrency() throws SQLException
- { try { return _res.getConcurrency(); } catch (final SQLException e) { handleException(e); return 0; } }
+ { try { return resultSet.getConcurrency(); } catch (final SQLException e) { handleException(e); return 0; } }
@Override
public boolean rowUpdated() throws SQLException
- { try { return _res.rowUpdated(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.rowUpdated(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public boolean rowInserted() throws SQLException
- { try { return _res.rowInserted(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.rowInserted(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public boolean rowDeleted() throws SQLException
- { try { return _res.rowDeleted(); } catch (final SQLException e) { handleException(e); return false; } }
+ { try { return resultSet.rowDeleted(); } catch (final SQLException e) { handleException(e); return false; } }
@Override
public void updateNull(final int columnIndex) throws SQLException
- { try { _res.updateNull(columnIndex); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateNull(columnIndex); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBoolean(final int columnIndex, final boolean x) throws SQLException
- { try { _res.updateBoolean(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBoolean(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateByte(final int columnIndex, final byte x) throws SQLException
- { try { _res.updateByte(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateByte(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateShort(final int columnIndex, final short x) throws SQLException
- { try { _res.updateShort(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateShort(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateInt(final int columnIndex, final int x) throws SQLException
- { try { _res.updateInt(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateInt(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateLong(final int columnIndex, final long x) throws SQLException
- { try { _res.updateLong(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateLong(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateFloat(final int columnIndex, final float x) throws SQLException
- { try { _res.updateFloat(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateFloat(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateDouble(final int columnIndex, final double x) throws SQLException
- { try { _res.updateDouble(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateDouble(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException
- { try { _res.updateBigDecimal(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBigDecimal(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateString(final int columnIndex, final String x) throws SQLException
- { try { _res.updateString(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateString(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBytes(final int columnIndex, final byte[] x) throws SQLException
- { try { _res.updateBytes(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBytes(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateDate(final int columnIndex, final Date x) throws SQLException
- { try { _res.updateDate(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateDate(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateTime(final int columnIndex, final Time x) throws SQLException
- { try { _res.updateTime(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateTime(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException
- { try { _res.updateTimestamp(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateTimestamp(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException
- { try { _res.updateAsciiStream(columnIndex, x, length); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateAsciiStream(columnIndex, x, length); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException
- { try { _res.updateBinaryStream(columnIndex, x, length); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBinaryStream(columnIndex, x, length); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException
- { try { _res.updateCharacterStream(columnIndex, x, length); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateCharacterStream(columnIndex, x, length); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateObject(final int columnIndex, final Object x, final int scale) throws SQLException
- { try { _res.updateObject(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateObject(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateObject(final int columnIndex, final Object x) throws SQLException
- { try { _res.updateObject(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateObject(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateNull(final String columnName) throws SQLException
- { try { _res.updateNull(columnName); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateNull(columnName); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBoolean(final String columnName, final boolean x) throws SQLException
- { try { _res.updateBoolean(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBoolean(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateByte(final String columnName, final byte x) throws SQLException
- { try { _res.updateByte(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateByte(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateShort(final String columnName, final short x) throws SQLException
- { try { _res.updateShort(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateShort(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateInt(final String columnName, final int x) throws SQLException
- { try { _res.updateInt(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateInt(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateLong(final String columnName, final long x) throws SQLException
- { try { _res.updateLong(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateLong(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateFloat(final String columnName, final float x) throws SQLException
- { try { _res.updateFloat(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateFloat(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateDouble(final String columnName, final double x) throws SQLException
- { try { _res.updateDouble(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateDouble(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBigDecimal(final String columnName, final BigDecimal x) throws SQLException
- { try { _res.updateBigDecimal(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBigDecimal(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateString(final String columnName, final String x) throws SQLException
- { try { _res.updateString(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateString(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBytes(final String columnName, final byte[] x) throws SQLException
- { try { _res.updateBytes(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBytes(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateDate(final String columnName, final Date x) throws SQLException
- { try { _res.updateDate(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateDate(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateTime(final String columnName, final Time x) throws SQLException
- { try { _res.updateTime(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateTime(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateTimestamp(final String columnName, final Timestamp x) throws SQLException
- { try { _res.updateTimestamp(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateTimestamp(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateAsciiStream(final String columnName, final InputStream x, final int length) throws SQLException
- { try { _res.updateAsciiStream(columnName, x, length); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateAsciiStream(columnName, x, length); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBinaryStream(final String columnName, final InputStream x, final int length) throws SQLException
- { try { _res.updateBinaryStream(columnName, x, length); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBinaryStream(columnName, x, length); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateCharacterStream(final String columnName, final Reader reader, final int length) throws SQLException
- { try { _res.updateCharacterStream(columnName, reader, length); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateCharacterStream(columnName, reader, length); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateObject(final String columnName, final Object x, final int scale) throws SQLException
- { try { _res.updateObject(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateObject(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateObject(final String columnName, final Object x) throws SQLException
- { try { _res.updateObject(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateObject(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void insertRow() throws SQLException
- { try { _res.insertRow(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.insertRow(); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateRow() throws SQLException
- { try { _res.updateRow(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateRow(); } catch (final SQLException e) { handleException(e); } }
@Override
public void deleteRow() throws SQLException
- { try { _res.deleteRow(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.deleteRow(); } catch (final SQLException e) { handleException(e); } }
@Override
public void refreshRow() throws SQLException
- { try { _res.refreshRow(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.refreshRow(); } catch (final SQLException e) { handleException(e); } }
@Override
public void cancelRowUpdates() throws SQLException
- { try { _res.cancelRowUpdates(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.cancelRowUpdates(); } catch (final SQLException e) { handleException(e); } }
@Override
public void moveToInsertRow() throws SQLException
- { try { _res.moveToInsertRow(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.moveToInsertRow(); } catch (final SQLException e) { handleException(e); } }
@Override
public void moveToCurrentRow() throws SQLException
- { try { _res.moveToCurrentRow(); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.moveToCurrentRow(); } catch (final SQLException e) { handleException(e); } }
@Override
public Object getObject(final int i, final Map<String,Class<?>> map) throws SQLException
- { try { return _res.getObject(i, map); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getObject(i, map); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Ref getRef(final int i) throws SQLException
- { try { return _res.getRef(i); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getRef(i); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Blob getBlob(final int i) throws SQLException
- { try { return _res.getBlob(i); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBlob(i); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Clob getClob(final int i) throws SQLException
- { try { return _res.getClob(i); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getClob(i); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Array getArray(final int i) throws SQLException
- { try { return _res.getArray(i); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getArray(i); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Object getObject(final String colName, final Map<String,Class<?>> map) throws SQLException
- { try { return _res.getObject(colName, map); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getObject(colName, map); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Ref getRef(final String colName) throws SQLException
- { try { return _res.getRef(colName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getRef(colName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Blob getBlob(final String colName) throws SQLException
- { try { return _res.getBlob(colName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getBlob(colName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Clob getClob(final String colName) throws SQLException
- { try { return _res.getClob(colName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getClob(colName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Array getArray(final String colName) throws SQLException
- { try { return _res.getArray(colName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getArray(colName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Date getDate(final int columnIndex, final Calendar cal) throws SQLException
- { try { return _res.getDate(columnIndex, cal); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getDate(columnIndex, cal); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Date getDate(final String columnName, final Calendar cal) throws SQLException
- { try { return _res.getDate(columnName, cal); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getDate(columnName, cal); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Time getTime(final int columnIndex, final Calendar cal) throws SQLException
- { try { return _res.getTime(columnIndex, cal); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getTime(columnIndex, cal); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Time getTime(final String columnName, final Calendar cal) throws SQLException
- { try { return _res.getTime(columnName, cal); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getTime(columnName, cal); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException
- { try { return _res.getTimestamp(columnIndex, cal); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getTimestamp(columnIndex, cal); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public Timestamp getTimestamp(final String columnName, final Calendar cal) throws SQLException
- { try { return _res.getTimestamp(columnName, cal); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getTimestamp(columnName, cal); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public java.net.URL getURL(final int columnIndex) throws SQLException
- { try { return _res.getURL(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getURL(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public java.net.URL getURL(final String columnName) throws SQLException
- { try { return _res.getURL(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+ { try { return resultSet.getURL(columnName); } catch (final SQLException e) { handleException(e); return null; } }
@Override
public void updateRef(final int columnIndex, final Ref x) throws SQLException
- { try { _res.updateRef(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateRef(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateRef(final String columnName, final Ref x) throws SQLException
- { try { _res.updateRef(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateRef(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBlob(final int columnIndex, final Blob x) throws SQLException
- { try { _res.updateBlob(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBlob(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateBlob(final String columnName, final Blob x) throws SQLException
- { try { _res.updateBlob(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateBlob(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateClob(final int columnIndex, final Clob x) throws SQLException
- { try { _res.updateClob(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateClob(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateClob(final String columnName, final Clob x) throws SQLException
- { try { _res.updateClob(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateClob(columnName, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateArray(final int columnIndex, final Array x) throws SQLException
- { try { _res.updateArray(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateArray(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
@Override
public void updateArray(final String columnName, final Array x) throws SQLException
- { try { _res.updateArray(columnName, x); } catch (final SQLException e) { handleException(e); } }
+ { try { resultSet.updateArray(columnName, x); } 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(_res.getClass())) {
+ } else if (iface.isAssignableFrom(resultSet.getClass())) {
return true;
} else {
- return _res.isWrapperFor(iface);
+ return resultSet.isWrapperFor(iface);
}
}
@@ -758,17 +758,17 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
public <T> T unwrap(final Class<T> iface) throws SQLException {
if (iface.isAssignableFrom(getClass())) {
return iface.cast(this);
- } else if (iface.isAssignableFrom(_res.getClass())) {
- return iface.cast(_res);
+ } else if (iface.isAssignableFrom(resultSet.getClass())) {
+ return iface.cast(resultSet);
} else {
- return _res.unwrap(iface);
+ return resultSet.unwrap(iface);
}
}
@Override
public RowId getRowId(final int columnIndex) throws SQLException {
try {
- return _res.getRowId(columnIndex);
+ return resultSet.getRowId(columnIndex);
}
catch (final SQLException e) {
handleException(e);
@@ -779,7 +779,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public RowId getRowId(final String columnLabel) throws SQLException {
try {
- return _res.getRowId(columnLabel);
+ return resultSet.getRowId(columnLabel);
}
catch (final SQLException e) {
handleException(e);
@@ -790,7 +790,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateRowId(final int columnIndex, final RowId value) throws SQLException {
try {
- _res.updateRowId(columnIndex, value);
+ resultSet.updateRowId(columnIndex, value);
}
catch (final SQLException e) {
handleException(e);
@@ -800,7 +800,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateRowId(final String columnLabel, final RowId value) throws SQLException {
try {
- _res.updateRowId(columnLabel, value);
+ resultSet.updateRowId(columnLabel, value);
}
catch (final SQLException e) {
handleException(e);
@@ -810,7 +810,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public int getHoldability() throws SQLException {
try {
- return _res.getHoldability();
+ return resultSet.getHoldability();
}
catch (final SQLException e) {
handleException(e);
@@ -821,7 +821,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public boolean isClosed() throws SQLException {
try {
- return _res.isClosed();
+ return resultSet.isClosed();
}
catch (final SQLException e) {
handleException(e);
@@ -832,7 +832,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNString(final int columnIndex, final String value) throws SQLException {
try {
- _res.updateNString(columnIndex, value);
+ resultSet.updateNString(columnIndex, value);
}
catch (final SQLException e) {
handleException(e);
@@ -842,7 +842,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNString(final String columnLabel, final String value) throws SQLException {
try {
- _res.updateNString(columnLabel, value);
+ resultSet.updateNString(columnLabel, value);
}
catch (final SQLException e) {
handleException(e);
@@ -852,7 +852,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNClob(final int columnIndex, final NClob value) throws SQLException {
try {
- _res.updateNClob(columnIndex, value);
+ resultSet.updateNClob(columnIndex, value);
}
catch (final SQLException e) {
handleException(e);
@@ -862,7 +862,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNClob(final String columnLabel, final NClob value) throws SQLException {
try {
- _res.updateNClob(columnLabel, value);
+ resultSet.updateNClob(columnLabel, value);
}
catch (final SQLException e) {
handleException(e);
@@ -872,7 +872,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public NClob getNClob(final int columnIndex) throws SQLException {
try {
- return _res.getNClob(columnIndex);
+ return resultSet.getNClob(columnIndex);
}
catch (final SQLException e) {
handleException(e);
@@ -883,7 +883,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public NClob getNClob(final String columnLabel) throws SQLException {
try {
- return _res.getNClob(columnLabel);
+ return resultSet.getNClob(columnLabel);
}
catch (final SQLException e) {
handleException(e);
@@ -894,7 +894,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public SQLXML getSQLXML(final int columnIndex) throws SQLException {
try {
- return _res.getSQLXML(columnIndex);
+ return resultSet.getSQLXML(columnIndex);
}
catch (final SQLException e) {
handleException(e);
@@ -905,7 +905,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public SQLXML getSQLXML(final String columnLabel) throws SQLException {
try {
- return _res.getSQLXML(columnLabel);
+ return resultSet.getSQLXML(columnLabel);
}
catch (final SQLException e) {
handleException(e);
@@ -916,7 +916,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateSQLXML(final int columnIndex, final SQLXML value) throws SQLException {
try {
- _res.updateSQLXML(columnIndex, value);
+ resultSet.updateSQLXML(columnIndex, value);
}
catch (final SQLException e) {
handleException(e);
@@ -926,7 +926,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateSQLXML(final String columnLabel, final SQLXML value) throws SQLException {
try {
- _res.updateSQLXML(columnLabel, value);
+ resultSet.updateSQLXML(columnLabel, value);
}
catch (final SQLException e) {
handleException(e);
@@ -936,7 +936,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public String getNString(final int columnIndex) throws SQLException {
try {
- return _res.getNString(columnIndex);
+ return resultSet.getNString(columnIndex);
}
catch (final SQLException e) {
handleException(e);
@@ -947,7 +947,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public String getNString(final String columnLabel) throws SQLException {
try {
- return _res.getNString(columnLabel);
+ return resultSet.getNString(columnLabel);
}
catch (final SQLException e) {
handleException(e);
@@ -958,7 +958,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public Reader getNCharacterStream(final int columnIndex) throws SQLException {
try {
- return _res.getNCharacterStream(columnIndex);
+ return resultSet.getNCharacterStream(columnIndex);
}
catch (final SQLException e) {
handleException(e);
@@ -969,7 +969,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public Reader getNCharacterStream(final String columnLabel) throws SQLException {
try {
- return _res.getNCharacterStream(columnLabel);
+ return resultSet.getNCharacterStream(columnLabel);
}
catch (final SQLException e) {
handleException(e);
@@ -980,7 +980,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNCharacterStream(final int columnIndex, final Reader reader, final long length) throws SQLException {
try {
- _res.updateNCharacterStream(columnIndex, reader, length);
+ resultSet.updateNCharacterStream(columnIndex, reader, length);
}
catch (final SQLException e) {
handleException(e);
@@ -990,7 +990,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException {
try {
- _res.updateNCharacterStream(columnLabel, reader, length);
+ resultSet.updateNCharacterStream(columnLabel, reader, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1000,7 +1000,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateAsciiStream(final int columnIndex, final InputStream inputStream, final long length) throws SQLException {
try {
- _res.updateAsciiStream(columnIndex, inputStream, length);
+ resultSet.updateAsciiStream(columnIndex, inputStream, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1010,7 +1010,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateBinaryStream(final int columnIndex, final InputStream inputStream, final long length) throws SQLException {
try {
- _res.updateBinaryStream(columnIndex, inputStream, length);
+ resultSet.updateBinaryStream(columnIndex, inputStream, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1020,7 +1020,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateCharacterStream(final int columnIndex, final Reader reader, final long length) throws SQLException {
try {
- _res.updateCharacterStream(columnIndex, reader, length);
+ resultSet.updateCharacterStream(columnIndex, reader, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1030,7 +1030,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateAsciiStream(final String columnLabel, final InputStream inputStream, final long length) throws SQLException {
try {
- _res.updateAsciiStream(columnLabel, inputStream, length);
+ resultSet.updateAsciiStream(columnLabel, inputStream, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1040,7 +1040,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateBinaryStream(final String columnLabel, final InputStream inputStream, final long length) throws SQLException {
try {
- _res.updateBinaryStream(columnLabel, inputStream, length);
+ resultSet.updateBinaryStream(columnLabel, inputStream, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1050,7 +1050,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException {
try {
- _res.updateCharacterStream(columnLabel, reader, length);
+ resultSet.updateCharacterStream(columnLabel, reader, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1060,7 +1060,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateBlob(final int columnIndex, final InputStream inputStream, final long length) throws SQLException {
try {
- _res.updateBlob(columnIndex, inputStream, length);
+ resultSet.updateBlob(columnIndex, inputStream, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1070,7 +1070,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateBlob(final String columnLabel, final InputStream inputStream, final long length) throws SQLException {
try {
- _res.updateBlob(columnLabel, inputStream, length);
+ resultSet.updateBlob(columnLabel, inputStream, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1080,7 +1080,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
try {
- _res.updateClob(columnIndex, reader, length);
+ resultSet.updateClob(columnIndex, reader, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1090,7 +1090,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
try {
- _res.updateClob(columnLabel, reader, length);
+ resultSet.updateClob(columnLabel, reader, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1100,7 +1100,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
try {
- _res.updateNClob(columnIndex, reader, length);
+ resultSet.updateNClob(columnIndex, reader, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1110,7 +1110,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
try {
- _res.updateNClob(columnLabel, reader, length);
+ resultSet.updateNClob(columnLabel, reader, length);
}
catch (final SQLException e) {
handleException(e);
@@ -1120,7 +1120,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
try {
- _res.updateNCharacterStream(columnIndex, reader);
+ resultSet.updateNCharacterStream(columnIndex, reader);
}
catch (final SQLException e) {
handleException(e);
@@ -1130,7 +1130,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
try {
- _res.updateNCharacterStream(columnLabel, reader);
+ resultSet.updateNCharacterStream(columnLabel, reader);
}
catch (final SQLException e) {
handleException(e);
@@ -1140,7 +1140,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateAsciiStream(final int columnIndex, final InputStream inputStream) throws SQLException {
try {
- _res.updateAsciiStream(columnIndex, inputStream);
+ resultSet.updateAsciiStream(columnIndex, inputStream);
}
catch (final SQLException e) {
handleException(e);
@@ -1150,7 +1150,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateBinaryStream(final int columnIndex, final InputStream inputStream) throws SQLException {
try {
- _res.updateBinaryStream(columnIndex, inputStream);
+ resultSet.updateBinaryStream(columnIndex, inputStream);
}
catch (final SQLException e) {
handleException(e);
@@ -1160,7 +1160,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
try {
- _res.updateCharacterStream(columnIndex, reader);
+ resultSet.updateCharacterStream(columnIndex, reader);
}
catch (final SQLException e) {
handleException(e);
@@ -1170,7 +1170,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateAsciiStream(final String columnLabel, final InputStream inputStream) throws SQLException {
try {
- _res.updateAsciiStream(columnLabel, inputStream);
+ resultSet.updateAsciiStream(columnLabel, inputStream);
}
catch (final SQLException e) {
handleException(e);
@@ -1180,7 +1180,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateBinaryStream(final String columnLabel, final InputStream inputStream) throws SQLException {
try {
- _res.updateBinaryStream(columnLabel, inputStream);
+ resultSet.updateBinaryStream(columnLabel, inputStream);
}
catch (final SQLException e) {
handleException(e);
@@ -1190,7 +1190,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
try {
- _res.updateCharacterStream(columnLabel, reader);
+ resultSet.updateCharacterStream(columnLabel, reader);
}
catch (final SQLException e) {
handleException(e);
@@ -1200,7 +1200,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateBlob(final int columnIndex, final InputStream inputStream) throws SQLException {
try {
- _res.updateBlob(columnIndex, inputStream);
+ resultSet.updateBlob(columnIndex, inputStream);
}
catch (final SQLException e) {
handleException(e);
@@ -1210,7 +1210,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateBlob(final String columnLabel, final InputStream inputStream) throws SQLException {
try {
- _res.updateBlob(columnLabel, inputStream);
+ resultSet.updateBlob(columnLabel, inputStream);
}
catch (final SQLException e) {
handleException(e);
@@ -1220,7 +1220,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateClob(final int columnIndex, final Reader reader) throws SQLException {
try {
- _res.updateClob(columnIndex, reader);
+ resultSet.updateClob(columnIndex, reader);
}
catch (final SQLException e) {
handleException(e);
@@ -1230,7 +1230,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateClob(final String columnLabel, final Reader reader) throws SQLException {
try {
- _res.updateClob(columnLabel, reader);
+ resultSet.updateClob(columnLabel, reader);
}
catch (final SQLException e) {
handleException(e);
@@ -1240,7 +1240,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNClob(final int columnIndex, final Reader reader) throws SQLException {
try {
- _res.updateNClob(columnIndex, reader);
+ resultSet.updateNClob(columnIndex, reader);
}
catch (final SQLException e) {
handleException(e);
@@ -1250,7 +1250,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public void updateNClob(final String columnLabel, final Reader reader) throws SQLException {
try {
- _res.updateNClob(columnLabel, reader);
+ resultSet.updateNClob(columnLabel, reader);
}
catch (final SQLException e) {
handleException(e);
@@ -1260,7 +1260,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public <T> T getObject(final int columnIndex, final Class<T> type) throws SQLException {
try {
- return _res.getObject(columnIndex, type);
+ return resultSet.getObject(columnIndex, type);
}
catch (final SQLException e) {
handleException(e);
@@ -1272,7 +1272,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
public <T> T getObject(final String columnLabel, final Class<T> type)
throws SQLException {
try {
- return _res.getObject(columnLabel, type);
+ return resultSet.getObject(columnLabel, type);
}
catch (final SQLException e) {
handleException(e);
@@ -1282,6 +1282,6 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
@Override
public String toString() {
- return super.toString() + "[_res=" + _res + ", _stmt=" + _stmt + ", _conn=" + _conn + "]";
+ return super.toString() + "[_res=" + resultSet + ", _stmt=" + statement + ", _conn=" + connection + "]";
}
}