Search in sources :

Example 11 with DBInfoConfigBean

use of org.eweb4j.orm.dao.config.bean.DBInfoConfigBean in project eweb4j-framework by laiweiwei.

the class DAOFactory method getSelectDAO.

public static SelectDAO getSelectDAO() {
    DataSource ds = DataSourceWrapCache.get();
    DBInfoConfigBean dcb = DBInfoConfigBeanCache.get();
    return new SelectDAOImpl(ds, dcb.getDataBaseType());
}
Also used : SelectDAOImpl(org.eweb4j.orm.dao.select.SelectDAOImpl) DBInfoConfigBean(org.eweb4j.orm.dao.config.bean.DBInfoConfigBean) DataSource(javax.sql.DataSource)

Example 12 with DBInfoConfigBean

use of org.eweb4j.orm.dao.config.bean.DBInfoConfigBean in project eweb4j-framework by laiweiwei.

the class DAOFactory method getDivPageDAO.

public static DivPageDAO getDivPageDAO() {
    DataSource ds = DataSourceWrapCache.get();
    DBInfoConfigBean dcb = DBInfoConfigBeanCache.get();
    return new DivPageDAOImpl(ds, dcb.getDataBaseType());
}
Also used : DivPageDAOImpl(org.eweb4j.orm.dao.select.DivPageDAOImpl) DBInfoConfigBean(org.eweb4j.orm.dao.config.bean.DBInfoConfigBean) DataSource(javax.sql.DataSource)

Example 13 with DBInfoConfigBean

use of org.eweb4j.orm.dao.config.bean.DBInfoConfigBean in project eweb4j-framework by laiweiwei.

the class CheckConfigBean method checkORMDBInfo.

/**
	 * Check the IOC component DBInfo part configuration
	 * 
	 * @param dcb
	 * @return
	 */
public static String checkORMDBInfo(DBInfoConfigBean dcb, String filePath) {
    String error = null;
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class.getName());
    if ("true".equals(cb.getOrm().getOpen()) || "1".equals(cb.getOrm().getOpen())) {
        StringBuilder sb = new StringBuilder();
        if (!"".equals(sb.toString())) {
            error = "\n<br /><b>" + filePath + ":</b>\n" + sb.toString();
        }
    }
    return error;
}
Also used : ORMConfigBean(org.eweb4j.orm.config.bean.ORMConfigBean) FieldConfigBean(org.eweb4j.mvc.config.bean.FieldConfigBean) DBInfoConfigBean(org.eweb4j.orm.dao.config.bean.DBInfoConfigBean) ParamConfigBean(org.eweb4j.mvc.config.bean.ParamConfigBean) ResultConfigBean(org.eweb4j.mvc.config.bean.ResultConfigBean) IOCConfigBean(org.eweb4j.ioc.config.bean.IOCConfigBean) LogConfigBean(org.eweb4j.config.bean.LogConfigBean) ActionConfigBean(org.eweb4j.mvc.config.bean.ActionConfigBean) ConfigBean(org.eweb4j.config.bean.ConfigBean) InterConfigBean(org.eweb4j.mvc.config.bean.InterConfigBean) ValidatorConfigBean(org.eweb4j.mvc.config.bean.ValidatorConfigBean)

Aggregations

DBInfoConfigBean (org.eweb4j.orm.dao.config.bean.DBInfoConfigBean)13 DataSource (javax.sql.DataSource)9 ConfigBean (org.eweb4j.config.bean.ConfigBean)4 File (java.io.File)2 Property (org.eweb4j.orm.dao.config.bean.Property)2 InsertDAOImpl (org.eweb4j.orm.dao.insert.InsertDAOImpl)2 DivPageDAOImpl (org.eweb4j.orm.dao.select.DivPageDAOImpl)2 SearchDAOImpl (org.eweb4j.orm.dao.select.SearchDAOImpl)2 SelectDAOImpl (org.eweb4j.orm.dao.select.SelectDAOImpl)2 BufferedReader (java.io.BufferedReader)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 Method (java.lang.reflect.Method)1 ArrayList (java.util.ArrayList)1 CheckConfigBean (org.eweb4j.config.CheckConfigBean)1 DBInfoXmlFiles (org.eweb4j.config.bean.DBInfoXmlFiles)1 ListenerBean (org.eweb4j.config.bean.ListenerBean)1 Listeners (org.eweb4j.config.bean.Listeners)1 LogConfigBean (org.eweb4j.config.bean.LogConfigBean)1