public static enum ForeignKey.Deferrable extends java.lang.Enum<ForeignKey.Deferrable>
If a statement modifies the contents of the database so that an immediate foreign key constraint is in violation at the conclusion the statement, an exception is thrown and the effects of the statement are reverted . By contrast, if a statement modifies the contents of the database such that a deferred foreign key constraint is violated, the violation is not reported immediately. Deferred foreign key constraints are not checked until the transaction tries to COMMIT. For as long as the user has an open transaction, the database is allowed to exist in a state that violates any number of deferred foreign key constraints. However, COMMIT will fail as long as foreign key constraints remain in violation.
If the current statement is not inside an explicit transaction (a BEGIN/COMMIT/ROLLBACK block), then an implicit transaction is committed as soon as the statement has finished executing.
| Enum Constant and Description |
|---|
DEFERRABLE |
NONE |
NOT_DEFERRABLE |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
keyword()
Returns a keyword string for the deferrable behavior.
|
static ForeignKey.Deferrable |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ForeignKey.Deferrable[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ForeignKey.Deferrable NONE
public static final ForeignKey.Deferrable DEFERRABLE
public static final ForeignKey.Deferrable NOT_DEFERRABLE
public static ForeignKey.Deferrable[] values()
for (ForeignKey.Deferrable c : ForeignKey.Deferrable.values()) System.out.println(c);
public static ForeignKey.Deferrable 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()