@SuppressWarnings("unchecked") public List<SignalEventSubscriptionEntity> findSignalEventSubscriptionsByEventName( String eventName) { final String query = "selectSignalEventSubscriptionsByEventName"; Set<SignalEventSubscriptionEntity> selectList = new HashSet<SignalEventSubscriptionEntity>(getDbSqlSession().selectList(query, eventName)); // add events created in this command (not visible yet in query) for (SignalEventSubscriptionEntity entity : createdSignalSubscriptions) { if (eventName.equals(entity.getEventName())) { selectList.add(entity); } } return new ArrayList<SignalEventSubscriptionEntity>(selectList); }
@SuppressWarnings("unchecked") public List<SignalEventSubscriptionEntity> findSignalEventSubscriptionsByNameAndExecution( String name, String executionId) { final String query = "selectSignalEventSubscriptionsByNameAndExecution"; Map<String, String> params = new HashMap<String, String>(); params.put("executionId", executionId); params.put("eventName", name); Set<SignalEventSubscriptionEntity> selectList = new HashSet<SignalEventSubscriptionEntity>(getDbSqlSession().selectList(query, params)); // add events created in this command (not visible yet in query) for (SignalEventSubscriptionEntity entity : createdSignalSubscriptions) { if (executionId.equals(entity.getExecutionId()) && name.equals(entity.getEventName())) { selectList.add((SignalEventSubscriptionEntity) entity); } } return new ArrayList<SignalEventSubscriptionEntity>(selectList); }