Class AthleteServiceMain
java.lang.Object
com.endurancetrio.business.competitor.service.AthleteServiceMain
- All Implemented Interfaces:
AthleteService
-
Constructor Summary
ConstructorsConstructorDescriptionAthleteServiceMain(AthleteRepository athleteRepository, IndividualResultRepository individualResultRepository, AthleteMapper athleteMapper, RaceMapper raceMapper) -
Method Summary
Modifier and TypeMethodDescriptiongetAthleteById(Long id) Returns theAthleteDTOfor the athlete with the given ID.getAthleteRaces(Long athleteId, org.springframework.data.domain.Pageable pageable) Returns anAthleteRacesPageDTOcontaining the paginated list of races for the athlete with the given ID, ordered by race date descending.getAthletes(org.springframework.data.domain.Pageable pageable) Returns anAthletesPageDTOcontaining the paginated list of athletes.
-
Constructor Details
-
AthleteServiceMain
@Autowired public AthleteServiceMain(AthleteRepository athleteRepository, IndividualResultRepository individualResultRepository, AthleteMapper athleteMapper, RaceMapper raceMapper)
-
-
Method Details
-
getAthletes
@Transactional(readOnly=true) public AthletesPageDTO getAthletes(org.springframework.data.domain.Pageable pageable) Description copied from interface:AthleteServiceReturns anAthletesPageDTOcontaining the paginated list of athletes.- Specified by:
getAthletesin interfaceAthleteService- Parameters:
pageable- the pagination information (page number, page size, etc.)- Returns:
- an
AthletesPageDTOwith the athletes for the current page and pagination metadata
-
getAthleteById
Description copied from interface:AthleteServiceReturns theAthleteDTOfor the athlete with the given ID.- Specified by:
getAthleteByIdin interfaceAthleteService- Parameters:
id- the unique identifier of the athlete- Returns:
- the
AthleteDTOfor the requested athlete
-
getAthleteRaces
@Transactional(readOnly=true) public AthleteRacesPageDTO getAthleteRaces(Long athleteId, org.springframework.data.domain.Pageable pageable) Description copied from interface:AthleteServiceReturns anAthleteRacesPageDTOcontaining the paginated list of races for the athlete with the given ID, ordered by race date descending.- Specified by:
getAthleteRacesin interfaceAthleteService- Parameters:
athleteId- the unique identifier of the athletepageable- the pagination information (page number, page size, etc.)- Returns:
- an
AthleteRacesPageDTOwith the races for the athlete and pagination metadata
-