org.apache.derby.impl.sql.execute
Class RISetChecker
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.RISetChecker
-
public class RISetChecker extends java.lang.ObjectChecks a set or referential integrity constraints. Used to shield the caller from ReferencedKeyRIChecker and ForeignKeyRICheckers.
-
-
Constructor Summary
Constructors Constructor and Description RISetChecker(LanguageConnectionContext lcc, TransactionController tc, FKInfo[] fkInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()clean upvoiddoFKCheck(Activation a, ExecRow row)Check that everything in the row is ok, i.e.voiddoPKCheck(Activation a, ExecRow row, boolean restrictCheckOnly, int deferredRowReq)Check that there are no referenced primary keys in the passed in row.voiddoRICheck(Activation a, int index, ExecRow row, boolean restrictCheckOnly, int deferredRowReq)Execute the specific RI check on the passed in row.voidpostCheck()voidpostCheck(int index)
-
-
-
Constructor Detail
-
RISetChecker
public RISetChecker(LanguageConnectionContext lcc, TransactionController tc, FKInfo[] fkInfo) throws StandardException
- Parameters:
lcc- the language connection contexttc- the xact controllerfkInfo- the foreign key information- Throws:
StandardException- Thrown on failure
-
-
Method Detail
-
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 activationrow- The row to checkrestrictCheckOnly-trueif 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 ifpostCheck==false.- Throws:
StandardException- on unexpected error, or on a primary/unique key violation
-
postCheck
public void postCheck() throws StandardException- Throws:
StandardException
-
postCheck
public void postCheck(int index) throws StandardException- Throws:
StandardException
-
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 activationrow- 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 activationindex- index into fkInforow- the row to checkrestrictCheckOnly-trueif 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 ifpostCheck==false.- Throws:
StandardException- on unexpected error, or on a primary/unique key violation
-
close
public void close() throws StandardExceptionclean up- Throws:
StandardException- on error
-
-
DataMelt 3.0 © DataMelt by jWork.ORG