Package com.mysema.query.jpa

Examples of com.mysema.query.jpa.FactoryExpressionTransformer


        // set transformer, if necessary
        List<? extends Expression<?>> projection = getMetadata().getProjection();
        if (projection.size() == 1 && !forCount) {
            Expression<?> expr = projection.get(0);
            if (expr instanceof FactoryExpression<?>) {
                query.setResultTransformer(new FactoryExpressionTransformer((FactoryExpression<?>) projection.get(0)));
            }
        } else if (!forCount) {
            FactoryExpression<?> proj = FactoryExpressionUtils.wrap(projection);
            if (proj != null) {
                query.setResultTransformer(new FactoryExpressionTransformer(proj));
            }
        }
        return query;
    }
View Full Code Here


                }
            }

            // set result transformer, if projection is a FactoryExpression instance
            if (projection.size() == 1 && proj instanceof FactoryExpression) {
                query.setResultTransformer(new FactoryExpressionTransformer((FactoryExpression<?>) proj));
            }
        }

        if (fetchSize > 0) {
            query.setFetchSize(fetchSize);
View Full Code Here

TOP

Related Classes of com.mysema.query.jpa.FactoryExpressionTransformer

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.