public static Condition andConditions(final Condition... conditions) {
        if (conditions == null || conditions.length == 0) {
            return DSL.noCondition();
        } else if (conditions.length == 1 && conditions[0] != null) {
            return conditions[0];
        } else {
            Condition condition = DSL.noCondition();
            for (final Condition condition2 : conditions) {
                if (condition2 != null) {
                    condition = condition.and(condition2);
                }
            }
            return condition;
        }
    }
Combine multiple conditions in a null safe way

@param conditions
@return A non-null condition
stroom-db-util/src/main/java/stroom/db/util/JooqUtil.java