public static enum ForeignKey.ReferentialAction extends java.lang.Enum<ForeignKey.ReferentialAction>
Perform an action on referenced rows on update and delete.
http://www.sqlite.org/foreignkeys.html#fk_actions| Enum Constant and Description |
|---|
CASCADE
A "CASCADE" action propagates the delete or update operation on the parent key to each dependent child key.
|
NO_ACTION
Configuring "NO ACTION" means just that: when a parent key is modified or deleted from the database,
no special action is taken.
|
NONE
No action.
|
RESTRICT
The "RESTRICT" action means that the application is prohibited from deleting (for ON DELETE RESTRICT) or
modifying (for ON UPDATE RESTRICT) a parent key when there exists one or more child keys mapped to it.
|
SET_DEFAULT
The "SET DEFAULT" actions are similar to "SET NULL", except that each of the child key columns is set to
contain the columns default value instead of NULL.
|
SET_NULL
If the configured action is "SET NULL", then when a parent key is deleted (for ON DELETE SET NULL) or
modified (for ON UPDATE SET NULL), the child key columns of all rows in the child table that mapped to the
parent key are set to contain SQL NULL values.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
keyword()
Returns a keyword string for the referential action.
|
static ForeignKey.ReferentialAction |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ForeignKey.ReferentialAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ForeignKey.ReferentialAction NONE
public static final ForeignKey.ReferentialAction SET_NULL
public static final ForeignKey.ReferentialAction SET_DEFAULT
public static final ForeignKey.ReferentialAction CASCADE
public static final ForeignKey.ReferentialAction RESTRICT
public static final ForeignKey.ReferentialAction NO_ACTION
public static ForeignKey.ReferentialAction[] values()
for (ForeignKey.ReferentialAction c : ForeignKey.ReferentialAction.values()) System.out.println(c);
public static ForeignKey.ReferentialAction 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 nullpublic java.lang.String keyword()