public enum ForeignKeyAction extends Enum<ForeignKeyAction>
| Enum Constant and Description |
|---|
CASCADE
When the primary key is updated, the foreign key (imported key) is changed to agree with it.
|
INITIALLY_DEFERRED
Indicates deferrability.
|
INITIALLY_IMMEDIATE
Indicates deferrability.
|
NO_ACTION
If the primary key has been imported, it cannot be updated or deleted.
|
NOT_DEFERRABLE
Indicates deferrability.
|
RESTRICT
The primary key may not be updated if it has been imported by another table as a foreign key.
|
SET_DEFAULT
If the primary key is updated or deleted, the foreign key (imported key) is set to the default value.
|
SET_NULL
When the primary key is updated or deleted, the foreign key (imported key) is changed to
NULL.. |
| Modifier and Type | Method and Description |
|---|---|
static ForeignKeyAction |
createFromAction(int action)
Creates a foreign key action from an action code.
|
int |
getAction()
Gets the action code.
|
String |
getSql()
Gets the SQL code.
|
String |
toString() |
static ForeignKeyAction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ForeignKeyAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ForeignKeyAction CASCADE
public static final ForeignKeyAction RESTRICT
public static final ForeignKeyAction SET_NULL
NULL..public static final ForeignKeyAction NO_ACTION
public static final ForeignKeyAction SET_DEFAULT
public static final ForeignKeyAction INITIALLY_DEFERRED
public static final ForeignKeyAction INITIALLY_IMMEDIATE
public static final ForeignKeyAction NOT_DEFERRABLE
public static ForeignKeyAction[] values()
for (ForeignKeyAction c : ForeignKeyAction.values()) System.out.println(c);
public static ForeignKeyAction valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getAction()
public String getSql()
public String toString()
toString in class Enum<ForeignKeyAction>public static ForeignKeyAction createFromAction(int action)
action - the codeTentackle - a domain driven enterprise framework