Package net.officefloor.jdbc
Interface DataSourceWrapper
public interface DataSourceWrapper
Means to obtain the
DataSource being wrapped.- Author:
- Daniel Sagenschneider
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionAllows obtaining the actualDataSource.static DataSourcegetRealDataSource(DataSource dataSource) Obtains the "real"DataSourcefrom the inputDataSource.static MethodObtains thegetRealDataSource()Method.static booleanisGetRealDataSourceMethod(Method method) Indicates ifMethodis thegetRealDataSource().
-
Field Details
-
GET_REAL_DATA_SOURCE_METHOD_NAME
getRealDataSource()Methodname.- See Also:
-
-
Method Details
-
isGetRealDataSourceMethod
Indicates ifMethodis thegetRealDataSource().- Parameters:
method-Method.- Returns:
trueifgetRealDataSource().
-
getRealDataSourceMethod
Obtains thegetRealDataSource()Method.- Returns:
getRealDataSource()Method.
-
getRealDataSource
Obtains the "real"DataSourcefrom the inputDataSource.- Parameters:
dataSource-DataSourceto inspect for the "real"DataSource.- Returns:
- The "real"
DataSource. - Throws:
SQLException- If fails to obtain the "real"DataSource.
-
getRealDataSource
Allows obtaining the actual
DataSource.Some implementations may
ProxytheDataSource. Therefore, in inspecting theDataSourceon closingOfficeFloor, it will incorrectly determine if theDataSourceisAutoCloseable.This enables obtaining the "real"
DataSource.- Returns:
- The "real"
DataSource. In some implementations it may actually benullas no "real" backingDataSourceis available. - Throws:
SQLException- If fails to obtain the "real"DataSource.
-