Record Class RecommendedFestivalArtistDto
java.lang.Object
java.lang.Record
org.localify.festival.dto.response.RecommendedFestivalArtistDto
- Record Components:
id- The ID of the artist.name- The name of the artist.image- The URL of the artist's image.genres- A list of genres for the artist.isSeed- Whether the artist is a seed for recommendations.score- The recommendation score.isFavorite- Whether the artist is a favorite of the user.similar- A list of similar artists.localCity- A list of local cities for the artist.spotifyTopTrackPreview- The URL for the artist's top track preview on Spotify.performances- A list of the artist's performances at the festival.
- All Implemented Interfaces:
Serializable
public record RecommendedFestivalArtistDto(UUID id, String name, String image, List<GenreResponse> genres, Boolean isSeed, Double score, boolean isFavorite, List<RecommendedArtistDto.SimilarArtistDto> similar, List<ArtistCityResponse> localCity, String spotifyTopTrackPreview, List<FestivalPerformanceResponse> performances)
extends Record
implements Serializable
Data Transfer Object for a recommended artist at a festival.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRecommendedFestivalArtistDto(UUID id, String name, String image, List<GenreResponse> genres, Boolean isSeed, Double score, boolean isFavorite, List<RecommendedArtistDto.SimilarArtistDto> similar, List<ArtistCityResponse> localCity, String spotifyTopTrackPreview, List<FestivalPerformanceResponse> performances) Creates an instance of aRecommendedFestivalArtistDtorecord class.RecommendedFestivalArtistDto(RecommendedArtistDto artistDto, List<FestivalPerformance> performances) Constructs a new RecommendedFestivalArtistDto from a RecommendedArtistDto and a list of performances. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.genres()Returns the value of thegenresrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.image()Returns the value of theimagerecord component.booleanReturns the value of theisFavoriterecord component.isSeed()Returns the value of theisSeedrecord component.Returns the value of thelocalCityrecord component.name()Returns the value of thenamerecord component.Returns the value of theperformancesrecord component.score()Returns the value of thescorerecord component.similar()Returns the value of thesimilarrecord component.Returns the value of thespotifyTopTrackPreviewrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecommendedFestivalArtistDto
public RecommendedFestivalArtistDto(RecommendedArtistDto artistDto, List<FestivalPerformance> performances) Constructs a new RecommendedFestivalArtistDto from a RecommendedArtistDto and a list of performances.- Parameters:
artistDto- The recommended artist DTO.performances- The list of performances.
-
RecommendedFestivalArtistDto
public RecommendedFestivalArtistDto(UUID id, String name, String image, List<GenreResponse> genres, Boolean isSeed, Double score, boolean isFavorite, @NonNull List<RecommendedArtistDto.SimilarArtistDto> similar, List<ArtistCityResponse> localCity, String spotifyTopTrackPreview, List<FestivalPerformanceResponse> performances) Creates an instance of aRecommendedFestivalArtistDtorecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentimage- the value for theimagerecord componentgenres- the value for thegenresrecord componentisSeed- the value for theisSeedrecord componentscore- the value for thescorerecord componentisFavorite- the value for theisFavoriterecord componentsimilar- the value for thesimilarrecord componentlocalCity- the value for thelocalCityrecord componentspotifyTopTrackPreview- the value for thespotifyTopTrackPreviewrecord componentperformances- the value for theperformancesrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
genres
Returns the value of thegenresrecord component.- Returns:
- the value of the
genresrecord component
-
isSeed
Returns the value of theisSeedrecord component.- Returns:
- the value of the
isSeedrecord component
-
score
Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
isFavorite
public boolean isFavorite()Returns the value of theisFavoriterecord component.- Returns:
- the value of the
isFavoriterecord component
-
similar
Returns the value of thesimilarrecord component.- Returns:
- the value of the
similarrecord component
-
localCity
Returns the value of thelocalCityrecord component.- Returns:
- the value of the
localCityrecord component
-
spotifyTopTrackPreview
Returns the value of thespotifyTopTrackPreviewrecord component.- Returns:
- the value of the
spotifyTopTrackPreviewrecord component
-
performances
Returns the value of theperformancesrecord component.- Returns:
- the value of the
performancesrecord component
-