String key = qual.key();
Object value = NSTranslator.instance.toNeutralValue(qual.value(), entity.attributeNamed(key));
if (operator.equals(EOKeyValueQualifier.QualifierOperatorEqual)) {
if (qual instanceof ERXInQualifier) {
ERXInQualifier inQualifier = (ERXInQualifier) qual;
List<ClauseType> clauses = new ArrayList<ClauseType>();
for (Object o : inQualifier.values()) {
clauses.add(comparison(entity, key, ComparisonOperator.EQUAL, o));
}
return joinWithOrOperator(clauses);
} else {
return comparison(entity, key, ComparisonOperator.EQUAL, value);