8351  Reviews star_rate star_rate star_rate star_rate star_half

Introduction to the Java Persistence API 2

Ascendient Learning's JPA 2 Training: Introduction to the Java™ Persistence API 2 class teaches attendees how to implement JPA for data persistence. JPA 2 is a standard feature of Java EE 6 and...

Read More
Duration 3 days
Course Code JAV-162
Available Formats Classroom

Overview

Ascendient Learning's JPA 2 Training: Introduction to the Java™ Persistence API 2 class teaches attendees how to implement JPA for data persistence. JPA 2 is a standard feature of Java EE 6 and later, but can also be used with Java SE applications.

Skills Gained

  • Understand the JPA architecture
  • Create JPA based applications
  • Understand and use JPA to map persistent objects to the database
  • Create JPA persistence units, and understand JPA persistence contexts
  • Use the JPA EntityManager
  • Work with queries and JPQL (Java Persistence Query Language), as well as the Criteria API (JPA 2)
  • Understand and work with collections and associations
    • Value and Entity Types
    • Bidrectional and unidirectional
    • 1-1, 1-N, N-N
  • Use versioning support for optimistic locking
  • Map inheritance hierarchies using JPA
  • Performance tune your JPA applications
  • Understanding JPA transaction support
  • Understand the relationship between JPA / EJB3
  • Use JPA entities from session beans
  • Be familiar with Spring support for JPA

Prerequisites

All attendees must have substantial prior Java development and relational database experience.

Course Details

Training Materials

All JPA training students receive comprehensive courseware.

Software Requirements

  • A recent version of Windows, macOS, or Linux with at least 8 GB RAM
  • JDK 8 or later
  • The Java tool the students are likely to use after the class (Eclipse or IntelliJ IDEA are recommended)
  • Other free software - please contact us if you have purchased this class

Outline

  • Introduction to Java Persistence API (JPA)
    • Overview
      • Persistence Layers, Object-Relational Mapping (ORM), JDBC
      • JPA Overview
    • Mapping with JPA
      • Entities and @Entity, ids and @Id
      • Generated Id Values
      • Basic Mapping Types
    • Persistence Unit and EntityManager
      • Persisting to the DB, the EntityManager API
      • Persistence Units, Config, Persistence Context
      • Retrieving Persistent Entities with find()
    • More About Mappings
      • Default Mappings, @Basic, @Column
      • Field vs. Property Access
      • Temporal (Date/Time) Mappings
    • Logging Options (Provider based)
  • Updates and Queries
    • Inserting and Updating - Persisting new Entities, Updating an Instance, Removing an Instance
    • Querying and JPQL
      • Entity Based Queries, SELECT, WHERE
      • Query Interface, Executing Queries, Generic Queries (JPA 2)
      • JPQL Operators, Expressions, and Parameters
      • Named Queries
    • Additional Query Capabilities
      • Projection query, Ordering, Aggregate Query, Build Update and Delete
    • Embedded Objects
      • @Embeddable, @Embedded
      • Defining and using Embedded Objects
    • Compound Primary Keys - @EmbeddedID, @IDClass, Defining Compound Keys
  • The Persistence Lifecycle
    • Transaction Overview and Transactions in JPA
      • Transaction Overview
      • EntityTransaction API (including JTA and resource-local EntityManager)
    • The Persistence Lifecycle
      • JPA Entity States (New, Managed, Detached, Removed), and Entity State Diagram
      • Persistence Context - Lifespan, Propagation
      • Synchronization to the DB
    • Versioning and Optimistic Locking
      • Overview, Detached Instances
      • Versioning, @Version, Optimistic Locking
    • Lifecycle Callbacks
      • @PrePersist, @PostPersist, etc.
      • Entity Listeners, @Entity Listeners
  • Entity Relationships
    • Relationships Overview: Object Relationships, Participants, Roles, Directionality, Cardinality
    • Relationship Mapping
      • Mapping Overview (1-1, 1-N, N-1, N-N)
      • Unidirectional and Bidirectional
      • @ManyToOne, @OneToMany, Table Structures
      • Relationship Inverse - Owning Side
      • Collection Types (List, Set, etc)
      • Cascading Over Relationships (including orphanRemoval - JPA 2)
      • @ManyToMany, @OneToOne
      • Lazy and Eager Loading
      • Queries Across Relationships (Inner Joins, Outer Joins, Fetch Joins)
    • Entity Inheritance Mapping
      • Overview
      • Single Table Mapping
      • Joined (Table per Subclass) Mapping
      • Table per Concrete Class Mapping
      • Pros and Cons
  • Element Collections (JPA 2)
    • Overview, Collections of Value Objects, @ElementCollection, @CollectionTable
    • Using Element Collections
    • Collections of Embeddables
  • Criteria API (JPA 2)
    • Overview of the Criteria API
    • Path Expressions, Building Queries (CriteriaBuilder, CriteriaQuery, Subquery, Predicate, Expression, Order, Selection, Join)
    • Executing Queries and Accessing Results
  • Additional JPA Capabilities
    • XML Mapping Files
    • Bean Validation (JPA 2)
    • Best Practices
      • Primary Keys, Named Queries, Lazy/Eager Loading, Transactional Semantics, Encapsulation, Report Queries
  • Integration
    • Data Access Objects (DAO) and Java SE Integration
      • DAO Overview
      • JpaUtil Class for EntityManager management in Java SE
      • Lifecycle Considerations
    • Integration with EJB
      • Using JPA with Session Beans
      • Container Managed (Injected) Entity Manger
      • JTA Transactions and Lifecycle Considerations
      • Extended Persistence Contexts
    • Using JPA with Java Web Apps
      • Using EntityManager in Web apps - request scoping
      • Lazy Loading - Open EntityManager in View Pattern
    • Integration with Spring
      • Injection of EntityManger, EntityManagerFactory
      • LocalEntityManager FactoryBean
      • JPA/Spring Based DAO
  • Conclusion

Schedule

FAQ

Does the course schedule include a Lunchbreak?

Classes typically include a 1-hour lunch break around midday. However, the exact break times and duration can vary depending on the specific class. Your instructor will provide detailed information at the start of the course.

What languages are used to deliver training?

Most courses are conducted in English, unless otherwise specified. Some courses will have the word "FRENCH" marked in red beside the scheduled date(s) indicating the language of instruction.

What does GTR stand for?

GTR stands for Guaranteed to Run; if you see a course with this status, it means this event is confirmed to run. View our GTR page to see our full list of Guaranteed to Run courses.

Does Ascendient Learning deliver group training?

Yes, we provide training for groups, individuals and private on sites. View our group training page for more information.

What does vendor-authorized training mean?

As a vendor-authorized training partner, we offer a curriculum that our partners have vetted. We use the same course materials and facilitate the same labs as our vendor-delivered training. These courses are considered the gold standard and, as such, are priced accordingly.

Is the training too basic, or will you go deep into technology?

It depends on your requirements, your role in your company, and your depth of knowledge. The good news about many of our learning paths, you can start from the fundamentals to highly specialized training.

How up-to-date are your courses and support materials?

We continuously work with our vendors to evaluate and refresh course material to reflect the latest training courses and best practices.

Are your instructors seasoned trainers who have deep knowledge of the training topic?

Ascendient Learning instructors have an average of 27 years of practical IT experience and have also served as consultants for an average of 15 years. To stay current, instructors spend at least 25 percent of their time learning new, emerging technologies and courses.

Do you provide hands-on training and exercises in an actual lab environment?

Lab access is dependent on the vendor and the type of training you sign up for. However, many of our top vendors will provide lab access to students to test and practice. The course description will specify lab access.

Will you customize the training for our company’s specific needs and goals?

We will work with you to identify training needs and areas of growth.  We offer a variety of training methods, such as private group training, on-site of your choice, and virtually. We provide courses and certifications that are aligned with your business goals.

How do I get started with certification?

Getting started on a certification pathway depends on your goals and the vendor you choose to get certified in. Many vendors offer entry-level IT certification to advanced IT certification that can boost your career. To get access to certification vouchers and discounts, please contact info@ascendientlearning.com.

Will I get access to content after I complete a course?

You will get access to the PDF of course books and guides, but access to the recording and slides will depend on the vendor and type of training you receive.

How do I request a W9 for Ascendient Learning?

View our filing status and how to request a W9.

Reviews

The class was very vast paced however the teacher was very good at checking in on us while giving us time to complete the labs.

The exit certified aws course provided a good introduction to the tools available on aws.

This was a good program to get prepared for the solutions architect associate exam.

Class was easy to sign up for and ExitCertified provided very good communication

This is my second course with ExitCertified. This course exceeded my expectations. The teacher was great and the class was fun.