@Transactional(readOnly = false) public void deleteGroup(Long groupId, Long userId) { Group group = userRepository.loadGroupById(groupId); if (group.checkOwnership(userId)) { logger.info("Deleting " + group); userRepository.deleteGroup(group); } }
public Group getGroupById(Long groupId) { return userRepository.loadGroupById(groupId); }