I'm currently doing like this.
final CriteriaBuilder builder = ...;
final boolean flag = ...;
if (flag) {
builder.isTrue(expression);
} else {
builder.isFalse(expression);
}
Can I use it like this?
builder.equals(expression, flag);
Is this try won't have any problem? Say null for expression or something.