Record Class EventOverviewDTO

java.lang.Object
java.lang.Record
com.endurancetrio.business.event.dto.EventOverviewDTO
Record Components:
id - the unique identifier of the event
title - the title of the event
startDate - the start date of the event
endDate - the end date of the event
city - the city where the event takes place
county - the county where the event takes place
district - the district where the event takes place
organizers - the organizers of the event
races - the races associated with the event
files - the files associated with the event

public record EventOverviewDTO(Long id, String title, LocalDate startDate, LocalDate endDate, String city, String county, String district, List<OrganizerDTO> organizers, List<RaceDTO> races, List<EventFileDTO> files) extends Record
The EventOverviewDTO provides a summary of an event, including its basic details, location, organizers, and races.
  • Constructor Details

    • EventOverviewDTO

      public EventOverviewDTO(Long id, String title, LocalDate startDate, LocalDate endDate, String city, String county, String district, List<OrganizerDTO> organizers, List<RaceDTO> races, List<EventFileDTO> files)
      Creates an instance of a EventOverviewDTO record class.
      Parameters:
      id - the value for the id record component
      title - the value for the title record component
      startDate - the value for the startDate record component
      endDate - the value for the endDate record component
      city - the value for the city record component
      county - the value for the county record component
      district - the value for the district record component
      organizers - the value for the organizers record component
      races - the value for the races record component
      files - the value for the files record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public Long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • startDate

      public LocalDate startDate()
      Returns the value of the startDate record component.
      Returns:
      the value of the startDate record component
    • endDate

      public LocalDate endDate()
      Returns the value of the endDate record component.
      Returns:
      the value of the endDate record component
    • city

      public String city()
      Returns the value of the city record component.
      Returns:
      the value of the city record component
    • county

      public String county()
      Returns the value of the county record component.
      Returns:
      the value of the county record component
    • district

      public String district()
      Returns the value of the district record component.
      Returns:
      the value of the district record component
    • organizers

      public List<OrganizerDTO> organizers()
      Returns the value of the organizers record component.
      Returns:
      the value of the organizers record component
    • races

      public List<RaceDTO> races()
      Returns the value of the races record component.
      Returns:
      the value of the races record component
    • files

      public List<EventFileDTO> files()
      Returns the value of the files record component.
      Returns:
      the value of the files record component