Examples of PropertyCriteria


Examples of de.xanders.data.system.criteria.PropertyCriteria

     * popComboBoxes - populates the combo boxes in the form
     */
    private List popAdvertLevelsList() {
        advertLevelsList = new ArrayList();
        try {
            PropertyCriteria propertyCriteria  = new PropertyCriteria(ADVERT_LEVEL_KEY);
            advertLevelsList = (ArrayList)
        dataServiceLocator.getPropertyService().searchProperties(propertyCriteria);
        } catch (Exception ex) {
            logger.error("DAO exception occured, cause: ", ex);
            MessageUtils.addErrorMessage("error.dataSource");
View Full Code Here

Examples of de.xanders.data.system.criteria.PropertyCriteria

     * popComboBoxes - populates the combo boxes in the form
     */
    private List popCustomerRelationsList() {
        customerRelationsList = new ArrayList();
        try {
            PropertyCriteria propertyCriteria  = new PropertyCriteria(CUST_RELATION_KEY);
            customerRelationsList = (ArrayList)
        dataServiceLocator.getPropertyService().searchProperties(propertyCriteria);
        } catch (Exception ex) {
            logger.error("DAO exception occured, cause: ", ex);
            System.out.println("DAO exception occured, cause: " + ex);
View Full Code Here

Examples of org.apdplat.platform.criteria.PropertyCriteria

     * @param code 数据字典编码
     * @return 数据字典项
     */
    public DicItem getDicItemByCode(String dicEnglish,String code){
        LOG.debug("根据 数据字典英文名称 ["+dicEnglish+"] 以及 数据字典编码 ["+code+"] 查找 数据字典项");
        PropertyCriteria propertyCriteria=new PropertyCriteria(Criteria.and);
        propertyCriteria.addPropertyEditor(new PropertyEditor("dic.english",Operator.eq,dicEnglish));
        propertyCriteria.addPropertyEditor(new PropertyEditor("code",Operator.eq,"String",code));

        List<DicItem> page=serviceFacade.query(DicItem.class, null, propertyCriteria).getModels();
        if(page.size() != 1){
            return null;
        }
View Full Code Here

Examples of org.apdplat.platform.criteria.PropertyCriteria

    private ServiceFacade serviceFacade;
   
    public Dic getRootDic(){
        PropertyEditor propertyEditor=new PropertyEditor("english",Operator.eq,"root");

        PropertyCriteria propertyCriteria=new PropertyCriteria();
        propertyCriteria.addPropertyEditor(propertyEditor);

        List<Dic> dics = serviceFacade.query(Dic.class, null, propertyCriteria).getModels();
        if(dics!=null && dics.size()==1){
            return dics.get(0);
        }
View Full Code Here

Examples of org.apdplat.platform.criteria.PropertyCriteria

    private ServiceFacade serviceFacade;

    public Module getRootModule() {
        PropertyEditor propertyEditor = new PropertyEditor("english", Operator.eq, "root");

        PropertyCriteria propertyCriteria = new PropertyCriteria();
        propertyCriteria.addPropertyEditor(propertyEditor);

        List<Module> roots = serviceFacade.query(Module.class, null, propertyCriteria).getModels();
        if(roots!=null && roots.size()==1){
            return roots.get(0);
        }
View Full Code Here

Examples of org.apdplat.platform.criteria.PropertyCriteria

    }

    public Dic getDic(String english){
        PropertyEditor propertyEditor=new PropertyEditor("english",Operator.eq,english);

        PropertyCriteria propertyCriteria=new PropertyCriteria();
        propertyCriteria.addPropertyEditor(propertyEditor);

        List<Dic> page=serviceFacade.query(Dic.class, null, propertyCriteria).getModels();
        if(page.isEmpty()){
            return null;
        }
View Full Code Here

Examples of org.apdplat.platform.criteria.PropertyCriteria

    }

    public Dic getDic(int id){
        PropertyEditor propertyEditor=new PropertyEditor("id",Operator.eq,Integer.toString(id));

        PropertyCriteria propertyCriteria=new PropertyCriteria();
        propertyCriteria.addPropertyEditor(propertyEditor);

        List<Dic> page=serviceFacade.query(Dic.class, null, propertyCriteria).getModels();
        if(page.isEmpty()){
            LOG.error("没有找到ID等于"+id+"的字典");
            return null;
View Full Code Here

Examples of org.apdplat.platform.criteria.PropertyCriteria

    }

    public Module getModule(String english) {
        PropertyEditor propertyEditor = new PropertyEditor("english", Operator.eq, english);

        PropertyCriteria propertyCriteria = new PropertyCriteria();
        propertyCriteria.addPropertyEditor(propertyEditor);

        List<Module> page = serviceFacade.query(Module.class, null, propertyCriteria).getModels();
        if (page.isEmpty()) {
            return null;
        }
View Full Code Here

Examples of org.apdplat.platform.criteria.PropertyCriteria

    }

    public Module getModule(int id) {
        PropertyEditor propertyEditor = new PropertyEditor("id", Operator.eq, Integer.toString(id));

        PropertyCriteria propertyCriteria = new PropertyCriteria();
        propertyCriteria.addPropertyEditor(propertyEditor);

        List<Module> page = serviceFacade.query(Module.class, null, propertyCriteria).getModels();
        if (page.isEmpty()) {
            LOG.error("没有找到ID等于" + id + "的模块");
            return null;
View Full Code Here

Examples of org.apdplat.platform.criteria.PropertyCriteria

    //propertyCriteria =score:gt:30,score:lt:60,birthday:gt:1983-10-21,birthday:lt:2009-12-12
    public PropertyCriteria buildPropertyCriteria() {
        if (StringUtils.isBlank(propertyCriteria)) {
            return null;
        }
        PropertyCriteria result = new PropertyCriteria();
        propertyCriteria=propertyCriteria.replace(",", ",");
        propertyCriteria=propertyCriteria.replace(";", ",");
        propertyCriteria=propertyCriteria.replace(";", ",");
        //,号用来分割属性
        String[] properties = propertyCriteria.split(",");
        int start=0;
        //判断是否支持集合查询
        if(propertyCriteria.startsWith("collection:") && properties.length>2){
            String collection=properties[0].split(":")[1];
            String object=properties[1].split(":")[1];
            result.setCollection(collection);
            result.setObject(object);
            start=2;
        }
        for (int i=start;i<properties.length;i++) {
            String prop=properties[i];
            //:号用来分割属性内部的类型、属性名、操作符、属性值
            String[] propInfo = prop.split(":");
            if(propInfo.length!=3){
                LOG.error("属性过滤器错误:"+prop);
                continue;
            }

            PropertyEditor propertyEditor = new PropertyEditor(propInfo[0], propInfo[1], propInfo[2]);

            result.addPropertyEditor(propertyEditor);
        }

        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.