private static void addConstraint(UpdateQueryPlan plan, LocalFieldDesc lf, Object val) {
for (Iterator iter = lf.getColumnElements(); iter.hasNext(); ) {
ColumnElement c = (ColumnElement) iter.next();
for (int i = 0; i < plan.statements.size(); i++) {
Statement s = (Statement) plan.statements.get(i);
for (int j = 0; j < s.tableList.size(); j++) {
QueryTable t = (QueryTable) s.tableList.get(j);
if (t.getTableDesc().getTableElement() == c.getDeclaringTable()) {
s.addConstraint(lf, val);
}
}
}
}
}