Java Persistence with JPA

Contact Us for Dates
2 days practical workshop for up to 12 people.
Only £790
This course develops skills in using the Object/Relational Mapping API JPA. The course uses the latest release version of JPA. By the end of the course, students will be prepared to set-up and use JPA as the persistence mechanism in Java applications.

Layout

The training course combines lectures with practical exercises that help the delegates to put what they have learned on the training course into practice.  The exercises specifically build on what has been recently taught and are built up as the training course progresses.

Training Course Objectives

  • Introduction to JPA
  • Configuring JPA
  • JPA Persistence
  • Object/Relational Mapping
  • The Criteria Query API
  • The JPA Query Language

Who it is for

Java Programmers

Training Course Prerequisites

  • Intermediate knowledge of Java programming and JDBC
  • Experience with SQL and relational databases

Chapters

Chapter 1 Introduction to JPA

  • Introducing JPA
  • The Object/Relational Mapping Problem
  • The Impedance Mismatch
  • JDBC
  • The Users-Roles Schema
  • Tools and Environment Setup
  • Creating the Database
  • The Role Class
  • The JPA Alternative
  • XML Tools

Chapter 2 Configuring JPA

  • JPA Distributions
  • Required Libraries
  • Configuration Files
  • persistence.xml
  • Annotation Configuration
  • XML Configuration Model

Chapter 3 JPA Persistence

  • The JPA Architecture
  • Interface Model
  • EntityManager Methods
  • The Entity Manager
  • Object States
  • State Transitions
  • Session Methods
  • Transactions
  • Session-Per-Operation
  • Session-Per-Request
  • The Data Access Object Pattern

Chapter 4 Object/Relational Mapping

  • Object-Oriented Design
  • Relational Mapping
  • Bidirectional Association
  • O/R Mapping Techniques
  • The Mapping Document
  • The Mapping XML Model
  • Primary Keys and Identity
  • Generating Identifiers
  • Other Mapping Elements
  • Components
  • Mapping Associations
  • The Mapping XML Model for Associations
  • Unidirectional Many-to-One
  • Eager Fetching
  • Bidirectional One-To-Many
  • Bidirectional One-To-One
  • Mapping Inheritance
  • Inheritance and Databases
  • Single-Table Inheritance
  • Mapping Single-Table Inheritance
  • Table-Per-Subclass
  • Table-Per-Subclass Mapping
  • Table-Per-Concrete-Class

Chapter 5 The Criteria Query API

  • Criteria Queries
  • The Criteria Interface
  • The Criteria API
  • The Restriction Class Utility
  • Other Restrictions
  • Windowing Results
  • Sorting Query Results
  • Projections and Aggregates
  • The Projections Class Utility
  • The ProjectionList Class
  • Query By Example

Chapter 6 The JPA Query Language

  • The JPA Query Language
  • Fundamentals
  • JPQL Queries
  • Polymorphism
  • Named Parameters
  • Entity Parameters
  • Joining on Associations
  • Aggregate Methods
  • Updates and Deletes
  • Named Queries
  • Using Native SQL