Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 3.3.82
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.je
Class ForeignKeyDeleteAction

    java.lang.Object
      com.sleepycat.je.ForeignKeyDeleteAction

    public class ForeignKeyDeleteAction

extends Object

The action taken when a referenced record in the foreign key database is deleted.

The delete action applies to a secondary database that is configured to have a foreign key integrity constraint. The delete action is specified by calling `SecondaryConfig.setForeignKeyDeleteAction(com.sleepycat.je.ForeignKeyDeleteAction)`.

When a record in the foreign key database is deleted, it is checked to see if it is referenced by any record in the associated secondary database. If the key is referenced, the delete action is applied. By default, the delete action is `ABORT`.

See Also:
  `SecondaryConfig`

Field Summary
`static ForeignKeyDeleteAction` | `ABORT` When a referenced record in the foreign key database is deleted, abort the transaction by throwing a `DatabaseException`.
`static ForeignKeyDeleteAction` | `CASCADE` When a referenced record in the foreign key database is deleted, delete the primary database record that references it.
`static ForeignKeyDeleteAction` | `NULLIFY` When a referenced record in the foreign key database is deleted, set the reference to null in the primary database record that references it, thereby deleting the secondary key.

Method Summary
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ABORT

    public static final ForeignKeyDeleteAction ABORT

  When a referenced record in the foreign key database is deleted, abort the transaction by throwing a `DatabaseException`.

### CASCADE

    public static final ForeignKeyDeleteAction CASCADE

  When a referenced record in the foreign key database is deleted, delete the primary database record that references it.

### NULLIFY

    public static final ForeignKeyDeleteAction NULLIFY

  When a referenced record in the foreign key database is deleted, set the reference to null in the primary database record that references it, thereby deleting the secondary key. @see ForeignKeyNullifier @see ForeignMultiKeyNullifier

Method Detail

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 3.3.82
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004,2008 Oracle. All rights reserved.