Class FestivalUser

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

@Entity public class FestivalUser extends Object
Represents the join table between users and festivals. This class mimics the behavior of a UserCity.
  • Constructor Details

    • FestivalUser

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

      public FestivalUser(User user, Festival festival, Instant selectedAt)
      Constructs a new FestivalUser.
      Parameters:
      user - The user.
      festival - The festival.
      selectedAt - The timestamp when the festival was selected.
  • Method Details

    • getKey

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

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

      public User getUser()
      Gets the user.
      Returns:
      The user.
    • setUser

      public void setUser(User user)
      Sets the user.
      Parameters:
      user - The user.
    • 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.
    • getSelectedAt

      public Instant getSelectedAt()
      Gets the selected timestamp.
      Returns:
      The selected timestamp.
    • setSelectedAt

      public void setSelectedAt(Instant selectedAt)
      Sets the selected timestamp.
      Parameters:
      selectedAt - The selected timestamp.
    • getDeletedAt

      public Instant getDeletedAt()
      Gets the deleted timestamp.
      Returns:
      The deleted timestamp.
    • setDeletedAt

      public void setDeletedAt(Instant deletedAt)
      Sets the deleted timestamp.
      Parameters:
      deletedAt - The deleted timestamp.
    • getPlaylist

      public Playlist getPlaylist()
      Gets the playlist for the festival.
      Returns:
      The playlist.
    • setPlaylist

      public void setPlaylist(Playlist playlist)
      Sets the playlist for the festival.
      Parameters:
      playlist - The playlist.
    • toResponse

      public UserFestivalContainer toResponse()
      Converts the FestivalUser to a response DTO.
      Returns:
      The user festival container DTO.