
sf.database.datasource.ADataSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sorm Show documentation
Show all versions of sorm Show documentation
java jpa tool for spring
The newest version!
package sf.database.datasource;
import javax.sql.DataSource;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.logging.Logger;
public abstract class ADataSource implements DataSource {
protected abstract DataSource targetDataSource();
@Override
public Connection getConnection() throws SQLException {
return targetDataSource().getConnection();
}
@Override
public Connection getConnection(String username, String password) throws SQLException {
return targetDataSource().getConnection(username,password);
}
@Override
public T unwrap(Class iface) throws SQLException {
return targetDataSource().unwrap(iface);
}
@Override
public boolean isWrapperFor(Class> iface) throws SQLException {
return targetDataSource().isWrapperFor(iface);
}
@Override
public PrintWriter getLogWriter() throws SQLException {
return targetDataSource().getLogWriter();
}
@Override
public void setLogWriter(PrintWriter out) throws SQLException {
targetDataSource().setLogWriter(out);
}
@Override
public void setLoginTimeout(int seconds) throws SQLException {
targetDataSource().setLoginTimeout(seconds);
}
@Override
public int getLoginTimeout() throws SQLException {
return targetDataSource().getLoginTimeout();
}
@Override
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
return targetDataSource().getParentLogger();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy