Package com.espertech.esper.epl.declexpr

Examples of com.espertech.esper.epl.declexpr.ExprDeclaredNodeImpl


        // try expression declaration local statement
        if (!expressionDeclarations.getExpressions().isEmpty()) {
            String name = chained.get(0).getName();
            for (ExpressionDeclItem declNode : expressionDeclarations.getExpressions()) {
                if (declNode.getName().equals(name)) {
                    dotNode.addChildNode(new ExprDeclaredNodeImpl(declNode, chained.get(0).getParameters()));
                    chained.remove(0);
                    break;
                }
            }
        }
View Full Code Here


        if (statementSpec.getExpressionDeclDesc() != null) {
            String name = node.getChild(0).getText();
            List<ExprChainedSpec> chained = getLibFuncChain(parent);
            for (ExpressionDeclItem declNode : statementSpec.getExpressionDeclDesc().getExpressions()) {
                if (declNode.getName().equals(name)) {
                    astExprNodeMap.put(node, new ExprDeclaredNodeImpl(declNode, chained.get(0).getParameters()));
                    return;
                }
            }
        }
View Full Code Here

        // try expression declaration local statement
        if (statementSpec.getExpressionDeclDesc() != null) {
            String name = chained.get(0).getName();
            for (ExpressionDeclItem declNode : statementSpec.getExpressionDeclDesc().getExpressions()) {
                if (declNode.getName().equals(name)) {
                    dotNode.addChildNode(new ExprDeclaredNodeImpl(declNode, chained.get(0).getParameters()));
                    chained.remove(0);
                    break;
                }
            }
        }
View Full Code Here

            DotExpression base = (DotExpression) expr;
            List<ExprChainedSpec> chain = mapChains(base.getChain(), mapContext);
            if (chain.size() == 1) {
                String name = chain.get(0).getName();
                if (mapContext.getExpressionDeclarations() != null && mapContext.getExpressionDeclarations().containsKey(name)) {
                    return new ExprDeclaredNodeImpl(mapContext.getExpressionDeclarations().get(name), chain.get(0).getParameters());
                }
            }
            return new ExprDotNode(chain,
                    mapContext.getConfiguration().getEngineDefaults().getExpression().isDuckTyping(),
                    mapContext.getConfiguration().getEngineDefaults().getExpression().isUdfCache());
View Full Code Here

            ASTExprHelper.exprCollectAddSubNodesAddParentNode(exprNode, ctx, astExprNodeMap);
            return;
        }

        // try declared expression
        ExprDeclaredNodeImpl declaredNode = ExprDeclaredHelper.getExistsDeclaredExpr(firstFunction, chain.get(0).getParameters(), expressionDeclarations.getExpressions(), exprDeclaredService, contextDescriptor);
        if (declaredNode != null) {
            chain.remove(0);
            ExprNode exprNode;
            if (chain.isEmpty()) {
                exprNode = declaredNode;
View Full Code Here

        else if (expr instanceof DotExpression) {
            DotExpression theBase = (DotExpression) expr;
            List<ExprChainedSpec> chain = mapChains(theBase.getChain(), mapContext);
            if (chain.size() == 1) {
                String name = chain.get(0).getName();
                ExprDeclaredNodeImpl declared = ExprDeclaredHelper.getExistsDeclaredExpr(name, chain.get(0).getParameters(), mapContext.getExpressionDeclarations().values(), mapContext.getExprDeclaredService(), mapContext.getContextDescriptor());
                if (declared != null) {
                    return declared;
                }
                ExprNodeScript script = ExprDeclaredHelper.getExistsScript(mapContext.getConfiguration().getEngineDefaults().getScripts().getDefaultDialect(),
                        name, chain.get(0).getParameters(), mapContext.getScripts().values(), mapContext.getExprDeclaredService());
View Full Code Here

        else if (expr instanceof DotExpression) {
            DotExpression theBase = (DotExpression) expr;
            List<ExprChainedSpec> chain = mapChains(theBase.getChain(), mapContext);
            if (chain.size() == 1) {
                String name = chain.get(0).getName();
                ExprDeclaredNodeImpl declared = ExprDeclaredHelper.getExistsDeclaredExpr(name, chain.get(0).getParameters(), mapContext.getExpressionDeclarations().values(), mapContext.getExprDeclaredService());
                if (declared != null) {
                    return declared;
                }
                ExprNodeScript script = ExprDeclaredHelper.getExistsScript(mapContext.getConfiguration().getEngineDefaults().getScripts().getDefaultDialect(),
                        name, chain.get(0).getParameters(), mapContext.getScripts().values(), mapContext.getExprDeclaredService());
View Full Code Here

        }

        // try expression declaration local statement
        String expressionName = node.getChild(0).getText();
        List<ExprChainedSpec> expressionChain = getLibFuncChain(parent);
        ExprDeclaredNodeImpl declaredNode = ExprDeclaredHelper.getExistsDeclaredExpr(expressionName, expressionChain.get(0).getParameters(), expressionDeclarations.getExpressions(), exprDeclaredService);
        if (declaredNode != null) {
            astExprNodeMap.put(node, declaredNode);
            return;
        }
View Full Code Here

        ExprDotNode dotNode = new ExprDotNode(chained, duckType, udfCache);

        // try expression declaration local statement
        String name = chained.get(0).getName();
        ExprDeclaredNodeImpl declaredNode = ExprDeclaredHelper.getExistsDeclaredExpr(name, chained.get(0).getParameters(), expressionDeclarations.getExpressions(), exprDeclaredService);
        if (declaredNode != null) {
            dotNode.addChildNode(declaredNode);
            chained.remove(0);
        }
        else {
View Full Code Here

        else if (expr instanceof DotExpression) {
            DotExpression theBase = (DotExpression) expr;
            List<ExprChainedSpec> chain = mapChains(theBase.getChain(), mapContext);
            if (chain.size() == 1) {
                String name = chain.get(0).getName();
                ExprDeclaredNodeImpl declared = ExprDeclaredHelper.getExistsDeclaredExpr(name, chain.get(0).getParameters(), mapContext.getExpressionDeclarations().values(), mapContext.getExprDeclaredService());
                if (declared != null) {
                    return declared;
                }
                ExprNodeScript script = ExprDeclaredHelper.getExistsScript(mapContext.getConfiguration().getEngineDefaults().getScripts().getDefaultDialect(),
                        name, chain.get(0).getParameters(), mapContext.getScripts().values(), mapContext.getExprDeclaredService());
View Full Code Here

TOP

Related Classes of com.espertech.esper.epl.declexpr.ExprDeclaredNodeImpl

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.