Record Class RaceDTO
java.lang.Object
java.lang.Record
com.endurancetrio.business.event.dto.RaceDTO
- Record Components:
id- the unique identifier of the racetitle- the title of the racesubtitle- the subtitle of the racedate- the date of the racetime- an optional start time for the racesports- the sport codes associated with the racedistanceTypes- the distance type codes associated with the raceraceTypeGroup- the race type group codedistanceMetadata- optional metadata describing the distance compositionevent- the event that the race belongs to (may be null)
public record RaceDTO(Long id, String title, String subtitle, LocalDate date, LocalTime time, List<String> sports, List<String> distanceTypes, String raceTypeGroup, DistanceMetadataDTO distanceMetadata, EventDTO event)
extends Record
The
RaceDTO represents a race within an event, including its schedule, sport categories,
distance types, and optional distance metadata.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondate()Returns the value of thedaterecord component.Returns the value of thedistanceMetadatarecord component.Returns the value of thedistanceTypesrecord component.final booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theraceTypeGrouprecord component.sports()Returns the value of thesportsrecord component.subtitle()Returns the value of thesubtitlerecord component.time()Returns the value of thetimerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RaceDTO
public RaceDTO(Long id, String title, String subtitle, LocalDate date, LocalTime time, List<String> sports, List<String> distanceTypes, String raceTypeGroup, DistanceMetadataDTO distanceMetadata, EventDTO event) Creates an instance of aRaceDTOrecord class.- Parameters:
id- the value for theidrecord componenttitle- the value for thetitlerecord componentsubtitle- the value for thesubtitlerecord componentdate- the value for thedaterecord componenttime- the value for thetimerecord componentsports- the value for thesportsrecord componentdistanceTypes- the value for thedistanceTypesrecord componentraceTypeGroup- the value for theraceTypeGrouprecord componentdistanceMetadata- the value for thedistanceMetadatarecord componentevent- the value for theeventrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
subtitle
Returns the value of thesubtitlerecord component.- Returns:
- the value of the
subtitlerecord component
-
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
time
Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
sports
Returns the value of thesportsrecord component.- Returns:
- the value of the
sportsrecord component
-
distanceTypes
Returns the value of thedistanceTypesrecord component.- Returns:
- the value of the
distanceTypesrecord component
-
raceTypeGroup
Returns the value of theraceTypeGrouprecord component.- Returns:
- the value of the
raceTypeGrouprecord component
-
distanceMetadata
Returns the value of thedistanceMetadatarecord component.- Returns:
- the value of the
distanceMetadatarecord component
-
event
Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-