Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreampie committed Jan 26, 2016
2 parents 2902a83 + 1b6a847 commit 7925169
Showing 1 changed file with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package cn.dreampie.orm.provider.ds;

import cn.dreampie.orm.dialect.Dialect;
import cn.dreampie.orm.provider.DataSourceProvider;

import javax.sql.DataSource;

/**
* Created by zhaopeng on 16/1/21.
*/
public class DsDataSourceProvider implements DataSourceProvider {
private DataSource dataSource;
private Dialect dialect;
private boolean showSql = false;
private String dsName = "default";

public DsDataSourceProvider(DataSource dataSource, Dialect dialect) {
this.dataSource = dataSource;
this.dialect = dialect;
}

public DsDataSourceProvider(DataSource dataSource, Dialect dialect, boolean showSql, String dsName) {
this.dataSource = dataSource;
this.dialect = dialect;
this.showSql = showSql;
this.dsName = dsName;
}

public DataSource getDataSource() {
return this.dataSource;
}

public Dialect getDialect() {
return this.dialect;
}

public String getDsName() {
return dsName;
}

public boolean isShowSql() {
return this.showSql;
}

public void close() {
//do nothing becouse it have no close method
}

}

0 comments on commit 7925169

Please sign in to comment.