正在加载图片...
CONTENTS 3.7 Introducing associations 105 Managed associations?106.Multiplicity 106 The simplest possible association 107.Making the association 111 3.8 Summary 112 Working with persistent objects 114 4.1 The persistence lifecycle 115 Transient objects 116.Persistent objects 117.Detached 119.Outside the 122 4.2 The persistence manager 126 Making an object persistent 126.Updating the persistent state of a detached instance 127.Retrieving a persistent object 129 Updating a persistent object 129.Making a persistent object transien 130 4.3 Using transitive persistence in Hibernate 131 Persistence by reachability 131.Cascading persistence with Hibernate 133.Managing auction categories 134 Distinguishing between transient and detached instances 138 4.4 Retrieving objects 139 Retrieving objects by identifier 140.Introducing HQL 141 QueyL riteria by example 143.Fetching strategies 143.Selecting a fetching strategy in mappings 146 Tuning object retrieval 151 4.5 Summary 152 Transactions,concurrency,and caching 154 5.1 Transactions,concurrency.and caching 154 5.2 Understanding database transactions 156 JDBC and TA transactions 157.The Hibernate Transaction API 158.Flushing the Session 160.Understanding isolation levels 161.Choosing an isolation level 163.Setting an isolation level 165.Using pessimistic locking 165 5.3 Working with application transactions 168 Using managed versioning 169Granularity of a Session 172.Other ways to implement optimistic locking 174CONTENTS vii 3.7 Introducing associations 105 Managed associations? 106 ■ Multiplicity 106 The simplest possible association 107 ■ Making the association bidirectional 108 ■ A parent/child relationship 111 3.8 Summary 112 4 Working with persistent objects 114 4.1 The persistence lifecycle 115 Transient objects 116 ■ Persistent objects 117 ■ Detached objects 118 ■ The scope of object identity 119 ■ Outside the identity scope 121 ■ Implementing equals() and hashCode() 122 4.2 The persistence manager 126 Making an object persistent 126 ■ Updating the persistent state of a detached instance 127 ■ Retrieving a persistent object 129 Updating a persistent object 129 ■ Making a persistent object transient 129 ■ Making a detached object transient 130 4.3 Using transitive persistence in Hibernate 131 Persistence by reachability 131 ■ Cascading persistence with Hibernate 133 ■ Managing auction categories 134 Distinguishing between transient and detached instances 138 4.4 Retrieving objects 139 Retrieving objects by identifier 140 ■ Introducing HQL 141 Query by criteria 142 ■ Query by example 143 ■ Fetching strategies 143 ■ Selecting a fetching strategy in mappings 146 Tuning object retrieval 151 4.5 Summary 152 5 Transactions, concurrency, and caching 154 5.1 Transactions, concurrency, and caching 154 5.2 Understanding database transactions 156 JDBC and JTA transactions 157 ■ The Hibernate Transaction API 158 ■ Flushing the Session 160 ■ Understanding isolation levels 161 ■ Choosing an isolation level 163 ■ Setting an isolation level 165 ■ Using pessimistic locking 165 5.3 Working with application transactions 168 Using managed versioning 169 ■ Granularity of a Session 172 ■ Other ways to implement optimistic locking 174 Licensed to Jose Carlos Romero Figueroa <jose.romero@galicia.seresco.es>
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有