DeleteAction (Oracle - Berkeley DB Java API)
Date: 2018-05-29

com.sleepycat.persist.model

## Enum DeleteAction

- java.lang.Object
- - java.lang.Enum<DeleteAction>
  - - com.sleepycat.persist.model.DeleteAction

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DeleteAction>

      public enum DeleteAction
      extends java.lang.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.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and 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.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### 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 Detail

    - #### values

          public static DeleteAction[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DeleteAction c : DeleteAction.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DeleteAction valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved.