Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Introduction to JPA

Course Summary

The Introduction to JPA training course is designed to demonstrate an in-depth exploration of database driven development using Java Persistence Architecture (JPS) both inside and outside of a Jakarta Enterprise Edition (EE) container.

The course begins with a review of common database programming techniques, including Java Database Connectivity (JDBC) and RowSets. Next, it examines how Object-Relational Mapping (ORM) frameworks and technologies simplify database development. The course concludes key JPA concepts, like an EntityManager, how to create advanced queries using Java Persistence Query Language (JPQL), and examining how to structure complex entity relationships. The course concludes with a discussion about transactions.

Purpose
Learn how to build Jakarta Enterprise Edition (EE) and Java Standard Edition (SE) database driven applications utilizing the Java Persistence Architecture (JPA).
Audience
Experienced Java programmers familiar with JDBC and database development.
Role
Software Developer
Skill Level
Intermediate
Style
Hack-a-thon - Learning Spikes - Workshops
Duration
2 Days
Related Technologies
Advanced Jakarta EE | Hibernate | Java

 

Productivity Objectives
  • Describe Java Persistence Architecture (JPA) and its capabilities
  • Compare the advantages and disadvantages of Object-Relational Mapping (ORM) frameworks
  • Configure persistence context inside and outside of a container
  • Implement a basic Create, Read, Update, Delete (CRUD) application using JPA
  • Map complex database schemas to JPA Entities
  • Create robust queries using Java Persistence Query Language (JPQL) and Native Structured Query Language (SQL)

What You'll Learn:

In the Introduction to JPA training course, you'll learn:
  • Review of Database Concepts
    • Review of using JDBC to perform CRUD operations
    • Advanced JDBC development using meta-data capabilities
    • Perform ORM with JDBC and JavaBeans
  • What is JPA?
    • Review of ORM problem
    • Examine industry attempts to solve problem
    • Resolve the relationship between Hibernate and JPA
  • Core JPA Concepts
    • What is JPA?
    • Overview of key concepts and terms
    • Persistence units, Entities, and EntityManagers
    • EntityManagerFactories, JPA QL, and the JPA Criteria queries
  • Configuring JPA
    • Set up the environment to work with JPA and a persistence provider
    • Create a persistence.xml file
    • Define a persistence provider
    • Define a persistence unit using JDBC connection strings and pooling
    • Define a persistence unit using data sets
    • Utilize Hibernate as a persistence provider
    • Utilize EclipseLink as a persistence provider
    • Choose the best configuration style
  • Creating a Basic JPA CRUD Application
    • Review of Java annotations
    • Review of Dependency Injection
    • Creating an Entity
    • Associating Entity with EntityManager
    • Performing CRUD with an EntityManager
    • Understanding Entity states
    • Performing basic Primary Key querying
  • Overview of Mapping Concepts
    • Types of relationships
    • Create relationships using Primary Keys and Foreign Keys
    • Define associations using cardinality
    • Identify annotations used to build basic relationships
    • Utilize type converters
  • Implementing Mapping Concepts
    • 1-1 Mapping
    • 1-N Mapping
    • N-1 Mapping
    • N-N Mapping
  • Object Relational Mappings
    • Apply OO design to mappings
    • Collection mapping
    • Inheritance mappings
    • Override "defaults"
  • Advance Mapping Configurations
    • Understand "conventions"
    • Build a solution using "configuration over convention"
    • Work with configuration annotations
  • Introduction to JPA QL
    • Review of querying concepts
    • Simple queries and conditions, Joins, Inner Joins, Outer Joins, Order by
    • What is JPA QL?
    • JPA QL syntax, structure, and functions
  • Understanding Types of Queries Supported by JPA QL
    • Create dynamic run-time queries
    • Create compile-time named queries
    • Create native-queries
    • Create stored procedures
  • Integrating JPA with Jakarta EE
    • Configure JPA with the app server
    • Utilize resource injection (CDI) to access a persistence unit
    • JPA within the JSP / Servlet container
    • JPA Within the EJB Container
“I appreciated the instructor's technique of writing live code examples rather than using fixed slide decks to present the material.”

VMware

Dive in and learn more

When transforming your workforce, it's important to have expert advice and tailored solutions. We can help. Tell us your unique needs and we'll explore ways to address them.

Let's chat

By filling out this form and clicking submit, you acknowledge our privacy policy.