Search in sources :

Example 1 with BaseJoinNode

use of com.haulmont.cuba.core.sys.jpql.tree.BaseJoinNode in project cuba by cuba-platform.

the class IdVarSelector method post.

@Override
public Object post(Object t) {
    if (!(t instanceof CommonTree))
        return t;
    if (t instanceof CommonErrorNode) {
        return t;
    }
    CommonTree node = (CommonTree) t;
    if (node.token == null)
        return t;
    if ((node instanceof QueryNode) && isInWhereSubquery(node)) {
        stack.peekLast().setPropagateVariablesUp(false);
        return t;
    }
    if (node instanceof IdentificationVariableNode) {
        IdentificationVariableNode vnode = (IdentificationVariableNode) node;
        vnode.identifyVariableEntity(model, stack, invalidIdVarNodes);
        return t;
    }
    if (node instanceof BaseJoinNode) {
        BaseJoinNode vnode = (BaseJoinNode) node;
        vnode.identifyVariableEntity(model, stack, invalidIdVarNodes);
        return t;
    }
    return t;
}
Also used : IdentificationVariableNode(com.haulmont.cuba.core.sys.jpql.tree.IdentificationVariableNode) BaseJoinNode(com.haulmont.cuba.core.sys.jpql.tree.BaseJoinNode) CommonTree(org.antlr.runtime.tree.CommonTree) QueryNode(com.haulmont.cuba.core.sys.jpql.tree.QueryNode) CommonErrorNode(org.antlr.runtime.tree.CommonErrorNode)

Aggregations

BaseJoinNode (com.haulmont.cuba.core.sys.jpql.tree.BaseJoinNode)1 IdentificationVariableNode (com.haulmont.cuba.core.sys.jpql.tree.IdentificationVariableNode)1 QueryNode (com.haulmont.cuba.core.sys.jpql.tree.QueryNode)1 CommonErrorNode (org.antlr.runtime.tree.CommonErrorNode)1 CommonTree (org.antlr.runtime.tree.CommonTree)1