Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.sql.execute
Class ForeignKeyRIChecker  view ForeignKeyRIChecker download ForeignKeyRIChecker.java

java.lang.Object
  extended byorg.apache.derby.impl.sql.execute.GenericRIChecker
      extended byorg.apache.derby.impl.sql.execute.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.


Field Summary
 
Fields inherited from class org.apache.derby.impl.sql.execute.GenericRIChecker
fkDcocis, fkInfo, fkScocis, refDcoci, refScoci, tc
 
Constructor Summary
(package private) ForeignKeyRIChecker(org.apache.derby.iapi.store.access.TransactionController tc, FKInfo fkinfo)
           
 
Method Summary
(package private)  void doCheck(org.apache.derby.iapi.sql.execute.ExecRow row, boolean restrictCheckOnly)
          Check that the row either has a null column(s), or corresponds to a row in the referenced key.
(package private)  int getRICheckIsolationLevel()
          Get the isolation level for the scan for the RI check.
 
Methods inherited from class org.apache.derby.impl.sql.execute.GenericRIChecker
close, doCheck, getScanController, isAnyFieldNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForeignKeyRIChecker

ForeignKeyRIChecker(org.apache.derby.iapi.store.access.TransactionController tc,
                    FKInfo fkinfo)
              throws org.apache.derby.iapi.error.StandardException
Method Detail

doCheck

void doCheck(org.apache.derby.iapi.sql.execute.ExecRow row,
             boolean restrictCheckOnly)
       throws org.apache.derby.iapi.error.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

getRICheckIsolationLevel

int getRICheckIsolationLevel()
Get the isolation level for the scan for the RI check. NOTE: The level will eventually be instantaneous locking once the implemenation changes.

Overrides:
getRICheckIsolationLevel in class GenericRIChecker