Dependable, Dependent, Providerpublic class ForeignKeyConstraintDescriptor extends KeyConstraintDescriptor
| Modifier and Type | Field | Description |
|---|---|---|
(package private) int |
raDeleteRule |
|
(package private) int |
raUpdateRule |
|
(package private) ReferencedKeyConstraintDescriptor |
referencedConstraintDescriptor |
interface to this descriptor
public ReferencedKeyConstraintDescriptor getReferencedConstraint()
throws StandardException;
public UUID getReferencedConstraintId()
throws StandardException;
public boolean isSelfReferencingFK()
throws StandardException;
|
(package private) UUID |
referencedConstraintId |
ALL, constraintId, constraintName, DISABLED, ENABLED, SYSCONSTRAINTS_STATE_FIELD, tableACTIVATION, ALIAS, COLUMNS_IN_TABLE, COLUMNS_PERMISSION, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PERM, PREPARED_STATEMENT, ROLE_GRANT, ROUTINE_PERMISSION, SCHEMA, SEQUENCE, STORED_PREPARED_STATEMENT, TABLE, TABLE_PERMISSION, TRIGGER, VIEWindexId| Modifier | Constructor | Description |
|---|---|---|
(package private) |
ForeignKeyConstraintDescriptor(DataDictionary dataDictionary,
TableDescriptor table,
java.lang.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
|
protected |
ForeignKeyConstraintDescriptor(DataDictionary dataDictionary,
TableDescriptor table,
java.lang.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
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getConstraintType() |
Gets an identifier telling what type of descriptor it is
(UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).
|
int |
getRaDeleteRule() |
Gets a referential action rule on a DELETE
|
int |
getRaUpdateRule() |
Gets a referential action rule on a UPDATE
|
ReferencedKeyConstraintDescriptor |
getReferencedConstraint() |
Get the constraint that this FK references.
|
UUID |
getReferencedConstraintId() |
Get the constraint id for the constraint that this FK references.
|
boolean |
isSelfReferencingFK() |
Am I a self-referencing FK?
|
boolean |
needsToFire(int stmtType,
int[] modifiedCols) |
Does this constraint need to fire on this type of
DML?
|
areColumnsComparable, columnIntersects, deferrable, doColumnsIntersect, drop, enforced, getClassType, getColumnDescriptors, getConstraintName, getConstraintText, getDependableFinder, getDescriptorName, getDescriptorType, getKeyColumns, getObjectID, getObjectName, getReferenceCount, getReferencedColumns, getSchemaDescriptor, getTableDescriptor, getTableId, getUUID, initiallyDeferred, isReferenced, isValid, makeInvalid, prepareToInvalidate, setDeferrable, setEnforced, setInitiallyDeferredisPersistentgetConglomerateId, getIndexConglomerateDescriptor, getIndexId, getIndexUUIDString, hasBackingIndex, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetColumnDependableFinder, getDataDictionary, getDependableFinder, isPersistent, setDataDictionaryReferencedKeyConstraintDescriptor referencedConstraintDescriptor
UUID referencedConstraintId
int raDeleteRule
int raUpdateRule
protected ForeignKeyConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, java.lang.String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, ReferencedKeyConstraintDescriptor referencedConstraintDescriptor, boolean enforced, int raDeleteRule, int raUpdateRule)
dataDictionary - The data dictionary that this descriptor lives intable - The descriptor of the table the constraint is onconstraintName - The name of the constraint.deferrable - If the constraint can be deferred.initiallyDeferred - If the constraint starts life deferred.fkColumns - columns in the foreign keyconstraintId - UUID of constraintindexId - The UUID for the backing indexschemaDesc - The SchemaDescriptor for the constraintreferencedConstraintDescriptor - is referenced constraint descriptorenforced - is the constraint enforced?raDeleteRule - The ON DELETE action ruleraUpdateRule - The ON UPDATE action ruleForeignKeyConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, java.lang.String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, UUID referencedConstraintId, boolean enforced, int raDeleteRule, int raUpdateRule)
dataDictionary - The data dictionary that this descriptor lives intable - The descriptor of the table the constraint is onconstraintName - The name of the constraint.deferrable - If the constraint can be deferred.initiallyDeferred - If the constraint starts life deferred.fkColumns - columns in the foreign keyconstraintId - UUID of constraintindexId - The UUID for the backing indexschemaDesc - The SchemaDescriptor for the constraintreferencedConstraintId - is referenced constraint idenforced - true if this constraint is enforcedraDeleteRule - The ON DELETE action ruleraUpdateRule - The ON UPDATE action rulepublic ReferencedKeyConstraintDescriptor getReferencedConstraint() throws StandardException
StandardException - on errorpublic UUID getReferencedConstraintId() throws StandardException
StandardException - on errorpublic int getConstraintType()
getConstraintType in class ConstraintDescriptorpublic boolean needsToFire(int stmtType,
int[] modifiedCols)
needsToFire in class ConstraintDescriptorstmtType - the type of DML
(StatementType.INSERT|StatementType.UPDATE|StatementType.DELETE)modifiedCols - the columns modified, or null for allpublic boolean isSelfReferencingFK()
throws StandardException
StandardException - on errorpublic int getRaDeleteRule()
public int getRaUpdateRule()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.