All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ch.exense.step.library.kw.system.DBConnectionWrapper Maven / Gradle / Ivy

There is a newer version: 1.0.25
Show newest version
package ch.exense.step.library.kw.system;

import java.io.Closeable;
import java.sql.Connection;
import java.sql.SQLException;

public class DBConnectionWrapper implements Closeable {

    private final Connection connection;

    public DBConnectionWrapper(Connection connection) {
        this.connection = connection;
    }

    public Connection getConnection() {
        return connection;
    }

    @Override
    public void close() {
        try {
            connection.close();
        } catch (SQLException exception) {
            throw new RuntimeException("Unable to close SQL connection", exception);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy