java.io.Serializable
, java.lang.Comparable<DeleteAction>
public enum DeleteAction extends java.lang.Enum<DeleteAction>
SecondaryKey.onRelatedEntityDelete()
annotation.Enum Constant | Description |
---|---|
ABORT |
The default action,
ABORT , means that an exception is thrown in
order to abort the current transaction. |
CASCADE |
If
CASCADE is specified, then this entity will be deleted also,
which could in turn trigger further deletions, causing a cascading
effect. |
NULLIFY |
If
NULLIFY is specified, then the secondary key in this entity
is set to null and this entity is updated. |
Modifier and Type | Method | Description |
---|---|---|
static DeleteAction |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static DeleteAction[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DeleteAction ABORT
ABORT
, means that an exception is thrown in
order to abort the current transaction.public static final DeleteAction CASCADE
CASCADE
is specified, then this entity will be deleted also,
which could in turn trigger further deletions, causing a cascading
effect.public static final DeleteAction NULLIFY
NULLIFY
is specified, then the secondary key in this entity
is set to null and this entity is updated. For a secondary key field
that has an array or collection type, the array or collection element
will be removed by this action. The secondary key field must have a
reference (not a primitive) type in order to specify this action.public static DeleteAction[] values()
for (DeleteAction c : DeleteAction.values()) System.out.println(c);
public static DeleteAction valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullCopyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.