214215216217218219220221222223224
groupName = m.group(1); } } GroupRepository groupRepo = this.applicationContext.getBean(GroupRepository.class); Group group = groupRepo.findByName(groupName); if (group == null) { group = groupRepo.save(new Group().setName(groupName)); } else { // Update something ?
159160161162163164165166167168169
int groupId = -1; int userId = -1; if (groupProvided) { GroupRepository groupRepo = context.getBean(GroupRepository.class); Group group = groupRepo.findByName(groupName); if (group == null) { group = groupRepo.save(new Group().setName(groupName)); } groupId = group.getId();