Class RISetChecker


  • public class RISetChecker
    extends java.lang.Object
    Checks a set or referential integrity constraints. Used to shield the caller from ReferencedKeyRIChecker and ForeignKeyRICheckers.
    • Method Detail

      • reopen

        void reopen()
             throws StandardException
        Do any work needed to reopen our ri checkers for another round of checks. Must do a close() first.
        Throws:
        StandardException - on error
      • doPKCheck

        public void doPKCheck​(Activation a,
                              ExecRow row,
                              boolean restrictCheckOnly,
                              int deferredRowReq)
                       throws StandardException
        Check that there are no referenced primary keys in the passed in row. So for each foreign key that references a primary key constraint, make sure that there is no row that matches the values in the passed in row.
        Parameters:
        a - The activation
        row - The row to check
        restrictCheckOnly - true if the check is relevant only for RESTRICTED referential action.
        deferredRowReq - For referenced keys: The required number of duplicates that need to be present. Only used if postCheck==false.
        Throws:
        StandardException - on unexpected error, or on a primary/unique key violation
      • doFKCheck

        public void doFKCheck​(Activation a,
                              ExecRow row)
                       throws StandardException
        Check that everything in the row is ok, i.e. that there are no foreign keys in the passed in row that have invalid values.
        Parameters:
        a - the activation
        row - the row to check
        Throws:
        StandardException - on unexpected error, or on a primary/unique key violation
      • doRICheck

        public void doRICheck​(Activation a,
                              int index,
                              ExecRow row,
                              boolean restrictCheckOnly,
                              int deferredRowReq)
                       throws StandardException
        Execute the specific RI check on the passed in row.
        Parameters:
        a - the activation
        index - index into fkInfo
        row - the row to check
        restrictCheckOnly - true if the check is relevant only for RESTRICTED referential action.
        deferredRowReq - For referenced keys: the required number of duplicates that need to be present. Only used if postCheck==false.
        Throws:
        StandardException - on unexpected error, or on a primary/unique key violation