Package com.espertech.esper.client

Examples of com.espertech.esper.client.EventPropertyGetter


* Method to getSelectListEvents events in collections to other collections or other event types.
*/
public class EventBeanUtility
{
    public static EventPropertyGetter getAssertPropertyGetter(EventType type, String propertyName) {
        EventPropertyGetter getter = type.getGetter(propertyName);
        if (getter == null) {
            throw new IllegalStateException("Property " + propertyName + " not found in type " + type.getName());
        }
        return getter;
    }
View Full Code Here


        filterHandle = new EPStatementHandleCallback(agentInstanceContextCreateContext.getEpStatementAgentInstanceHandle(), this);

        getters = new EventPropertyGetter[partitionItem.getPropertyNames().size()];
        for (int i = 0; i < partitionItem.getPropertyNames().size(); i++) {
            String propertyName = partitionItem.getPropertyNames().get(i);
            EventPropertyGetter getter = partitionItem.getFilterSpecCompiled().getFilterForEventType().getGetter(propertyName);
            getters[i] = getter;
        }

        FilterValueSet filterValueSet = partitionItem.getFilterSpecCompiled().getValueSet(null, null, null);
        servicesContext.getFilterService().add(filterValueSet, filterHandle);
View Full Code Here

    public void setUnderlying(Object underlying) {
        this.propertyValues = (Object[]) underlying;
    }

    public Object get(String property) throws PropertyAccessException {
        EventPropertyGetter getter = eventType.getGetter(property);
        if (getter == null)
        {
            throw new PropertyAccessException("Property named '" + property + "' is not a valid property name for this type");
        }
        return getter.get(this);
    }
View Full Code Here

    public Object getUnderlying() {
        return propertyValues;
    }

    public Object getFragment(String propertyExpression) throws PropertyAccessException {
        EventPropertyGetter getter = eventType.getGetter(propertyExpression);
        if (getter == null)
        {
            throw new PropertyAccessException("Property named '" + propertyExpression + "' is not a valid property name for this type");
        }
        return getter.getFragment(this);
    }
View Full Code Here

            for (EventPropertyDescriptor propertyDescriptor : parentEventType.getPropertyDescriptors()) {
                if (propertyDescriptor.isFragment()) {
                    continue;
                }
                additionalProps.add(propertyDescriptor.getPropertyName());
                final EventPropertyGetter getter = parentEventType.getGetter(propertyDescriptor.getPropertyName());
                final Class type = propertyDescriptor.getPropertyType();
                ExprEvaluator exprEvaluator = new ExprEvaluator() {
                    public Object evaluate(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
                        return getter.get(eventsPerStream[0]);
                    }

                    public Class getType() {
                        return type;
                    }
View Full Code Here

    return eventType;
  }

  public Object get(String property) throws PropertyAccessException
    {
    EventPropertyGetter getter = eventType.getGetter(property);
    if (getter == null) {
      throw new PropertyAccessException("Property named '" + property
          + "' is not a valid property name for this type");
    }
    return getter.get(this);
  }
View Full Code Here

            // try to resolve as property if the last method returned a type
            if (currentInputType instanceof EventEPType) {
                EventType inputEventType = ((EventEPType) currentInputType).getType();
                Class type = inputEventType.getPropertyType(chainElement.getName());
                EventPropertyGetter getter = inputEventType.getGetter(chainElement.getName());
                if (type != null && getter != null) {
                    ExprDotEvalProperty noduck = new ExprDotEvalProperty(getter, EPTypeHelper.singleValue(JavaClassHelper.getBoxedType(type)));
                    methodEvals.add(noduck);
                    currentInputType = EPTypeHelper.singleValue(EPTypeHelper.getClassSingleValued(noduck.getTypeInfo()));
                    continue;
View Full Code Here

        try {
            DatabaseConnectionFactory connectionFactory = databaseConfigSvc.getConnectionFactory(dmlQuery.getConnection());

            Map<Integer, BindingEntry> bindings = new HashMap<Integer, BindingEntry>();
            for (BindingParameter params : dmlQuery.getBindings()) {
                EventPropertyGetter valueGetter = eventType.getGetter(params.getPropertyName());
                bindings.put(params.getPosition(), new BindingEntry(valueGetter));
            }

            StoreExceptionHandler handler = new StoreExceptionHandler() {
                public void handle(String message, SQLException ex)
View Full Code Here

            if (parameterPropertyStart == null) {
                throw new ExprValidationException("For date-time method '" + methodNameUse + "' the first parameter is event type '" + type.getName() + "', however no timestamp property has been defined for this event type");
            }

            timestampType = type.getPropertyType(parameterPropertyStart);
            EventPropertyGetter getter = type.getGetter(parameterPropertyStart);
            evaluatorTimestamp = new ExprEvaluatorStreamLongProp(parameterStreamNum, getter);

            if (type.getEndTimestampPropertyName() != null) {
                parameterPropertyEnd = type.getEndTimestampPropertyName();
                EventPropertyGetter getterEndTimestamp = type.getGetter(type.getEndTimestampPropertyName());
                evaluatorEndTimestamp = new ExprEvaluatorStreamLongProp(parameterStreamNum, getterEndTimestamp);
            }
            else {
                parameterPropertyEnd = parameterPropertyStart;
            }
View Full Code Here

    {
        String[] properties = eventType.getPropertyNames();
        List<EventPropertyGetter> getters = new ArrayList<EventPropertyGetter>();
        for (String property : properties)
        {
            EventPropertyGetter getter = eventType.getGetter(property);
            if (getter != null)
            {
                getters.add(getter);
            }
        }
View Full Code Here

TOP

Related Classes of com.espertech.esper.client.EventPropertyGetter

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.