Interface EventService

All Known Implementing Classes:
EventServiceMain

public interface EventService
The EventService defines the business operations for managing event data.
  • Method Summary

    Modifier and Type
    Method
    Description
    getEventOverview(Long id, int year)
    Returns an EventOverviewDTO containing the summary details of the event identified by the given id and belonging to the given year, including its organizers and races.
    getEventsByYear(int year, org.springframework.data.domain.Pageable pageable)
    Returns an EventsPageDTO containing the events whose start date falls within the given year, ordered by start date descending and paginated according to the given Pageable.
    Returns a list of all distinct years extracted from the events' start dates, ordered descending.
  • Method Details

    • getEventYears

      List<Integer> getEventYears()
      Returns a list of all distinct years extracted from the events' start dates, ordered descending. This is used by YearsWithEventsDTO to drive the year-browser pagination on the events landing page.
      Returns:
      a list of distinct event years in descending order
    • getEventsByYear

      EventsPageDTO getEventsByYear(int year, org.springframework.data.domain.Pageable pageable)
      Returns an EventsPageDTO containing the events whose start date falls within the given year, ordered by start date descending and paginated according to the given Pageable.
      Parameters:
      year - the year to filter events by
      pageable - the pagination information (page number, page size, etc.)
      Returns:
      an EventsPageDTO with the events for the given year and pagination metadata
    • getEventOverview

      EventOverviewDTO getEventOverview(Long id, int year)
      Returns an EventOverviewDTO containing the summary details of the event identified by the given id and belonging to the given year, including its organizers and races.
      Parameters:
      id - the unique identifier of the event
      year - the year the event belongs to
      Returns:
      an EventOverviewDTO with the event overview
      Throws:
      EnduranceTrioException - if no event with the given id and year is found