Class FestivalArtist

java.lang.Object
org.localify.festival.jpa.FestivalArtist

@Entity public class FestivalArtist extends Object
Represents the join table between artists and festivals. This class mimics the behavior of an ArtistCity.
  • Constructor Details

    • FestivalArtist

      protected FestivalArtist()
      Protected no-arg constructor for JPA.
    • FestivalArtist

      public FestivalArtist(Artist artist, Festival festival)
      Constructs a new FestivalArtist.
      Parameters:
      artist - The artist.
      festival - The festival.
  • Method Details

    • getKey

      public FestivalArtist.Key getKey()
      Gets the composite key.
      Returns:
      The key.
    • setKey

      public void setKey(FestivalArtist.Key key)
      Sets the composite key.
      Parameters:
      key - The key.
    • getArtist

      public Artist getArtist()
      Gets the artist.
      Returns:
      The artist.
    • setArtist

      public void setArtist(Artist artist)
      Sets the artist.
      Parameters:
      artist - The artist.
    • getFestival

      public Festival getFestival()
      Gets the festival.
      Returns:
      The festival.
    • setFestival

      public void setFestival(Festival festival)
      Sets the festival.
      Parameters:
      festival - The festival.
    • getCreatedAt

      public Instant getCreatedAt()
      Gets the creation timestamp.
      Returns:
      The creation timestamp.
    • setCreatedAt

      public void setCreatedAt(Instant createdAt)
      Sets the creation timestamp.
      Parameters:
      createdAt - The creation timestamp.
    • getUpdatedAt

      public Instant getUpdatedAt()
      Gets the last update timestamp.
      Returns:
      The last update timestamp.
    • setUpdatedAt

      public void setUpdatedAt(Instant updatedAt)
      Sets the last update timestamp.
      Parameters:
      updatedAt - The last update timestamp.
    • toFestivalResponse

      public FestivalBasicResponse toFestivalResponse()
      Converts the festival to a basic response DTO.
      Returns:
      The basic festival response DTO.
    • toArtistResponse

      public FestivalArtistResponse toArtistResponse(Boolean isFavorite)
      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.