org.logicalcobwebs.proxool
Class ProxyDatabaseMetaData
java.lang.Object
org.logicalcobwebs.proxool.ProxyDatabaseMetaData
class ProxyDatabaseMetaData
- extends java.lang.Object
Delegates to a normal Coonection for everything but the close()
method (when it puts itself back into the pool instead).
- Version:
- $Revision: 1.9 $, $Date: 2006/01/18 14:40:02 $
- Author:
- billhorsman, $Author: billhorsman $ (current maintainer)
Constructor Summary |
ProxyDatabaseMetaData(java.sql.DatabaseMetaData databaseMetaData,
java.sql.Connection wrappedConnection)
|
Method Summary |
boolean |
equals(java.lang.Object obj)
Whether the underlying databaseMetaData are equal |
java.sql.Connection |
getConnection()
We don't want to ask the DatabaseMetaData object for the
connection or we will get the delegate instead of the Proxool
one. |
protected java.sql.DatabaseMetaData |
getDatabaseMetaData()
Get the DatabaseMetaData from the connection |
java.lang.Object |
intercept(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args,
MethodProxy methodProxy)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LOG
private static final Log LOG
GET_CONNECTION_METHOD
private static final java.lang.String GET_CONNECTION_METHOD
- See Also:
- Constant Field Values
EQUALS_METHOD
private static final java.lang.String EQUALS_METHOD
- See Also:
- Constant Field Values
FINALIZE_METHOD
private static final java.lang.String FINALIZE_METHOD
- See Also:
- Constant Field Values
databaseMetaData
private java.sql.DatabaseMetaData databaseMetaData
wrappedConnection
private java.sql.Connection wrappedConnection
ProxyDatabaseMetaData
public ProxyDatabaseMetaData(java.sql.DatabaseMetaData databaseMetaData,
java.sql.Connection wrappedConnection)
- Parameters:
databaseMetaData
- the meta data we use to delegate all calls to (except getConnection())wrappedConnection
- the connection we return if asked for the connection
intercept
public java.lang.Object intercept(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args,
MethodProxy methodProxy)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
equals
public boolean equals(java.lang.Object obj)
- Whether the underlying databaseMetaData are equal
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
- the object (probably another databaseMetaData) that we
are being compared to
- Returns:
- whether they are the same
getConnection
public java.sql.Connection getConnection()
- We don't want to ask the DatabaseMetaData object for the
connection or we will get the delegate instead of the Proxool
one.
- See Also:
DatabaseMetaData.getConnection()
getDatabaseMetaData
protected java.sql.DatabaseMetaData getDatabaseMetaData()
- Get the DatabaseMetaData from the connection
- Returns:
- databaseMetaData
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()