Package org.apache.openjpa.kernel.exps

Examples of org.apache.openjpa.kernel.exps.QueryExpressions


                        q.getContext().getQueryString()));
            }
        }

        public final void validate(StoreQuery q) {
            QueryExpressions exps = assertQueryExpression();   
            ValidateGroupingExpressionVisitor.validate(q.getContext(), exps);
        }
View Full Code Here


            QueryExpressions exps = assertQueryExpression();   
            ValidateGroupingExpressionVisitor.validate(q.getContext(), exps);
        }

        public void getRange(StoreQuery q, Object[] params, Range range) {
            QueryExpressions exps = assertQueryExpression();
            if (exps.range.length == 0)
                return;

            if (exps.range.length == 2
                && exps.range[0] instanceof Constant
View Full Code Here

        return ctx().parsed == null || root().parser == null ? null
            : root().parser.jpql;
    }

    QueryExpressions getQueryExpressions() {
        QueryExpressions exps = new QueryExpressions();

        evalQueryOperation(exps);

        Expression filter = null;
        filter = and(evalFromClause(root().id == JJTSELECT), filter);
View Full Code Here

        subq.setMetaData(candidate);

        contexts.push(new Context(parsed, subq));

        try {
            QueryExpressions subexp = getQueryExpressions();
            subq.setQueryExpressions(subexp);
            return subq;
        } finally {
            // remove the subquery parse context
            contexts.pop();
View Full Code Here

* @since 2.0.0
*/
class CriteriaExpressionBuilder {
   
    public QueryExpressions getQueryExpressions(ExpressionFactory factory, CriteriaQueryImpl<?> q) {
        QueryExpressions exps = new QueryExpressions();
        exps.setContexts(q.getContexts());

        evalAccessPaths(exps, factory, q);
        exps.alias = null;      // String  
        evalDistinct(exps, factory, q);
        evalFetchJoin(exps, factory, q);
        evalCrossJoinRoots(exps, factory, q);
        evalFilter(exps, factory, q);
        evalGrouping(exps, factory, q);
        evalOrderingAndProjection(exps, factory, q);
        exps.operation = QueryOperations.OP_SELECT;
        exps.range = QueryExpressions.EMPTY_VALUES;
        exps.resultClass = q.getResultType();
        exps.shape = evalResultShape(q);
        exps.parameterTypes = q.getParameterTypes();
        exps.isAggregate();
        return exps;
    }
View Full Code Here

                        q.getContext().getQueryString()));
            }
        }

        public final void validate(StoreQuery q) {
            QueryExpressions exps = assertQueryExpression();   
            ValidateGroupingExpressionVisitor.validate(q.getContext(), exps);
        }
View Full Code Here

            QueryExpressions exps = assertQueryExpression();   
            ValidateGroupingExpressionVisitor.validate(q.getContext(), exps);
        }

        public void getRange(StoreQuery q, Object[] params, Range range) {
            QueryExpressions exps = assertQueryExpression();
            if (exps.range.length == 0)
                return;

            if (exps.range.length == 2
                && exps.range[0] instanceof Constant
View Full Code Here

        Object executor = ((Object[])userObject)[1];
        if (executor instanceof StoreQuery.Executor == false)
            return new Object[]{null, _loc.get("exclude-not-executor", _id)};
        _exps = ((StoreQuery.Executor)executor).getQueryExpressions();
        for (int i = 0; i < _exps.length; i++) {
            QueryExpressions exp = _exps[i];
            if (exp.hasInExpression)
                return new Object[]{null, _loc.get("exclude-in-expression", _id)};
            if (isUsingExternalizedParameter(exp)) {
                return new Object[]{null, _loc.get("exclude-externalized-param", _id)};
            }
View Full Code Here

        return ctx().parsed == null || root().parser == null ? null
            : root().parser.jpql;
    }

    QueryExpressions getQueryExpressions() {
        QueryExpressions exps = new QueryExpressions();
        exps.setContexts(contexts);

        evalQueryOperation(exps);

        Expression filter = null;
        Expression from = ctx().from;
View Full Code Here

        // evaluate from clause for resolving variables defined in subquery
        JPQLNode from = node.getChild(1);
        subContext.from = evalFromClause(from, true);

        try {
            QueryExpressions subexp = getQueryExpressions();
            subq.setQueryExpressions(subexp);
            if (subexp.projections.length > 0)
                checkEmbeddable(subexp.projections[0]);
            return subq;
        } finally {
View Full Code Here

TOP

Related Classes of org.apache.openjpa.kernel.exps.QueryExpressions

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.