@Override
                public Object apply(Object arg) {
                    if (arg instanceof Constant<?>) {
                        return ConstantImpl.create(apply(arg.toString()).toString());
                    } else if (arg instanceof Expression) {
                        return ExpressionUtils.operation(String.class, Ops.UPPER, (Expression) arg);
                    } else {
                        return String.valueOf(arg).toUpperCase();
                    }
                }
{@code TemplateFactory} is a factory for {@link Template} instances

@author tiwe
querydsl-core/src/main/java/com/querydsl/core/types/TemplateFactory.java