Fast Track to the Java Persistence API Version 2

Customized Onsite Training

3
Days
  • Customized Content
  • For Groups of 5+
  • Online or On-location
  • Expert Instructors

Live Online Training

$1,575.00
or 3 vouchers
  • Live Online Training
  • Expert Instructors
  • Guaranteed to Run
  • 100% Free Re-take Option
  • 1-minute Video
Overview

This Java Persistence API training covers everything you need to know to begin working with the Java Persistence API in a very short time. It covers all the important concepts necessary to access and update data stored in relational databases. It includes an extensive series of labs to exercise all major capabilities.

Goals
  1. Understand the JPA architecture
  2. Learn to create JPA based applications
  3. Understand and use JPA to map persistent objects to the database
  4. Learn to create JPA persistence units, and understand JPA persistence contexts and the Entity Lifecycle
  5. Learn to use the JPA EntityManager
  6. Learn to work with queries and JPQL (Java Persistence Query Language), as well as the Criteria API (JPA 2)
  7. Understand and work with collections & associations
  8. Learn to use versioning support for optimistic locking
  9. Learn to map inheritance hierarchies using JPA
  10. Learn how to performance tune your JPA applications
  11. Understand JPA transaction support
  12. Understand the relationship between JPA / EJB3
  13. Use JPA entities from session beans (Optional)
  14. Be familiar with Spring support for JPA (Optional)
Outline
  1. Introduction to Java Persistence API (JPA)
    1. Overview
      1. Persistence Layers, Object-Relational Mapping (ORM), JDBC
      2. JPA Overview
    2. Mapping with JPA
      1. Entities and @Entity, ids and @Id,
      2. Generated Id Values
      3. Basic Mapping Types
    3. Persistence Unit and EntityManager
      1. Persisting to the DB, the EntityManager API
      2. Persistence Units, Config, Persistence Context
      3. Retrieving Persistent Entities with find()
    4. More About Mappings
      1. Default Mappings, @Basic, @Column
      2. Field vs. Property Access
      3. Temporal (Date/Time) Mappings
    5. Logging Options (Provider based)
  2. Updates and Queries
    1. Inserting and Updating - Persisting new Entities, Updating an Instance, Removing an Instance
    2. Querying and JPQL
      1. Entity Based Queries, SELECT ,WHERE
      2. Query Interface, Executing Queries, Generic Queries (JPA 2)
      3. JPQL Operators, Expressions, and Parameters
      4. Named Queries
    3. Additional Query Capabilities
      1. Projection query, Ordering, Aggregate Query, Build Update and Delete
    4. Embedded Objects
      1. @Embeddable, @Embedded
      2. Defining and using Embedded Objects
    5. Compound Primary Keys - @EmbeddedID, @IDClass, Defining Compound Keys
  3. The Persistence Lifecycle
    1. Transaction Overview and Transactions in JPA
      1. Transaction Overview
      2. EntityTransaction API (including JTA and resource-local EntityManager)
    2. The Persistence Lifecycle
      1. JPA Entity States (New, Managed, Detached, Removed), and Entity State Diagram
      2. Persistence Context - Lifespan, Propagation
      3. Synchronization to the DB
    3. Versioning and Optimistic Locking
      1. Overview, Detached Instances
      2. Versioning, @Version, Optimistic Locking
    4. Lifecycle Callbacks
      1. @PrePersist, @PostPersist, etc.
      2. Entity Listeners, @EntityListeners
  4. Entity Relationships
    1. Relationships Overview: Object Relationships, Participants, Roles, Directionality, Cardinality
    2. Relationship Mapping
      1. Mapping Overview (1-1, 1-N, N-1, N-N)
      2. Unidirectional and Bidirectional
      3. @ManyToOne, @OneToMany, Table Structures
      4. Relationship Inverse - Owning Side
      5. Collection Types (List, Set, etc)
      6. Cascading Over Relationships (including orphanRemoval - JPA 2)
      7. @ManyToMany, @OneToOne
      8. Lazy and Eager Loading
      9. Queries Across Relationships (Inner Joins, Outer Joins, Fetch Joins)
    3. Entity Inheritance Mapping
      1. Overview
      2. Single Table Mapping
      3. Joined (Table per Subclass) Mapping
      4. Table per Concrete Class Mapping
      5. Pros and Cons
    4. Element Collections (JPA 2)
      1. Overview, Collections of Value Objects, @ElementCollection, @CollectionTable
      2. Using Element Collections
      3. Collections of Embeddables
  5. The Crietria API (JPA 2)
    1. Overview of the Criteria API
    2. Path Expressions, Building Queries (CriteriaBuilder, CriteriaQuery, Subquery, Predicate, Expression, Order, Selection, Join)
    3. Executing Queries and Accessing Results
  6. Additional JPA Capabilities
    1. XML Mapping Files
    2. Bean Validation (JPA 2)
    3. Best Practices
      1. Primary Keys, Named Queries, Lazy/Eager Loading, Transactional Semantics, Encapsulation, Report Queries
  7. Integration
    1. Data Access Objects (DAO) and Java SE Integration (Optional)
      1. DAO Overview
      2. JpaUtil Class for EntityManager management in Java SE
      3. Lifecycle Considerations
    2. Integration with EJB (Optional)
      1. Using JPA with Session Beans
      2. Container Managed (Injected) Entity Manger
      3. JTA Transactions and Lifecycle Considerations
      4. Extended Persistence Contexts
    3. Using JPA with Java Web Apps
      1. Using EntityManager in Web apps - request scoping
      2. Lazy Loading - Open EntityManager in View Pattern
    4. Integration with Spring (Optional)
      1. Injection of EntityManger, EntityManagerFactory
      2. LocalEntityManagerFactoryBean
      3. JPA/Spring Based DAO
Class Materials

Each student in our Live Online and our Onsite classes receives a comprehensive set of materials, including course notes and all the class examples.

Class Prerequisites

Experience in the following is required for this Java EE class:

    Substantial prior Java development and relational database experience.
Preparing for Class

No cancelation for low enrollment

Certified Microsoft Partner

Registered Education Provider (R.E.P.)

GSA schedule pricing

74,839

Students who have taken Live Online Training

15,233

Organizations who trust Webucator for their training needs

100%

Satisfaction guarantee and retake option

9.41

Students rated our trainers 9.41 out of 10 based on 5,189 reviews

Contact Us or call 1-877-932-8228