Package io.permazen.core
Enum Class DeleteAction
- All Implemented Interfaces:
Serializable
,Comparable<DeleteAction>
,Constable
Describes what action to take when an object that is still referred to by some other object is deleted.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAlso delete the object containing the reference.Disallow deleting the object, instead throwingReferencedObjectException
.Do nothing.Remove the reference, either by setting it to null (in the case of aSimpleField
in an object), or by removing the corresponding collection element or map entry (in the case of aComplexField
sub-field). -
Method Summary
Modifier and TypeMethodDescriptionstatic DeleteAction
Returns 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
-
IGNORE
Do nothing. The reference will still exist, but subsequent attempts to access the fields of the deleted object will result inDeletedObjectException
. -
EXCEPTION
Disallow deleting the object, instead throwingReferencedObjectException
. This is the default if not specified.Note: deleting an object that is only referred to by itself will not cause any exception to be thrown.
-
UNREFERENCE
Remove the reference, either by setting it to null (in the case of aSimpleField
in an object), or by removing the corresponding collection element or map entry (in the case of aComplexField
sub-field). -
DELETE
Also delete the object containing the reference. This action will be repeated recursively, if necessary.
-
-
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
-