| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final int | constraintType
public interface to this descriptor:
|
| private ConstraintDescriptorList | |
| private ConstraintDescriptorList | |
| private boolean | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| protected | ReferencedKeyConstraintDescriptor(int
The type of the constraint constraintType, 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 involved in the constraint columns, UUID UUID of constraint constraintId, UUID The UUID for the backing index indexId, SchemaDescriptor The SchemaDescriptor for the constraint schemaDesc, boolean is the constraint enforced? enforced, int number of FKs (enforced only) referenceCount)Constructor for a KeyConstraintDescriptorImpl |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public int | |
| public final int | getConstraintType()
Implements abstract org. Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK). |
| public ConstraintDescriptorList | Returns: the list of constraints (ConstraintDescriptorListImpl)ConstraintDescriptor.(ENABLED|DISABLED|ALL) type)Get the referencing foreign key constraints |
| public ConstraintDescriptorList | Returns: list of constraintsConstraintDescriptor.(ENABLED|DISABLED|ALL) type)Am I referenced by a FK on another table? |
| public int | Returns: the number of fksOverrides org. Get the number of enforced fks that reference this key. |
| public boolean | Returns: true/falseConstraintDescriptorList for the table cdl, int ConstraintDescriptor.(ENABLED|DISABLED|ALL) type)Am I referenced by a FK on the same table? |
| public int | |
| public boolean | Returns: falseOverrides org. Is this constraint referenced? |
| 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? |
| checkedSelfReferencing | back to summary |
|---|---|
| private boolean checkedSelfReferencing | |
| constraintType | back to summary |
|---|---|
| private final int constraintType public interface to this descriptor:
| |
| fkConstraintList | back to summary |
|---|---|
| private ConstraintDescriptorList fkConstraintList | |
| fkEnabledConstraintList | back to summary |
|---|---|
| private ConstraintDescriptorList fkEnabledConstraintList | |
| hasSelfReferencing | back to summary |
|---|---|
| private boolean hasSelfReferencing | |
| referenceCount | back to summary |
|---|---|
| pack-priv int referenceCount | |
| ReferencedKeyConstraintDescriptor | back to summary |
|---|---|
| protected ReferencedKeyConstraintDescriptor(int constraintType, DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] columns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean enforced, int referenceCount) Constructor for a KeyConstraintDescriptorImpl
| |
| checkType | back to summary |
|---|---|
| private void checkType(int type) throws StandardException | |
| decrementReferenceCount | back to summary |
|---|---|
| public int decrementReferenceCount() Decrement the reference count by one.
| |
| getConstraintType | back to summary |
|---|---|
| public final int getConstraintType() Implements abstract org. Doc from org. Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).
| |
| getForeignKeyConstraints | back to summary |
|---|---|
| public ConstraintDescriptorList getForeignKeyConstraints(int type) throws StandardException Get the referencing foreign key constraints
| |
| getNonSelfReferencingFK | back to summary |
|---|---|
| public ConstraintDescriptorList getNonSelfReferencingFK(int type) throws StandardException Am I referenced by a FK on another table? Return the list of those foreign constraints.
| |
| getReferenceCount | back to summary |
|---|---|
| public int getReferenceCount() Overrides org. Get the number of enforced fks that reference this key.
| |
| hasSelfReferencingFK | back to summary |
|---|---|
| public boolean hasSelfReferencingFK(ConstraintDescriptorList cdl, int type) throws StandardException Am I referenced by a FK on the same table?
| |
| incrementReferenceCount | back to summary |
|---|---|
| public int incrementReferenceCount() Bump the reference count by one.
| |
| isReferenced | back to summary |
|---|---|
| public boolean isReferenced() Overrides org. Is this constraint referenced? Returns true if there are enforced fks that reference this constraint.
| |
| 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? For referenced keys, fire if referenced by a fk, and stmt is delete or bulk insert replace, or stmt is update and columns intersect.
| |