生活随笔
收集整理的這篇文章主要介紹了
Hibernate Reference Documentation
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
http://docs.jboss.org/hibernate/core/3.6/reference/zh-CN/html/index.html
?
前言 1. 教程 1.1. 第一部分 - 第一個 Hibernate 應用程序 1.1.1. 設置 1.1.2. 第一個 class 1.1.3. 映射文件 1.1.4. Hibernate 配置 1.1.5. 用 Maven 構建 1.1.6. 啟動和輔助類 1.1.7. 加載并存儲對象 1.2. 第二部分 - 關聯映射 1.2.1. 映射 Person 類 1.2.2. 單向 Set-based 的關聯 1.2.3. 使關聯工作 1.2.4. 值類型的集合 1.2.5. 雙向關聯 1.2.6. 使雙向連起來 1.3. 第三部分 - EventManager web 應用程序 1.3.1. 編寫基本的 servlet 1.3.2. 處理與渲染 1.3.3. 部署與測試 1.4. 總結
2. 體系結構(Architecture) 2.1. 概況(Overview) 2.1.1. Minimal architecture 2.1.2. Comprehensive architecture 2.1.3. Basic APIs 2.2. JMX 整合 2.3. 上下文相關的會話(Contextual Session)
3. 配置 3.1. 可編程的配置方式 3.2. 獲得 SessionFactory 3.3. JDBC 連接 3.4. 可選的配置屬性 3.4.1. SQL 方言 3.4.2. 外連接抓取(Outer Join Fetching) 3.4.3. 二進制流(Binary Streams) 3.4.4. 二級緩存與查詢緩存 3.4.5. 查詢語言中的替換 3.4.6. Hibernate 的統計(statistics)機制 3.5. 日志 3.6. 實現 NamingStrategy 3.7. Implementing a PersisterClassProvider 3.8. XML 配置文件 3.9. Java EE Application Server integration 3.9.1. 事務策略配置 3.9.2. JNDI 綁定的 SessionFactory 3.9.3. 在 JTA 環境下使用 Current Session context(當前 session 上下文)管理 3.9.4. JMX 部署
4. 持久化類(Persistent Classes) 4.1. 一個簡單的 POJO 例子 4.1.1. 實現一個默認的(即無參數的)構造方法(constructor) 4.1.2. Provide an identifier property 4.1.3. Prefer non-final classes (semi-optional) 4.1.4. 為持久化字段聲明訪問器(accessors)和是否可變的標志(mutators)(可選) 4.2. 實現繼承(Inheritance) 4.3. 實現 equals() 和 hashCode() 方法: 4.4. 動態模型(Dynamic models) 4.5. 元組片斷映射(Tuplizers) 4.6. EntityNameResolvers
5. 對象/關系數據庫映射基礎(Basic O/R Mapping) 5.1. 映射定義(Mapping declaration) 5.1.1. Entity 5.1.2. Identifiers 5.1.3. Optimistic locking properties (optional) 5.1.4. Property 5.1.5. Embedded objects (aka components) 5.1.6. Inheritance strategy 5.1.7. Mapping one to one and one to many associations 5.1.8. 自然 ID(natural-id) 5.1.9. Any 5.1.10. 屬性(Properties) 5.1.11. Some hbm.xml specificities 5.2. Hibernate 的類型 5.2.1. 實體(Entities)和值(values) 5.2.2. 基本值類型 5.2.3. 自定義值類型 5.3. 多次映射同一個類 5.4. SQL 中引號包圍的標識符 5.5. 數據庫生成屬性(Generated Properties) 5.6. Column transformers: read and write expressions 5.7. 輔助數據庫對象(Auxiliary Database Objects)
6. Types 6.1. Value types 6.1.1. Basic value types 6.1.2. Composite types 6.1.3. Collection types 6.2. Entity types 6.3. Significance of type categories 6.4. Custom types 6.4.1. Custom types using org.hibernate.type.Type 6.4.2. Custom types using org.hibernate.usertype.UserType 6.4.3. Custom types using org.hibernate.usertype.CompositeUserType 6.5. Type registry
7. 集合映射(Collection mappings) 7.1. 持久化集合類(Persistent collections) 7.2. How to map collections 7.2.1. 集合外鍵(Collection foreign keys) 7.2.2. 索引集合類(Indexed collections) 7.2.3. Collections of basic types and embeddable objects 7.3. 高級集合映射(Advanced collection mappings) 7.3.1. 有序集合(Sorted collections) 7.3.2. 雙向關聯(Bidirectional associations) 7.3.3. 雙向關聯,涉及有序集合類 7.3.4. 三重關聯(Ternary associations) 7.3.5. Using an <idbag> 7.4. 集合例子(Collection example)
8. 關聯關系映射 8.1. 介紹 8.2. 單向關聯(Unidirectional associations) 8.2.1. 多對一(many-to-one) 8.2.2. 一對一(One-to-one) 8.2.3. 一對多(one-to-many) 8.3. 使用連接表的單向關聯(Unidirectional associations with join tables) 8.3.1. 一對多(one-to-many) 8.3.2. 多對一(many-to-one) 8.3.3. 一對一(One-to-one) 8.3.4. 多對多(many-to-many) 8.4. 雙向關聯(Bidirectional associations) 8.4.1. 一對多(one to many)/多對一(many to one) 8.4.2. 一對一(One-to-one) 8.5. 使用連接表的雙向關聯(Bidirectional associations with join tables) 8.5.1. 一對多(one to many)/多對一(many to one) 8.5.2. 一對一(one to one) 8.5.3. 多對多(many-to-many) 8.6. 更復雜的關聯映射
9. 組件(Component)映射 9.1. 依賴對象(Dependent objects) 9.2. 在集合中出現的依賴對象(Collections of dependent objects) 9.3. 組件作為 Map 的索引(Components as Map indices ) 9.4. 組件作為聯合標識符(Components as composite identifiers) 9.5. 動態組件(Dynamic components)
10. 繼承映射(Inheritance Mapping) 10.1. 三種策略 10.1.1. 每個類分層結構一張表(Table per class hierarchy) 10.1.2. 每個子類一張表(Table per subclass) 10.1.3. 每個子類一張表(Table per subclass),使用辨別標志(Discriminator) 10.1.4. 混合使用“每個類分層結構一張表”和“每個子類一張表” 10.1.5. 每個具體類一張表(Table per concrete class) 10.1.6. 每個具體類一張表,使用隱式多態 10.1.7. 隱式多態和其他繼承映射混合使用 10.2. 限制
11. 與對象共事 11.1. Hibernate 對象狀態(object states) 11.2. 使對象持久化 11.3. 裝載對象 11.4. 查詢 11.4.1. 執行查詢 11.4.2. 過濾集合 11.4.3. 條件查詢(Criteria queries) 11.4.4. 使用原生 SQL 的查詢 11.5. 修改持久對象 11.6. 修改脫管(Detached)對象 11.7. 自動狀態檢測 11.8. 刪除持久對象 11.9. 在兩個不同數據庫間復制對象 11.10. Session 刷出(flush) 11.11. 傳播性持久化(transitive persistence) 11.12. 使用元數據
12. Read-only entities 12.1. Making persistent entities read-only 12.1.1. Entities of immutable classes 12.1.2. Loading persistent entities as read-only 12.1.3. Loading read-only entities from an HQL query/criteria 12.1.4. Making a persistent entity read-only 12.2. Read-only affect on property type 12.2.1. Simple properties 12.2.2. Unidirectional associations 12.2.3. Bidirectional associations
13. 事務和并發 13.1. Session 和事務范圍(transaction scope) 13.1.1. 操作單元(Unit of work) 13.1.2. 長對話 13.1.3. 關注對象標識(Considering object identity) 13.1.4. 常見問題 13.2. 數據庫事務聲明 13.2.1. 非托管環境 13.2.2. 使用 JTA 13.2.3. 異常處理 13.2.4. 事務超時 13.3. 樂觀并發控制(Optimistic concurrency control) 13.3.1. 應用程序級別的版本檢查(Application version checking) 13.3.2. 擴展周期的 session 和自動版本化 13.3.3. 脫管對象(deatched object)和自動版本化 13.3.4. 定制自動版本化行為 13.4. 悲觀鎖定(Pessimistic Locking) 13.5. 連接釋放模式(Connection Release Modes)
14. 攔截器與事件(Interceptors and events) 14.1. 攔截器(Interceptors) 14.2. 事件系統(Event system) 14.3. Hibernate 的聲明式安全機制
15. 批量處理(Batch processing) 15.1. 批量插入(Batch inserts) 15.2. 批量更新(Batch updates) 15.3. StatelessSession(無狀態 session)接口 15.4. DML(數據操作語言)風格的操作(DML-style operations)
16. HQL: Hibernate 查詢語言 16.1. 大小寫敏感性問題 16.2. from 子句 16.3. 關聯(Association)與連接(Join) 16.4. join 語法的形式 16.5. 引用 identifier 屬性 16.6. select 子句 16.7. 聚集函數 16.8. 多態查詢 16.9. where 子句 16.10. 表達式 16.11. order by 子句 16.12. group by 子句 16.13. 子查詢 16.14. HQL 示例 16.15. 批量的 UPDATE 和 DELETE 16.16. 小技巧 & 小竅門 16.17. 組件 16.18. Row value 構造函數語法
17. 條件查詢(Criteria Queries) 17.1. 創建一個 Criteria 實例 17.2. 限制結果集內容 17.3. 結果集排序 17.4. 關聯 17.5. 動態關聯抓取 17.6. 查詢示例 17.7. 投影(Projections)、聚合(aggregation)和分組(grouping) 17.8. 離線(detached)查詢和子查詢 17.9. 根據自然標識查詢(Queries by natural identifier)
18. Native SQL 查詢 18.1. 使用 SQLQuery 18.1.1. 標量查詢(Scalar queries) 18.1.2. 實體查詢(Entity queries) 18.1.3. 處理關聯和集合類(Handling associations and collections) 18.1.4. 返回多個實體(Returning multiple entities) 18.1.5. 返回非受管實體(Returning non-managed entities) 18.1.6. 處理繼承(Handling inheritance) 18.1.7. 參數(Parameters) 18.2. 命名 SQL 查詢 18.2.1. 使用 return-property 來明確地指定字段/別名 18.2.2. 使用存儲過程來查詢 18.3. 定制 SQL 用來 create,update 和 delete 18.4. 定制裝載 SQL
19. 過濾數據 19.1. Hibernate 過濾器(filters)
20. XML 映射 20.1. 用 XML 數據進行工作 20.1.1. 指定同時映射 XML 和類 20.1.2. 只定義 XML 映射 20.2. XML 映射元數據 20.3. 操作 XML 數據
21. 提升性能 21.1. 抓取策略(Fetching strategies) 21.1.1. 操作延遲加載的關聯 21.1.2. 調整抓取策略(Tuning fetch strategies) 21.1.3. 單端關聯代理(Single-ended association proxies) 21.1.4. 實例化集合和代理(Initializing collections and proxies) 21.1.5. 使用批量抓取(Using batch fetching) 21.1.6. 使用子查詢抓取(Using subselect fetching) 21.1.7. Fetch profile(抓取策略) 21.1.8. 使用延遲屬性抓取(Using lazy property fetching) 21.2. 二級緩存(The Second Level Cache) 21.2.1. 緩存映射(Cache mappings) 21.2.2. 策略:只讀緩存(Strategy:read only) 21.2.3. 策略:讀寫/緩存(Strategy:read/write) 21.2.4. 策略:非嚴格讀/寫緩存(Strategy:nonstrict read/write) 21.2.5. 策略:事務緩存(transactional) 21.2.6. 各種緩存提供商/緩存并發策略的兼容性 21.3. 管理緩存(Managing the caches) 21.4. 查詢緩存(The Query Cache) 21.4.1. 啟用查詢緩存 21.4.2. 查詢緩存區 21.5. 理解集合性能(Understanding Collection performance) 21.5.1. 分類(Taxonomy) 21.5.2. Lists,maps 和 sets 用于更新效率最高 21.5.3. Bag 和 list 是反向集合類中效率最高的 21.5.4. 一次性刪除(One shot delete) 21.6. 監測性能(Monitoring performance) 21.6.1. 監測 SessionFactory 21.6.2. 數據記錄(Metrics)
22. 工具箱指南 22.1. Schema 自動生成(Automatic schema generation) 22.1.1. 對 schema 定制化(Customizing the schema) 22.1.2. 運行該工具 22.1.3. 屬性(Properties) 22.1.4. 使用 Ant(Using Ant) 22.1.5. 對 schema 的增量更新(Incremental schema updates) 22.1.6. 用 Ant 來增量更新 schema(Using Ant for incremental schema updates) 22.1.7. Schema 校驗 22.1.8. 使用 Ant 進行 schema 校驗
23. Additional modules 23.1. Bean Validation 23.1.1. Adding Bean Validation 23.1.2. Configuration 23.1.3. Catching violations 23.1.4. Database schema 23.2. Hibernate Search 23.2.1. Description 23.2.2. Integration with Hibernate Annotations
24. 示例:父子關系(Parent/Child) 24.1. 關于 collections 需要注意的一點 24.2. 雙向的一對多關系(Bidirectional one-to-many) 24.3. 級聯生命周期(Cascading lifecycle) 24.4. 級聯與未保存值(unsaved-value) 24.5. 結論
25. 示例:Weblog 應用程序 25.1. 持久化類(Persistent Classes) 25.2. Hibernate 映射 25.3. Hibernate 代碼
26. 示例:復雜映射實例 26.1. Employer(雇主)/Employee(雇員) 26.2. Author(作家)/Work(作品) 26.3. Customer(客戶)/Order(訂單)/Product(產品) 26.4. 雜例 26.4.1. "Typed" 一對一關聯 26.4.2. 組合鍵示例 26.4.3. 共有組合鍵屬性的多對多(Many-to-many with shared composite key attribute) 26.4.4. 基于內容的識別 26.4.5. 備用鍵的聯合
27. 最佳實踐(Best Practices) 28. 數據庫移植性考量 28.1. 移植性基礎 28.2. Dialect 28.3. 方言的使用 28.4. 標識符的生成 28.5. 數據庫函數 28.6. 類型映射
總結
以上是生活随笔 為你收集整理的Hibernate Reference Documentation 的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔 網站內容還不錯,歡迎將生活随笔 推薦給好友。