| java.lang.Object org.apache.derby.iapi.sql.dictionary.TupleDescriptor org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor org.apache.derby.iapi.sql.dictionary.KeyConstraintDescriptor org.apache.derby.iapi.sql.dictionary.ReferencedKeyConstraintDescriptor
ReferencedKeyConstraintDescriptor | public class ReferencedKeyConstraintDescriptor extends KeyConstraintDescriptor (Code) | | A ReferencedConstraintDeescriptor is a primary key or a unique
key that is referenced by a foreign key.
author: Jamie |
Constructor Summary | |
protected | ReferencedKeyConstraintDescriptor(int constraintType, DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] columns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean isEnabled, int referenceCount) |
referenceCount | int referenceCount(Code) | | |
ReferencedKeyConstraintDescriptor | protected ReferencedKeyConstraintDescriptor(int constraintType, DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] columns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean isEnabled, int referenceCount)(Code) | | Constructor for a KeyConstraintDescriptorImpl
Parameters: constraintType - The type of the constraint Parameters: dataDictionary - The data dictionary that this descriptor lives in Parameters: table - The descriptor of the table the constraint is on Parameters: constraintName - The name of the constraint. Parameters: deferrable - If the constraint can be deferred. Parameters: initiallyDeferred - If the constraint starts life deferred. Parameters: columns - columns involved in the constraint Parameters: constraintId - UUID of constraint Parameters: indexId - The UUID for the backing index Parameters: schemaDesc - The SchemaDescriptor for the constraint Parameters: isEnabled - is the constraint enabled? Parameters: referenceCount - number of FKs (enabled only) |
decrementReferenceCount | public int decrementReferenceCount()(Code) | | Decrement the reference count by one.
the number of fks |
getConstraintType | final public int getConstraintType()(Code) | | |
getForeignKeyConstraints | public ConstraintDescriptorList getForeignKeyConstraints(int type) throws StandardException(Code) | | Get the referencing foreign key constraints
Parameters: type - ConstraintDescriptor.(ENABLED|DISABLED|ALL) the list of constraints (ConstraintDescriptorListImpl) exception: StandardException - on error |
getReferenceCount | public int getReferenceCount()(Code) | | Get the number of enabled fks that
reference this key.
the number of fks |
hasNonSelfReferencingFK | public boolean hasNonSelfReferencingFK(int type) throws StandardException(Code) | | Am I referenced by a FK on another table?
Parameters: type - ConstraintDescriptor.(ENABLED|DISABLED|ALL) true/false exception: StandardException - on error |
hasSelfReferencingFK | public boolean hasSelfReferencingFK(ConstraintDescriptorList cdl, int type) throws StandardException(Code) | | Am I referenced by a FK on the same table?
Parameters: cdl - ConstraintDescriptorList for the table Parameters: type - ConstraintDescriptor.(ENABLED|DISABLED|ALL) true/false exception: StandardException - on error |
incrementReferenceCount | public int incrementReferenceCount()(Code) | | Bump the reference count by one.
the number of fks |
isReferenced | public boolean isReferenced()(Code) | | Is this constraint referenced? Returns
true if there are enabled fks that
reference this constraint.
false |
needsToFire | public boolean needsToFire(int stmtType, int[] modifiedCols)(Code) | | 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.
Parameters: stmtType - the type of DML (StatementType.INSERT|StatementType.UPDATE|StatementType.DELETE) Parameters: modifiedCols - the columns modified, or null for all true/false |
Fields inherited from org.apache.derby.iapi.sql.dictionary.KeyConstraintDescriptor | UUID indexId(Code)(Java Doc)
|
|
|