Exemplo n.º 1
0
 @Override
 @Transactional
 public void deleteSingleTeamTag(TeamTag teamTag) {
   TeamTag newTeamTag = teamTagPersistence.reload(teamTag);
   if (newTeamTag != null) {
     teamTagPersistence.deleteTeamTag(newTeamTag);
   }
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 5
0
 @Override
 @Transactional(readOnly = true)
 public TeamTag reload(TeamTag teamTag) {
   return teamTagPersistence.reload(teamTag);
 }
Exemplo n.º 6
0
 @Override
 public Page<TeamTag> findAllTeamTagsWithTeam(Pageable pageable, Team team) {
   return teamTagPersistence.getAllTeamTagsForTeam(pageable, team);
 }