Package com.sleepycat.persist.model
Enum Class DeleteAction
- All Implemented Interfaces:
Serializable,Comparable<DeleteAction>,Constable
Specifies the action to take when a related entity is deleted having a
primary key value that exists as a secondary key value for this entity.
This can be specified using a
SecondaryKey.onRelatedEntityDelete()
annotation.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe default action,ABORT, means that an exception is thrown in order to abort the current transaction.IfCASCADEis specified, then this entity will be deleted also, which could in turn trigger further deletions, causing a cascading effect.IfNULLIFYis specified, then the secondary key in this entity is set to null and this entity is updated. -
Method Summary
Modifier and TypeMethodDescriptionstatic DeleteActionReturns the enum constant of this class with the specified name.static DeleteAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ABORT
The default action,ABORT, means that an exception is thrown in order to abort the current transaction. -
CASCADE
IfCASCADEis specified, then this entity will be deleted also, which could in turn trigger further deletions, causing a cascading effect. -
NULLIFY
IfNULLIFYis 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.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-