public enum SForeignKeyDeleteAction extends java.lang.Enum<SForeignKeyDeleteAction>
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 SSecondaryConfig.setForeignKeyDeleteAction(com.sleepycat.client.SForeignKeyDeleteAction)
.
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.
Enum Constant and Description |
---|
ABORT
When a referenced record in the foreign key database is deleted, abort
the transaction by throwing a
SDatabaseException . |
CASCADE
When a referenced record in the foreign key database is deleted, delete
the primary database record that references it.
|
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.
|
Modifier and Type | Method and Description |
---|---|
static SForeignKeyDeleteAction |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SForeignKeyDeleteAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SForeignKeyDeleteAction ABORT
SDatabaseException
.public static final SForeignKeyDeleteAction CASCADE
public static final SForeignKeyDeleteAction NULLIFY
SForeignKeyNullifier
,
SForeignMultiKeyNullifier
public static SForeignKeyDeleteAction[] values()
for (SForeignKeyDeleteAction c : SForeignKeyDeleteAction.values()) System.out.println(c);
public static SForeignKeyDeleteAction valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullCopyright (c) 2016, 2019 Oracle and/or its affiliates. All rights reserved.