Interface RaceService
- All Known Implementing Classes:
RaceServiceMain
public interface RaceService
The
RaceService defines the business operations for managing race data.-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<RaceDTO> getNonDerivedRacesWithMostRecentAddedResults(org.springframework.data.domain.Pageable pageable) Returns aPageof the most recent non-derivedracesthat have at least one result recorded in the database.getRaceResults(RaceDTO race)
-
Method Details
-
getNonDerivedRacesWithMostRecentAddedResults
org.springframework.data.domain.Page<RaceDTO> getNonDerivedRacesWithMostRecentAddedResults(org.springframework.data.domain.Pageable pageable) Returns aPageof the most recent non-derivedracesthat have at least one result recorded in the database.Derived race types (
INDIVIDUAL_DERIVED,TEAM_RELAY_DERIVED,MIXED_RELAY_DERIVED) are excluded. Results are ordered by the most recent result creation date descending.- Parameters:
pageable- the pagination information- Returns:
- a
Pageofraces
-
getRaceResults
Returns aRaceResultsDTOcontaining the results of the givenrace, grouped byAgeGroup. The results include individual, team, or relay entries depending on the race's type group, each enriched with computed time gaps relative to the overall winner.- Parameters:
race- the race whose results are to be retrieved- Returns:
- a
RaceResultsDTOwith the race results - Throws:
EnduranceTrioException- if the race's type group is invalid or unsupported
-