org.jarbframework.utils.JdbcConnectionCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jarb-utils Show documentation
Show all versions of jarb-utils Show documentation
Provides common utilities
package org.jarbframework.utils;
import java.sql.Connection;
import java.sql.SQLException;
/**
* Callback interface invoked for the JDBC connection.
*
* @author Jeroen van Schagen
* @date Sep 8, 2011
*
* @param type of operation result
*/
public interface JdbcConnectionCallback {
/**
* Perform operation(s) on a new JDBC connection.
* @param connection the JDBC connection made available
* @return result of the operation
* @throws SQLException whenever an SQL error occurs
*/
T doWork(Connection connection) throws SQLException;
}