1 | package org.hplr.tournament.core.usecases.service; | |
2 | ||
3 | import lombok.RequiredArgsConstructor; | |
4 | import org.hplr.tournament.core.model.Tournament; | |
5 | import org.hplr.tournament.core.model.TournamentSnapshot; | |
6 | import org.hplr.tournament.core.usecases.port.dto.TournamentSelectDto; | |
7 | import org.hplr.tournament.core.usecases.port.in.GetAllTournamentsUseCaseInterface; | |
8 | import org.hplr.tournament.core.usecases.port.out.query.SelectAllTournamentsQueryInterface; | |
9 | import org.springframework.stereotype.Service; | |
10 | ||
11 | import java.util.List; | |
12 | ||
13 | @Service | |
14 | @RequiredArgsConstructor | |
15 | public class GetAllTournamentsUseCaseService implements GetAllTournamentsUseCaseInterface { | |
16 | ||
17 | private final SelectAllTournamentsQueryInterface selectAllTournamentsQueryInterface; | |
18 | ||
19 | @Override | |
20 | public List<TournamentSnapshot> getAllTournamentsList(Boolean closed) { | |
21 | List<TournamentSelectDto> tournamentSelectDtoList = selectAllTournamentsQueryInterface.selectAllTournaments(closed); | |
22 | List<Tournament> tournamentList = tournamentSelectDtoList.stream().map(Tournament::fromSelectDto).toList(); | |
23 |
1
1. getAllTournamentsList : replaced return value with Collections.emptyList for org/hplr/tournament/core/usecases/service/GetAllTournamentsUseCaseService::getAllTournamentsList → KILLED |
return tournamentList.stream().map(Tournament::toSnapshot).toList(); |
24 | } | |
25 | } | |
Mutations | ||
23 |
1.1 |