Home » db-derby-10.5.3.0 » org.apache.derby.iapi.sql.dictionary » [javadoc | source]
org.apache.derby.iapi.sql.dictionary
public class: ReferencedKeyConstraintDescriptor [javadoc | source]
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

All Implemented Interfaces:
    Dependent, Provider, UniqueTupleDescriptor

A ReferencedConstraintDeescriptor is a primary key or a unique key that is referenced by a foreign key.
Field Summary
 int referenceCount     
Fields inherited from org.apache.derby.iapi.sql.dictionary.KeyConstraintDescriptor:
indexId
Fields inherited from org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor:
ENABLED,  DISABLED,  ALL,  SYSCONSTRAINTS_STATE_FIELD,  table,  constraintName,  isEnabled,  constraintId
Constructor:
 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) 
    Constructor for a KeyConstraintDescriptorImpl
    Parameters:
    constraintType - The type of the constraint
    dataDictionary - The data dictionary that this descriptor lives in
    table - The descriptor of the table the constraint is on
    constraintName - The name of the constraint.
    deferrable - If the constraint can be deferred.
    initiallyDeferred - If the constraint starts life deferred.
    columns - columns involved in the constraint
    constraintId - UUID of constraint
    indexId - The UUID for the backing index
    schemaDesc - The SchemaDescriptor for the constraint
    isEnabled - is the constraint enabled?
    referenceCount - number of FKs (enabled only)
Method from org.apache.derby.iapi.sql.dictionary.ReferencedKeyConstraintDescriptor Summary:
decrementReferenceCount,   getConstraintType,   getForeignKeyConstraints,   getReferenceCount,   hasNonSelfReferencingFK,   hasSelfReferencingFK,   incrementReferenceCount,   isReferenced,   needsToFire
Methods from org.apache.derby.iapi.sql.dictionary.KeyConstraintDescriptor:
getConglomerateId,   getIndexConglomerateDescriptor,   getIndexId,   getIndexUUIDString,   hasBackingIndex,   toString
Methods from org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor:
areColumnsComparable,   columnIntersects,   deferrable,   doColumnsIntersect,   drop,   getClassType,   getColumnDescriptors,   getConglomerateId,   getConstraintName,   getConstraintText,   getConstraintType,   getDependableFinder,   getDescriptorName,   getDescriptorType,   getKeyColumns,   getObjectID,   getObjectName,   getReferenceCount,   getReferencedColumns,   getSchemaDescriptor,   getTableDescriptor,   getTableId,   getUUID,   hasBackingIndex,   initiallyDeferred,   isEnabled,   isReferenced,   isValid,   makeInvalid,   needsToFire,   prepareToInvalidate,   setDisabled,   setEnabled,   toString
Methods from org.apache.derby.iapi.sql.dictionary.TupleDescriptor:
getColumnDependableFinder,   getDataDictionary,   getDependableFinder,   getDescriptorName,   getDescriptorType,   isPersistent,   setDataDictionary
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.derby.iapi.sql.dictionary.ReferencedKeyConstraintDescriptor Detail:
 public int decrementReferenceCount() 
    Decrement the reference count by one.
 public final int getConstraintType() 
 public ConstraintDescriptorList getForeignKeyConstraints(int type) throws StandardException 
    Get the referencing foreign key constraints
 public int getReferenceCount() 
    Get the number of enabled fks that reference this key.
 public boolean hasNonSelfReferencingFK(int type) throws StandardException 
    Am I referenced by a FK on another table?
 public boolean hasSelfReferencingFK(ConstraintDescriptorList cdl,
    int type) throws StandardException 
    Am I referenced by a FK on the same table?
 public int incrementReferenceCount() 
    Bump the reference count by one.
 public boolean isReferenced() 
    Is this constraint referenced? Returns true if there are enabled fks that reference this constraint.
 public boolean needsToFire(int stmtType,
    int[] modifiedCols) 
    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.