Class UserArtistRecommendation

java.lang.Object
org.localify.recommend.UserArtistRecommendation

@Entity public class UserArtistRecommendation extends Object
Represents a recommendation of an artist for a user.
  • 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

      public UserRecommendation getRecommendationEntry()
      Gets the parent user recommendation.
      Returns:
      The user recommendation.
    • setRecommendationEntry

      public UserArtistRecommendation setRecommendationEntry(UserRecommendation userRecommendation)
      Sets the parent user recommendation.
      Parameters:
      userRecommendation - The user recommendation.
      Returns:
      This UserArtistRecommendation instance.
    • getArtist

      public Artist getArtist()
      Gets the recommended artist.
      Returns:
      The artist.
    • setArtist

      public UserArtistRecommendation setArtist(Artist artist)
      Sets the recommended artist.
      Parameters:
      artist - The artist.
      Returns:
      This UserArtistRecommendation instance.
    • getScore

      public Double getScore()
      Gets the recommendation score.
      Returns:
      The score.
    • setScore

      public UserArtistRecommendation setScore(Double score)
      Sets the recommendation score.
      Parameters:
      score - The score.
      Returns:
      This UserArtistRecommendation instance.
    • getSimilarArtists

      public List<UserRecommendationSimilarArtist> 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

      public UUID 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.