Spring Data JDBC Extensions

org.springframework.data.jdbc.support.nativejdbc
Class P6spyNativeJdbcExtractor

java.lang.Object
  extended by org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter
      extended by org.springframework.data.jdbc.support.nativejdbc.P6spyNativeJdbcExtractor
All Implemented Interfaces:
NativeJdbcExtractor

public class P6spyNativeJdbcExtractor
extends NativeJdbcExtractorAdapter

Implementation of the NativeJdbcExtractor interface.

Since:
1.0
Author:
Thomas Risberg

Constructor Summary
P6spyNativeJdbcExtractor()
          This constructor retrieves the P6Spy JDBC wrapper class, so we can get the underlying native connection using reflection.
 
Method Summary
protected  Connection doGetNativeConnection(Connection con)
          Retrieve the Connection via P6Spy's getVendorConnection method.
 boolean isNativeConnectionNecessaryForNativeCallableStatements()
          Return true, as P6Spy returns wrapped CallableStatements.
 boolean isNativeConnectionNecessaryForNativePreparedStatements()
          Return true, as P6Spy returns wrapped PreparedStatements.
 boolean isNativeConnectionNecessaryForNativeStatements()
          Return true, as P6Spy returns wrapped Statements.
 void setNextNativeJdbcExtractor(NativeJdbcExtractor nextNativeJdbcExtractor)
           
 
Methods inherited from class org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter
getNativeCallableStatement, getNativeConnection, getNativeConnectionFromStatement, getNativePreparedStatement, getNativeResultSet, getNativeStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

P6spyNativeJdbcExtractor

public P6spyNativeJdbcExtractor()
This constructor retrieves the P6Spy JDBC wrapper class, so we can get the underlying native connection using reflection.

Method Detail

setNextNativeJdbcExtractor

public void setNextNativeJdbcExtractor(NativeJdbcExtractor nextNativeJdbcExtractor)

isNativeConnectionNecessaryForNativeStatements

public boolean isNativeConnectionNecessaryForNativeStatements()
Return true, as P6Spy returns wrapped Statements.

Specified by:
isNativeConnectionNecessaryForNativeStatements in interface NativeJdbcExtractor
Overrides:
isNativeConnectionNecessaryForNativeStatements in class NativeJdbcExtractorAdapter

isNativeConnectionNecessaryForNativePreparedStatements

public boolean isNativeConnectionNecessaryForNativePreparedStatements()
Return true, as P6Spy returns wrapped PreparedStatements.

Specified by:
isNativeConnectionNecessaryForNativePreparedStatements in interface NativeJdbcExtractor
Overrides:
isNativeConnectionNecessaryForNativePreparedStatements in class NativeJdbcExtractorAdapter

isNativeConnectionNecessaryForNativeCallableStatements

public boolean isNativeConnectionNecessaryForNativeCallableStatements()
Return true, as P6Spy returns wrapped CallableStatements.

Specified by:
isNativeConnectionNecessaryForNativeCallableStatements in interface NativeJdbcExtractor
Overrides:
isNativeConnectionNecessaryForNativeCallableStatements in class NativeJdbcExtractorAdapter

doGetNativeConnection

protected Connection doGetNativeConnection(Connection con)
                                    throws SQLException
Retrieve the Connection via P6Spy's getVendorConnection method.

Overrides:
doGetNativeConnection in class NativeJdbcExtractorAdapter
Throws:
SQLException

Spring Data JDBC Extensions