Interface EventService
- All Known Implementing Classes:
EventServiceMain
public interface EventService
The
EventService defines the business operations for managing event data.-
Method Summary
Modifier and TypeMethodDescriptiongetEventOverview(Long id, int year) Returns anEventOverviewDTOcontaining the summary details of the event identified by the givenidand belonging to the givenyear, including its organizers and races.getEventsByYear(int year, org.springframework.data.domain.Pageable pageable) Returns anEventsPageDTOcontaining theeventswhose start date falls within the givenyear, ordered by start date descending and paginated according to the givenPageable.Returns a list of all distinct years extracted from the events' start dates, ordered descending.
-
Method Details
-
getEventYears
Returns a list of all distinct years extracted from the events' start dates, ordered descending. This is used byYearsWithEventsDTOto drive the year-browser pagination on the events landing page.- Returns:
- a list of distinct event years in descending order
-
getEventsByYear
Returns anEventsPageDTOcontaining theeventswhose start date falls within the givenyear, ordered by start date descending and paginated according to the givenPageable.- Parameters:
year- the year to filter events bypageable- the pagination information (page number, page size, etc.)- Returns:
- an
EventsPageDTOwith the events for the given year and pagination metadata
-
getEventOverview
Returns anEventOverviewDTOcontaining the summary details of the event identified by the givenidand belonging to the givenyear, including its organizers and races.- Parameters:
id- the unique identifier of the eventyear- the year the event belongs to- Returns:
- an
EventOverviewDTOwith the event overview - Throws:
EnduranceTrioException- if no event with the givenidandyearis found
-