Document Information

Preface

Part I Introduction

1.  Overview

2.  Using the Tutorial Examples

Part II The Web Tier

3.  Getting Started with Web Applications

4.  Java Servlet Technology

5.  JavaServer Faces Technology

6.  Introduction to Facelets

7.  Using JavaServer Faces Technology in Web Pages

8.  Developing with JavaServer Faces Technology

9.  Configuring JavaServer Faces Applications

Part III Web Services

10.  Introduction to Web Services

11.  Building Web Services with JAX-WS

12.  Building RESTful Web Services with JAX-RS and Jersey

Part IV Enterprise Beans

13.  Enterprise Beans

14.  Getting Started with Enterprise Beans

15.  Running the Enterprise Bean Examples

Part V Persistence

Entities

Requirements for Entity Classes

Persistent Fields and Properties in Entity Classes

Persistent Fields

Persistent Properties

Using Collections in Entity Fields and Properties

Primary Keys in Entities

Primary Key Classes

Multiplicity in Entity Relationships

Direction in Entity Relationships

Bidirectional Relationships

Unidirectional Relationships

Queries and Relationship Direction

Cascade Deletes and Relationships

Orphan Removal in Relationships

Entity Inheritance

Abstract Entities

Mapped Superclasses

Non-Entity Superclasses

Entity Inheritance Mapping Strategies

Managing Entities

The Persistence Context

The EntityManager Interface

Container-Managed Entity Managers

Application-Managed Entity Managers

Finding Entities Using the EntityManager

Managing an Entity Instance's Life Cycle

Creating Queries

Persistence Units

The persistence.xml File

17.  Running the Persistence Examples

18.  The Java Persistence Query Language

Part VI Security

19.  Introduction to Security in the Java EE Platform

20.  Using Java EE Security

21.  Securing Java EE Applications

22.  Securing Web Applications

Part VII Java EE Supporting Technologies

23.  Introduction to Java EE Supporting Technologies

24.  Transactions

25.  Resource Connections

Index

 

Chapter 16

Introduction to the Java Persistence API

The Java Persistence API provides an object/relational mapping facility to Java developers for managing relational data in Java applications. Java Persistence consists of four areas:

  • The Java Persistence API

  • The query language

  • The Java Persistence Criteria API

  • Object/relational mapping metadata