ca.sqlpower.architect
Enum SQLRelationship.Deferrability

java.lang.Object
  extended by java.lang.Enum<SQLRelationship.Deferrability>
      extended by ca.sqlpower.architect.SQLRelationship.Deferrability
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SQLRelationship.Deferrability>
Enclosing class:
SQLRelationship

public static enum SQLRelationship.Deferrability
extends java.lang.Enum<SQLRelationship.Deferrability>

The enumeration of all referential integrity constraint checking policies.


Enum Constant Summary
INITIALLY_DEFERRED
          Indicates the constrain is deferrable, and checking is deferred by default unless the current transaction has been set for immediate constraint checking.
INITIALLY_IMMEDIATE
          Indicates the constrain is deferrable, and checking is performed immediately unless the current transaction has been set for deferred constraint checking.
NOT_DEFERRABLE
          Indicates that the checking for this constraint must always be immediate regardless of the current transaction setting.
 
Method Summary
 int getCode()
          Returns the JDBC code number for this deferrability rule.
static SQLRelationship.Deferrability ruleForCode(int code)
          Returns the enumeration value associated with the given code number.
static SQLRelationship.Deferrability ruleForCode(int code, SQLRelationship.Deferrability defaultValue)
          Returns the enumeration value associated with the given code number, or the given default value if the given code number is not valid.
static SQLRelationship.Deferrability valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SQLRelationship.Deferrability[] 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

INITIALLY_DEFERRED

public static final SQLRelationship.Deferrability INITIALLY_DEFERRED
Indicates the constrain is deferrable, and checking is deferred by default unless the current transaction has been set for immediate constraint checking.


INITIALLY_IMMEDIATE

public static final SQLRelationship.Deferrability INITIALLY_IMMEDIATE
Indicates the constrain is deferrable, and checking is performed immediately unless the current transaction has been set for deferred constraint checking.


NOT_DEFERRABLE

public static final SQLRelationship.Deferrability NOT_DEFERRABLE
Indicates that the checking for this constraint must always be immediate regardless of the current transaction setting.

Method Detail

values

public static final SQLRelationship.Deferrability[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(SQLRelationship.Deferrability c : SQLRelationship.Deferrability.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static SQLRelationship.Deferrability valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

ruleForCode

public static SQLRelationship.Deferrability ruleForCode(int code)
Returns the enumeration value associated with the given code number. The code numbers are defined in the JDBC specification.

Throws:
java.lang.IllegalArgumentException - if the given code number is not valid.

ruleForCode

public static SQLRelationship.Deferrability ruleForCode(int code,
                                                        SQLRelationship.Deferrability defaultValue)
Returns the enumeration value associated with the given code number, or the given default value if the given code number is not valid. This method exists mainly for backward compatibility with old projects where all the deferrability rules were defaulted to 0, which is an invalid code. New code should normally be written to use ruleForCode(int), which throws an exception when asked for an invalid code.


getCode

public int getCode()
Returns the JDBC code number for this deferrability rule.



Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca