com.atlassian.spring
Class LazyNativeJdbcExtractor

java.lang.Object
  extended by com.atlassian.spring.LazyNativeJdbcExtractor
All Implemented Interfaces:
org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor

public class LazyNativeJdbcExtractor
extends Object
implements org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor

A class to lazily instantiate a native JDBC extractor.

We need to lazily instantiate it because otherwise Spring will construct it for us, and users might get class not found errors (eg if they're not using Weblogic and Spring tries to load the WeblogicNativeJdbcExtractor, things get ugly).


Constructor Summary
LazyNativeJdbcExtractor()
           
 
Method Summary
 CallableStatement getNativeCallableStatement(CallableStatement cs)
           
 Connection getNativeConnection(Connection con)
           
 Connection getNativeConnectionFromStatement(Statement stmt)
           
 PreparedStatement getNativePreparedStatement(PreparedStatement ps)
           
 ResultSet getNativeResultSet(ResultSet rs)
           
 Statement getNativeStatement(Statement stmt)
           
 boolean isNativeConnectionNecessaryForNativeCallableStatements()
           
 boolean isNativeConnectionNecessaryForNativePreparedStatements()
           
 boolean isNativeConnectionNecessaryForNativeStatements()
           
 void setExtractorClass(Class extractorClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyNativeJdbcExtractor

public LazyNativeJdbcExtractor()
Method Detail

setExtractorClass

public void setExtractorClass(Class extractorClass)

isNativeConnectionNecessaryForNativeStatements

public boolean isNativeConnectionNecessaryForNativeStatements()
Specified by:
isNativeConnectionNecessaryForNativeStatements in interface org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor

isNativeConnectionNecessaryForNativePreparedStatements

public boolean isNativeConnectionNecessaryForNativePreparedStatements()
Specified by:
isNativeConnectionNecessaryForNativePreparedStatements in interface org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor

isNativeConnectionNecessaryForNativeCallableStatements

public boolean isNativeConnectionNecessaryForNativeCallableStatements()
Specified by:
isNativeConnectionNecessaryForNativeCallableStatements in interface org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor

getNativeConnection

public Connection getNativeConnection(Connection con)
                               throws SQLException
Specified by:
getNativeConnection in interface org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor
Throws:
SQLException

getNativeConnectionFromStatement

public Connection getNativeConnectionFromStatement(Statement stmt)
                                            throws SQLException
Specified by:
getNativeConnectionFromStatement in interface org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor
Throws:
SQLException

getNativeStatement

public Statement getNativeStatement(Statement stmt)
                             throws SQLException
Specified by:
getNativeStatement in interface org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor
Throws:
SQLException

getNativePreparedStatement

public PreparedStatement getNativePreparedStatement(PreparedStatement ps)
                                             throws SQLException
Specified by:
getNativePreparedStatement in interface org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor
Throws:
SQLException

getNativeCallableStatement

public CallableStatement getNativeCallableStatement(CallableStatement cs)
                                             throws SQLException
Specified by:
getNativeCallableStatement in interface org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor
Throws:
SQLException

getNativeResultSet

public ResultSet getNativeResultSet(ResultSet rs)
                             throws SQLException
Specified by:
getNativeResultSet in interface org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor
Throws:
SQLException


Atlassian Spring is developed by Atlassian Software Systems.