<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    一個Hibernate多條件查詢的demo

    Posted on 2009-08-16 11:14 Robert Su 閱讀(658) 評論(0)  編輯  收藏 所屬分類: 工程相關
        public List findByInstance(IInsInfo instance) {
            log.debug(
    "finding IInsInfo instances with given IInsInfo instance");
            
    try {
                Criteria crit 
    = getSession().createCriteria(instance.getClass());
                Criterion iname 
    = null, gdfield = null, kind = null, property = null;
                Conjunction conjunction 
    = Restrictions.conjunction();// 合取
                
    //
                if (instance.getIname() != null)
                    
    if (!instance.getIname().equals(null)) {
                        iname 
    = Restrictions.like("iname""%"
                                
    + instance.getIname() + "%");
                        conjunction.add(iname);
                    }
                
    if (instance.getGdfield() != null)
                    
    if (!instance.getGdfield().equals("")) {
                        gdfield 
    = Restrictions.eq("gdfield", instance.getGdfield());
                        conjunction.add(gdfield);
                    }
                
    if (instance.getKind() != null)
                    
    if (!instance.getKind().equals("")) {
                        kind 
    = Restrictions.eq("kind", instance.getKind());
                        conjunction.add(kind);
                    }
                
    if (instance.getProperty() != null)
                    
    if (!instance.getProperty().equals("")) {
                        property 
    = Restrictions.eq("property", instance
                                .getProperty());
                        conjunction.add(property);
                    }

                crit.add(conjunction);
                
    return crit.list();
            } 
    catch (RuntimeException re) {
                log.error(
    "find by IInsInfo instance failed", re);
                
    throw re;
            }
        }

    posts - 103, comments - 104, trackbacks - 0, articles - 5

    Copyright © Robert Su

    主站蜘蛛池模板: 在线日韩av永久免费观看| 亚洲一区在线观看视频| 久久精品国产亚洲一区二区| 亚洲精品在线观看视频| 亚洲人成网站色在线观看| 亚洲.国产.欧美一区二区三区| a毛片免费观看完整| 女人张开腿等男人桶免费视频| 亚洲视频人成在线播放| 亚洲乱码一二三四五六区| 国产精品亚洲二区在线| 久久一区二区三区免费播放| 四虎国产精品免费久久影院| 亚洲无线电影官网| 亚洲精品国产日韩无码AV永久免费网 | 6080午夜一级毛片免费看| 波多野结衣视频在线免费观看| 久久亚洲私人国产精品vA| 好猛好深好爽好硬免费视频| 成全视频免费高清 | 亚洲欧美日韩一区二区三区| 国产精品白浆在线观看免费| 免费一级国产生活片| 亚洲精品久久久久无码AV片软件| 99re热精品视频国产免费| 中文字幕在线亚洲精品 | 亚洲AV无码一区二区三区网址| 91精品免费不卡在线观看| 亚洲av成人无码久久精品| 成全高清在线观看免费 | 国产最新凸凹视频免费| 亚洲av综合av一区二区三区| 成年女人毛片免费观看97| 亚洲国语在线视频手机在线| 99re免费99re在线视频手机版| 色播亚洲视频在线观看| 国产在线观看麻豆91精品免费| 67194在线午夜亚洲| 亚洲成AⅤ人影院在线观看| yy一级毛片免费视频| 亚洲精品免费观看|