com.yuyenews.easy.session.SqlSession Maven / Gradle / Ivy
The newest version!
package com.yuyenews.easy.session;
import java.sql.Connection;
import java.util.List;
import java.util.Map;
import com.yuyenews.easy.base.ExBaseDao;
import com.yuyenews.easy.util.ConnectionUtil;
public class SqlSession extends ExBaseDao {
private String dataSourceName;
/**
* 不让外部实例化,强制指定数据源
*/
private SqlSession() {}
/**
* 指定数据源
* @param name mingc
* @return duix
*/
public static SqlSession get(String name) {
SqlSession session = new SqlSession();
session.dataSourceName = name;
return session;
}
/**
* 查询数据,返回map类型的list集合
* @param sql sql
* @param args canshu
* @return duix
*/
public List