Spring Framework NativeJdbcExtractorAdapter - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework NativeJdbcExtractorAdapter class.

This code example shows how to use the following methods:
	private final Method getInternalStatementMethod;
	 
	/** 
	 * Default constructor. 
	 */ 
	public BoneCPNativeJdbcExtractor() { 
		final ClassLoader cl = getClass().getClassLoader();
		try { 
			this.connectionHandleClass = cl.loadClass("com.jolbox.bonecp.ConnectionHandle");
			this.statementHandleClass = cl.loadClass("com.jolbox.bonecp.StatementHandle");
			this.getInternalConnectionMethod = this.connectionHandleClass.getMethod("getInternalConnection");
			this.getInternalStatementMethod = this.statementHandleClass.getMethod("getInternalStatement");
		} catch (Exception e) {
			throw new IllegalStateException("Failed to initialize because BoneCP API classes are not available", e);
		} 
	} 
 
	 
	/** 
	 * @see org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter#doGetNativeConnection(java.sql.Connection) 
5
CodeRank
This code example shows how to use the following methods:
 * If delegating extractor is specified, after unwrapping our proxy, delegating 
 * extractor will be applied. 
 * 
 * @author Tadaya Tsuyukubo 
 */ 
public class DataSourceProxyNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
 
    private NativeJdbcExtractor delegate;
 
    @Override 
    protected Connection doGetNativeConnection(Connection con) throws SQLException {
        Connection connection = NativeJdbcExtractUtils.getConnection(con);
        if (delegate != null) {
            connection = delegate.getNativeConnection(connection);
        } 
        return connection;
    } 
 
    @Override 
    public Statement getNativeStatement(Statement stmt) throws SQLException {
4
CodeRank