Package com.espertech.esper.epl.enummethod.dot

Examples of com.espertech.esper.epl.enummethod.dot.ExprDotEvalParamLambda


        return new EventType[] {inputEventType};
    }

    public EnumEval getEnumEval(StreamTypeService streamTypeService, String enumMethodUsedName, List<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Class collectionComponentType, int numStreamsIncoming) {
        super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(Map.class));
        ExprDotEvalParamLambda first = (ExprDotEvalParamLambda) bodiesAndParameters.get(0);
        if (bodiesAndParameters.size() == 2) {
            ExprDotEvalParamLambda second = (ExprDotEvalParamLambda) bodiesAndParameters.get(1);
            return new EnumEvalGroupByKeyValueSelector(first.getBodyEvaluator(), first.getStreamCountIncoming(), second.getBodyEvaluator());
        }
        return new EnumEvalGroupByKeySelector(first.getBodyEvaluator(), first.getStreamCountIncoming());
    }
View Full Code Here


        return new EventType[]{firstParamType, indexEventType};
    }

    public EnumEval getEnumEval(StreamTypeService streamTypeService, String enumMethodUsedName, List<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Class collectionComponentType, int numStreamsIncoming) {

        ExprDotEvalParamLambda first = (ExprDotEvalParamLambda) bodiesAndParameters.get(0);

        if (inputEventType != null) {
            super.setTypeInfo(ExprDotEvalTypeInfo.eventColl(inputEventType));
            if (first.getGoesToNames().size() == 1) {
                return new EnumEvalWhereEvents(first.getBodyEvaluator(), first.getStreamCountIncoming());
            }
            return new EnumEvalWhereIndexEvents(first.getBodyEvaluator(), first.getStreamCountIncoming(), (MapEventType) first.getGoesToTypes()[1], first.getGoesToNames().get(1));
        }

        super.setTypeInfo(ExprDotEvalTypeInfo.componentColl(collectionComponentType));
        if (first.getGoesToNames().size() == 1) {
            return new EnumEvalWhereScalar(first.getBodyEvaluator(), first.getStreamCountIncoming(), (MapEventType) first.getGoesToTypes()[0], first.getGoesToNames().get(0));
        }
        return new EnumEvalWhereScalarIndex(first.getBodyEvaluator(), first.getStreamCountIncoming(), (MapEventType) first.getGoesToTypes()[0], first.getGoesToNames().get(0), (MapEventType) first.getGoesToTypes()[1], first.getGoesToNames().get(1));
    }
View Full Code Here

        super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(Integer.class));
        if (bodiesAndParameters.isEmpty()) {
            return new EnumEvalCountOf(numStreamsIncoming);
        }

        ExprDotEvalParamLambda first = (ExprDotEvalParamLambda) bodiesAndParameters.get(0);
        if (inputEventType != null) {
            return new EnumEvalCountOfSelectorEvents(first.getBodyEvaluator(), first.getStreamCountIncoming());
        }
        else {
            return new EnumEvalCountOfSelectorScalar(first.getBodyEvaluator(), first.getStreamCountIncoming(), (MapEventType) first.getGoesToTypes()[0], first.getGoesToNames().get(0));
        }
    }
View Full Code Here

            }
            super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(Double.class));
            return new EnumEvalAverageScalar(numStreamsIncoming);
        }

        ExprDotEvalParamLambda first = (ExprDotEvalParamLambda) bodiesAndParameters.get(0);
        Class returnType = first.getBodyEvaluator().getType();

        if (returnType == BigDecimal.class || returnType == BigInteger.class) {
            super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(BigDecimal.class));
            return new EnumEvalAverageBigDecimalEvents(first.getBodyEvaluator(), first.getStreamCountIncoming());
        }
        super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(Double.class));
        return new EnumEvalAverageEvents(first.getBodyEvaluator(), first.getStreamCountIncoming());
    }
View Full Code Here

        return new EventType[] {inputEventType};
    }

    public EnumEval getEnumEval(StreamTypeService streamTypeService, String enumMethodUsedName, List<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Class collectionComponentType, int numStreamsIncoming) {
        super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(Map.class));
        ExprDotEvalParamLambda first = (ExprDotEvalParamLambda) bodiesAndParameters.get(0);
        ExprDotEvalParamLambda second = (ExprDotEvalParamLambda) bodiesAndParameters.get(1);
        return new EnumEvalToMap(first.getBodyEvaluator(), first.getStreamCountIncoming(), second.getBodyEvaluator());
    }
View Full Code Here

            AggregationMethod aggMethod = getAggregator(collectionComponentType);
            super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(JavaClassHelper.getBoxedType(aggMethod.getValueType())));
            return new EnumEvalSumScalar(numStreamsIncoming, aggMethod);
        }

        ExprDotEvalParamLambda first = (ExprDotEvalParamLambda) bodiesAndParameters.get(0);
        AggregationMethod aggMethod = getAggregator(first.getBodyEvaluator().getType());
        Class returnType = JavaClassHelper.getBoxedType(aggMethod.getValueType());
        super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(returnType));
        return new EnumEvalSumEvents(first.getBodyEvaluator(), first.getStreamCountIncoming(), aggMethod);
    }
View Full Code Here

    public EnumEval getEnumEval(StreamTypeService streamTypeService, String enumMethodUsedName, List<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Class collectionComponentType, int numStreamsIncoming) {
        ExprDotEvalParam initValueParam = bodiesAndParameters.get(0);
        ExprEvaluator initValueEval = initValueParam.getBodyEvaluator();
        super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(JavaClassHelper.getBoxedType(initValueEval.getType())));

        ExprDotEvalParamLambda resultAndAdd = (ExprDotEvalParamLambda) bodiesAndParameters.get(1);

        if (inputEventType != null) {
            return new EnumEvalAggregateEvents(initValueEval,
                    resultAndAdd.getBodyEvaluator(), resultAndAdd.getStreamCountIncoming(),
                    (MapEventType) resultAndAdd.getGoesToTypes()[0], resultAndAdd.getGoesToNames().get(0));
        }
        else {
            return new EnumEvalAggregateScalar(initValueEval,
                    resultAndAdd.getBodyEvaluator(), resultAndAdd.getStreamCountIncoming(),
                    (MapEventType) resultAndAdd.getGoesToTypes()[0], resultAndAdd.getGoesToNames().get(0),
                    (MapEventType) resultAndAdd.getGoesToTypes()[1], resultAndAdd.getGoesToNames().get(1));
        }
    }
View Full Code Here

        return new EventType[]{firstParamType, indexEventType};
    }

    public EnumEval getEnumEval(EventAdapterService eventAdapterService, StreamTypeService streamTypeService, String statementId, String enumMethodUsedName, List<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Class collectionComponentType, int numStreamsIncoming) {

        ExprDotEvalParamLambda first = (ExprDotEvalParamLambda) bodiesAndParameters.get(0);

        if (inputEventType != null) {
            super.setTypeInfo(ExprDotEvalTypeInfo.eventColl(inputEventType));
            if (first.getGoesToNames().size() == 1) {
                return new EnumEvalWhereEvents(first.getBodyEvaluator(), first.getStreamCountIncoming());
            }
            return new EnumEvalWhereIndexEvents(first.getBodyEvaluator(), first.getStreamCountIncoming(), (MapEventType) first.getGoesToTypes()[1], first.getGoesToNames().get(1));
        }

        super.setTypeInfo(ExprDotEvalTypeInfo.componentColl(collectionComponentType));
        if (first.getGoesToNames().size() == 1) {
            return new EnumEvalWhereScalar(first.getBodyEvaluator(), first.getStreamCountIncoming(), (MapEventType) first.getGoesToTypes()[0], first.getGoesToNames().get(0));
        }
        return new EnumEvalWhereScalarIndex(first.getBodyEvaluator(), first.getStreamCountIncoming(), (MapEventType) first.getGoesToTypes()[0], first.getGoesToNames().get(0), (MapEventType) first.getGoesToTypes()[1], first.getGoesToNames().get(1));
    }
View Full Code Here

        return new EventType[] {inputEventType};
    }

    public EnumEval getEnumEval(EventAdapterService eventAdapterService, StreamTypeService streamTypeService, String statementId, String enumMethodUsedName, List<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Class collectionComponentType, int numStreamsIncoming) {
        super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(Map.class));
        ExprDotEvalParamLambda first = (ExprDotEvalParamLambda) bodiesAndParameters.get(0);
        ExprDotEvalParamLambda second = (ExprDotEvalParamLambda) bodiesAndParameters.get(1);
        return new EnumEvalToMap(first.getBodyEvaluator(), first.getStreamCountIncoming(), second.getBodyEvaluator());
    }
View Full Code Here

            AggregationMethod aggMethod = getAggregator(collectionComponentType);
            super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(JavaClassHelper.getBoxedType(aggMethod.getValueType())));
            return new EnumEvalSumScalar(numStreamsIncoming, aggMethod);
        }

        ExprDotEvalParamLambda first = (ExprDotEvalParamLambda) bodiesAndParameters.get(0);
        AggregationMethod aggMethod = getAggregator(first.getBodyEvaluator().getType());
        Class returnType = JavaClassHelper.getBoxedType(aggMethod.getValueType());
        super.setTypeInfo(ExprDotEvalTypeInfo.scalarOrUnderlying(returnType));
        return new EnumEvalSumEvents(first.getBodyEvaluator(), first.getStreamCountIncoming(), aggMethod);
    }
View Full Code Here

TOP

Related Classes of com.espertech.esper.epl.enummethod.dot.ExprDotEvalParamLambda

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.