Class ForeignKeyRIChecker


  • public class ForeignKeyRIChecker
    extends GenericRIChecker
    A Referential Integrity checker for a foreign key constraint. It makes sure the foreign key is intact. This is used for a change to a foreign key column. see ReferencedKeyRIChecker for the code that validates changes to referenced keys.
    • Method Detail

      • doCheck

        void doCheck​(Activation a,
                     ExecRow row,
                     boolean restrictCheckOnly,
                     int deferredRowReq)
              throws StandardException
        Check that the row either has a null column(s), or corresponds to a row in the referenced key.

        If the referenced key is found, then it is locked when this method returns. The lock is held until the next call to doCheck() or close().

        Specified by:
        doCheck in class GenericRIChecker
        Parameters:
        a - the activation
        row - the row to check
        restrictCheckOnly - true if the check is relevant only for RESTRICTED referential action.
        deferredRowReq - dummy (interface obligation only)
        Throws:
        StandardException - on unexpected error, or on a foreign key violation
      • getRICheckIsolationLevel

        int getRICheckIsolationLevel()
        Get the isolation level for the scan for the RI check. NOTE: The level will eventually be instantaneous locking once the implementation changes.
        Overrides:
        getRICheckIsolationLevel in class GenericRIChecker
        Returns:
        The isolation level for the scan for the RI check.