PoolGuardConnectionWrapper is a Connection wrapper that makes sure a
closed connection cannot be used anymore.
| Method from org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper Detail: |
protected void checkOpen() throws SQLException {
if(delegate == null) {
throw new SQLException("Connection is closed.");
}
}
|
public void clearWarnings() throws SQLException {
checkOpen();
delegate.clearWarnings();
}
|
public void close() throws SQLException {
checkOpen();
this.delegate.close();
this.delegate = null;
super.setDelegate(null);
}
|
public void commit() throws SQLException {
checkOpen();
delegate.commit();
}
|
public Statement createStatement() throws SQLException {
checkOpen();
return delegate.createStatement();
}
|
public Statement createStatement(int resultSetType,
int resultSetConcurrency) throws SQLException {
checkOpen();
return delegate.createStatement(resultSetType, resultSetConcurrency);
}
|
public Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) throws SQLException {
checkOpen();
return delegate.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability);
}
|
public boolean equals(Object obj) {
if (delegate == null){
return false;
}
return delegate.equals(obj);
}
|
public boolean getAutoCommit() throws SQLException {
checkOpen();
return delegate.getAutoCommit();
}
|
public String getCatalog() throws SQLException {
checkOpen();
return delegate.getCatalog();
}
|
public Connection getDelegate() {
if (isAccessToUnderlyingConnectionAllowed()) {
return super.getDelegate();
} else {
return null;
}
}
|
public int getHoldability() throws SQLException {
checkOpen();
return delegate.getHoldability();
}
|
public Connection getInnermostDelegate() {
if (isAccessToUnderlyingConnectionAllowed()) {
return super.getInnermostDelegate();
} else {
return null;
}
}
|
public DatabaseMetaData getMetaData() throws SQLException {
checkOpen();
return delegate.getMetaData();
}
|
public int getTransactionIsolation() throws SQLException {
checkOpen();
return delegate.getTransactionIsolation();
}
|
public Map getTypeMap() throws SQLException {
checkOpen();
return delegate.getTypeMap();
}
|
public SQLWarning getWarnings() throws SQLException {
checkOpen();
return delegate.getWarnings();
}
|
public int hashCode() {
if (delegate == null){
return 0;
}
return delegate.hashCode();
}
|
public boolean isClosed() throws SQLException {
if (delegate == null) {
return true;
}
return delegate.isClosed();
}
|
public boolean isReadOnly() throws SQLException {
checkOpen();
return delegate.isReadOnly();
}
|
public String nativeSQL(String sql) throws SQLException {
checkOpen();
return delegate.nativeSQL(sql);
}
|
public CallableStatement prepareCall(String sql) throws SQLException {
checkOpen();
return delegate.prepareCall(sql);
}
|
public CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) throws SQLException {
checkOpen();
return delegate.prepareCall(sql, resultSetType, resultSetConcurrency);
}
|
public CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) throws SQLException {
checkOpen();
return delegate.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
}
|
public PreparedStatement prepareStatement(String sql) throws SQLException {
checkOpen();
return delegate.prepareStatement(sql);
}
|
public PreparedStatement prepareStatement(String sql,
int autoGeneratedKeys) throws SQLException {
checkOpen();
return delegate.prepareStatement(sql, autoGeneratedKeys);
}
|
public PreparedStatement prepareStatement(String sql,
int[] columnIndexes) throws SQLException {
checkOpen();
return delegate.prepareStatement(sql, columnIndexes);
}
|
public PreparedStatement prepareStatement(String sql,
String[] columnNames) throws SQLException {
checkOpen();
return delegate.prepareStatement(sql, columnNames);
}
|
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) throws SQLException {
checkOpen();
return delegate.prepareStatement(sql, resultSetType, resultSetConcurrency);
}
|
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) throws SQLException {
checkOpen();
return delegate.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
}
|
public void releaseSavepoint(Savepoint savepoint) throws SQLException {
checkOpen();
delegate.releaseSavepoint(savepoint);
}
|
public void rollback() throws SQLException {
checkOpen();
delegate.rollback();
}
|
public void rollback(Savepoint savepoint) throws SQLException {
checkOpen();
delegate.rollback(savepoint);
}
|
public void setAutoCommit(boolean autoCommit) throws SQLException {
checkOpen();
delegate.setAutoCommit(autoCommit);
}
|
public void setCatalog(String catalog) throws SQLException {
checkOpen();
delegate.setCatalog(catalog);
}
|
public void setHoldability(int holdability) throws SQLException {
checkOpen();
delegate.setHoldability(holdability);
}
|
public void setReadOnly(boolean readOnly) throws SQLException {
checkOpen();
delegate.setReadOnly(readOnly);
}
|
public Savepoint setSavepoint() throws SQLException {
checkOpen();
return delegate.setSavepoint();
}
|
public Savepoint setSavepoint(String name) throws SQLException {
checkOpen();
return delegate.setSavepoint(name);
}
|
public void setTransactionIsolation(int level) throws SQLException {
checkOpen();
delegate.setTransactionIsolation(level);
}
|
public void setTypeMap(Map map) throws SQLException {
checkOpen();
delegate.setTypeMap(map);
}
|
public String toString() {
if (delegate == null){
return null;
}
return delegate.toString();
}
|