| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.logicalcobwebs.proxool.ProxyDatabaseMetaData
class ProxyDatabaseMetaData
Delegates to a normal Coonection for everything but the close() method (when it puts itself back into the pool instead).
| Field Summary | |
|---|---|
| private  java.sql.DatabaseMetaData | databaseMetaData | 
| private static java.lang.String | EQUALS_METHOD | 
| private static java.lang.String | FINALIZE_METHOD | 
| private static java.lang.String | GET_CONNECTION_METHOD | 
| private static Log | LOG | 
| private  java.sql.Connection | wrappedConnection | 
| 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)All generated proxied methods call this method instead of the original method. | 
|  java.lang.String | toString() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
private static final Log LOG
private static final java.lang.String GET_CONNECTION_METHOD
private static final java.lang.String EQUALS_METHOD
private static final java.lang.String FINALIZE_METHOD
private java.sql.DatabaseMetaData databaseMetaData
private java.sql.Connection wrappedConnection
| Constructor Detail | 
|---|
public ProxyDatabaseMetaData(java.sql.DatabaseMetaData databaseMetaData,
                             java.sql.Connection wrappedConnection)
databaseMetaData - the meta data we use to delegate all calls to (except getConnection())wrappedConnection - the connection we return if asked for the connection| Method Detail | 
|---|
public java.lang.Object intercept(java.lang.Object proxy,
                                  java.lang.reflect.Method method,
                                  java.lang.Object[] args,
                                  MethodProxy methodProxy)
                           throws java.lang.Throwable
MethodInterceptor
intercept in interface MethodInterceptorproxy - "this", the enhanced objectmethod - intercepted Methodargs - argument array; primitive types are wrappedmethodProxy - used to invoke super (non-intercepted method); may be called
 as many times as needed
java.lang.Throwable - any exception may be thrown; if so, super method will not be invokedMethodProxypublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (probably another databaseMetaData) that we
 are being compared to
public java.sql.Connection getConnection()
DatabaseMetaData.getConnection()protected java.sql.DatabaseMetaData getDatabaseMetaData()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||