Class ArtistSimilarity

java.lang.Object
org.localify.artist.jpa.ArtistSimilarity

@Entity public class ArtistSimilarity extends Object
Represents the similarity between two artists.
  • Constructor Details

    • ArtistSimilarity

      protected ArtistSimilarity()
      Default constructor for JPA.
    • ArtistSimilarity

      public ArtistSimilarity(Artist seedArtist, Artist similarArtist)
      Constructs a new ArtistSimilarity.
      Parameters:
      seedArtist - The seed artist.
      similarArtist - The similar artist.
  • Method Details

    • getSpotifyRank

      public Integer getSpotifyRank()
      Gets the Spotify rank of the similar artist in relation to the seed artist.
      Returns:
      The Spotify rank.
    • setSpotifyRank

      public void setSpotifyRank(Integer spotifyRank)
      Sets the Spotify rank of the similar artist in relation to the seed artist.
      Parameters:
      spotifyRank - The Spotify rank.
    • getLastfmScore

      public Double getLastfmScore()
      Gets the Last.fm similarity score.
      Returns:
      The Last.fm score.
    • setLastfmScore

      public void setLastfmScore(Double lastfmScore)
      Sets the Last.fm similarity score.
      Parameters:
      lastfmScore - The Last.fm score.
    • getKey

      public ArtistSimilarity.Key getKey()
      Gets the composite primary key.
      Returns:
      The key.
    • setKey

      public void setKey(ArtistSimilarity.Key key)
      Sets the composite primary key.
      Parameters:
      key - The key.
    • getSeedArtist

      public Artist getSeedArtist()
      Gets the seed artist.
      Returns:
      The seed artist.
    • setSeedArtist

      public ArtistSimilarity setSeedArtist(Artist seedArtist)
      Sets the seed artist.
      Parameters:
      seedArtist - The seed artist.
      Returns:
      This ArtistSimilarity instance.
    • getSimilarArtist

      public Artist getSimilarArtist()
      Gets the similar artist.
      Returns:
      The similar artist.
    • setSimilarArtist

      public ArtistSimilarity setSimilarArtist(Artist similarArtist)
      Sets the similar artist.
      Parameters:
      similarArtist - The similar artist.
      Returns:
      This ArtistSimilarity instance.
    • getScore

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

      public ArtistSimilarity setScore(Double score)
      Sets the similarity score.
      Parameters:
      score - The score.
      Returns:
      This ArtistSimilarity instance.
    • getCreatedAt

      public Instant getCreatedAt()
      Gets the creation timestamp.
      Returns:
      The creation timestamp.
    • setCreatedAt

      public ArtistSimilarity setCreatedAt(Instant createdAt)
      Sets the creation timestamp.
      Parameters:
      createdAt - The creation timestamp.
      Returns:
      This ArtistSimilarity instance.
    • getUpdatedAt

      public Instant getUpdatedAt()
      Gets the update timestamp.
      Returns:
      The update timestamp.
    • setUpdatedAt

      public ArtistSimilarity setUpdatedAt(Instant updatedAt)
      Sets the update timestamp.
      Parameters:
      updatedAt - The update timestamp.
      Returns:
      This ArtistSimilarity instance.
    • toString

      public String toString()
      Overrides:
      toString in class Object