@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; }
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; }