Ejemplo n.º 1
0
 public Iterator<EventBean> iterator() {
   Map<String, Object> values =
       factory.getVariableReadWritePackage().iterate(exprEvaluatorContext.getAgentInstanceId());
   EventBean theEvent =
       factory.getEventAdapterService().adapterForTypedMap(values, factory.getEventType());
   return new SingleEventIterator(theEvent);
 }
Ejemplo n.º 2
0
  public void update(EventBean[] newData, EventBean[] oldData) {
    if ((newData == null) || (newData.length == 0)) {
      return;
    }

    Map<String, Object> values = null;
    boolean produceOutputEvents =
        (factory.getStatementResultService().isMakeNatural()
            || factory.getStatementResultService().isMakeSynthetic());

    if (produceOutputEvents) {
      values = new HashMap<String, Object>();
    }

    eventsPerStream[0] = newData[newData.length - 1];
    factory
        .getVariableReadWritePackage()
        .writeVariables(
            factory.getVariableService(), eventsPerStream, values, exprEvaluatorContext);

    if (values != null) {
      EventBean newDataOut[] = new EventBean[1];
      newDataOut[0] =
          factory.getEventAdapterService().adapterForTypedMap(values, factory.getEventType());
      this.updateChildren(newDataOut, null);
    }
  }