Top Description Fields Constructors Methods
jakarta.persistence

public final Enum InheritanceType

extends Enum<InheritanceType>
Class Inheritance

Enumerated the options for mapping entity inheritance.
Since
1.0
See Also
Inheritance#strategy

Field Summary

Modifier and TypeField and Description
public static final InheritanceType
JOINED

A table for each abstract or concrete entity class, with only the columns mapped to persistent fields and properties declared by the entity class.

public static final InheritanceType
SINGLE_TABLE

A single table for each entity class hierarchy.

public static final InheritanceType
TABLE_PER_CLASS

A table for each concrete entity class.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static InheritanceType
public static InheritanceType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

JOINEDback to summary
public static final InheritanceType JOINED

A table for each abstract or concrete entity class, with only the columns mapped to persistent fields and properties declared by the entity class.

Each class in the hierarchy has its own table, but that table does not contain columns mapped to inherited fields or properties, and so the state of an entity instance might be stored across multiple table rows. A join is used to retrieve the state of such entities.

SINGLE_TABLEback to summary
public static final InheritanceType SINGLE_TABLE

A single table for each entity class hierarchy.

Subclasses are stored together with the root class, and each entity instance is stored as a single table row.

The concrete subclass represented by a row is determined by the value held by a discriminator column.

TABLE_PER_CLASSback to summary
public static final InheritanceType TABLE_PER_CLASS

A table for each concrete entity class.

Each concrete class in the hierarchy has its own table, and each entity instance is stored as a single table row.

No discriminator column is necessary.

Constructor Detail

InheritanceTypeback to summary
private InheritanceType()

Method Detail

valueOfback to summary
public static InheritanceType valueOf(String name)
valuesback to summary
public static InheritanceType[] values()