org.apache.derby.impl.sql.execute
Class ReferencedKeyRIChecker

java.lang.Object
  extended by org.apache.derby.impl.sql.execute.GenericRIChecker
      extended by org.apache.derby.impl.sql.execute.ReferencedKeyRIChecker

public class ReferencedKeyRIChecker
extends GenericRIChecker

A Referential Integrity checker for a change to a referenced key (primary or unique). Makes sure that all the referenced key row is not referenced by any of its foreign keys. see ForeignKeyRIChecker for the code that validates changes to foreign keys.


Field Summary
 
Fields inherited from class org.apache.derby.impl.sql.execute.GenericRIChecker
fkDcocis, fkInfo, fkScocis, refDcoci, refScoci, tc
 
Constructor Summary
ReferencedKeyRIChecker(TransactionController tc, FKInfo fkinfo)
           
 
Method Summary
(package private)  void doCheck(ExecRow row, boolean restrictCheckOnly)
          Check that the row either has a null column(s), or has no corresponding foreign keys.
 
Methods inherited from class org.apache.derby.impl.sql.execute.GenericRIChecker
close, doCheck, getRICheckIsolationLevel, getScanController, isAnyFieldNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferencedKeyRIChecker

ReferencedKeyRIChecker(TransactionController tc,
                       FKInfo fkinfo)
                 throws StandardException
Parameters:
tc - the xact controller
fkinfo - the foreign key information
Throws:
StandardException - Thrown on failure
Method Detail

doCheck

void doCheck(ExecRow row,
             boolean restrictCheckOnly)
       throws StandardException
Check that the row either has a null column(s), or has no corresponding foreign keys.

If a foreign key is found, an exception is thrown. If not, the scan is closed.

Specified by:
doCheck in class GenericRIChecker
Parameters:
row - the row to check
Throws:
StandardException - on unexpected error, or on a primary/unique key violation

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.