cn.sylinx.hbatis.ds.DataSourceWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbatis-core Show documentation
Show all versions of hbatis-core Show documentation
hbatis is a simple orm framework
package cn.sylinx.hbatis.ds;
import javax.sql.DataSource;
import cn.sylinx.hbatis.db.dialect.DbType;
public class DataSourceWrapper {
private DataSource dataSource;
private DbType dbType = DbType.MYSQL;
public static DataSourceWrapper create(DataSource dataSource, DbType dbType) {
DataSourceWrapper dsw = new DataSourceWrapper();
dsw.setDataSource(dataSource);
dsw.setDbType(dbType);
return dsw;
}
public DataSource getDataSource() {
return dataSource;
}
public void setDataSource(DataSource dataSource) {
this.dataSource = dataSource;
}
public DbType getDbType() {
return dbType;
}
public void setDbType(DbType dbType) {
this.dbType = dbType;
}
}