public static enum EnumMappingTable.DeleteAction extends Enum<EnumMappingTable.DeleteAction>
Enum Constant and Description |
---|
HARD_DELETE
Indicates that the hard deletes will be performed, either to
the database table rows, or to the java enum constants,
basing on
EnumMappingTable.mappingType() of this annotation. |
NO_ACTION
Indicates that the deletes will not be performed, neither to
the database table, nor to the java enum.
|
SOFT_DELETE
Indicates that the soft deletes will be performed to the
database table rows.
|
Modifier and Type | Method and Description |
---|---|
static EnumMappingTable.DeleteAction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EnumMappingTable.DeleteAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnumMappingTable.DeleteAction NO_ACTION
public static final EnumMappingTable.DeleteAction SOFT_DELETE
EnumMappingTable.mappingType()
of this
annotation evaluates to EnumMappingTable.MappingType.TABLE
then
special column with the name specified in
EnumMappingTable.deletedColumnName()
of INT
-compatible
type must be holding the soft deleted state that isn't equals
to 0
if the row is deleted. Enum constants will
be hard deleted in this case nonetheless and the deleted
enums will be persisted as soft deleted ones to the database
table. If EnumMappingTable.mappingType()
of this annotation evaluates
to EnumMappingTable.MappingType.ENUM
then an additional database table
with the name equal to EnumMappingTable.tableName()
with an added
"_history" string will be created that will be holding all
deleted instances of java enums if they are encountered in a
corresponding table. This helps keep java enum and database
table representations in line with each other and track
historical values of java enum constants used previously.public static final EnumMappingTable.DeleteAction HARD_DELETE
EnumMappingTable.mappingType()
of this annotation. This helps
keep java enum and database table representations in line
with each other without tracking historical values of java
enum constants used previously. This is the default type.public static EnumMappingTable.DeleteAction[] values()
for (EnumMappingTable.DeleteAction c : EnumMappingTable.DeleteAction.values()) System.out.println(c);
public static EnumMappingTable.DeleteAction valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2015–2021 OmniFaces. All rights reserved.