@Override
public Object evaluateRecord(final ORecordInternal<?> iRecord, final OSQLFilterCondition iCondition, final Object iLeft,
final Object iRight) {
if (iLeft instanceof OQueryRuntimeValueMulti) {
// LEFT = MULTI
final OQueryRuntimeValueMulti left = (OQueryRuntimeValueMulti) iLeft;
if (left.values.length == 0)
return false;
if (left.getDefinition().getRoot().equals(OSQLFilterItemFieldAll.NAME)) {
// ALL VALUES
for (final Object v : left.values)
if (v == null || !evaluateExpression(iRecord, iCondition, v, iRight))
return false;
return true;
} else {
// ANY VALUES
for (final Object v : left.values)
if (v != null && evaluateExpression(iRecord, iCondition, v, iRight))
return true;
return false;
}
} else if (iRight instanceof OQueryRuntimeValueMulti) {
// RIGHT = MULTI
final OQueryRuntimeValueMulti right = (OQueryRuntimeValueMulti) iRight;
if (right.values.length == 0)
return false;
if (right.getDefinition().getRoot().equals(OSQLFilterItemFieldAll.NAME)) {
// ALL VALUES
for (final Object v : right.values)
if (v == null || !evaluateExpression(iRecord, iCondition, iLeft, v))
return false;
return true;