public enum CascadeAction extends Enum<CascadeAction>
ReferentialAction
which is specifically for a ForeignKey
constraint. This enumeration controls how entities in relational associations are persisted and
updated when their containing entity is modified.Enum Constant and Description |
---|
DELETE
When the parent element is deleted its associated elements are also deleted.
|
NONE
When a associative element is added no action will be taken, this element must be persisted
before the object referencing it is persisted.
|
SAVE
When a associative element is added it will be persisted (inserted or updated) if required.
|
Modifier and Type | Method and Description |
---|---|
static CascadeAction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CascadeAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CascadeAction NONE
public static final CascadeAction SAVE
public static final CascadeAction DELETE
public static CascadeAction[] values()
for (CascadeAction c : CascadeAction.values()) System.out.println(c);
public static CascadeAction 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 null