Reputation: 1401
I have a list of conditions which should be combined with OR
List<Condition> conditions; //conditionA, conditionB, ... other conditions
I have another condition
Condition dateCondition;
Now I want to combine as below
dateCondition AND (conditionA OR conditionB ...)
What would be a good way to do this.
Is there a Jooq function to do this.
Upvotes: 1
Views: 1630
Reputation: 221350
Write
dateCondition.and(DSL.or(conditions))
The method you're looking for is DSL.or(Collection<? extends Condition>)
Upvotes: 4