if (constraints != null) {
// don't use enhanced for loop to avoid creating objects
for (int i = 0, size = constraints.size(); i < size; i++) {
Constraint constraint = constraints.get(i);
if (constraint.isBefore() == before) {
constraint.checkRow(session, this, oldRow, newRow);
}
}
}
}