Pro EJB 3 - Java Persistence API

Foreword . xv About the Authors . xvii About the Technical Reviewers . xix Acknowledgments . xxi Preface xxiii ■CHAPTER 1 Introduction 1 ■CHAPTER 2 Getting Started 17 ■CHAPTER 3 Enterprise Applications 35 ■CHAPTER 4 Object-Relational Mapping . 71 ■CHAPTER 5 Entity Manager . 111 ■CHAPTER 6 Using Queries 163 ■CHAPTER 7 Query Language 191 ■CHAPTER 8 Advanced Object-Relational Mapping 221 ■CHAPTER 9 Advanced Topics . 257 ■CHAPTER 10 XML Mapping Files . 299 ■CHAPTER 11 Packaging and Deployment . 335 ■CHAPTER 12 Testing 353 ■CHAPTER 13 Migration 385 ■APPENDIX Quick Reference 411 ■INDEX 433

pdf480 trang | Chia sẻ: tlsuongmuoi | Lượt xem: 2349 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Pro EJB 3 - Java Persistence API, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
(); public Object getSingleResult(); public int executeUpdate(); public Query setMaxResults(int maxResult); public Query setFirstResult(int startPosition); public Query setHint(String hintName, Object value); public Query setParameter(String name, Object value); public Query setParameter(String name, Date value, TemporalType temporalType); public Query setParameter(String name, Calendar value, TemporalType temporalType); public Query setParameter(int position, Object value); public Query setParameter(int position, Date value, TemporalType temporalType); public Query setParameter(int position, Calendar value, TemporalType temporalType); public Query setFlushMode(FlushModeType flushMode); } Keith_6455AppA.fm Page 430 Friday, April 7, 2006 2:54 PM A P P E N D I X ■ Q U I C K R E F E R E N C E 431 EntityManagerFactory Interface The EntityManagerFactory interface is implemented by the persistence provider. Concrete instances are obtained from the Persistence bootstrap class or from the container through injection or JNDI lookup. public interface javax.persistence.EntityManagerFactory { public EntityManager createEntityManager(); public EntityManager createEntityManager(Map map); public void close(); public boolean isOpen(); } EntityTransaction Interface The EntityTransaction interface is implemented by the persistence provider. Concrete instances are obtained from the EntityManager.getTransaction() method. public interface javax.persistence.EntityTransaction { public void begin(); public void commit(); public void rollback(); public void setRollbackOnly(); public boolean getRollbackOnly(); public boolean isActive(); } Keith_6455AppA.fm Page 431 Friday, April 7, 2006 2:54 PM Keith_6455AppA.fm Page 432 Friday, April 7, 2006 2:54 PM 433 Index ■Symbols . (dot) operator, 164, 197 ' ' (single quotes), 207 ■A ABS function, 212 abstract classes, 245 abstract persistence schema, 192 acceptance tests, 355 access attribute, 312 access element, 304–305, 308, 427–428 access modes, 72 field access, 72–73 property access, 73–74 ACID transactions, 55 activation, 43 Active Record pattern, 409 addItem() method, 58 aggregate functions, 216 aggregate queries, 166, 192, 214–217 aggregate functions, 216 GROUP BY clause, 216–217 HAVING clause, 217 syntax, 214 ALL operator, 212 allocation size, 86 annotations, 15, 19–20 adding to classes, 21–22 disabling, 301–303 ignored, 71 logical, 72 persistence, 71–72 physical, 72 vs. XML, 299 see also specific annotations ANY operator, 212 application component models, 35–37 application.xml file, 342 application-managed entity managers, 117–119 for reporting, 153–154 transaction management, 126–128, 371 when to use, 132 arguments, to remote interfaces, 40 ASC keyword, 214 association fields, 192 association overrides, 329–330 @AssociationOverride annotation, 252, 412 asynchronous messaging, 44 atomicity, 54 attribute element, 313 attribute mappings, overriding, 313–314 @AttributeOverride annotation, 225, 228, 239, 252, 411 attribute-override element, 326 attributes, 313–314 defined, 76 lazy fetching of, 77–78 ordering, using List, 106–107 transient, 82–83 see also specific attributes automatic id generation, 84 automatic state mapping, 22–23 AVG function, 216 ■B @Basic annotation, 76, 78, 317, 412 basic element, 317–319 basic mappings, 75–76, 79, 317–319 beanInterface element, 53 bean-managed transactions (BMTs), 56–59, 373–376 beanName element, 53 beans. See entity beans; JavaBeans begin() method, 129 best practices, for testing, 383 BETWEEN expressions, 207 Keith_6455INDEX.fm Page 433 Thursday, April 13, 2006 6:31 PM 434 ■I N D E X bidirectional relationships, 89–90, 99 many-to-many, 102 one-to-many, 100 binary large objects (BLOBs), 79 Boolean values, 207 bulk operations, 183–187 best practices, 189 relationships and, 186–187 business interfaces, remote, 40 business methods, migration of, 388–389 Business Object pattern, 408 business services component model and, 36–37 session beans and, 37–44 ■C cache data, testing and, 367–368 cache invalidation, 367 Cactus framework, 353 Calendar parameters, 172 callback methods, 268–271 enterprise contexts, 271 exceptions and, 270 inheriting, 274–275 signature definition, 270 specifying lifecycle, 330 using on an entity, 270–271 cardinality, 90–91 Cartesian products, 201 cascade element, 136, 320–321 merge(), 146–147 persist() method, 136–137 remove() method, 137–138 cascade-persist element, 305–306, 428 CascadeType, 426 case sensitivity, of queries, 192 catalog element, 239, 304, 308, 427–428 catalogs, 75 character large objects (CLOBs), 79 Chen, Peter, 17 class elements, 350 class hierarchies, 241–245 abstract and concrete classes, 245 joined strategy, 250 mapped superclasses, 242–244 transient classes, 244–245 class indicators, 247 class representation, object-relational mapping and, 6–7 ClassCastExceptions, 26 classes access types, 308 adding annotations to, 21–22 creation of, 30–31 embeddable, 223 generic, 26 managed. See managed classes reusing embedded object, 224–225 see also specific classes classpath deployment, 342–343 system, 351 clear() method, 138–139, 175, 377 CLOBs (character large objects), 79 CMP entity beans challenge of migrating, 386–387 conversion of, 387–396 migration from, to Java Persistence API, 385–396 coarse-grained transfer objects, 400–401 collection expressions, 210–211 Collection interface, 105 collection types, 105 Collection interface, 105 List interface, 106–107 Map interface, 107 Set interface, 105 using different, in relationship mapping, 105 collection-valued associations, 99–107, 197 many-to-many mappings, 101–02 one-to-many mappings, 99–101 unidirectional, 104–105 using different collections, 105 using join tables, 102–103 column aliases, mapping, 264 @Column annotation, 76–77, 83, 315, 412 columnDefinition element, 296–297 insertable element, 229–230 length element, 295 nullable element, 294 precision element, 295 Keith_6455INDEX.fm Page 434 Thursday, April 13, 2006 6:31 PM 435■I N D E X Find it faster at scale element, 295 unique element, 293–295 updatable element, 229–230 column element, 318 columnDefinitions element, 296–297 @ColumnResult annotation, 264, 413 columns defining, 296–297 discriminator, 247 floating point, 295–296 mapping, 76–77 null constraints on, 294–295 string-based, 295 commit() method, 29, 129 Common Object Request Broker Architecture (CORBA), 386 comparison operators, 165 component models, 35–37 components, 35 advantages of, 36–37 defining, 65–67 dependency management, 46–54 message-driven beans, 44–45 servlets, 36, 45–46, 56 testing entities in, 359–360 compound join columns, 231–233 compound primary keys embedded id class, 228–229 with foreign key dependency, 233 id class, 226–228 join table with, 232–233 mapping, 266–267 multiple tables and, 239–240 relationships included in, 233–235 CONCAT function, 212 concrete classes, 245 concurrency, 279 conditional expressions basic form, 206–207 BETWEEN operator, 207 HAVING clause, 217 IN operator, 210 LIKE operator, 208 operator precedence, 207 configuration, 15 data source, 337–350 by exception, 20–21 for Java SE deployment, 348–350 managed classes, 339–341 mapping files, 338–339 mapping metadata as part of, 335 persistence provider, 337, 349 persistence unit name, 336 of persistence units, 335–342 transaction type, 336, 348 consistency, of transactions, 55 constraints null, 294–295 unique, 293–294 constructor expressions, 177–178, 199, 401 container-managed entity managers, 376–379 vs. application-managed entity managers, 126–128 extended, 112–117 testing, 357 transaction-scoped, 112–113 container-managed persistence, 385. See also CMP entity beans container-managed relationships, migration of, 389–391 container-managed transactions (CMTs), 55–60, 132, 371–372 Context interface, 48 conversational state, servlets and, 45–46 COUNT function, 216 createEntityManager() method, 117–119 createEntityManagerFactory() method, 24, 350 createNativeQuery() method, 260–262 createQuery() method, 30, 167–169 CURRENT_DATE function, 212 CURRENT_TIME function, 212 CURRENT_TIMESTAMP function, 213 ■D Data Access Object (DAO) pattern, 397, 403–408 data integrity, persistence contexts and, 128 data model, example, 192–193 Find it faster at Keith_6455INDEX.fm Page 435 Thursday, April 13, 2006 6:31 PM 436 ■I N D E X data source, configuration, 337–338, 348–350 Data Transfer Object pattern. See Transfer Object pattern database connections, minimizing for integration tests, 369–370 database identity, id generation using, 88 database persistence. See persistence database sequences, for id generation, 87–88 database synchronization, 139 database systems, developing applications for, 1 database tables. See tables Date parameters, 172 DbUnit, 367 declarative container services, 36 default names, overriding, 74 default values, 22 defaults, 15, 20–21 delete queries, 192, 218–219 DELETE statement, bulk, 183–189 dependencies declaring, 51–54 unit testing and, 359 dependency injection, 49–51 field injection, 50 testing and, 383 unit testing and, 359 dependency management, 35, 46–54 components and, 36 dependency injection, 49–51 dependency lookup, 47–48 EJB referencing, 53 persistence context referencing, 51–52 persistence unit referencing, 52–53 resource referencing, 53–54 deployment, 335, 342–348 classpath, 342–343 managed classes, 339–341 outside the server, 348–351 packaging options, 343–347 persistence unit scope, 347–348 to Java SE environment, 348–351 DESC keyword, 214 design patterns Active Record, 409 Business Object, 408 DAO, 403–408 Fast Lane Reader, 408–409 migration and, 397–409 Session Façade, 401–403 Transfer Object, 398–401 detached entities merging, 143–147 working with, 147–161 detachment avoiding, 151–155 lazy loading and, 142–143, 150 planning for, 149–151 discriminator column, 247 discriminator value, 247–248 @DiscriminatorColumn annotation, 247, 413 discriminator-column element, 328 DiscriminatorType, 426 @DiscriminatorValue annotation, 413 discriminator-value element, 328 DISTINCT operator, 198, 206, 209 doGet() method, 61 doPost() method, 60 dot (.) operator, 164, 197 durability, of transactions, 55 dynamic queries, 167–169 ■E EAGER fetch type, 151 eager loading, 151 Edit Session pattern, 158–161 EJB. See Enterprise JavaBeans @EJB annotation, 47, 50, 53 EJB JAR, 343–345 EJB QL query definitions, 392 EJB Query Language (EJB QL), 3, 163 EJBContext instance, 54 EJBContext interface lookup() method, 48, 62 setRollbackOnly(), 371 ejb-jar.xml, 343 ejbSelect methods, 389 @Embeddable annotation, 223, 414 embeddable classes, 221 embeddable element, 313 @Embedded annotation, 223, 414 embedded element, 325 Keith_6455INDEX.fm Page 436 Thursday, April 13, 2006 6:31 PM 437■I N D E X Find it faster at @EmbeddedId annotation, 228, 316, 414 embedded id class, 228–229 embedded object mappings, 325–326 embedded objects, 221–225 embedded id class, 228–229 mapping to secondary tables, 239 reusing, 224–225 embedded-id element, 316–317 EmployeeService class, 30–32 defining the components, 65–67 defining the user interface, 67–68 enterprise application integration (EAI) companies, 1 enterprise applications, 1 application component models, 35–37 dependency management, 46–54 message-driven beans and, 44–45 servlets and, 45–46 session beans and, 37–44 testing, 353–357 transaction management, 54–60 enterprise design patterns. See design patterns enterprise integration systems (EIS), 1 Enterprise JavaBeans (EJB), 2–3 migration from, to Java Persistence API, 385–396 referencing, 53 testing, 355–356 transaction management of, 56 see also entity beans Enterprise JavaBeans (EJB) 2.1, 164, 355 Enterprise JavaBeans (EJB) 3.0, 12–13 Enterprise JavaBeans (EJB) model, 36–45 Enterprise JavaBeans Query Language (EJB QL), 3, 163 enterprise transactions, 55–60 entities as regular classes, 221 attaching entity listeners to, 272–274 automatic state mapping, 22–23 bulk delete of, 184 bulk update of, 183–184 characteristics of, 17–19 compared to mapped superclasses, 243 concurrency access, 279 creating, 21–23 defined, 17 detached, 141–143, 147–161 embedded objects and, 221–225 finding, 26–27, 133–134 granularity of, 18 identity of, 18 joins between, 165–166, 200–206 mapping across multiple tables, 238 mapping simple types, 75–83 mapping to tables, 74–75 metadata, 19–21 names of, 22, 192 overview, 17–19 packaging, in EJB JAR, 343–344 packaging, in persistence archive, 346–347 persistence properties, 17, 192 persisting, 25, 132–133 in queries, 192 relationships between, 88–108 removing, 27–28, 135 roles of, 89 SELECT clause and, 197–198 testing, 357–360 transactionality of, 18, 28–29 updating, 28, 156–161 using callback methods on, 270–271 @Entity annotation, 21–22, 192, 414 entity beans, 2–3, 13 challenge of migrating, 386–387 conversion of, 387–396 implementation, 385 remote interfaces, 386 entity classes, 72 entity element, 313 secondary-table element, 314–315 table element, 314 entity expressions, 165 entity hierarchy, 242, 246 entity listeners, 271–274, 331–333 attaching to entities, 272–274 default, 274 exclude-default-listeners element, 332 exclude-superclass-listeners element, 332 inheritance of, 275 Keith_6455INDEX.fm Page 437 Thursday, April 13, 2006 6:31 PM 438 ■I N D E X @EntityListeners annotation, 272–275, 415 entity-listeners element, 306, 331–332 entity manager operations, 132–139 cascading, 136–138 clearing persistence context, 138–139 concurrency, 279 finding entities, 133–134 merging, 143–147 persisting entities, 132–133 removing entities, 135 entity managers, 23–30 adding, to stateless session beans, 64–65 application-managed, 117–119, 126–128, 132, 153–154, 371 choosing, 131–132 configuration, 23 construction of Query objects by, 29 container-managed, 112–117, 126–128, 376–379 database synchronization, 139–141 detachment, 141–143, 147, 148–161 finding entities using, 26–27 flush modes, 182–183 integration testing and, 364–370 merging operations, 142–147, 155–161 persistence context, 23, 111–112 persisting entities with, 25 providers, 23 removing entities using, 27–28 resource-local transactions, 128–130 transaction type, 336 transaction-scoped, 377 types of, 112–119 unit tests and, 361–364 see also EntityManager interface entity relationships cardinality, 90–91 collection-valued associations, 99–107 directionality, 89–90 mapping overview, 92 ordinality, 91 single-valued associations, 92–98 see also mappings @EntityResult annotation, 263, 267, 415 entity state accessing, 72–74 field access, 72–73 merging, 142–147 property access, 73–74 refreshing, 279–282 transaction rollbacks and, 131 transient, 82–83 entity types, as parameters, 171 EntityManager interface, 428–429 clear() method, 138–139, 175 createNativeQuery() method, 260–262 createQuery() method, 167–169 factory methods, 167–171 find() method, 133–134, 180 flush() method, 139 getTransaction() method, 128–129 lock() method, 286–287 merge() method, 143–147 persist() method, 105, 132–133 refresh() method, 279–282 remove() method, 135 see also entity managers EntityManagerFactory interface, 23–25, 52, 117–119, 431 entity-mappings element, 301, 426 access element, 308 catalog element, 308 package element, 306–307 schema element, 307–308 entity-scoped query names, 170 EntityTransaction interface, 29, 128–130, 373–376, 431 @Enumerated annotation, 81, 415 enumerated element, 318 enumerated types, 79–81, 426 EnumType, 426 equals() method, 107, 225–227 exceptions from callback methods, 270 ClassCastExceptions, 26 IllegalArgumentException, 144 IllegalStateException, 129 NonUniqueResultException, 174 NoResultException, 174 Keith_6455INDEX.fm Page 438 Thursday, April 13, 2006 6:31 PM 439■I N D E X Find it faster at OptimisticLockException, 290–293 PersistenceException, 186 RollbackException, 129 exclude-default listeners method, 332 @ExcludeDefaultListeners annotation, 274, 415 @ExcludesSuperclassListeners annotation, 416 exclude-superclass listeners element, 332 exclude-unlisted-classes element, 340, 350 executeUpdate() method, 173 EXISTS expressions, 211 explicitly listed classes, 340–341 expressions ANY, ALL, and SOME, 212 BETWEEN, 207 collection, 210–211 combining, 198–199 conditional, 206–207 constructor, 177–178, 199, 401 entity, 165 EXISTS, 211 function, 212–213 IN, 210 LIKE, 208 numeric, 207 path, 197 extended entity managers, 112–117 for reporting, 154–155 persistence contexts, 122–126 stateful session beans and, 154–155 extended persistence contexts, 122–126, 132 ■F FALSE, 207 Fast Lane Reader pattern, 408–409 fat clients. See Java SE clients fetch element, 78 fetch joins, 204–206 fetch mode lazy, 77–78, 108 overriding, 320 specifying, 78, 108 FetchType, 426 field access, 72–73 field injection, 50 @FieldResult annotation, 264–266, 416 fields default mapping of, 22–23 transient, 82–83 find() method, 26–29, 133–134, 180, 371 findAll() method, 147–149 fine-grained transfer objects, 398–400 floating point columns, 295–296 floating point types, primary key mapping and, 83 flush, of persistence context, 139–141 flush modes, 182–183 flush() method, 139 foreign key columns, 93–95 foreign keys, 8, 263 FROM clause, 196, 200–206 identification variables, 200 JOIN operator, 166 joins, 200–206 subqueries, 209 Front Controller, 147 function expressions, 212–213 functional tests, 355 ■G @GeneratedValue annotation, 83–88, 316, 416 generated-value element, 316 GenerationType, 426 generators, 308–313 generated-value element, 316 sequence-generator element, 309 table-generator element, 309–310 generic types/methods, 26 getContents() method, 26 getCurrentResults() method, 179 getReference() method, 134 getResultList() method, 30, 173–174, 196 getSingleResult() method, 173–175 getStatus() method, 59 getter method, property access and, 73 getTransaction() method, 29, 128–129 global metadata elements, 308–312 global transactions, 55 granularity, of entities, 18 GROUP BY clause, 166, 214–217 Keith_6455INDEX.fm Page 439 Thursday, April 13, 2006 6:31 PM 440 ■I N D E X ■H hashCode() method, 107, 225–227 HAVING clause, 166, 208, 214, 217 Hibernate, 4, 12 hierarchies, class, 241–245 abstract and concrete classes, 245 joined strategy, 250 mapped superclasses, 242–244 transient classes, 244–245 home interface, conversion of, 391–396 home methods, migration of, 393 HTTP sessions, servlets and, 45–46 ■I @Id annotation, 21–22, 315, 416 @IdClass annotation, 226–228, 417 id class, 226–229, 317 id element, 315–316 id generation, 83–88 automatic, 84 using database identity, 88 using a database sequence, 87–88 using a table, 84–87 id mappings, 83–88, 315–317 identification variables, 196 FROM clause, 200 JOIN clause, 201 names of, 209 SELECT clause, 197 identifier variables allocation size, 86 entity, 18 scope of, 208 IllegalArgumentException, 144 IllegalStateException, 129 impedance mismatch, 6–9, 12 implementation classes, invocation of, 105 IN expressions, 210 IN operator, 202 inheritance, 199–200, 241–255 of callback methods, 274–275 class hierarchies, 241–245 of entity listeners, 275 joined strategy, 249–251 lifecycle events and, 274–278 mapping, 267–268, 327–330 mixed, 253–255 models, 246–253 object-relational mapping, 9–12 persistent context, 125–126 single-table strategy, 246–249 table-per-concrete class strategy, 251–253 @Inheritance annotation, 246, 250, 417 inheritance element, 327 InheritanceType, 426 initialValue element, 86 injection dependency, 50–51 inner joins, 201–204 input parameters, 206 insertable element, 229–230 integration, 15 integration testing, 354–356, 364–383 minimizing database connections for, 369–370 Spring framework for, 379–383 switching configurations for, 368–369 transaction management, 371–376 using entity manager, 364–370 inverseJoinColumns element, 103 inversion of control, 49 IS EMPTY operator, 210–211 IS NOT EMPTY operator, 210 isActive() method, 129 isolation, of transactions, 55 ■J Jar-file element, 341 Java support for persistence in, 2–4 use of, for building database applications, 1 Java 2 Enterprise Edition (J2EE), 2 Java Connector Architecture (J2C) components, 55 Java Data Objects (JDO), 3–4, 397 Java Development Kit (JDK), 3 Java EE applications configuration, 68 packaging options, 343–347 persistence.xml file, 68 Keith_6455INDEX.fm Page 440 Thursday, April 13, 2006 6:31 PM 441■I N D E X Find it faster at Java EE components dependency management, 46–54 message–driven beans, 63–64 session beans, 61–63 using, 60–65 Java EE environment, transactional model, 29 Java Message Service (JMS), 44 Java Persistence API history of, 12–13 introduction to, 1–2, 12 migration to, 385–410 overview, 13–15 Java Persistence Query Language (JPQL), 14, 29–30, 163–167,191 aggregate queries, 166, 214–217 delete queries, 218–219 features of, 164 filtering results, 165 getting started with, 164–165 joins between entities, 165–166 operators used in, 165 portability of, 191 projecting results, 165 query parameters, 166–167 sample application, 193–195 select queries, 195–214 vs. SQL, 164, 191 terminology, 192 update queries, 218 Java SE 5 annotations, 15 Java SE clients, 353 Java SE environment, deployment to, 348–351 Java Transaction API (JTA), 55, 336 Java Transaction API (JTA) transactions, 55, 119–128 Application-managed persistence contexts, 126–128 container-managed entity managers and, 113 extended persistence contexts, 122–126 specifying data source, 337–338 transaction-scoped persistence contexts, 120–122 java.sql types, 81 java.util types, 81 JavaBeans defined, 35 message-driven. See message-driven beans session beans. See session beans JavaServer Faces, 46 JavaServer Pages Standard Tag Library (JSTL), 148 javax.jms.MessageListener, 44 javax.persistence package, 19 JDBC (Java Database Connectivity), 2 migration from, 396–397 JDBC queries, vs. SQL queries, 258–259, 260 JDBC types, matching to persistable types, 76 JDO. See Java Data Objects JMS. See Java Message Service JNDI, specifying data source from, 337 join columns compound, 231–233 many-to-many relationships, 102 primary key, 238 JOIN operator, 166 collection association fields, 201–202 single-valued association fields, 202–203 join tables, 102–103 with additional state, 236 with compound join columns, 233 with compound primary keys, 233 @JoinColumn annotation, 93–95, 293–295, 417 bidirectional one-to-one mappings and, 97 columnDefinition element, 296–297 insertable element, 229–230 length element, 295 nullable element, 294 updatable element, 229–230 join-column element, 103, 320 @JoinColumns annotation, 231–232, 294 joined inheritance data model, 249–251 joined strategy, 250 joins, 200–206 defined, 200 fetch, 204–206 inner, 201–204 multiple, 204 occurrence of, 200 outer, 201, 204 Keith_6455INDEX.fm Page 441 Thursday, April 13, 2006 6:31 PM 442 ■I N D E X @JoinTable annotation, 103, 418 join-table element, 321 joinTransaction() method, 126–128 JPQL. See Java Persistence Query Language JPQL queries, 164–167 best practices, 188–190 bulk update and delete, 183–187 defining, 167–171 executing, 173–183 paging, 178–180 parameter types, 171–173 result types, 175 see also queries JSTL (JavaServer Pages Standard Tag Library), 148 JTA. See Java Transaction API JTA transactions. See Java Transaction API (JTA) transaction Jta-data-source element, 337, 348 JUnit test framework, 353, 356–357 ■L large objects (LOBs), 79 lazy fetching, 77–78, 108 lazy loading detachment and, 142–143 triggering, 150 lazy relationships, 108 legacy data, support for, 5 length element, 295 LENGTH function, 213 library directory, 342 lifecycle callbacks, 268–278 callback methods, 270–271 entity listeners, 271–274, 331–333 inheritance and, 274–278 lifecycle events, 269–270 for session beans, 39–40 for stateful session beans, 43–44 lifecycle event annotations, 270 lifecycle events, 269–270, 330 inheritance and, 274–278 invocation order, 275–278 PostLoad, 270 PostPersist, 269 PostRemove, 269 PostUpdate, 269 PrePersist, 269 PreRemove event, 269 PreUpdate, 269 lifecycle management, 36 lifecycle methods, 379 lifecycles, of stateless session beans, 39–40 LIKE expressions, 208 List interface, 106–107 Listeners. See entity listeners @Lob annotation, 79, 418 @Local annotation, 38 local classes, 339–341 LOCATE function, 213 lock() method, 286–287 locking, 282–293 optimistic, 282–284 read, 285–288 Read Committed isolation and, 285 recovering from optimistic failures, 290–293 versioning, 284–285 write, 288–290 logical annotations, 72 lookup() method, 48 loose coupling, components and, 36 LOWER function, 213 ■M managed classes, 221 additional JARs of, 339–341 attributes, 313–314 classes in mapping files, 339–340 configuration, 339–341 explicitly listed classes, 339–341 identifier mappings, 315–317 listing, outside of server, 349 local classes, 339–341 mappings and, 312–333 tables, 314–315 MANDATORY attribute, 57 @ManyToMany annotation, 101, 418 many-to-many mappings, 101–103, 323–324 @ManyToOne annotation, 93, 418 many-to-one mappings, 92–95, 320–321 Map interface, 107 Keith_6455INDEX.fm Page 442 Thursday, April 13, 2006 6:31 PM 443■I N D E X Find it faster at @MapKey annotation, 107, 419 map-key element, 321 mapped superclasses, 221, 242–246 mappedBy element, 97 @ManyToMany annotation, 102 @OneToMany annotation, 101 @OneToOne annotation, 97, 98 @MappedSuperclass, 419 Mapped-superclass element, 313 mapping file defaults, 306–308 access0020class element, 308 catalog element, 308 package element, 306–307 schema element, 307–308 mapping file-level metadata, 426 mapping files, 301–333, 368–369 classes in, 339–340 configuration, 338–339 disabling annotations, 301–303 entity-mappings, 301 generators, 308–312 header for, 301 managed classes, 312–333 multiple, 338 persistence unit defaults, 303–306 queries, 308–312 singular, 338 mapping metadata, 71–72, 335 mapping-file element, 338 mappings advanced, 231–237 automatic state, 22–23 basic, 75–76, 79, 317–319 bidirectional, 89–90, 99–102 bulk delete and, 186–187 cardinality, 90–91 collection-valued associations, 99–107 column aliases, 264 compound join columns, 231–233 compound keys, 266–267 directionality, 89–90 embedded object, 325–326 foreign keys, 8, 263 identifier, 83–88, 315–317 included in primary keys, 233–235 inheritance, 9, 12, 267–268, 327–330 lazy, 108 many-to-many, 91, 101–103, 323–324 many-to-one, 91–95, 320–321 multiple SQL results, 263 multiple tables, 237–241 non-owning (inverse) side, 94 one-to-many, 99–101 one-to-one, 95–98 optional, 230–231 ordinality, 91 overriding, 313–314 overview, 92 owning side, 94 primary keys, 83–88 relationship, 320–324 relationship state, 235–237 roles, 89 scalar result columns, 264–266 simple, 317–319 single-valued associations, 92–98 SQL result sets, 262–268 unidirectional collection, 104–105 using join columns, 93–95 see also object-relational mapping; XML mapping files MAX function, 216 Meet-in-the-middle mapping scenarios, 237 MEMBER OF operator, 211 merge cascade, 146–147 merge() method, 143–147 merging, 142–147 Edit Session pattern, 158–161 Session Façade, 156–158 strategies for, 155–161 @MessageDriven annotation, 44 message-driven beans (MDBs), 12, 36 defining, 44–45 using, 63–64 metadata annotations, 19–20 annotations vs. XML, 299 collection process, 300–301 configuration by exception, 20–21 defining for a persistence unit, 303 Keith_6455INDEX.fm Page 443 Thursday, April 13, 2006 6:31 PM 444 ■I N D E X entity, 19–21 logic for obtaining, 300 mapping, 71–72 mapping file-level, 426 persistence-unit level, 427–428 XML descriptors, 19 metadata language, 15 metadata processor, 300 Metadata-complete attribute, 302–303 META-INF directory, 335, 345–346 META-INF/MANIFEST.MF file, 342 methods addItem(), 58 begin(), 129 clear(), 138–139, 175, 377 commit(), 29, 129 createEntityManager(), 117–119 createEntityManagerFactory(), 24, 350 createNativeQuery(), 260–262 createQuery(), 30, 167–169 doGet(), 61 doPost(), 60 EJBContext lookup(), 62 equals(), 107, 225–227 executeUpdate(), 173 find(), 26–29, 133–134, 180, 371 findAll(), 147–149 flush(), 139 generic, 26 getContents(), 26 getCurrentResults(), 179 getReference(), 134 getResultList(), 30, 173–174, 196 getSingleResult(), 173–175 getStatus(), 59 getTransaction(), 29, 128–129 hashCode(), 107, 225–227 isActive(), 129 joinTransaction(), 126–128 lifecycle events, 330 lock(), 286–287 lookup(), 48 merge(), 143–147 next(), 179 onMessage(), 44–45 persist(), 25, 132–133, 371 previous(), 179 refresh(), 279–282 remove(), 27–28, 135, 186–187, 394 rollback(), 59, 129 setFirstResult(), 178–180 setFlushMode(), 182 setHint(), 187 setMaxResults(), 178–180 setParameter(), 171 setRollbackOnly(), 58–59, 371 setSessionContext(), 54 setTransactionTimeout(), 59 setUp(), 366–370 tearDown(), 366–368 verifyItem(), 58 migration of business methods, 388–389 challenge of, 386–387 from CMP entity beans, 385–396 of container-managed relationships, 389–391 entity bean conversion, 387–396 of home methods, 393 from JDBC, 396–397 leveraging design patterns, 397–409 from other ORM solutions, 397 of properties, 387–388 of queries, 392 refactoring before, 386, 394 Transfer Object pattern, 386 MIN function, 216 mixed inheritance, 253–255 mobility, 14 mock objects, 360, 363–364 mocking the interface, 360 MOD function, 213 Model-View-Controller (MVC) architecture, 147–148 multiple tables, 237–241 multitier application, 15 multivalued associations, 105 ■N name attribute, 192, 313 name element, 47, 76–77 Keith_6455INDEX.fm Page 444 Thursday, April 13, 2006 6:31 PM 445■I N D E X Find it faster at named parameters, 167, 171 arguments for, 171 binding, 172 named queries, 29, 167, 170–171 best practices, 188 parameters with, 171 @NamedNativeQuery annotation, 260, 419 named-native query element, 310–311 @NamedQueries annotation, 170 @NamedQuery annotation, 170, 420 named-query element, 310 names of persistence units, 336, 348 query, 170 native queries. See SQL queries navigation, path, 197–198 NEVER attribute, 57 next() method, 179 no-arg constructor, 39 nonintrusiveness, of persistence model, 14 non-jta-data-source element, 348 non-jts-data-source element, 337 NonUniqueResultException, 174 NoResultException, 174 normalized data schema, 249 NOT MEMBER OF operator, 211 NOT operator, 211 NOT_SUPPORTED attribute, 57 null constraints, 294–295 nullable element, 294 numeric expressions, 207 ■O OBJECT keyword, 197 object queries, 14 object-relational mapping (ORM), 5–12 accessing entity state, 72–74 class representation, 6–7 column mapping, 76–77 compound join columns, 231–233 compound primary keys, 225–229 embedded objects, 221–225 of enumerated types, 79–81 history of, 12–13 impedance mismatch, 6–9, 12 inheritance, 9–12, 241–255 of large objects, 79 lazy fetching, 77–78 mapping to a table, 74–75 migration from, 397 multiple tables, 237–241 object relationships, 7–9 optional element, 230–231 overview, 92 persistence annotations and, 71–72 primary keys, 83–88 read-only, 229–230 of relationship state, 235–237 of simple types, 75–83 of temporal types, 81 see also mappings objects, 79 detached, 14 embedded, 221–225 management of, by entity manager, 23 Query, 29, 30, 174–175 SELECT clause and, 197–198 String, 79 @OneToMany annotation, 100–, 390, 420 one-to-many mappings, 99–101, 321–322 unidirectional, 104–105 using a Map, 107 using List, 106–107 @OneToOne annotation, 95–98, 421 one-to-one mappings, 95–98, 322–323 bidirectional, 96–97 primary key, 97–98 onMessage() method, 44–45 optimistic locking, 282–284 recovering from failures, 290–293 OptimisticLockException, 283, 290–293 optional element, 230–231 OR condition, 168 Oracle TopLink, 12 ORDER BY clause, 214 @OrderBy annotation, 106–107, 421 ordinal values, of enumerated types, 79–80 ordinality, 91 orm_1_0.xsd schema, 301 orm.xml file, 338–340, 344–346 outer joins, 201, 204 Keith_6455INDEX.fm Page 445 Thursday, April 13, 2006 6:31 PM 446 ■I N D E X overriding association, 329–330 attribute, 326 basic mappings, 318 column names, 76–77, 83 default name, 74 entity listeners, 331–332 fetch mode, 320 identifier mappings, 315–317 inheritance strategy, 327 tables, 314 of XML over annotations, 313–314 ■P package element, 306–307, 427 packaging options, 335, 343–347 EJB JAR, 343–345 persistence archive, 346–347 web archives, 345–346 Page Controller, 147 parameter binding, 268 parameters arguments for, 171 binding, 169 with dynamic queries, 169 entity types as, 171 named, 167, 171–172 positional, 166 query, 166–167 types of, 171–173 see also specific parameters parametized types, 26 passivation, 43 path expressions, 197 collection association fields, 201–203 identification variables and, 200 SELECT clause, 198 performance optimization, through lazy fetching, 77–78, 108 persist() method, 25, 132–133, 136–137, 371 persist() method, 25, 132–133, 371 persistable types enumerated types, 79–81 large objects (LOBs), 79 mapping, 75–83 temporal types, 81 persistence Enterprise JavaBeans, 2–3 of entities, 17, 192 handling, in Java, 1 Java Data Objects, 3–4 Java support for, 2–4 JDBC, 2 POJO, 4, 13 See also object-relational mapping persistence annotations, 71–72 persistence applications deployment, 342–348 packaging options, 343–347 persistence archive, packaging entities in, 346–347 persistence contexts, 23, 111–112, 368 active, 119 application-managed, 126–128 clearing, 138–139 collision, 123–125 extended, 122–126, 132, 185 flushed, 139–141 inheritance, 125–126 JTA transactions, 119–126 keeping open, 151–155 queries and, 180–183 referencing, 51–52 transaction management and, 119–131 transaction rollbacks and, 131 transaction-scoped, 120–122 see also entity managers persistence model, need for standardized, 4–5 persistence objects, vs. entities, 18 persistence providers, 23 configuration, 337, 349 differences between, 189 persistence unit defaults, 303–306 access element, 304–305 cascade-persist element, 305–306 catalog element, 304 entity-listeners element, 306 schema element, 304 persistence units, 23–24, 33 configuration of, 335–342, 348–350 deployment, 335 Keith_6455INDEX.fm Page 446 Thursday, April 13, 2006 6:31 PM 447■I N D E X Find it faster at managed classes, 312–333 mapping files, 338 namespaces, 308–309, naming, 336, 348 packaging, 335 root, 345 scope, 347–348 persistence.xml file, 33–34, 68, 335 class elements, 340, 350 configuration, 335–342 for defining persistence unit in EJB JAR, 343–344 defining persistence unit scope in, 347–348 exclude-unlisted-classes element, 340, 350 integration tests and, 368–369 jar-file element, 341 jta-data-source element, 337–348 managed classes, 339 mapping-file element, 338 non-jta-data-source element, 337–338, 348 for packaging in persistence archive, 346 for packaging in web archives, 345–346 persistence element, 349 persistence-unit element, 36, 336 properties element, 341, 342 provider element, 337 @PersistenceContext annotation, 47, 112–113 @PersistenceException annotation, 129, 186 @PersistenceUnit annotation, 47, 52–53, 118 persistence-unit element, 36, 336 persistence-unit-defaults element, 303, 427 persistence-unit-level metadata, 427, 428 persistence-unit-metadata element, 303, 427 persistent identity, 18 persistent properties, 192 physical annotations, 72 pkColumnName, 85 POJO (Plain Old Java Object) persistence, 4, 13 polymorphism, 199–200 portability, 36 positional binding, 166 positional parameter notation, 166 PostActivate callback, 43 PostConstruct callback, 39, 40 @PostLoad annotation, 421 PostLoad event, 270 @PostPersist annotation, 421 PostPersist event, 269 @PostRemove annotation, 422 PostRemove event, 269 @PostUpdate annotation, 422 PostUpdate event, 269 PreDestroy callback, 39, 40 PrePassivate callback, 43 @PrePersist annotation, 422 PrePersist event, 269 @PreRemove annotation, 422 PreRemove event, 269 @PreUpdate annotation, 422 PreUpdate event, 269 previous() method, 179 primary key classes, 225–229 embedded id class, 228–229 id class, 226–228 primary key join columns, 238 primary keys compound. See compound primary keys mapping, 83–88 one-to-one mappings, 97–98 relationship included in, 233–235 transaction rollbacks and, 131 primary tables, 238 primary-key-join-column element, 315 @PrimaryKeyJoinColumn annotation, 98, 238, 249, 423 projection queries, 151 propagation, 377–379 properties element, 341–342 property access, 73–74 property methods, testing, 357 provider properties, specifying at runtime, 350 ■Q queries, 14, 29–30 aggregate, 166, 192, 214–217 best practices, 188–190 bulk update and delete, 183–187 data model example, 192–193 defining, 167–171, 192 delete, 192, 218–219 Keith_6455INDEX.fm Page 447 Thursday, April 13, 2006 6:31 PM 448 ■I N D E X dynamic, 167–169 executing, 30, 173–183 filtering results, 165 formatting, 170 joins between entities, 165–166 JPQL. See JPQL queries mapping files and, 308–313 migration of, 392 named, 167, 170–171, 310–311 named-native-query element, 310–311 named-query element, 310 overriding, 311 parameters, 166–167, 171–173 projecting results, 165 projection, 151 read-only, 175–176 report, 192 result types, 175 sample application, 193–195 select, 192, 195–214 SQL, 257–268 Sql-result-set-mapping element, 311–312 stateful session beans, 154, 155 terminology of, 192 uncommitted changes, 180–183 update, 192, 218 query hints, 187, 189 Query interface, 167, 430 execution methods, 173–183 getResultList() method, 196 pagination, 178–179 setParameter() method, 171 query languages, 163 EJB QL, 163 Java Persistence QL, 163 Java Persistence QL. See Java Persistence Query Language SQL, 2, 163–164, 191 Query objects, 29 creation of, 30 reusing, 174–175 query paging, 178–180 query results, special types, 176–178 query translator, role of, 193 @QueryHint annotation, 187, 423 ■R range variable declarations, 200 read Committed isolation, 285 read locking, 285–288 read-only mappings, 229–230 read-only queries, optimization of, 175–176 refactoring, 361, 383, 386, 394 references, 47 refresh() method, 279–282 relational databases, 1 bridging gap between object-oriented models and, 1 Java support for persistence to, 2–4 relationship mappings. See mappings relationship state, mapping, 235–237 reliability, of components, 36 @Remote annotation, 40 remote entity bean interfaces, migration and, 386 Remote Method Invocation (RMI), 40 @Remove annotation, 42, 61 remove() method, 27–28, 135–138, 186–187, 394 Repeatable Read isolation, 285–288 report queries, 188, 192 REQUIRED attribute, 57 REQUIRES_NEW attribute, 57 @Resource annotation, 47, 53–54, 59 resource annotations @PersistenceContext, 51–52 @PersistenceUnit, 52–53 @Resource, 47, 53–54, 59 resource references, 47 dependency injection, 49– 51 dependency lookup and, 47–48 resource-local transactions, 56, 119, 128–130 resource-location transactions, 55 resourceType element, 53 result set mappings, 311–312 results, ordering, 106–107 ResultSet interface, 396 roles, 89 rollback() method, 59, 129 RollbackException, 129 RowSet interface, 396 Keith_6455INDEX.fm Page 448 Thursday, April 13, 2006 6:31 PM 449■I N D E X Find it faster at ■S Scalability, of components, 36 scalar result columns, mapping, 264–266 schema element, 239, 304, 307–308, 427–428 schema generation, 293–297 defining the column, 296–297 floating point columns, 295–296 null constraints, 294–295 string-based columns, 295 unique constraints, 293–294 schema names, 74 scope, persistence unit, 347–348 secondary tables, 238 @SecondaryTable annotation, 238, 314, 423 secondary-table element, 314–315 SELECT clause, 196–200 combining expressions in, 198–199 constructor expressions, 199 entities and objects, 197–198 inheritance and polymorphism, 199–200 path expressions, 197–198 select queries, 192, 195–214 domain of, 196 execution of, 196 FROM clause, 196, 200–206 identification variables, 196 JPQL vs. SQL, 196 ORDER BY clause, 214 SELECT clause, 196–200 structure of, 195–196 WHERE clause, 206–213 @SequenceGenerator annotation, 424 sequence-generator element, 309 Serializable type, 79 server resources, referencing, 53–54 Service Locator pattern, 355 servlets, 36, 45–46, 56 session beans, 12, 36 adding an entity manager, 64–65 advantages of, 37, 46 best practices, 189 business interface of, 37 defining, 38,–42 EJB JAR, 343 integration testing, 364–383 lifecycle callbacks, 39–40, 43–44 overview, 37 remote business interfaces, 40 stateful. See stateful session beans stateless. See stateless session beans testing, 356, 360 using, 61–63 Session Façade pattern, 156–158, 401–403 Set interface, 105 setFirstResult() method, 178–180 setFlushMode() method, 182 setHint() method, 187 setMaxresults() method, 178–180 setParameter() method, 171–172 setRollbackOnly() method, 58–59, 371 setSessionContext() method, 54 setter injection, 50–51 setter methods, property access and, 73 testing, 357–359 setTransactionTimeout() method, 59, 375 setUp() method, 366–370 shopping cart business interface for, 41 implementing, with stateful session beans, 42 simple mappings, 317–319 single quotes (' '), 207 single-table hierarchy, 246–249 single-valued associations, 92–98, 197 many-to-one mappings, 92–93 one-to-one mappings, 95–98 SIZE function, 213 SOME operator, 212 source roles, 90 Spring framework, 357, 379–383 SQL language, 2, 163–164, 191 SQL queries, 2, 257–268 defining and executing, 260–262 vs. JDBC queries, 258–260 mapping column aliases, 264 mapping compound keys, 266–267 mapping foreign keys, 263 mapping inheritance, 267–268 mapping scalar result columns, 264–266 Keith_6455INDEX.fm Page 449 Thursday, April 13, 2006 6:31 PM 450 ■I N D E X migration and, 396 multiple result mappings, 263 parameter binding, 268 reasons for using, 257 result set mapping, 262–268 @SqlResultSetMapping annotation, 262, 424 sql-result-set-mapping element, 311–312 SQRT function, 213 standardization, value of, 4–5 state field paths, 197 state fields, 192 @Stateful annotation, 42 stateful session beans, 37, 41–44 defining, 41–42 Edit Session, 158–161 extended entity managers, 154–155 extended entity manager and, 113–117 lifecycle callbacks, 43–44 persistence contexts, 123–126 query methods, 154–155 vs. stateless, 42 using, 61–63 see also session beans @Stateless annotation, 38 stateless session beans, 37– 41 adding an entity manager, 64–65 best practices, 189 defining, 38–39 life cycle of, 39–40 remote business interfaces, 40 vs. stateful, 42 using, 61 using transaction-scoped entity manager, 112–113 see also session beans static queries, 29 strategy element, id generation strategies and, 84–88 string concatenation, 170 string literals, 207 String objects, 79 string pattern matching, 208 string-based columns, 295 strings vs. entities, 18 for enumerated values, 81 subqueries, 208–210 SUBSTRING function, 213 SUM function, 216 superclasses, 241 mapped, 242–244 transient, 244 SUPPORTS attribute, 57 syntax aggregate queries, 214 conditional expressions, 206–207 system classpath, 351 ■T @Table annotation, 85, 314, 424 table definitions, unique constraints in, 293–294 table element, 314 table names, default, 74 @TableGenerator annotation, 85, 425 table-generator element, 309–310 table-per-concrete-class inheritance strategy, 251–253 tables catalog element, 75 id generation using, 84–87 mapping to, 74–75 multiple, 237–241 primary, 238 schema names, 74 secondary, 238, 314–315 specifying names of, 74 in XML, 314–15 target roles, 90 targetEntity element, 100 tearDown() method, 366–368 @Temporal annotation, 172, 425 temporal types, 81 TemporalType, 172, 426 test frameworks, 356–357 testability, 15 test-driven development (TDD) methodology, 354 testing acceptance tests, 355 best practices, 383 enterprise applications, 353–357 Keith_6455INDEX.fm Page 450 Thursday, April 13, 2006 6:31 PM 451■I N D E X Find it faster at entities, 357–360 entity manager and, 361–370 functional tests, 355 integration, 354–356, 364–383 outside of server, 355–356 terminology, 354–355 unit, 354–364 white box, 355 TestSetup, 369–370 TopLink, 4, 12 TopLink Essentials, 367 transaction association, 119 transaction attributes, 57 transaction management, 54–60, 119–131, 371–376 bean-managed, 56–59 changing type of, 56 container-managed, 56–58 resource-local transactions, 119, 128–130 transaction rollback, 131 JTA, 119–128 transaction propagation, 119 transaction rollback, 131 transaction synchronization, 119 transaction type configuration, 336, 348 Transaction View, 151–153 transactionality, of entities, 18 @TransactionAttribute annotation, 57 @TransactionManagement annotation, 56 transactions, 28–29, 35 bean-managed, 58–59, 373–376 container-managed, 55, 371–373 demarcation of, 56 enterprise, 55– 60 executing queries outside of, 175–176 overview, 54–55 propagation, 377–379 properties of, 54–55 resource-local, 55 rollbacks, 59 time limits for, 59 uncommitted, 180–183 UserTransaction interface, 59–60 when to use, 371 transaction-scoped entity managers, 112–113, 132, 377 transaction-scoped persistence contexts, 120–122 Transfer Object pattern, 151, 386, 397–401 Coarse-grained transfer objects, 400–401 Fine-grained transfer objects, 398–400 @Transient annotation, 82–83, 425 transient classes, 244–245 transient element, 319 transient state, 82–83 TRIM function, 213 TRUE, 207 try ... finally, 60 type, 79 ■U unidirectional collection mappings, 104–105 unidirectional relationships, 89–90 unique constraints, 293–294 @UniqueConstraint annotation, 294, 426 unit testing, 354–364 entities, 357–360 entities in components, 359–360 entity manager and, 361–364 unitName element, 51–52 updatable element, 229–230 update queries, 192, 218 UPDATE statement, bulk, 183–189 UPPER function, 213 user interface, defining, 67–68 UserTransaction interface, 59– 60, 373–376 ■V valueColumnName, 85 verifyItem() method, 58 @Version annotation, 426 version element, 319 version fields, transaction rollback and, 131 versioning system, 284–285 ■W WAR, 345–346 web archives, packaging entities in, 345–346 WEB–INF/classes directory, 345–346 Keith_6455INDEX.fm Page 451 Thursday, April 13, 2006 6:31 PM 452 ■I N D E X WHERE clause, 165, 206–213 ANY, ALL, and SOME expressions, 212 basic expression form, 206–207 BETWEEN expressions, 207 collection expressions, 210–211 delete queries, 219 EXISTS expression, 211 function expressions, 212–213 IN expressions, 210 input parameters, 206 join conditions in, 203–204 LIKE expressions, 208 subqueries, 208–210 update queries, 218 white box testing, 355 wildcard characters, 208 write locking, 288–290 ■X XML, defining queries in, 170 XML annotations, 15, 299 XML definition, of container-managed relationship, 390 XML descriptors, 19 XML mapping files, 299–333 disabling annotations, 301–303 entity listeners, 331–333 entity-mappings, 301 generators, 308–312 header, 301 identifier mappings, 315–317 lifecycle events, 330 managed classes, 312,–333 mapping file defaults, 306–308 metadata collection process, 300–301 orm_1_0.xsd schema, 301 persistence unit defaults, 303–306 queries, 308–312 tables, 314–315 xml-mapping-metadata-complete element, 302, 427 Keith_6455INDEX.fm Page 452 Thursday, April 13, 2006 6:31 PM FIND IT FAST with the Apress SuperIndex ™ Quickly Find Out What the Experts Know Leading by innovation, Apress now offers you its SuperIndex™, a turbochargedcompanion to the fine index in this book. The Apress SuperIndex™ is a keyword and phrase-enabled search tool that lets you search through the entire Apress library. Powered by dtSearch™, it delivers results instantly. Instead of paging through a book or a PDF, you can electronically access the topic of your choice from a vast array of Apress titles. The Apress SuperIndex™ is the perfect tool to find critical snippets of code or an obscure reference. The Apress SuperIndex™ enables all users to harness essential information and data from the best minds in technology. No registration is required, and the Apress SuperIndex™ is free to use. 1 Thorough and comprehensive searches of over 300 titles 2 No registration required 3 Instantaneous results 4 A single destination to find what you need 5 Engineered for speed and accuracy 6 Will spare your time, application, and anxiety level Search now: BOB_SuperIndex_7x925.qxd 1/23/06 12:24 PM Page 1 Keith_6455INDEX.fm Page 453 Thursday, April 13, 2006 6:31 PM

Các file đính kèm theo tài liệu này:

  • pdfPro EJB 3 Java Persistence API.pdf
Tài liệu liên quan