Package org.apache.openjpa.kernel.exps

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


    private Expression assignProjections(JPQLNode parametersNode,
        QueryExpressions exps, List<Value> projections,
        List<String> projectionClauses, List<String> projectionAliases) {
        int count = parametersNode.getChildCount();

        Expression exp = null;
        for (int i = 0; i < count; i++) {
            JPQLNode parent = parametersNode.getChild(i);
            JPQLNode node = firstChild(parent);
            JPQLNode aliasNode = parent.children.length > 1 ? right(parent)
                : null;
View Full Code Here


        return alias;
    }

    protected Expression evalFetchJoins(QueryExpressions exps) {
        Expression filter = null;

        // handle JOIN FETCH
        Set<String> joins = null;
        Set<String> innerJoins = null;
View Full Code Here

            throw parseException(EX_USER, "no-from-clause", null, null);
        return evalFromClause(from, needsAlias);
    }

    private Expression evalFromClause(JPQLNode from, boolean needsAlias) {
        Expression exp = null;

        for (int i = 0; i < from.children.length; i++) {
            JPQLNode node = from.children[i];

            if (node.id == JJTFROMITEM)
View Full Code Here

    }

    private Expression getSubquery(String alias, Path path, Expression exp) {
        Value var = getVariable(alias, true);
        // this bind is for validateMapPath to resolve alias
        Expression bindVar = factory.bindVariable(var, path);
        FieldMetaData fmd = path.last();
        ClassMetaData candidate = getFieldType(fmd);
        if (candidate == null && fmd.isElementCollection())
            candidate = fmd.getDefiningMetaData();
View Full Code Here

        String alias = aliasNode != null ? aliasNode.text : nextAlias();

        Value var = getVariable(alias, true);
        var.setMetaData(getFieldType(fmd));

        Expression join = null;

        // if the variable is already bound, get the var's value and
        // do a regular contains with that
        boolean bound = isBound(var);
        if (bound) {
View Full Code Here

                return evalNot(not, and(factory.greaterThanEqual(val1, val2),
                    factory.lessThanEqual(val1, val3)));

            case JJTIN: // x.field [NOT] IN ('a', 'b', 'c')
                        // TYPE(x...) [NOT] IN (entityTypeLiteral1,...)
                Expression inExp = null;
                Iterator<JPQLNode> inIterator = node.iterator();
                // the first child is the path
                JPQLNode first = inIterator.next();
                val1 = getValue(first);
View Full Code Here

TOP

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

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.