Package adalid.core.enums
Enum InheritanceMappingStrategy
- java.lang.Object
-
- java.lang.Enum<InheritanceMappingStrategy>
-
- adalid.core.enums.InheritanceMappingStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<InheritanceMappingStrategy>
public enum InheritanceMappingStrategy extends Enum<InheritanceMappingStrategy>
- Author:
- Jorge Campins
-
-
Enum Constant Summary
Enum Constants Enum Constant Description JOINEDJoined Subclass Strategy.SINGLE_TABLESingleTable per Class Hierarchy Strategy.TABLE_PER_CLASSTable per Concrete Class Strategy.UNSPECIFIED
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InheritanceMappingStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static InheritanceMappingStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNSPECIFIED
public static final InheritanceMappingStrategy UNSPECIFIED
-
SINGLE_TABLE
public static final InheritanceMappingStrategy SINGLE_TABLE
SingleTable per Class Hierarchy Strategy. All classes in the hierarchy are mapped to a single table in the database. This table has a discriminator column, a column that contains a value that identifies the subclass to which the instance represented by the row belongs.
-
JOINED
public static final InheritanceMappingStrategy JOINED
Joined Subclass Strategy. The root of the class hierarchy is represented by a single table, and each subclass has a separate table that only contains those fields specific to that subclass. That is, the subclass table does not contain columns for inherited fields or properties. The subclass table also has a column or columns that represent its primary key, which is a foreign key to the primary key of the superclass table.
-
TABLE_PER_CLASS
public static final InheritanceMappingStrategy TABLE_PER_CLASS
Table per Concrete Class Strategy. Each concrete class is mapped to a separate table in the database. All fields or properties in the class, including inherited fields or properties, are mapped to columns in the class table in the database.
-
-
Method Detail
-
values
public static InheritanceMappingStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (InheritanceMappingStrategy c : InheritanceMappingStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InheritanceMappingStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-