Enterprise Java Development@TOPIC@

Java Persistence API: Inheritance

Mapping Entity Inheritance to the Database

Revision: v2013-10-05

2014-03-07 00:07 EST

Abstract

This presentation provides information for mapping Java entity class inheritance to the database using JPA.


Purpose
1. Goals
2. Objectives
1. Inheritance Strategy: Single Table
1.1. Single Table Strategy Overview
1.2. Single Table Example Database Schema
1.3. Single Table Example Java Mapping
1.4. Single Table Example Usage
1.5. @DiscriminatorColumn Annotation
1.6. Summary
2. Inheritance Strategy:Table per Concrete Class
2.1. Table per Concrete Class Strategy Overview
2.2. Table per Concrete Class Example Database Schema
2.3. Table per Concrete Class Example Java Mapping
2.4. Table per Concrete Class Example Usage
2.5. Summary
3. Inheritance Strategy:Join
3.1. Join Strategy Overview
3.2. Join Example Database Schema
3.3. Join Example Java Mapping
3.4. Join Example Usage (Persist)
3.5. Summary
4. Inheritance Strategy:Non-Entity
4.1. Non-Entity Strategy Overview
4.2. Non-Entity Example Database Schema
4.3. Non-Entity Example Java Mapping
4.4. Non-Entity Example Usage (Persist)
4.5. Summary
5. Mixed Inheritance Strategies
5.1. Which Strategy Gets Used for Subclass?
5.2. Generated Database Schema
5.3. Summary