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

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

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

    一個(gè)Hibernate多條件查詢(xún)的demo

    Posted on 2009-08-16 11:14 Robert Su 閱讀(664) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): 工程相關(guān)
        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;
            }
        }

    只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     

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

    Copyright © Robert Su

    主站蜘蛛池模板: 亚洲综合在线成人一区| 18观看免费永久视频| 真人做人试看60分钟免费视频| 国产偷国产偷亚洲清高动态图| 黄网站色视频免费看无下截| 四虎成人免费大片在线| 日本亚洲精品色婷婷在线影院| 91在线老王精品免费播放| 亚洲国产一区国产亚洲| 久久久久久一品道精品免费看 | 亚洲色成人中文字幕网站| caoporn国产精品免费| 亚洲熟妇无码乱子AV电影| 免费精品国产日韩热久久| 亚洲人成综合在线播放| 国产成人精品免费视| 久久亚洲精品国产亚洲老地址| 最近中文字幕免费mv视频7| 亚洲人成人伊人成综合网无码| 成人永久免费高清| 男女交性无遮挡免费视频| 国产午夜亚洲不卡| 无码国产精品一区二区免费模式 | 特色特黄a毛片高清免费观看| 亚洲AV无码乱码在线观看牲色| caoporm超免费公开视频| 亚洲粉嫩美白在线| 亚洲爆乳无码一区二区三区| 国产一级a毛一级a看免费人娇| 亚洲爆乳无码专区| 亚洲第一页日韩专区| 日韩视频免费在线| 99xxoo视频在线永久免费观看| 国产精品亚洲四区在线观看| 亚洲日产无码中文字幕| 俄罗斯极品美女毛片免费播放| 国产午夜无码精品免费看| 亚洲乱码卡一卡二卡三| 亚洲成av人在线视| 亚洲自偷自偷图片| 亚洲国产黄在线观看|