コード例 #1
0
 @Override
 @Transactional
 public void deleteSingleTeamTag(TeamTag teamTag) {
   TeamTag newTeamTag = teamTagPersistence.reload(teamTag);
   if (newTeamTag != null) {
     teamTagPersistence.deleteTeamTag(newTeamTag);
   }
 }
コード例 #2
0
 @Override
 @Transactional
 public List<TeamTag> save(Team team, Set<Tag> tagSet) {
   Team teamToFind = teamPersistence.reload(team);
   if (teamToFind != null) {
     teamTagPersistence.deleteTeamTagsWithTeam(teamToFind);
     if (tagSet != null) {
       List<TeamTag> savedTeamTags = new ArrayList<>();
       for (Tag tag : tagSet) {
         TeamTag teamTag = new TeamTag(teamToFind, tag);
         TeamTag savedTeamTag = teamTagPersistence.saveTeamTag(teamTag);
         savedTeamTags.add(savedTeamTag);
       }
       return savedTeamTags;
     }
   }
   return null;
 }
コード例 #3
0
 @Override
 @Transactional
 public TeamTag saveSingleTeamTag(Team team, Tag tag) {
   Team teamToFind = teamPersistence.reload(team);
   Tag tagToFind = tagPersistence.reload(tag);
   if (teamToFind != null && tagToFind != null) {
     TeamTag teamTag = new TeamTag(teamToFind, tag);
     return teamTagPersistence.saveTeamTag(teamTag);
   }
   return null;
 }
コード例 #4
0
 @Override
 @Transactional(readOnly = true)
 public Page<TeamTag> findTeamsWithTag(
     Pageable pageable, TeamTagSearchFilter teamTagSearchFilter) {
   Set<Tag> tagSet = teamTagSearchFilter.getTagSet();
   Set<Tag> newTagSet = new HashSet<>();
   for (Tag tag : tagSet) {
     tag = tagPersistence.reload(new Tag(tag.getId()));
     if (tag != null) {
       newTagSet.add(tag);
     }
   }
   teamTagSearchFilter.setTagSet(newTagSet);
   return teamTagPersistence.findTeamsWithTag(pageable, teamTagSearchFilter);
 }
コード例 #5
0
 @Override
 @Transactional(readOnly = true)
 public TeamTag reload(TeamTag teamTag) {
   return teamTagPersistence.reload(teamTag);
 }
コード例 #6
0
 @Override
 public Page<TeamTag> findAllTeamTagsWithTeam(Pageable pageable, Team team) {
   return teamTagPersistence.getAllTeamTagsForTeam(pageable, team);
 }