Ejemplo n.º 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);
   }
 }
Ejemplo n.º 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);
 }