Enum Class DeleteAction

java.lang.Object
java.lang.Enum<DeleteAction>
com.sleepycat.persist.model.DeleteAction
All Implemented Interfaces:
Serializable, Comparable<DeleteAction>, Constable

public enum DeleteAction extends Enum<DeleteAction>
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 Constants
    Enum Constant
    Description
    The default action, ABORT, means that an exception is thrown in order to abort the current transaction.
    If CASCADE is specified, then this entity will be deleted also, which could in turn trigger further deletions, causing a cascading effect.
    If NULLIFY is specified, then the secondary key in this entity is set to null and this entity is updated.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static DeleteAction[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ABORT

      public static final DeleteAction ABORT
      The default action, ABORT, means that an exception is thrown in order to abort the current transaction.
    • CASCADE

      public static final DeleteAction CASCADE
      If CASCADE is specified, then this entity will be deleted also, which could in turn trigger further deletions, causing a cascading effect.
    • NULLIFY

      public static final DeleteAction NULLIFY
      If 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.
  • Method Details

    • values

      public static DeleteAction[] 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

      public static DeleteAction valueOf(String name)
      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 name
      NullPointerException - if the argument is null