Package org.localify.recommend
Class UserArtistRecommendation
java.lang.Object
org.localify.recommend.UserArtistRecommendation
Represents a recommendation of an artist for a user.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected no-arg constructor for JPA.UserArtistRecommendation(UserRecommendation userRecommendation, Artist artist, Double score, boolean isSeed) Constructs a new UserArtistRecommendation. -
Method Summary
Modifier and TypeMethodDescriptionGets the recommended artist.getId()Gets the ID of this recommendation.Gets the parent user recommendation.getScore()Gets the recommendation score.Gets the list of similar artists for this recommendation.booleanisSeed()Checks if the recommended artist is a seed artist.Sets the recommended artist.setRecommendationEntry(UserRecommendation userRecommendation) Sets the parent user recommendation.Sets the recommendation score.voidsetSeed(boolean seed) Sets whether the recommended artist is a seed artist.setSimilarArtists(List<UserRecommendationSimilarArtist> similarArtists) Sets the list of similar artists for this recommendation.
-
Constructor Details
-
UserArtistRecommendation
protected UserArtistRecommendation()Protected no-arg constructor for JPA. -
UserArtistRecommendation
public UserArtistRecommendation(UserRecommendation userRecommendation, Artist artist, Double score, boolean isSeed) Constructs a new UserArtistRecommendation.- Parameters:
userRecommendation- The parent user recommendation.artist- The recommended artist.score- The recommendation score.isSeed- Whether the artist is a seed artist.
-
-
Method Details
-
getRecommendationEntry
Gets the parent user recommendation.- Returns:
- The user recommendation.
-
setRecommendationEntry
Sets the parent user recommendation.- Parameters:
userRecommendation- The user recommendation.- Returns:
- This UserArtistRecommendation instance.
-
getArtist
Gets the recommended artist.- Returns:
- The artist.
-
setArtist
Sets the recommended artist.- Parameters:
artist- The artist.- Returns:
- This UserArtistRecommendation instance.
-
getScore
Gets the recommendation score.- Returns:
- The score.
-
setScore
Sets the recommendation score.- Parameters:
score- The score.- Returns:
- This UserArtistRecommendation instance.
-
getSimilarArtists
Gets the list of similar artists for this recommendation.- Returns:
- A list of similar artists.
-
setSimilarArtists
public UserArtistRecommendation setSimilarArtists(List<UserRecommendationSimilarArtist> similarArtists) Sets the list of similar artists for this recommendation.- Parameters:
similarArtists- A list of similar artists.- Returns:
- This UserArtistRecommendation instance.
-
getId
Gets the ID of this recommendation.- Returns:
- The ID.
-
isSeed
public boolean isSeed()Checks if the recommended artist is a seed artist.- Returns:
- true if the artist is a seed, false otherwise.
-
setSeed
public void setSeed(boolean seed) Sets whether the recommended artist is a seed artist.- Parameters:
seed- true if the artist is a seed, false otherwise.
-