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 閱讀(159) 評論(0)  編輯  收藏


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


          網站導航:
           
          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導航

          統計

          常用鏈接

          留言簿(3)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 确山县| 四会市| 城固县| 金山区| 徐水县| 寿宁县| 吉木萨尔县| 平湖市| 洛扎县| 屏东市| 观塘区| 游戏| 抚顺市| 鄂托克前旗| 延吉市| 津市市| 阜南县| 本溪市| 海淀区| 大邑县| 南漳县| 砀山县| 蒙自县| 鹤壁市| 澜沧| 白水县| 江西省| 托克逊县| 三台县| 闽清县| 呈贡县| 姜堰市| 炎陵县| 浪卡子县| 丹阳市| 宁阳县| 华蓥市| 富顺县| 昂仁县| 永德县| 甘肃省|