正在加载图片...
CONTENTS xi甜 PART 3 DIVING INTO THE JAVA PERSISTENCE API (JPA).....215 Implementing domain models 217 7.1 Domain modeling and the JPA 218 Introducing domain models 219.The ActionBazaar 224·Domain object as Java classes 225 7.2 Implementing domain objects with JPA 227 The @Entity annotation 228.Persisting entity data 229 Ch nti identity 233 238 7.3 Entity relationships 239 @OneToOne 240.@OneToMany and @ManyToOne 244.@ManyToMany 247 7.4 Summary 249 8 Object-relational mapping 250 8.1 The impedance mismatch 251 257 8.2 Mapping entities 258 Specifying the table 261.Mapping the columns 262 Using @Enumerated 264.Mapping CLOBs and BLOBs 265.Mapping temporal types 265 Mapping an entity to multiple tables 266 26> Mapping embe 8.3 Mapping entity relationships 273 ppite one-lo-me velntonskps3 One-to-many on me278·May-lo nany 281 8.4 Mapping inheritance 284 Single-table strategy 285"Joined-tables strategy 287.Table-per-class strategy 288 Mapping polymorphic relationships 291 8.5 Summary 292CONTENTS xiii PART 3 DIVING INTO THE JAVA PERSISTENCE API (JPA)..... 215 7 Implementing domain models 217 7.1 Domain modeling and the JPA 218 Introducing domain models 219 ■ The ActionBazaar problem domain 219 ■ Domain model actors 222 The EJB 3 Java Persistence API 224 ■ Domain objects as Java classes 225 7.2 Implementing domain objects with JPA 227 The @Entity annotation 228 ■ Persisting entity data 229 Specifying entity identity 233 The @Embeddable annotation 238 7.3 Entity relationships 239 @OneToOne 240 ■ @OneToMany and @ManyToOne 244 ■ @ManyToMany 247 7.4 Summary 249 8 Object-relational mapping 250 8.1 The impedance mismatch 251 Mapping objects to databases 252 Introducing O/R mapping 257 8.2 Mapping entities 258 Specifying the table 261 ■ Mapping the columns 262 Using @Enumerated 264 ■ Mapping CLOBs and BLOBs 265 ■ Mapping temporal types 265 Mapping an entity to multiple tables 266 Generating primary keys 267 Mapping embeddable classes 270 8.3 Mapping entity relationships 273 Mapping one-to-one relationships 273 ■ One-to-many and many-to-one 278 ■ Many-to-many 281 8.4 Mapping inheritance 284 Single-table strategy 285 ■ Joined-tables strategy 287 ■ Table-per-class strategy 288 Mapping polymorphic relationships 291 8.5 Summary 292
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有