Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Java EE 8 Application Development

You're reading from   Java EE 8 Application Development Develop Enterprise applications using the latest versions of CDI, JAX-RS, JSON-B, JPA, Security, and more

Arrow left icon
Product type Paperback
Published in Dec 2017
Publisher Packt
ISBN-13 9781788293679
Length 372 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
David R. Heffelfinger David R. Heffelfinger
Author Profile Icon David R. Heffelfinger
David R. Heffelfinger
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Introduction to Java EE FREE CHAPTER 2. JavaServer Faces 3. Object Relational Mapping with the Java Persistence API 4. Enterprise JavaBeans 5. Contexts and Dependency Injection 6. JSON Processing with JSON-P and JSON-B 7. WebSocket 8. Java Messaging Service 9. Securing Java EE Applications 10. RESTful Web Services with JAX-RS 11. Microservices Development with Java EE 12. Web Services with JAX-WS 13. Servlet Development and Deployment 14. Configuring and Deploying to GlassFish

Summary


This chapter covered how to access data in a database via the Java Persistence API (JPA).

We covered how to mark a Java class as a JPA entity by decorating it with the @Entity annotation. Additionally, we covered how to map an entity to a database table via the @Table annotation. We also covered how to map entity fields to database columns via the @Column annotation, as well as declaring an entity's primary key via the @Id annotation.

Using the javax.persistence.EntityManager interface to find, persist, and update JPA entities was also covered.

Defining both unidirectional and bidirectional one-to-one, one-to-many, and many-to-many relationships between JPA entities was covered as well.

Additionally, we explored how to use JPA composite primary keys by developing custom primary key classes.

Also, we covered how to retrieve entities from a database by using the Java Persistence Query Language (JPQL).

We discussed additional JPA features such as the Criteria API, which allows us to build...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime