Package org.localify.festival.jpa
Class FestivalUser
java.lang.Object
org.localify.festival.jpa.FestivalUser
Represents the join table between users and festivals.
This class mimics the behavior of a UserCity.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the composite key for the FestivalUser entity. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected no-arg constructor for JPA.FestivalUser(User user, Festival festival, Instant selectedAt) Constructs a new FestivalUser. -
Method Summary
Modifier and TypeMethodDescriptionGets the creation timestamp.Gets the deleted timestamp.Gets the festival.getKey()Gets the composite key.Gets the playlist for the festival.Gets the selected timestamp.Gets the last update timestamp.getUser()Gets the user.voidsetCreatedAt(Instant createdAt) Sets the creation timestamp.voidsetDeletedAt(Instant deletedAt) Sets the deleted timestamp.voidsetFestival(Festival festival) Sets the festival.voidsetKey(FestivalUser.Key key) Sets the composite key.voidsetPlaylist(Playlist playlist) Sets the playlist for the festival.voidsetSelectedAt(Instant selectedAt) Sets the selected timestamp.voidsetUpdatedAt(Instant updatedAt) Sets the last update timestamp.voidSets the user.Converts the FestivalUser to a response DTO.
-
Constructor Details
-
FestivalUser
protected FestivalUser()Protected no-arg constructor for JPA. -
FestivalUser
Constructs a new FestivalUser.- Parameters:
user- The user.festival- The festival.selectedAt- The timestamp when the festival was selected.
-
-
Method Details
-
getKey
Gets the composite key.- Returns:
- The key.
-
setKey
Sets the composite key.- Parameters:
key- The key.
-
getUser
Gets the user.- Returns:
- The user.
-
setUser
Sets the user.- Parameters:
user- The user.
-
getFestival
Gets the festival.- Returns:
- The festival.
-
setFestival
Sets the festival.- Parameters:
festival- The festival.
-
getCreatedAt
Gets the creation timestamp.- Returns:
- The creation timestamp.
-
setCreatedAt
Sets the creation timestamp.- Parameters:
createdAt- The creation timestamp.
-
getUpdatedAt
Gets the last update timestamp.- Returns:
- The last update timestamp.
-
setUpdatedAt
Sets the last update timestamp.- Parameters:
updatedAt- The last update timestamp.
-
getSelectedAt
Gets the selected timestamp.- Returns:
- The selected timestamp.
-
setSelectedAt
Sets the selected timestamp.- Parameters:
selectedAt- The selected timestamp.
-
getDeletedAt
Gets the deleted timestamp.- Returns:
- The deleted timestamp.
-
setDeletedAt
Sets the deleted timestamp.- Parameters:
deletedAt- The deleted timestamp.
-
getPlaylist
Gets the playlist for the festival.- Returns:
- The playlist.
-
setPlaylist
Sets the playlist for the festival.- Parameters:
playlist- The playlist.
-
toResponse
Converts the FestivalUser to a response DTO.- Returns:
- The user festival container DTO.
-