@Transactional public WhatsNextEntry addToWhatsNext(User user, Task task) { WhatsNextEntry entry = new WhatsNextEntry(); entry.setTask(task); entry.setUser(user); whatsNextEntryDAO.store(entry); taskBusiness.addResponsible(task, user); doRankToBottomOnWhatsNext(entry); return entry; }
@Transactional private void doRankToBottomOnWhatsNext(WhatsNextEntry entry) throws IllegalArgumentException { rankingBusiness.rankToBottom(entry, whatsNextEntryDAO.getLastTaskInRank(entry.getUser())); }