Documentation of 'org.apache.derby.iapi.sql.dictionary.ForeignKeyConstraintDescriptor' Java class
ForeignKeyConstraintDescriptor
org.apache.derby.iapi.sql.dictionary

Class ForeignKeyConstraintDescriptor

    • Method Detail

      • getReferencedConstraintId

        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.
        Returns:
        the constraint id
        Throws:
        StandardException - on error
      • getConstraintType

        public int getConstraintType()
        Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).
        Specified by:
        getConstraintType in class ConstraintDescriptor
        Returns:
        An identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).
      • needsToFire

        public boolean needsToFire(int stmtType,
                                   int[] modifiedCols)
        Does this constraint need to fire on this type of DML? True if insert or update and columns intersect
        Specified by:
        needsToFire in class ConstraintDescriptor
        Parameters:
        stmtType - the type of DML (StatementType.INSERT|StatementType.UPDATE|StatementType.DELETE)
        modifiedCols - the columns modified, or null for all
        Returns:
        true/false
      • isSelfReferencingFK

        public boolean isSelfReferencingFK()
                                    throws StandardException
        Am I a self-referencing FK? True if my referenced constraint is on the same table as me.
        Returns:
        true/false
        Throws:
        StandardException - on error
      • getRaDeleteRule

        public int getRaDeleteRule()
        Gets a referential action rule on a DELETE
        Returns:
        referential rule defined by the user during foreign key creattion for a delete (like CASCDE , RESTRICT ..etc)
      • getRaUpdateRule

        public int getRaUpdateRule()
        Gets a referential action rule on a UPDATE
        Returns:
        referential rule defined by the user during foreign key creattion for an UPDATE (like CASCDE , RESTRICT ..etc)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.