Package org.localify.event
Class Event
java.lang.Object
org.localify.event.Event
Represents an event.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the artists performing at the event.Gets the BandsInTown ID.Gets the BandsInTown queued timestamp.Gets the BandsInTown updated timestamp.Gets the banned timestamp.Gets the creation timestamp.Gets the door time.Gets the end time.Gets the Google updated timestamp.Gets the high price.getId()Gets the ID of the event.Gets the low price.getName()Gets the name of the event.Gets the playlist for the event.Gets the Pollstar ID.Gets the Pollstar queued timestamp.Gets the Pollstar updated timestamp.Gets the Spotify updated timestamp.Gets the start time.Gets the ticket URL.Gets the last update timestamp.getVenue()Gets the venue of the event.inthashCode()voidsetBandsInTownId(String bandsInTownId) Sets the BandsInTown ID.voidSets the BandsInTown last queued timestamp to now.voidsetBandsInTownQueuedAt(Instant bandsInTownQueuedAt) Sets the BandsInTown queued timestamp.voidSets the BandsInTown updated timestamp to now.voidsetBandsInTownUpdatedAt(Instant bandsInTownUpdatedAt) Sets the BandsInTown updated timestamp.voidsetDoorTime(Instant doorTime) Sets the door time.voidsetEndTime(Instant endTime) Sets the end time.voidSets the Google updated timestamp to now.voidsetGoogleUpdatedAt(Instant googleUpdatedAt) Sets the Google updated timestamp.voidsetHighPrice(Double highPrice) Sets the high price.voidsetLowPrice(Double lowPrice) Sets the low price.voidSets the name of the event.voidsetPlaylist(Playlist playlist) Sets the playlist for the event.voidsetPollstarId(String pollstarId) Sets the Pollstar ID.voidSets the Pollstar last queued timestamp to now.voidsetPollstarQueuedAt(Instant pollstarQueuedAt) Sets the Pollstar queued timestamp.voidSets the Pollstar updated timestamp to now.voidsetPollstarUpdatedAt(Instant pollstarUpdatedAt) Sets the Pollstar updated timestamp.voidSets the Spotify updated timestamp to now.voidsetSpotifyUpdatedAt(Instant spotifyUpdatedAt) Sets the Spotify updated timestamp.voidsetStartTime(Instant startTime) Sets the start time.voidsetTicketUrl(String ticketUrl) Sets the ticket URL.voidSets the venue of the event.toExtendedLocalResponse(List<BasicArtistLocalResponse> artists, boolean isFavorite) Converts the event to an extended local response DTO.toExtendedResponse(List<EventArtistResponse> artists, boolean isFavorite) Converts the event to an extended response DTO.Converts the event to a response DTO.
-
Constructor Details
-
Event
protected Event()Protected no-arg constructor for JPA. -
Event
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
Gets the artists performing at the event.- Returns:
- The set of artists.
-
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
Gets the ID of the event.- Returns:
- The event ID.
-
getName
Gets the name of the event.- Returns:
- The event name.
-
getVenue
Gets the venue of the event.- Returns:
- The venue.
-
getPlaylist
Gets the playlist for the event.- Returns:
- The playlist.
-
setName
Sets the name of the event.- Parameters:
name- The event name.
-
setVenue
Sets the venue of the event.- Parameters:
venue- The venue.
-
setPlaylist
Sets the playlist for the event.- Parameters:
playlist- The playlist.
-
getCreatedAt
Gets the creation timestamp.- Returns:
- The creation timestamp.
-
getUpdatedAt
Gets the last update timestamp.- Returns:
- The last update timestamp.
-
getBannedAt
Gets the banned timestamp.- Returns:
- The banned timestamp.
-
getDoorTime
Gets the door time.- Returns:
- The door time.
-
setDoorTime
Sets the door time.- Parameters:
doorTime- The door time.
-
getStartTime
Gets the start time.- Returns:
- The start time.
-
setStartTime
Sets the start time.- Parameters:
startTime- The start time.
-
getEndTime
Gets the end time.- Returns:
- The end time.
-
setEndTime
Sets the end time.- Parameters:
endTime- The end time.
-
getLowPrice
Gets the low price.- Returns:
- The low price.
-
setLowPrice
Sets the low price.- Parameters:
lowPrice- The low price.
-
getHighPrice
Gets the high price.- Returns:
- The high price.
-
setHighPrice
Sets the high price.- Parameters:
highPrice- The high price.
-
getTicketUrl
Gets the ticket URL.- Returns:
- The ticket URL.
-
setTicketUrl
Sets the ticket URL.- Parameters:
ticketUrl- The ticket URL.
-
getBandsInTownId
Gets the BandsInTown ID.- Returns:
- The BandsInTown ID.
-
setBandsInTownId
Sets the BandsInTown ID.- Parameters:
bandsInTownId- The BandsInTown ID.
-
getBandsInTownQueuedAt
Gets the BandsInTown queued timestamp.- Returns:
- The BandsInTown queued timestamp.
-
setBandsInTownQueuedAt
Sets the BandsInTown queued timestamp.- Parameters:
bandsInTownQueuedAt- The BandsInTown queued timestamp.
-
setBandsInTownLastQueued
public void setBandsInTownLastQueued()Sets the BandsInTown last queued timestamp to now. -
getBandsInTownUpdatedAt
Gets the BandsInTown updated timestamp.- Returns:
- The BandsInTown updated timestamp.
-
setBandsInTownUpdatedAt
Sets the BandsInTown updated timestamp.- Parameters:
bandsInTownUpdatedAt- The BandsInTown updated timestamp.
-
getPollstarId
Gets the Pollstar ID.- Returns:
- The Pollstar ID.
-
setPollstarId
Sets the Pollstar ID.- Parameters:
pollstarId- The Pollstar ID.
-
getPollstarQueuedAt
Gets the Pollstar queued timestamp.- Returns:
- The Pollstar queued timestamp.
-
setPollstarQueuedAt
Sets the Pollstar queued timestamp.- Parameters:
pollstarQueuedAt- The Pollstar queued timestamp.
-
setPollstarLastQueuedAt
public void setPollstarLastQueuedAt()Sets the Pollstar last queued timestamp to now. -
getPollstarUpdatedAt
Gets the Pollstar updated timestamp.- Returns:
- The Pollstar updated timestamp.
-
setBandsInTownUpdatedAt
public void setBandsInTownUpdatedAt()Sets the BandsInTown updated timestamp to now. -
setPollstarUpdatedAt
Sets the Pollstar updated timestamp.- Parameters:
pollstarUpdatedAt- The Pollstar updated timestamp.
-
setPollstarUpdatedAt
public void setPollstarUpdatedAt()Sets the Pollstar updated timestamp to now. -
getGoogleUpdatedAt
Gets the Google updated timestamp.- Returns:
- The Google updated timestamp.
-
setGoogleUpdatedAt
Sets the Google updated timestamp.- Parameters:
googleUpdatedAt- The Google updated timestamp.
-
setGoogleUpdatedAt
public void setGoogleUpdatedAt()Sets the Google updated timestamp to now. -
getSpotifyUpdatedAt
Gets the Spotify updated timestamp.- Returns:
- The Spotify updated timestamp.
-
setSpotifyUpdatedAt
Sets the Spotify updated timestamp.- Parameters:
spotifyUpdatedAt- The Spotify updated timestamp.
-
setSpotifyUpdatedAt
public void setSpotifyUpdatedAt()Sets the Spotify updated timestamp to now. -
equals
-
hashCode
public int hashCode()
-