Interface AthleteService
- All Known Implementing Classes:
AthleteServiceMain
public interface AthleteService
The
AthleteService defines the business operations for managing athlete data.-
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.
-
Method Details
-
getAthletes
Returns anAthletesPageDTOcontaining the paginated list of athletes.- Parameters:
pageable- the pagination information (page number, page size, etc.)- Returns:
- an
AthletesPageDTOwith the athletes for the current page and pagination metadata
-
getAthleteById
Returns theAthleteDTOfor the athlete with the given ID.- Parameters:
id- the unique identifier of the athlete- Returns:
- the
AthleteDTOfor the requested athlete - Throws:
EnduranceTrioException- if no athlete with the given ID is found
-
getAthleteRaces
AthleteRacesPageDTO 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.- 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
-