Java Persistence with JPA
2h 8mIntermediate2023-01-04
Authors

Kesha Williams
Software Engineering Manager, Speaker, Tech Blogger
Course details
Jakarta Persistence (JPA) is the standard for mapping Java objects to databases. JPA provides several advantages over traditional data access methods like Java Database Connectivity (JDBC). In this hands-on course, Kesha Williams discusses these advantages and acquaints you with the basics of JPA, entity management, transaction management, and relationship mapping. Kesha then discusses more advanced topics like inheritance mapping strategies, Jakarta Persistence Query Language (JPQL), the Criteria API, and persistence providers. She explains how inheritance functions when working with mappings, classes, and tables. She also demonstrates how to create queries using JPQL as well as native queries.
Skills covered
APIsJavaOracleProgramming LanguagesSoftware DevelopmentOne-Off
Concepts
0. Introduction
- 01 - Map Java objects to databases
- 02 - What you should know
- 03 - Reviewing the course project
1. Understanding JPA
- 04 - Exploring the history of JPA
- 05 - Leveraging Object-Relational Mapping (ORM)
- 06 - Understanding JPA and its benefits
- 07 - Demo - Configuring JPA
- 08 - Demo - Reviewing JPA annotations
- 09 - Challenge - Create simple employee, company, and salary classes
- 10 - Solution - Create simple employee, company, and salary classes
2. Managing Entities
- 11 - What is an entity
- 12 - Demo - Working with the entity manager
- 13 - Demo - Persisting entities
- 14 - Mapping keys
- 15 - Demo - Mapping keys
- 16 - Implementing CRUD operations
- 17 - Demo - CRUD operations
- 18 - Challenge - Persist employee, company, and salary entities
- 19 - Solution - Persist employee, company, and salary entities
3. Exploring Entity Relationships
- 20 - What are entity relationships
- 21 - Annotating a one-to-one relationship
- 22 - Demo - Annotating a one-to-one relationship
- 23 - Annotating a one-to-many relationship
- 24 - Demo - Annotating a one-to-many relationship
- 25 - Annotating a many-to-one relationship
- 26 - Demo - Annotating a many-to-one relationship
- 27 - Annotating a many-to-many relationship
- 28 - Demo - Annotating a many-to-many relationship
- 29 - Utilizing inheritance mapping strategies
- 30 - Demo - Utilizing inheritance mapping strategies
- 31 - Challenge - Implement a many-to-many relationship
- 32 - Solution - Implement a many-to-many relationship
4. Understanding Transactions
- 33 - What is a transaction
- 34 - Managing transactions
- 35 - Demo - Managing transactions
- 36 - Challenge - Manage a transaction
- 37 - Solution - Manage a transaction
5. Querying Entities
- 38 - Querying with the Jakarta Persistence Query Language (JPQL)
- 39 - Demo - Querying with JPQL
- 40 - Using native queries
- 41 - Demo - Querying with native queries
- 42 - Leveraging the Criteria API
- 43 - Demo - Leveraging the Criteria API
- 44 - Challenge - Query an entity using JPQL
- 45 - Solution - Query an entity using JPQL
Conclusion
- 46 - Good luck on your JPA journey
Related courses
- Java Persistence with JPA and Hibernate
- Java Persistence API (JPA): 1 The Basics
- Java Persistence API (JPA): 2 Inheritance and Querying
- Creating Your First Spring Boot Microservice
- Learning Java Enterprise Edition
- Java EE: Bean Validation
- Java EE 8 Essential Training
- Spring Cloud GCP: Setting Up a Cloud SQL Database