|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter
Abstract adapter class for the NativeJdbcExtractor interface, for simplified implementation of basic extractors. Returns the passed-in JDBC objects on all methods.
The getNativeConnectionFromStatement
method is implemented
to simply delegate to getNativeConnection
with the Statement's
Connection. This is what most extractor implementations will stick to,
unless there's a more efficient version for a specific pool.
getNativeConnectionFromStatement(java.sql.Statement)
,
getNativeConnection(java.sql.Connection)
Constructor Summary | |
NativeJdbcExtractorAdapter()
|
Method Summary | |
java.sql.CallableStatement |
getNativeCallableStatement(java.sql.CallableStatement cs)
Not able to unwrap: return passed-in CallableStatement. |
java.sql.Connection |
getNativeConnection(java.sql.Connection con)
Not able to unwrap: return passed-in Connection. |
java.sql.Connection |
getNativeConnectionFromStatement(java.sql.Statement stmt)
Retrieve the Connection via the Statement's Connection. |
java.sql.PreparedStatement |
getNativePreparedStatement(java.sql.PreparedStatement ps)
Not able to unwrap: return passed-in PreparedStatement. |
java.sql.ResultSet |
getNativeResultSet(java.sql.ResultSet rs)
Not able to unwrap: return passed-in ResultSet. |
java.sql.Statement |
getNativeStatement(java.sql.Statement stmt)
Not able to unwrap: return passed-in Statement. |
boolean |
isNativeConnectionNecessaryForNativeCallableStatements()
Return false by default. |
boolean |
isNativeConnectionNecessaryForNativePreparedStatements()
Return false by default. |
boolean |
isNativeConnectionNecessaryForNativeStatements()
Return false by default. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NativeJdbcExtractorAdapter()
Method Detail |
public boolean isNativeConnectionNecessaryForNativeStatements()
isNativeConnectionNecessaryForNativeStatements
in interface NativeJdbcExtractor
public boolean isNativeConnectionNecessaryForNativePreparedStatements()
isNativeConnectionNecessaryForNativePreparedStatements
in interface NativeJdbcExtractor
public boolean isNativeConnectionNecessaryForNativeCallableStatements()
isNativeConnectionNecessaryForNativeCallableStatements
in interface NativeJdbcExtractor
public java.sql.Connection getNativeConnection(java.sql.Connection con) throws java.sql.SQLException
getNativeConnection
in interface NativeJdbcExtractor
con
- the Connection handle, potentially wrapped by a connection pool
java.sql.SQLException
- if thrown by JDBC methodspublic java.sql.Connection getNativeConnectionFromStatement(java.sql.Statement stmt) throws java.sql.SQLException
getNativeConnectionFromStatement
in interface NativeJdbcExtractor
stmt
- the Statement handle, potentially wrapped by a connection pool
java.sql.SQLException
- if thrown by JDBC methodsgetNativeConnection(java.sql.Connection)
,
Statement.getConnection()
public java.sql.Statement getNativeStatement(java.sql.Statement stmt) throws java.sql.SQLException
getNativeStatement
in interface NativeJdbcExtractor
stmt
- the Statement handle, potentially wrapped by a connection pool
java.sql.SQLException
- if thrown by JDBC methodspublic java.sql.PreparedStatement getNativePreparedStatement(java.sql.PreparedStatement ps) throws java.sql.SQLException
getNativePreparedStatement
in interface NativeJdbcExtractor
ps
- the PreparedStatement handle, potentially wrapped by a connection pool
java.sql.SQLException
- if thrown by JDBC methodspublic java.sql.CallableStatement getNativeCallableStatement(java.sql.CallableStatement cs) throws java.sql.SQLException
getNativeCallableStatement
in interface NativeJdbcExtractor
cs
- the CallableStatement handle, potentially wrapped by a connection pool
java.sql.SQLException
- if thrown by JDBC methodspublic java.sql.ResultSet getNativeResultSet(java.sql.ResultSet rs) throws java.sql.SQLException
getNativeResultSet
in interface NativeJdbcExtractor
rs
- the ResultSet handle, potentially wrapped by a connection pool
java.sql.SQLException
- if thrown by JDBC methods
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |