Spring Data JDBC Extensions

org.springframework.data.jdbc.support.oracle
Class ProxyConnectionPreparer

java.lang.Object
  extended by org.springframework.data.jdbc.support.oracle.ProxyConnectionPreparer
All Implemented Interfaces:
ConnectionPreparer

public class ProxyConnectionPreparer
extends Object
implements ConnectionPreparer

A ConnectionPreparer that will delegate to a ConnectionContextProvider to obtaing the current user name to be used for the proxy connection.

Since:
1.0
Author:
Thomas Risberg

Constructor Summary
ProxyConnectionPreparer()
           
 
Method Summary
protected  Connection getUserNameConnectionProxyWrapper(Connection target)
          Wrap the given Connection with a proxy that delegates every method call to it and resets user name proxy for close calls.
 Connection prepare(Connection connection)
           
 void setContextProvider(ConnectionContextProvider contextProvider)
           
 void setJdbcExtractor(NativeJdbcExtractor jdbcExtractor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyConnectionPreparer

public ProxyConnectionPreparer()
Method Detail

setContextProvider

public void setContextProvider(ConnectionContextProvider contextProvider)

setJdbcExtractor

public void setJdbcExtractor(NativeJdbcExtractor jdbcExtractor)

prepare

public Connection prepare(Connection connection)
Specified by:
prepare in interface ConnectionPreparer

getUserNameConnectionProxyWrapper

protected Connection getUserNameConnectionProxyWrapper(Connection target)
Wrap the given Connection with a proxy that delegates every method call to it and resets user name proxy for close calls.

Parameters:
target - the original Connection to wrap
Returns:
the wrapped Connection

Spring Data JDBC Extensions