|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<SQLRelationship.UpdateDeleteRule>
ca.sqlpower.architect.SQLRelationship.UpdateDeleteRule
public static enum SQLRelationship.UpdateDeleteRule
Enumeration of the various rules allowed for (foreign/imported/child) columns when their parent value is updated or deleted.
| Enum Constant Summary | |
|---|---|
CASCADE
When parent value changes, child value should be modified to match new parent value. |
|
NO_ACTION
Modifying or deleting the parent value should fail if there are child records. |
|
RESTRICT
Modifying or deleting the parent value should fail if there are child records. |
|
SET_DEFAULT
Modifying or deleting the parent value should cause the child value to be set to its default. |
|
SET_NULL
The child value will be set to SQL NULL if the parent value is modified or deleted. |
|
| Method Summary | |
|---|---|
int |
getCode()
Returns the JDBC code number for this update/delete rule. |
static SQLRelationship.UpdateDeleteRule |
ruleForCode(int code)
Returns the update/delete rule associated with the given code number. |
static SQLRelationship.UpdateDeleteRule |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static SQLRelationship.UpdateDeleteRule[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final SQLRelationship.UpdateDeleteRule CASCADE
public static final SQLRelationship.UpdateDeleteRule RESTRICT
NO_ACTION
in that the constraint check will not be deferrable on some
platforms.
public static final SQLRelationship.UpdateDeleteRule SET_NULL
public static final SQLRelationship.UpdateDeleteRule NO_ACTION
RESTRICT
in that the constraint checking will be deferrable on some platforms.
This is the default update and delete rule on most database platforms.
public static final SQLRelationship.UpdateDeleteRule SET_DEFAULT
| Method Detail |
|---|
public static final SQLRelationship.UpdateDeleteRule[] values()
for(SQLRelationship.UpdateDeleteRule c : SQLRelationship.UpdateDeleteRule.values())
System.out.println(c);
public static SQLRelationship.UpdateDeleteRule 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 namepublic static SQLRelationship.UpdateDeleteRule ruleForCode(int code)
java.lang.IllegalArgumentException - if the given code number is not valid.public int getCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||