use of org.apache.derby.iapi.types.SQLBoolean in project derby by apache.
the class UpdateResultSet method evaluateCheckConstraints.
/**
* Run check constraints against the current row. Raise an error if
* a check constraint is violated, unless all the offending checks are
* deferred, in which case a false value will be returned. A NULL value
* will be interpreted as success (not violation).
*
* @exception StandardException thrown on error
*/
private boolean evaluateCheckConstraints() throws StandardException {
boolean result = true;
if (checkGM != null) {
// Evaluate the check constraints. If all check constraint modes are
// immediate, a check error will throw rather than return a false
// value.
SQLBoolean allOk = (SQLBoolean) checkGM.invoke(activation);
result = allOk.isNull() || allOk.getBoolean();
}
return result;
}
Aggregations