public static <T> Expression<T> union(List<SubQueryExpression<T>> union, boolean unionAll) {
        final Operator operator = unionAll ? SQLOps.UNION_ALL : SQLOps.UNION;
        Expression<T> rv = union.get(0);
        for (int i = 1; i < union.size(); i++) {
            rv = ExpressionUtils.operation(rv.getType(), operator, rv, union.get(i));
        }
        return rv;
    }
UnionUtils provides static utility methods for Union handling

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/UnionUtils.java