Class Event

java.lang.Object
org.localify.event.Event

@Entity public class Event extends Object
Represents an event.
  • Constructor Details

    • Event

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

      public Event(String name, Instant startTime, Venue venue)
      Constructs a new Event.
      Parameters:
      name - The name of the event.
      startTime - The start time of the event.
      venue - The venue of the event.
  • Method Details

    • getArtists

      public Set<Artist> getArtists()
      Gets the artists performing at the event.
      Returns:
      The set of artists.
    • toResponse

      public EventResponse toResponse()
      Converts the event to a response DTO.
      Returns:
      The event response DTO.
    • toExtendedLocalResponse

      public EventResponseExtendedLocal toExtendedLocalResponse(List<BasicArtistLocalResponse> artists, boolean isFavorite)
      Converts the event to an extended local response DTO.
      Parameters:
      artists - The list of artists.
      isFavorite - Whether the event is a favorite of the user.
      Returns:
      The extended local event response DTO.
    • toExtendedResponse

      public EventResponseExtended toExtendedResponse(List<EventArtistResponse> artists, boolean isFavorite)
      Converts the event to an extended response DTO.
      Parameters:
      artists - The list of artists.
      isFavorite - Whether the event is a favorite of the user.
      Returns:
      The extended event response DTO.
    • getId

      public UUID getId()
      Gets the ID of the event.
      Returns:
      The event ID.
    • getName

      public String getName()
      Gets the name of the event.
      Returns:
      The event name.
    • getVenue

      public Venue getVenue()
      Gets the venue of the event.
      Returns:
      The venue.
    • getPlaylist

      public Playlist getPlaylist()
      Gets the playlist for the event.
      Returns:
      The playlist.
    • setName

      public void setName(String name)
      Sets the name of the event.
      Parameters:
      name - The event name.
    • setVenue

      public void setVenue(Venue venue)
      Sets the venue of the event.
      Parameters:
      venue - The venue.
    • setPlaylist

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

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

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

      public Instant getBannedAt()
      Gets the banned timestamp.
      Returns:
      The banned timestamp.
    • getDoorTime

      public Instant getDoorTime()
      Gets the door time.
      Returns:
      The door time.
    • setDoorTime

      public void setDoorTime(Instant doorTime)
      Sets the door time.
      Parameters:
      doorTime - The door time.
    • getStartTime

      public Instant getStartTime()
      Gets the start time.
      Returns:
      The start time.
    • setStartTime

      public void setStartTime(Instant startTime)
      Sets the start time.
      Parameters:
      startTime - The start time.
    • getEndTime

      public Instant getEndTime()
      Gets the end time.
      Returns:
      The end time.
    • setEndTime

      public void setEndTime(Instant endTime)
      Sets the end time.
      Parameters:
      endTime - The end time.
    • getLowPrice

      public Double getLowPrice()
      Gets the low price.
      Returns:
      The low price.
    • setLowPrice

      public void setLowPrice(Double lowPrice)
      Sets the low price.
      Parameters:
      lowPrice - The low price.
    • getHighPrice

      public Double getHighPrice()
      Gets the high price.
      Returns:
      The high price.
    • setHighPrice

      public void setHighPrice(Double highPrice)
      Sets the high price.
      Parameters:
      highPrice - The high price.
    • getTicketUrl

      public String getTicketUrl()
      Gets the ticket URL.
      Returns:
      The ticket URL.
    • setTicketUrl

      public void setTicketUrl(String ticketUrl)
      Sets the ticket URL.
      Parameters:
      ticketUrl - The ticket URL.
    • getBandsInTownId

      public String getBandsInTownId()
      Gets the BandsInTown ID.
      Returns:
      The BandsInTown ID.
    • setBandsInTownId

      public void setBandsInTownId(String bandsInTownId)
      Sets the BandsInTown ID.
      Parameters:
      bandsInTownId - The BandsInTown ID.
    • getBandsInTownQueuedAt

      public Instant getBandsInTownQueuedAt()
      Gets the BandsInTown queued timestamp.
      Returns:
      The BandsInTown queued timestamp.
    • setBandsInTownQueuedAt

      public void setBandsInTownQueuedAt(Instant bandsInTownQueuedAt)
      Sets the BandsInTown queued timestamp.
      Parameters:
      bandsInTownQueuedAt - The BandsInTown queued timestamp.
    • setBandsInTownLastQueued

      public void setBandsInTownLastQueued()
      Sets the BandsInTown last queued timestamp to now.
    • getBandsInTownUpdatedAt

      public Instant getBandsInTownUpdatedAt()
      Gets the BandsInTown updated timestamp.
      Returns:
      The BandsInTown updated timestamp.
    • setBandsInTownUpdatedAt

      public void setBandsInTownUpdatedAt(Instant bandsInTownUpdatedAt)
      Sets the BandsInTown updated timestamp.
      Parameters:
      bandsInTownUpdatedAt - The BandsInTown updated timestamp.
    • getPollstarId

      public String getPollstarId()
      Gets the Pollstar ID.
      Returns:
      The Pollstar ID.
    • setPollstarId

      public void setPollstarId(String pollstarId)
      Sets the Pollstar ID.
      Parameters:
      pollstarId - The Pollstar ID.
    • getPollstarQueuedAt

      public Instant getPollstarQueuedAt()
      Gets the Pollstar queued timestamp.
      Returns:
      The Pollstar queued timestamp.
    • setPollstarQueuedAt

      public void setPollstarQueuedAt(Instant pollstarQueuedAt)
      Sets the Pollstar queued timestamp.
      Parameters:
      pollstarQueuedAt - The Pollstar queued timestamp.
    • setPollstarLastQueuedAt

      public void setPollstarLastQueuedAt()
      Sets the Pollstar last queued timestamp to now.
    • getPollstarUpdatedAt

      public Instant getPollstarUpdatedAt()
      Gets the Pollstar updated timestamp.
      Returns:
      The Pollstar updated timestamp.
    • setBandsInTownUpdatedAt

      public void setBandsInTownUpdatedAt()
      Sets the BandsInTown updated timestamp to now.
    • setPollstarUpdatedAt

      public void setPollstarUpdatedAt(Instant pollstarUpdatedAt)
      Sets the Pollstar updated timestamp.
      Parameters:
      pollstarUpdatedAt - The Pollstar updated timestamp.
    • setPollstarUpdatedAt

      public void setPollstarUpdatedAt()
      Sets the Pollstar updated timestamp to now.
    • getGoogleUpdatedAt

      public Instant getGoogleUpdatedAt()
      Gets the Google updated timestamp.
      Returns:
      The Google updated timestamp.
    • setGoogleUpdatedAt

      public void setGoogleUpdatedAt(Instant googleUpdatedAt)
      Sets the Google updated timestamp.
      Parameters:
      googleUpdatedAt - The Google updated timestamp.
    • setGoogleUpdatedAt

      public void setGoogleUpdatedAt()
      Sets the Google updated timestamp to now.
    • getSpotifyUpdatedAt

      public Instant getSpotifyUpdatedAt()
      Gets the Spotify updated timestamp.
      Returns:
      The Spotify updated timestamp.
    • setSpotifyUpdatedAt

      public void setSpotifyUpdatedAt(Instant spotifyUpdatedAt)
      Sets the Spotify updated timestamp.
      Parameters:
      spotifyUpdatedAt - The Spotify updated timestamp.
    • setSpotifyUpdatedAt

      public void setSpotifyUpdatedAt()
      Sets the Spotify updated timestamp to now.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object