Search in sources :

Example 1 with InsertDAOImpl

use of org.eweb4j.orm.dao.insert.InsertDAOImpl in project eweb4j-framework by laiweiwei.

the class DAOFactory method getInsertDAO.

public static InsertDAO getInsertDAO() {
    DataSource ds = DataSourceWrapCache.get();
    DBInfoConfigBean dcb = DBInfoConfigBeanCache.get();
    return new InsertDAOImpl(ds, dcb.getDataBaseType());
}
Also used : InsertDAOImpl(org.eweb4j.orm.dao.insert.InsertDAOImpl) DBInfoConfigBean(org.eweb4j.orm.dao.config.bean.DBInfoConfigBean) DataSource(javax.sql.DataSource)

Example 2 with InsertDAOImpl

use of org.eweb4j.orm.dao.insert.InsertDAOImpl in project eweb4j-framework by laiweiwei.

the class DAOFactory method getInsertDAO.

/**
	 * 创建InsertDAOImpl实例
	 * 
	 * @param dsName
	 *            数据库配置信息Bean的名字,默认下在eweb4j-dbInfo-config.xml文件中<name></name>
	 *            找到这个值
	 * @return
	 */
public static InsertDAO getInsertDAO(String dsName) {
    DataSource ds = DataSourceWrapCache.get(dsName);
    DBInfoConfigBean dcb = DBInfoConfigBeanCache.get(dsName);
    return new InsertDAOImpl(ds, dcb.getDataBaseType());
}
Also used : InsertDAOImpl(org.eweb4j.orm.dao.insert.InsertDAOImpl) DBInfoConfigBean(org.eweb4j.orm.dao.config.bean.DBInfoConfigBean) DataSource(javax.sql.DataSource)

Aggregations

DataSource (javax.sql.DataSource)2 DBInfoConfigBean (org.eweb4j.orm.dao.config.bean.DBInfoConfigBean)2 InsertDAOImpl (org.eweb4j.orm.dao.insert.InsertDAOImpl)2