@Override
    public void visitConstant(Object constant) {
        if (inCaseOperation && templates.isCaseWithLiterals()) {
            if (constant instanceof Collection) {
                append("(");
                boolean first = true;
                for (Object o : (Collection) constant) {
                    if (!first) {
                        append(", ");
                    }
                    visitLiteral(o);
                    first = false;
                }
                append(")");
            } else {
                visitLiteral(constant);
            }
        } else {
            boolean wrap = templates.wrapConstant(constant);
            if (wrap) {
                append("(");
            }
            super.visitConstant(constant);
            if (wrap) {
                append(")");
            }
        }
    }
{@code JPQLSerializer} serializes Querydsl expressions into JPQL syntax.

@author tiwe
querydsl-jpa/src/main/java/com/querydsl/jpa/JPQLSerializer.java