Package net.officefloor.jdbc
Interface ConnectionWrapper
- 
 public interface ConnectionWrapperMeans to obtain theConnectionbeing wrapped.- Author:
- Daniel Sagenschneider
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringGET_REAL_CONNECTION_METHOD_NAMEgetRealConnection()Methodname.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.sql.ConnectiongetRealConnection()Allows obtaining the actualConnection.static java.sql.ConnectiongetRealConnection(java.sql.Connection connection)Obtains the "real"Connectionfrom the inputConnection.static java.lang.reflect.MethodgetRealConnectionMethod()Obtains thegetRealConnection()Method.static booleanisGetRealConnectionMethod(java.lang.reflect.Method method)Indicates ifMethodis thegetRealConnection().
 
- 
- 
- 
Field Detail- 
GET_REAL_CONNECTION_METHOD_NAMEstatic final java.lang.String GET_REAL_CONNECTION_METHOD_NAME getRealConnection()Methodname.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
isGetRealConnectionMethodstatic boolean isGetRealConnectionMethod(java.lang.reflect.Method method) Indicates ifMethodis thegetRealConnection().- Parameters:
- method-- Method.
- Returns:
- trueif- getRealConnection().
 
 - 
getRealConnectionMethodstatic java.lang.reflect.Method getRealConnectionMethod() Obtains thegetRealConnection()Method.- Returns:
- getRealConnection()- Method.
 
 - 
getRealConnectionstatic java.sql.Connection getRealConnection(java.sql.Connection connection) throws java.sql.SQLExceptionObtains the "real"Connectionfrom the inputConnection.- Parameters:
- connection-- Connectionto inspect for the "real"- Connection.
- Returns:
- The "real" Connectionornullif none.
- Throws:
- java.sql.SQLException- If fails to obtain the "real"- Connection.
 
 - 
getRealConnectionjava.sql.Connection getRealConnection() throws java.sql.SQLExceptionAllows obtaining the actual Connection.Some implementations may ProxytheConnectionto source on invocation of firstConnectionmethod. Therefore, in inspecting theConnectionon recycle, it will actually acquire aConnectionwhen none was required to be recycled (creating unnecessaryConnectioninstances).This enables obtaining the "real" Connection.- Returns:
- The "real" Connection. In some implementations it may actually benullas no "real" backingConnectionis available.
- Throws:
- java.sql.SQLException- If fails to obtain the "real"- Connection.
 
 
- 
 
-