Record Class AuthorDTO
java.lang.Object
java.lang.Record
com.endurancetrio.business.insight.dto.AuthorDTO
- Record Components:
id- the unique identifier of the authorknownName- the display name of the author (must be non-null and non-blank)bio- the optional biography of the authorprofileFileName- the optional file name of the author's profile imageathleteId- the optional identifier of theAthletelinked to this author, used in the frontend to connect author and athlete profiles
public record AuthorDTO(Long id, String knownName, String bio, String profileFileName, Long athleteId)
extends Record
AuthorDTO carries the author profile data for the Insights section.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theathleteIdrecord component.bio()Returns the value of thebiorecord 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 theknownNamerecord component.Returns the value of theprofileFileNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuthorDTO
Creates an instance of aAuthorDTOrecord class.- Parameters:
id- the value for theidrecord componentknownName- the value for theknownNamerecord componentbio- the value for thebiorecord componentprofileFileName- the value for theprofileFileNamerecord componentathleteId- the value for theathleteIdrecord 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
-
knownName
Returns the value of theknownNamerecord component.- Returns:
- the value of the
knownNamerecord component
-
bio
Returns the value of thebiorecord component.- Returns:
- the value of the
biorecord component
-
profileFileName
Returns the value of theprofileFileNamerecord component.- Returns:
- the value of the
profileFileNamerecord component
-
athleteId
Returns the value of theathleteIdrecord component.- Returns:
- the value of the
athleteIdrecord component
-