Hibernate-檢索

          Hibernate的 HQL和QBC檢索。 HQL 主要依據QUERY接口, 執行HQL語句, 可以動態的改變HQL參數的名字(參數名, 位置), 鏈式編程。 QBC就是QUERY BY CRETIRA, 創建某一類的CRETIRA, 用EXPRESSIONG的靜態方法產生查詢條件, 返回CRETIRION實例, 然后用CRETIRA對象ADD。(CRETIRION), 調用CRETIRA.LIST()返回查詢結果。 HQL and QBC CAN do batch query, we can set first record position from results that we get from databases, and set max records we can get every time. HQL and QBC also support uniqueResult() method. 不能寫類似于SELECT * FROM CUSTMOER WHERE NAME = NULL, it will return null ever null = null or name = null from SQL query criteria. HQL can setInt(), setString for our query string. QBE(QUERY BY EXAMPLE), it should give a example of the object that we want to query. and query the results.

          posted on 2006-08-29 08:26 Sheldon Sun 閱讀(158) 評論(0)  編輯  收藏


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


          網站導航:
           
          <2025年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          導航

          統計

          常用鏈接

          留言簿(3)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 许昌县| 东至县| 乌拉特后旗| 威海市| 大田县| 新丰县| 拉萨市| 屯门区| 富裕县| 安吉县| 确山县| 丰顺县| 无为县| 拜泉县| 普安县| 陆川县| 偏关县| 华亭县| 祁东县| 灵寿县| 枣阳市| 阳城县| 新兴县| 扎鲁特旗| 剑河县| 宁海县| 双桥区| 阿尔山市| 安义县| 梁山县| 洛隆县| 平凉市| 博乐市| 噶尔县| 石屏县| 永平县| 潼南县| 静安区| 通榆县| 屏东县| 潮州市|