コード例 #1
0
  @Transactional(readOnly = true, propagation = Propagation.NOT_SUPPORTED)
  public List<QueueEntry> getEntriesByQueueId(Integer queueId) {
    ProcessingQueue queue = queueDao.getQueueById(queueId);
    List<QueueEntry> list = entryDao.getQueueEntryByQueueRef(queue);

    return list;
  }
コード例 #2
0
  public Integer deleteQueueAndEntries(Integer queueId) {
    Integer entries = 0;

    ProcessingQueue queue = queueDao.getQueueById(queueId);
    List<QueueEntry> list = entryDao.getQueueEntryByQueueRef(queue);
    for (QueueEntry entry : list) {
      entryDao.delete(entry);
      entries++;
    }
    queueDao.delete(queue);

    return entries;
  }