com.espertech.esper.epl.enummethod.dot.PropertyExprEvaluatorEventSingle Maven / Gradle / Ivy
/*
***************************************************************************************
* Copyright (C) 2006 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
***************************************************************************************
*/
package com.espertech.esper.epl.enummethod.dot;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.EventPropertyGetter;
import com.espertech.esper.client.EventType;
import com.espertech.esper.epl.expression.core.ExprEvaluatorContext;
import com.espertech.esper.epl.expression.core.ExprEvaluatorEnumeration;
import com.espertech.esper.epl.expression.core.ExprEvaluatorEnumerationGivenEvent;
import com.espertech.esper.epl.expression.core.ExprValidationException;
import com.espertech.esper.event.EventAdapterService;
import java.util.Collection;
public class PropertyExprEvaluatorEventSingle implements ExprEvaluatorEnumeration, ExprEvaluatorEnumerationGivenEvent {
private final int streamId;
private final EventType fragmentType;
private final EventPropertyGetter getter;
public PropertyExprEvaluatorEventSingle(int streamId, EventType fragmentType, EventPropertyGetter getter) {
this.streamId = streamId;
this.fragmentType = fragmentType;
this.getter = getter;
}
public EventBean evaluateGetEventBean(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
EventBean eventInQuestion = eventsPerStream[streamId];
if (eventInQuestion == null) {
return null;
}
return (EventBean) getter.getFragment(eventInQuestion);
}
public EventBean evaluateEventGetEventBean(EventBean event, ExprEvaluatorContext context) {
if (event == null) {
return null;
}
return (EventBean) getter.getFragment(event);
}
public EventType getEventTypeCollection(EventAdapterService eventAdapterService, int statementId) {
return fragmentType;
}
public Class getComponentTypeCollection() throws ExprValidationException {
return null;
}
public EventType getEventTypeSingle(EventAdapterService eventAdapterService, int statementId) throws ExprValidationException {
return null;
}
public Collection evaluateEventGetROCollectionEvents(EventBean event, ExprEvaluatorContext context) {
return null;
}
public Collection evaluateEventGetROCollectionScalar(EventBean event, ExprEvaluatorContext context) {
return null;
}
public Collection evaluateGetROCollectionEvents(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
return null;
}
public Collection evaluateGetROCollectionScalar(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy