org.apache.derby.impl.sql.execute
Class ForeignKeyRIChecker
java.lang.Object
org.apache.derby.impl.sql.execute.GenericRIChecker
org.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.
Method Summary |
(package private) void |
doCheck(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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ForeignKeyRIChecker
ForeignKeyRIChecker(TransactionController tc,
FKInfo fkinfo)
throws StandardException
- Parameters:
tc
- the xact controllerfkinfo
- the foreign key information
- Throws:
StandardException
- Thrown on failure
doCheck
void doCheck(ExecRow row,
boolean restrictCheckOnly)
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:
row
- the row to check
- Throws:
StandardException
- on unexped 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 implemenation changes.
- Overrides:
getRICheckIsolationLevel
in class GenericRIChecker
- Returns:
- The isolation level for the scan for
the RI check.
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.