| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv int | |
| pack-priv ReferencedKeyConstraintDescriptor | referencedConstraintDescriptor
interface to this descriptor
|
| pack-priv UUID |
| Access | Constructor and Description |
|---|---|
| protected | ForeignKeyConstraintDescriptor(DataDictionary
The data dictionary that this descriptor lives in dataDictionary, TableDescriptor The descriptor of the table the constraint is on table, String The name of the constraint. constraintName, boolean If the constraint can be deferred. deferrable, boolean If the constraint starts life deferred. initiallyDeferred, int[] columns in the foreign key fkColumns, UUID UUID of constraint constraintId, UUID The UUID for the backing index indexId, SchemaDescriptor The SchemaDescriptor for the constraint schemaDesc, ReferencedKeyConstraintDescriptor is referenced constraint descriptor referencedConstraintDescriptor, boolean is the constraint enforced? enforced, int The raDeleteRule, int ON DELETE action ruleThe raUpdateRule)ON UPDATE action ruleConstructor for a ForeignKeyConstraintDescriptor |
| pack-priv | ForeignKeyConstraintDescriptor(DataDictionary
The data dictionary that this descriptor lives in dataDictionary, TableDescriptor The descriptor of the table the constraint is on table, String The name of the constraint. constraintName, boolean If the constraint can be deferred. deferrable, boolean If the constraint starts life deferred. initiallyDeferred, int[] columns in the foreign key fkColumns, UUID UUID of constraint constraintId, UUID The UUID for the backing index indexId, SchemaDescriptor The SchemaDescriptor for the constraint schemaDesc, UUID is referenced constraint id referencedConstraintId, boolean true if this constraint is enforcedThe raDeleteRule, int ON DELETE action ruleThe raUpdateRule)ON UPDATE action ruleConstructor for a ForeignKeyConstraintDescriptor |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: An identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).Implements abstract org. Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK). |
| public int | Returns: referential rule defined by the user during foreign key creattion for a delete (like CASCDE , RESTRICT ..etc)Gets a referential action rule on a DELETE |
| public int | Returns: referential rule defined by the user during foreign key creattion for an UPDATE (like CASCDE , RESTRICT ..etc)Gets a referential action rule on a UPDATE |
| public ReferencedKeyConstraintDescriptor | |
| public UUID | Returns: the constraint idGet the constraint id for the constraint that this FK references. |
| public boolean | |
| public boolean | Returns: true/falsethe type of DML
(StatementType.INSERT|StatementType.UPDATE|StatementType.DELETE) stmtType, int[] the columns modified, or null for all modifiedCols)Implements abstract org. Does this constraint need to fire on this type of DML? |
| raDeleteRule | back to summary |
|---|---|
| pack-priv int raDeleteRule | |
| raUpdateRule | back to summary |
|---|---|
| pack-priv int raUpdateRule | |
| referencedConstraintDescriptor | back to summary |
|---|---|
| pack-priv ReferencedKeyConstraintDescriptor referencedConstraintDescriptor interface to this descriptor
| |
| referencedConstraintId | back to summary |
|---|---|
| pack-priv UUID referencedConstraintId | |
| ForeignKeyConstraintDescriptor | back to summary |
|---|---|
| protected ForeignKeyConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, ReferencedKeyConstraintDescriptor referencedConstraintDescriptor, boolean enforced, int raDeleteRule, int raUpdateRule) Constructor for a ForeignKeyConstraintDescriptor
| |
| ForeignKeyConstraintDescriptor | back to summary |
|---|---|
| pack-priv ForeignKeyConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, UUID referencedConstraintId, boolean enforced, int raDeleteRule, int raUpdateRule) Constructor for a ForeignKeyConstraintDescriptor
| |
| getConstraintType | back to summary |
|---|---|
| public int getConstraintType() Implements abstract org. Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).
| |
| getRaDeleteRule | back to summary |
|---|---|
| public int getRaDeleteRule() Gets a referential action rule on a DELETE
| |
| getRaUpdateRule | back to summary |
|---|---|
| public int getRaUpdateRule() Gets a referential action rule on a UPDATE
| |
| getReferencedConstraint | back to summary |
|---|---|
| public ReferencedKeyConstraintDescriptor getReferencedConstraint() throws StandardException Get the constraint that this FK references. Will return either a primary key or a unique key constraint.
| |
| getReferencedConstraintId | back to summary |
|---|---|
| public UUID getReferencedConstraintId() throws StandardException Get the constraint id for the constraint that this FK references. Will return either a primary key or a unique key constriant.
| |
| isSelfReferencingFK | back to summary |
|---|---|
| public boolean isSelfReferencingFK() throws StandardException Am I a self-referencing FK? True if my referenced constraint is on the same table as me.
| |
| needsToFire | back to summary |
|---|---|
| public boolean needsToFire(int stmtType, int[] modifiedCols) Implements abstract org. Does this constraint need to fire on this type of DML? True if insert or update and columns intersect
| |