Package org.localify.recommend
Class UserRecommendation
java.lang.Object
org.localify.recommend.UserRecommendation
Represents a set of recommendations for a user, tied to a city or festival.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected no-arg constructor for JPA.UserRecommendation(User user, City city) Constructs a new UserRecommendation for a city.UserRecommendation(User user, Festival festival) Constructs a new UserRecommendation for a festival. -
Method Summary
Modifier and TypeMethodDescriptionGets the list of artist recommendations.Gets the creation timestamp.getDtos()Gets the list of recommended artist DTOs.getId()Gets the ID of the recommendation.Gets the last update timestamp.getUser()Gets the user for this recommendation.voidsetDtos(List<RecommendedArtistDto> dtos) Sets the list of recommended artist DTOs.Sets the user for this recommendation.
-
Constructor Details
-
UserRecommendation
protected UserRecommendation()Protected no-arg constructor for JPA. -
UserRecommendation
Constructs a new UserRecommendation for a city.- Parameters:
user- The user.city- The city.
-
UserRecommendation
Constructs a new UserRecommendation for a festival.- Parameters:
user- The user.festival- The festival.
-
-
Method Details
-
getCreatedAt
Gets the creation timestamp.- Returns:
- The creation timestamp.
-
getUpdatedAt
Gets the last update timestamp.- Returns:
- The last update timestamp.
-
getId
Gets the ID of the recommendation.- Returns:
- The ID.
-
getUser
Gets the user for this recommendation.- Returns:
- The user.
-
getArtists
Gets the list of artist recommendations.- Returns:
- A list of artist recommendations.
-
setUser
Sets the user for this recommendation.- Parameters:
user- The user.- Returns:
- This UserRecommendation instance.
-
getDtos
Gets the list of recommended artist DTOs.- Returns:
- A list of recommended artist DTOs.
-
setDtos
Sets the list of recommended artist DTOs.- Parameters:
dtos- A list of recommended artist DTOs.
-