@Override protected void closeResources(Connection connection, java.sql.Statement statement) { delegate.closeResources(connection, statement); }
/** * Caches the connection used while the closure is active. * If the closure takes a single argument, it will be called * with the connection, otherwise it will be called with no arguments. * * @param closure the given closure * @throws SQLException if a database error occurs */ public void cacheConnection(Closure closure) throws SQLException { boolean savedCacheConnection = cacheConnection; cacheConnection = true; Connection connection = null; try { connection = createConnection(); callClosurePossiblyWithConnection(closure, connection); } finally { cacheConnection = false; closeResources(connection, null); cacheConnection = savedCacheConnection; if (dataSource != null && !cacheConnection) { useConnection = null; } } }
throw e; } finally { closeResources(connection, statement);
throw e; } finally { closeResources(connection, statement);
/** * After performing the execute operation and making use of its return, it's necessary * to free the resources allocated for the statement. */ protected final void closeResources() { Sql.this.closeResources(connection, statement); }
/** * After performing the execute operation and making use of its return, it's necessary * to free the resources allocated for the statement. * * @param rs allows the caller to conveniently close its resource as well */ protected final void closeResources(ResultSet rs) { Sql.this.closeResources(connection, statement, rs); }
/** * After performing the execute operation and making use of its return, it's necessary * to free the resources allocated for the statement. */ protected final void closeResources() { Sql.this.closeResources(connection, statement); }
/** * After performing the execute operation and making use of its return, it's necessary * to free the resources allocated for the statement. */ public final void closeResources(){ Sql.this.closeResources(connection, statement); }
/** * After performing the execute operation and making use of its return, it's necessary * to free the resources allocated for the statement. * * @param rs allows the caller to conveniently close its resource as well */ protected final void closeResources(ResultSet rs) { Sql.this.closeResources(connection, statement, rs); }
/** * After performing the execute operation and making use of its return, it's necessary * to free the resources allocated for the statement. * * @param rs allows the caller to conveniently close its resource as well */ public final void closeResources(ResultSet rs) { Sql.this.closeResources(connection, statement, rs); }
private void closeResources(BatchingPreparedStatementWrapper statement) { if (cacheStatements) return; closeResources((BatchingStatementWrapper) statement); }
@Override protected void closeResources(Connection connection, java.sql.Statement statement, ResultSet results) { delegate.closeResources(connection, statement, results); }
@Override protected void closeResources(Connection connection, java.sql.Statement statement, ResultSet results) { delegate.closeResources(connection, statement, results); }
@Override protected void closeResources(Connection connection, java.sql.Statement statement, ResultSet results) { delegate.closeResources(connection, statement, results); }
@Override protected void closeResources(Connection connection, java.sql.Statement statement) { delegate.closeResources(connection, statement); }
@Override protected void closeResources(Connection connection, java.sql.Statement statement, ResultSet results) { delegate.closeResources(connection, statement, results); }
@Override protected void closeResources(Connection connection, java.sql.Statement statement) { delegate.closeResources(connection, statement); }
protected void closeResources(Connection connection, Statement statement, ResultSet results) { if (results != null) { try { results.close(); } catch (SQLException e) { log.log(Level.SEVERE, "Caught exception closing resultSet: " + e, e); } } closeResources(connection, statement); }
@Override protected void closeResources(Connection connection, Statement statement, ResultSet results) { getPlanInfo(statement); super.closeResources(connection, statement, results); }
@Override protected void closeResources(Connection connection, Statement statement) { getPlanInfo(statement); super.closeResources(connection, statement); }