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)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 富锦市| 中牟县| 迭部县| 英山县| 连云港市| 博客| 长顺县| 综艺| 婺源县| 神农架林区| 达州市| 澄江县| 安多县| 墨玉县| 宾川县| 偃师市| 尤溪县| 湾仔区| 大荔县| 丽江市| 四子王旗| 日土县| 阿城市| 营山县| 平阳县| 丹巴县| 城市| 台前县| 保山市| 隆化县| 繁昌县| 永善县| 海晏县| 恩施市| 牟定县| 合作市| 尖扎县| 琼结县| 龙州县| 紫云| 宁晋县|