java學習

          java學習

           

          hibernate里的DetachedCriteria的幾種條件查詢方法

          detachedCriteria.add(Restrictions.eq("user.userId", userId));
          Restrictions.eq()是等于,Restrictions.allMap()使用Map,使用key和value進行多個等于的對比
          Restrictions.gt()大于,Restrictions.ge()大于等于,Restrictions.lt()小于,
          Restrictions.le()小于等于,Restrictions.between()對應sql中的between字句,
          Restrictions.like()對應sql的like字句,
          Restrictions.in()對應sql的in字句
          Restrictions.and()
          Restrictions.or()
          Restrictions.sqlRestnction(),是對sql限定查詢 

          posted on 2012-09-27 13:35 楊軍威 閱讀(772) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          導航

          統計

          常用鏈接

          留言簿

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 巴楚县| 柳林县| 武安市| 长沙市| 收藏| 横山县| 普宁市| 武陟县| 凌源市| 腾冲县| 洪洞县| 偃师市| 镇巴县| 镇江市| 铜陵市| 土默特左旗| 汉阴县| 右玉县| 东城区| 浮山县| 同仁县| 金沙县| 开阳县| 灵山县| 宁都县| 历史| 宜良县| 大足县| 阜阳市| 铁力市| 陵水| 化州市| 司法| 固始县| 龙里县| 营口市| 汉川市| 西安市| 东港市| 法库县| 南安市|