Package org.localify.user.support
Class UserFavoriteEvent
java.lang.Object
org.localify.user.support.UserFavoriteEvent
Represents a user's favorite event.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the composite key for a user favorite event. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor.UserFavoriteEvent(User user, Event event) Creates a new user favorite event. -
Method Summary
Modifier and TypeMethodDescriptionGets the creation timestamp.Gets the deletion timestamp.getEvent()Gets the event.getKey()Gets the key.Gets the rating.getUser()Gets the user.voidsetCreatedAt(Instant createdAt) Sets the creation timestamp.voidSets the deletion timestamp to now.voidsetDeletedAt(Instant instant) Sets the deletion timestamp.voidSets the event.voidSets the key.voidSets the rating.voidSets the user.toResponse(List<BasicArtistLocalResponse> artists) Converts the user favorite event to a response.
-
Constructor Details
-
UserFavoriteEvent
protected UserFavoriteEvent()Default constructor. -
UserFavoriteEvent
Creates a new user favorite event.- Parameters:
user- The user.event- The event.
-
-
Method Details
-
getKey
Gets the key.- Returns:
- The key.
-
setKey
Sets the key.- Parameters:
key- The key.
-
getUser
Gets the user.- Returns:
- The user.
-
setUser
Sets the user.- Parameters:
user- The user.
-
getEvent
Gets the event.- Returns:
- The event.
-
setEvent
Sets the event.- Parameters:
event- The event.
-
getCreatedAt
Gets the creation timestamp.- Returns:
- The creation timestamp.
-
setCreatedAt
Sets the creation timestamp.- Parameters:
createdAt- The creation timestamp.
-
getDeletedAt
Gets the deletion timestamp.- Returns:
- The deletion timestamp.
-
setDeletedAt
public void setDeletedAt()Sets the deletion timestamp to now. -
setDeletedAt
Sets the deletion timestamp.- Parameters:
instant- The deletion timestamp.
-
getRating
Gets the rating.- Returns:
- The rating.
-
setRating
Sets the rating.- Parameters:
rating- The rating. -1 for Bad, 0 for didn't go, 1 for good, 2 for great.
-
toResponse
Converts the user favorite event to a response.- Parameters:
artists- The artists performing at the event.- Returns:
- The response.
-