| Java Training   Overview 
 
 
				
This course offers a comprehensive and detail-oriented treatment of the Java Persistence API (JPA) for developers interested in implementing persistence tiers for enterprise applications. We cover JPA basics including simple object/relational concepts and annotations, persistence contexts and entity managers, and configuration via persistence.xml. We get a good grounding in the Java Persistence Query Language (JPQL) and take advantage of a prepared JPQL query console to explore the two schemas on which the course's case studies are based. The course then moves into advanced topics including JPA-2.0 mapping options, the Criteria API, lifecycle hooks, JSR-303 validation, locking, and caching. Students will complete the course with a firm understanding of JPA architecture and plenty of hands-on exercise in entity mapping, persistence operations, and JPQL.
 Course software includes two schemas: a fairly simple human-resources model (6 tables, 253 rows) for early chapters and a more sophisticated pharmacy schema (14 tables, 4255 rows) for the latter half of the course. The pharmacy schema is based on an open-source project and made available to Capstone Courseware by special permission.
 
 This version of the course supports JPA 2.0 with a choice of two providers: EclipseLink 2.3, which is pre-configured for course exercises, and Hibernate® 4.0. Switching providers is just a matter of moving a few lines in and out of XML comments in the relevant persistence.xml file, and we encourage instructors to demonstrate both providers at least here and there, to illustrate portability and for comparison's sake over some finer points.
 
 The course also supports either the Derby or Oracle® RDBMS. Derby is bundled with the course software and is pre-configured; a script is included to change over to Oracle configurations for all exercises and schema-creation scripts are available for both.
 
 Java Training   Prerequisites
 Java Training  Learning ObjectivesA strong Java programming background is essential for this course
Knowledge of relational database concepts and SQL is recommended -- but is not strictly required.Prior experience with JDBC will be a plus but is not required.
 
 After completing this course, the student should be able to:
		 
		Java Training   Course durationUnderstand the value of object/relational mapping and JPA's role as a standard for ORM implementations.Develop JPA entities using JPA annotations to align the Java classes, properties, and types to relational tables, columns, and types.Create entity managers and instantiate persistence contexts to perform persistence operations.Carry out create/retrieve/update/delete (CRUD) operations on JPA entities using entity managers.Implement entity relationships of all cardinalities, including unidirectional and bidirectional relationships.Implement special ORM cases such as composite primary keys, inheritance relationships, and cascading operations.Use JPQL to write object-oriented queries, and process query results.Use the Criteria API to define queries programmatically, and take advantage of type safety using the Metamodel API.Build reusable façades that encapsulate simpler and more complex persistence operations.Implement persistence lifecycle event handlers.Define JSR-303 validation constraints on JPA entities and see them enforced by the JPA provider.Make well-informed decisions about locking strategies, and understand the role of the JPA cache in enterprise applications. 
 4 Days
 
 Java Training   Course outline
 
 Chapter 1. Introduction to JPA
 
Chapter 2. Object/Relational MappingObject/Relational MappingMismatches Between Relational and Object ModelsThe Java Persistence APIJPA HistoryJPA ArchitectureEntity MetadataThe Entity ManagerJPA Providers 
Chapter 3. Entity ManagersAnnotationsJavaBean StandardsProperty, Field, and Mixed AccessTable and Column MappingPrimary Keys and GenerationType MappingsTemporal and Enumerated TypesEmbedded TypesEntity Relationships@ManyToOne Relationships@OneToOne Relationships@OneToMany Relationships@ManyToMany RelationshipsEager and Lazy Loading 
Chapter 4. JPQLPutting Entities to Workpersistence.xmlEntity State and TransitionsManaging TransactionsPersistence OperationsCreating QueriesNamed QueriesQuery ParametersNative Queries 
Chapter 5. Advanced MappingsThe Java Persistence Query LanguageQuery StructurePath ExpressionsFilteringScalar FunctionsOperators and Precedencebetween, like, inis null, is emptyOrderingAliasesGroupingAggregate FunctionsJoinsConstructors 
Chapter 6. The Criteria APIInheritance StrategiesSingle-Table StrategyJoined-Table StrategyTable-Per-Concrete-Class StrategyQuerying Over Inheritance RelationshipsSecondary TablesComposite Primary Keys@IdClass and @EmbeddedIdDerived Identifiers@ElementCollectionDefault Values@Version FieldsCascading and Orphan RemovalDetachment and Merging 
Chapter 7. Lifecycle and ValidationHistory of the Criteria APICriteria Query StructureThe MetaModel API and Query Type SafetyTuplesJoinsPredicatesBuilding ExpressionsOrderingGroupingEncapsulating Persistence LogicFaçadesRange Queries 
Chapter 8. Locking and CachingLifecycle EventsMethod AnnotationsEntity ListenersJSR-303 ValidationConstraint AnnotationsValidation ModesValidation Groups 
System RequirementsConcurrencyOptimistic LockingOptimistic Read LockingOptimistic Write LockingPessimistic LockingCachingPersistence Context as Transactional CacheShared (2nd-level) CacheLocking and Caching "Do's and Don'ts" 
 Minimum Hardware Requirements
 Hardware – recommendedDual-core 1.8 GHz, 4 gig RAM, 10 gig disk space.
 
 
			    
		              
		    Operating systemDual-core 2.8 GHz, 8 gig RAM, 10 gig disk space. Network and SecurityTested on Windows 7. Course software should be viable on all systems which support a Java 6 Developer's Kit.
 
 Limited privileges required
 
 Software
 
 All free downloadable tools, with an option to use certain commercial products.
 
 
 |