Pro Cloud Native Java EE Apps by 2022
Author:2022
Language: eng
Format: epub
CHAPTER 5
Persistence with Jakarta
EE Persistence
Every application needs to store data at some point during its execution to a durable
data store. The data store could be as simple as a flat file and as complex as a full-fledged database management system. The data store acts as the single source of truth for the
application. For instance, the bank balance of your account with your bank is stored
in some form of data store. This single data is the only source of truth for the bank in identifying how much money they are keeping for you.
Irrespective of the language and platform an application is written in, the process of storing application data into a durable data store generally spans three broad categories, namely, data modelling, data persistence, and data retrieval. In Enterprise Java, the
Jakarta Persistence API is a fully featured specification that allows you to realize these three broad application data persistence categories through the use of annotations and intuitive interfaces.
This chapter is about persisting data to a relational database using the Jakarta
Persistence API or JPA. The goal isnât to teach you everything about JPA, but rather
the essentials of what you need to get very common application data persistence
requirements fulfilled. For a much more comprehensive overview and reference for JPA,
please take a look at the specification1 document. The chapter is split into the three main categories of data modelling, data persistence, and data retrieval.
All the examples in this chapter use the Postgres database as the underlying
database. However, the same principles should apply to all database engines out there as long as you use the JPA constructs. By the end of this chapter, you should be comfortable in using the JPA specification to persist your application data to a relational database.
1 Jakarta Persistence 3.1 Specification
139
© Luqman Saeed and Ghazy Abdallah 2022
L. Saeed and G. Abdallah, Pro Cloud Native Java EE Apps, https://doi.org/10.1007/978-1-4842-8900-6_5
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7781)
Grails in Action by Glen Smith Peter Ledbrook(7696)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6563)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6550)
Running Windows Containers on AWS by Marcio Morales(6080)
Kotlin in Action by Dmitry Jemerov(5065)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(4914)
Combating Crime on the Dark Web by Nearchos Nearchou(4497)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4414)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4334)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4170)
The Age of Surveillance Capitalism by Shoshana Zuboff(3950)
Python for Security and Networking - Third Edition by José Manuel Ortega(3738)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3508)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3407)
Mastering Python for Networking and Security by José Manuel Ortega(3344)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3330)
Blockchain Basics by Daniel Drescher(3294)
Learn Wireshark by Lisa Bock(3259)
