for (T record : records.values()) {
boolean allMatch = true;
for (WhereConstraint constraint : constraints) {
Enum field = constraint.getField();
IWhereOperator operator = constraint.getOperator();
allMatch = allMatch && operator.apply(record.getField(field.name()));
}
if (ids != null && !ids.isEmpty() && !ids.contains(record.getId())) {
allMatch = false;
}
T newRecord = record.getCopy();