Enterprise Java Development@TOPIC@

Java Persistence API: Entities

Mapping POJOs to RDBMS Tables

Revision: v2013-09-23

2014-03-07 00:01 EST

Abstract

This presentation provides information for mapping Java classes (without relationships) to the database using JPA.


Purpose
1. Goals
2. Objectives
1. Identifying Entity Classes
1.1. Entities
1.2. Entity Name
1.3. Field/Property Access
1.3.1. Access Types
1.3.2. Defining Access using @Annotations
1.3.3. Defining Access using orm.xml
1.4. Approaches
1.4.1. Java First
1.4.2. Schema First
2. Mapping Entity Classes
2.1. Core Mappings
2.2. More Detailed Property Mappings
2.3. Entity Mapping Example
2.3.1. Example Schema
2.3.2. Mapping Entity Class with Annotations
2.3.3. Mapping Entity Class with orm.xml
2.4. More on Precision/Scale
2.5. Transient Properties
2.6. Lob Properties
2.7. Temporal and Enumerated Properties
2.7.1. Temporals
2.7.2. Enums
2.7.3. Temporal/Enum Example
3. Primary Keys
3.1. Generated Simple Primary Keys
3.1.1. GenerationType.AUTO
3.1.2. GenerationType.IDENTITY
3.1.3. GenerationType.SEQUENCE
3.1.4. GenerationType.TABLE
4. Composite Primary Keys
4.1. Example Composite Primary Key Class
4.2. Composite @IdClass
4.3. Composite @EmbeddedId
4.4. Composite Overrides
4.5. Composite Primary Key Summary
5. Multi-table Mapping
5.1. Multi-table Example
5.2. Summary
6. Embedded Object
6.1. Embedded Object Example
6.2. Summary