コード例 #1
0
 private void postExecutionEvents() {
   for (StatementExecutorWrapper each : statementExecutorWrappers) {
     if (each.getDMLExecutionEvent().isPresent()) {
       DMLExecutionEventBus.post(each.getDMLExecutionEvent().get());
     } else if (each.getDQLExecutionEvent().isPresent()) {
       DQLExecutionEventBus.post(each.getDQLExecutionEvent().get());
     }
   }
 }
コード例 #2
0
 private void postExecutionEventsAfterExecution(
     final StatementExecutorWrapper statementExecutorWrapper,
     final EventExecutionType eventExecutionType,
     final Optional<SQLException> exp) {
   if (statementExecutorWrapper.getDMLExecutionEvent().isPresent()) {
     DMLExecutionEvent event = statementExecutorWrapper.getDMLExecutionEvent().get();
     event.setEventExecutionType(eventExecutionType);
     event.setExp(exp);
     DMLExecutionEventBus.post(event);
   } else if (statementExecutorWrapper.getDQLExecutionEvent().isPresent()) {
     DQLExecutionEvent event = statementExecutorWrapper.getDQLExecutionEvent().get();
     event.setEventExecutionType(eventExecutionType);
     event.setExp(exp);
     DQLExecutionEventBus.post(event);
   }
 }