예제 #1
0
 @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);
   }
 }
예제 #2
0
 @Transactional(readOnly = false)
 public void saveGroup(Group group) {
   for (Long memberId : group.getMembersIdSet()) {
     group.addMember(getUserProfileByUserId(memberId));
   }
   logger.info("Saving " + group);
   userRepository.storeGroup(group);
 }