Record Class EventDTO
java.lang.Object
java.lang.Record
com.endurancetrio.business.event.dto.EventDTO
- Record Components:
id- the unique identifier of the eventtitle- the title of the eventstartDate- the start date of the eventendDate- the end date of the eventcity- the city where the event takes placecounty- the county where the event takes placedistrict- the district where the event takes placesportCodes- the distinct sport codes associated with the event's courses, sorted alphabetically
public record EventDTO(Long id, String title, LocalDate startDate, LocalDate endDate, String city, String county, String district, List<String> sportCodes)
extends Record
The
EventDTO represents an event with its basic information, location data, and the
distinct sport codes extracted from its courses.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncity()Returns the value of thecityrecord component.county()Returns the value of thecountyrecord component.district()Returns the value of thedistrictrecord component.endDate()Returns the value of theendDaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thesportCodesrecord component.Returns the value of thestartDaterecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EventDTO
public EventDTO(Long id, String title, LocalDate startDate, LocalDate endDate, String city, String county, String district, List<String> sportCodes) Creates an instance of aEventDTOrecord class.- Parameters:
id- the value for theidrecord componenttitle- the value for thetitlerecord componentstartDate- the value for thestartDaterecord componentendDate- the value for theendDaterecord componentcity- the value for thecityrecord componentcounty- the value for thecountyrecord componentdistrict- the value for thedistrictrecord componentsportCodes- the value for thesportCodesrecord 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
-
startDate
Returns the value of thestartDaterecord component.- Returns:
- the value of the
startDaterecord component
-
endDate
Returns the value of theendDaterecord component.- Returns:
- the value of the
endDaterecord component
-
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-
county
Returns the value of thecountyrecord component.- Returns:
- the value of the
countyrecord component
-
district
Returns the value of thedistrictrecord component.- Returns:
- the value of the
districtrecord component
-
sportCodes
Returns the value of thesportCodesrecord component.- Returns:
- the value of the
sportCodesrecord component
-