fi.jubic.easyconfig.jdbc.AbstractJdbcConfiguration Maven / Gradle / Ivy
The newest version!
package fi.jubic.easyconfig.jdbc;
import javax.sql.DataSource;
import java.sql.SQLException;
/**
* Simple {@link JdbcConfiguration} base class for delegating implementations.
*/
public abstract class AbstractJdbcConfiguration implements JdbcConfiguration {
private final JdbcConfiguration configuration;
protected AbstractJdbcConfiguration(JdbcConfiguration configuration) {
this.configuration = configuration;
}
@Override
public T withConnection(ConnectionFunction connectionFunction) throws SQLException {
return configuration.withConnection(connectionFunction);
}
@Override
public DataSource getDataSource() {
return configuration.getDataSource();
}
}