Interface RaceService

All Known Implementing Classes:
RaceServiceMain

public interface RaceService
The RaceService defines the business operations for managing race data.
  • Method Details

    • getNonDerivedRacesWithMostRecentAddedResults

      org.springframework.data.domain.Page<RaceDTO> getNonDerivedRacesWithMostRecentAddedResults(org.springframework.data.domain.Pageable pageable)
      Returns a Page of the most recent non-derived races that 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 Page of races
    • getRaceResults

      RaceResultsDTO getRaceResults(RaceDTO race)
      Returns a RaceResultsDTO containing the results of the given race, grouped by AgeGroup. 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 RaceResultsDTO with the race results
      Throws:
      EnduranceTrioException - if the race's type group is invalid or unsupported