Package com.mysema.query.support

Examples of com.mysema.query.support.Context


       
    @Override
    protected Predicate normalize(Predicate predicate, boolean where) {
        predicate = (Predicate)ExpressionUtils.extract(predicate);
        if (predicate != null) {
            Context context = new Context();           
            Predicate transformed = (Predicate) predicate.accept(CollectionAnyVisitor.DEFAULT, context);
            for (int i = 0; i < context.paths.size(); i++) {
                Path<?> path = context.paths.get(i);           
                addCondition(context, i, path, where);
            }
View Full Code Here


                ser.append("for (" + typeName + " " + alias.getArg(1) + " : ");
                if (leftJoin) {
                    ser.append(CollQueryFunctions.class.getName()+".leftJoin(");
                }
                if (colAnyJoin) {
                    Context context = new Context();
                    Expression<?> replacement = alias.getArg(0)
                            .accept(CollectionAnyVisitor.DEFAULT, context);
                    ser.handle(replacement);
                } else {
                    ser.handle(alias.getArg(0));
View Full Code Here

            "from cat.kittens as cat_kittens.*\n" +
            "where cat_kittens.*\\.name = \\?1\\)", serialize(predicate));
    }

    private String serialize(Expression<?> expression) {
        Expression<?> transformed = expression.accept(JPACollectionAnyVisitor.DEFAULT, new Context());
        JPQLSerializer serializer = new JPQLSerializer(HQLTemplates.DEFAULT, null);
        serializer.handle(transformed);
        return serializer.toString();
    }
View Full Code Here

    @Override
    protected Predicate normalize(Predicate predicate, boolean where) {
        predicate = (Predicate)ExpressionUtils.extract(predicate);
        if (predicate != null) {
            Context context = new Context();
            Predicate transformed = (Predicate) predicate.accept(CollectionAnyVisitor.DEFAULT, context);
            for (int i = 0; i < context.paths.size(); i++) {
                leftJoin(
                    (Path)context.paths.get(i).getMetadata().getParent(),
                    (Path)context.replacements.get(i));
View Full Code Here

TOP

Related Classes of com.mysema.query.support.Context

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.