/** * Constructor that takes a list of {@link HistoryEventHandler} that consume * the event and adds {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeDbHistoryEventHandler(final List<HistoryEventHandler> historyEventHandlers) { super(historyEventHandlers); addDefaultDbHistoryEventHandler(); }
public void handleEvents(List<HistoryEvent> historyEvents) { for (HistoryEvent historyEvent : historyEvents) { handleEvent(historyEvent); } }
@Override public void handleEvent(final HistoryEvent historyEvent) { for (HistoryEventHandler historyEventHandler : historyEventHandlers) { historyEventHandler.handleEvent(historyEvent); } }
public void handleEvent(HistoryEvent historyEvent) { if (historyEvent instanceof HistoricVariableUpdateEventEntity) { insertHistoricVariableUpdateEntity((HistoricVariableUpdateEventEntity) historyEvent); } else if(historyEvent instanceof HistoricDecisionEvaluationEvent) { insertHistoricDecisionEvaluationEvent((HistoricDecisionEvaluationEvent) historyEvent); } else { insertOrUpdate(historyEvent); } }
protected void initHistoryEventHandler() { if (historyEventHandler == null) { historyEventHandler = new DbHistoryEventHandler(); } }
/** * Constructor that takes a list of {@link HistoryEventHandler} that consume * the event. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeHistoryEventHandler(final List<HistoryEventHandler> historyEventHandlers) { initializeHistoryEventHandlers(historyEventHandlers); }
@Override public void handleEvents(final List<HistoryEvent> historyEvents) { for (HistoryEvent historyEvent : historyEvents) { handleEvent(historyEvent); } }
public void handleEvent(HistoryEvent historyEvent) { if (historyEvent instanceof HistoricVariableUpdateEventEntity) { insertHistoricVariableUpdateEntity((HistoricVariableUpdateEventEntity) historyEvent); } else if(historyEvent instanceof HistoricDecisionEvaluationEvent) { insertHistoricDecisionEvaluationEvent((HistoricDecisionEvaluationEvent) historyEvent); } else { insertOrUpdate(historyEvent); } }
protected void initHistoryEventHandler() { if (historyEventHandler == null) { historyEventHandler = new DbHistoryEventHandler(); } }
/** * Constructor that takes a list of {@link HistoryEventHandler} that consume * the event and adds {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeDbHistoryEventHandler(final List<HistoryEventHandler> historyEventHandlers) { super(historyEventHandlers); addDefaultDbHistoryEventHandler(); }
public void handleEvents(List<HistoryEvent> historyEvents) { for (HistoryEvent historyEvent : historyEvents) { handleEvent(historyEvent); } }
/** * Constructor that takes a list of {@link HistoryEventHandler} that consume * the event. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeHistoryEventHandler(final List<HistoryEventHandler> historyEventHandlers) { initializeHistoryEventHandlers(historyEventHandlers); }
@Override public void handleEvent(final HistoryEvent historyEvent) { for (HistoryEventHandler historyEventHandler : historyEventHandlers) { historyEventHandler.handleEvent(historyEvent); } }
@Override public void handleEvents(final List<HistoryEvent> historyEvents) { for (HistoryEvent historyEvent : historyEvents) { handleEvent(historyEvent); } }
/** * Add {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. */ private void addDefaultDbHistoryEventHandler() { historyEventHandlers.add(new DbHistoryEventHandler()); }
/** * Non-argument constructor that adds {@link DbHistoryEventHandler} to the * list of {@link HistoryEventHandler}. */ public CompositeDbHistoryEventHandler() { super(); addDefaultDbHistoryEventHandler(); }
/** * Constructor that takes a varargs parameter {@link HistoryEventHandler} that * consume the event. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeHistoryEventHandler(final HistoryEventHandler... historyEventHandlers) { initializeHistoryEventHandlers(Arrays.asList(historyEventHandlers)); }
/** * Constructor that takes a varargs parameter {@link HistoryEventHandler} that * consume the event and adds {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeDbHistoryEventHandler(final HistoryEventHandler... historyEventHandlers) { super(historyEventHandlers); addDefaultDbHistoryEventHandler(); }
/** * Non-argument constructor that adds {@link DbHistoryEventHandler} to the * list of {@link HistoryEventHandler}. */ public CompositeDbHistoryEventHandler() { super(); addDefaultDbHistoryEventHandler(); }
/** * Constructor that takes a varargs parameter {@link HistoryEventHandler} that * consume the event and adds {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeDbHistoryEventHandler(final HistoryEventHandler... historyEventHandlers) { super(historyEventHandlers); addDefaultDbHistoryEventHandler(); }