Search in sources :

Example 16 with ORMConfigBean

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

the class CheckConfigBean method checkORMProperty.

/**
	 * Check the Property part of ORM components configuration
	 * 
	 * @param pList
	 * @param ormList
	 * @return
	 */
public static String checkORMProperty(List<Property> pList, List<ORMConfigBean> ormList, String beanID, String xmlFile) {
    String error = null;
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class.getName());
    if ("true".equalsIgnoreCase(cb.getOrm().getOpen()) || "1".equals(cb.getOrm().getOpen())) {
        StringBuilder sb = new StringBuilder();
        if (!"".equals(sb.toString())) {
            error = "\n<br /><b>" + xmlFile + "[bean id=" + beanID + "][property]:</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

ORMConfigBean (org.eweb4j.orm.config.bean.ORMConfigBean)16 Property (org.eweb4j.orm.config.bean.Property)11 Field (java.lang.reflect.Field)6 ArrayList (java.util.ArrayList)6 ConfigBean (org.eweb4j.config.bean.ConfigBean)5 ReflectUtil (org.eweb4j.util.ReflectUtil)5 File (java.io.File)4 Method (java.lang.reflect.Method)4 HashMap (java.util.HashMap)3 Map (java.util.Map)3 Entry (java.util.Map.Entry)3 JoinColumn (javax.persistence.JoinColumn)3 FileWriter (java.io.FileWriter)2 IOException (java.io.IOException)2 Column (javax.persistence.Column)2 Entity (javax.persistence.Entity)2 JoinTable (javax.persistence.JoinTable)2 ManyToMany (javax.persistence.ManyToMany)2 Table (javax.persistence.Table)2 LogConfigBean (org.eweb4j.config.bean.LogConfigBean)2