// ALL VALUES
for (int i = 0; i < left.getValues().length; ++i) {
Object v = left.getValues()[i];
Object r = iRight;
final OCollate collate = left.getCollate(i);
if (collate != null) {
v = collate.transform(v);
r = collate.transform(iRight);
}
if (v == null || !evaluateExpression(iRecord, iCondition, v, r, iContext))
return false;
}
return true;
} else {
// ANY VALUES
for (int i = 0; i < left.getValues().length; ++i) {
Object v = left.getValues()[i];
Object r = iRight;
final OCollate collate = left.getCollate(i);
if (collate != null) {
v = collate.transform(v);
r = collate.transform(iRight);
}
if (v != null && evaluateExpression(iRecord, iCondition, v, r, iContext))
return true;
}
return false;
}
} else if (iRight instanceof OQueryRuntimeValueMulti) {
// RIGHT = MULTI
final OQueryRuntimeValueMulti right = (OQueryRuntimeValueMulti) iRight;
if (right.getValues().length == 0)
return false;
if (right.getDefinition().getRoot().startsWith(OSQLFilterItemFieldAll.NAME)) {
// ALL VALUES
for (int i = 0; i < right.getValues().length; ++i) {
Object v = right.getValues()[i];
Object l = iLeft;
final OCollate collate = right.getCollate(i);
if (collate != null) {
v = collate.transform(v);
l = collate.transform(iLeft);
}
if (v == null || !evaluateExpression(iRecord, iCondition, l, v, iContext))
return false;
}
return true;
} else {
// ANY VALUES
for (int i = 0; i < right.getValues().length; ++i) {
Object v = right.getValues()[i];
Object l = iLeft;
final OCollate collate = right.getCollate(i);
if (collate != null) {
v = collate.transform(v);
l = collate.transform(iLeft);
}
if (v != null && evaluateExpression(iRecord, iCondition, l, v, iContext))
return true;
}