Package org.localify.festival.jpa
Class FestivalArtist
java.lang.Object
org.localify.festival.jpa.FestivalArtist
Represents the join table between artists and festivals.
This class mimics the behavior of an ArtistCity.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the composite key for the FestivalArtist entity. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected no-arg constructor for JPA.FestivalArtist(Artist artist, Festival festival) Constructs a new FestivalArtist. -
Method Summary
Modifier and TypeMethodDescriptionGets the artist.Gets the creation timestamp.Gets the festival.getKey()Gets the composite key.Gets the last update timestamp.voidSets the artist.voidsetCreatedAt(Instant createdAt) Sets the creation timestamp.voidsetFestival(Festival festival) Sets the festival.voidsetKey(FestivalArtist.Key key) Sets the composite key.voidsetUpdatedAt(Instant updatedAt) Sets the last update timestamp.toArtistResponse(Boolean isFavorite) Converts the artist to a festival artist response DTO.Converts the festival to a basic response DTO.
-
Constructor Details
-
FestivalArtist
protected FestivalArtist()Protected no-arg constructor for JPA. -
FestivalArtist
Constructs a new FestivalArtist.- Parameters:
artist- The artist.festival- The festival.
-
-
Method Details
-
getKey
Gets the composite key.- Returns:
- The key.
-
setKey
Sets the composite key.- Parameters:
key- The key.
-
getArtist
Gets the artist.- Returns:
- The artist.
-
setArtist
Sets the artist.- Parameters:
artist- The artist.
-
getFestival
Gets the festival.- Returns:
- The festival.
-
setFestival
Sets the festival.- Parameters:
festival- The festival.
-
getCreatedAt
Gets the creation timestamp.- Returns:
- The creation timestamp.
-
setCreatedAt
Sets the creation timestamp.- Parameters:
createdAt- The creation timestamp.
-
getUpdatedAt
Gets the last update timestamp.- Returns:
- The last update timestamp.
-
setUpdatedAt
Sets the last update timestamp.- Parameters:
updatedAt- The last update timestamp.
-
toFestivalResponse
Converts the festival to a basic response DTO.- Returns:
- The basic festival response DTO.
-
toArtistResponse
Converts the artist to a festival artist response DTO.- Parameters:
isFavorite- Whether the artist is a favorite of the user.- Returns:
- The festival artist response DTO.
-