#1634 ENH: Add convenience expressions "equal to or null" eqOrNull()

This commit is contained in:
rob bygrave
2019-02-11 22:59:47 +13:00
parent aa7b15fd6e
commit 192a946cf6
6 changed files with 42 additions and 0 deletions
@@ -162,6 +162,11 @@ public class DefaultExpressionFactory implements SpiExpressionFactory {
return new SimpleExpression(propertyName, Op.EQ, value);
}
@Override
public Expression eqOrNull(String propertyName, Object value) {
return or(eq(propertyName, value), isNull(propertyName));
}
/**
* Not Equal To - property not equal to the given value.
*/