public class WrappedDatabaseConnection extends Object implements InvocationHandler
WrappedConnectionSource. This uses a proxy object so it can track
the statements and make sure everything has been closed appropriately.| Modifier and Type | Field and Description |
|---|---|
protected DatabaseConnection |
connection |
protected DatabaseConnection |
connectionProxy |
protected List<WrappedStatement> |
wrappedStatements |
| Constructor and Description |
|---|
WrappedDatabaseConnection(DatabaseConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close our connection.
|
DatabaseConnection |
getDatabaseConnection() |
DatabaseConnection |
getDatabaseConnectionProxy() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
boolean |
isAllStatementsClosed()
See if all of the wrapped statements have been closed.
|
protected final DatabaseConnection connection
protected final DatabaseConnection connectionProxy
protected final List<WrappedStatement> wrappedStatements
public WrappedDatabaseConnection(DatabaseConnection connection)
public DatabaseConnection getDatabaseConnection()
public DatabaseConnection getDatabaseConnectionProxy()
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowablepublic boolean isAllStatementsClosed()
public void close()
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.