Class Playlist

java.lang.Object
org.localify.playlist.Playlist

@Entity public class Playlist extends Object
Represents a playlist.
  • Constructor Details

    • Playlist

      public Playlist()
      Default constructor.
    • Playlist

      public Playlist(String name)
      Constructs a new Playlist with the specified name.
      Parameters:
      name - The name of the playlist.
  • Method Details

    • getPlaylistSongPairs

      public List<PlaylistSongPair> getPlaylistSongPairs()
      Gets the list of song pairs in the playlist.
      Returns:
      The list of playlist song pairs.
    • setPlaylistSongPairs

      public void setPlaylistSongPairs(List<PlaylistSongPair> playlistSongPairs)
      Sets the list of song pairs in the playlist.
      Parameters:
      playlistSongPairs - The list of playlist song pairs.
    • getId

      public UUID getId()
      Gets the ID of the playlist.
      Returns:
      The playlist ID.
    • getName

      public String getName()
      Gets the name of the playlist.
      Returns:
      The playlist name.
    • getCreatedAt

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

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

      public String getDescription()
      Gets the description of the playlist.
      Returns:
      The description.
    • getSpotifyId

      public String getSpotifyId()
      Gets the Spotify ID of the playlist.
      Returns:
      The Spotify ID.
    • getAppleId

      public String getAppleId()
      Gets the Apple Music ID of the playlist.
      Returns:
      The Apple Music ID.
    • getSpotifyCreatedAt

      public Instant getSpotifyCreatedAt()
      Gets the Spotify creation timestamp.
      Returns:
      The Spotify creation timestamp.
    • getSpotifyUpdatedAt

      public Instant getSpotifyUpdatedAt()
      Gets the Spotify update timestamp.
      Returns:
      The Spotify update timestamp.
    • getAppleCreatedAt

      public Instant getAppleCreatedAt()
      Gets the Apple Music creation timestamp.
      Returns:
      The Apple Music creation timestamp.
    • getAppleUpdatedAt

      public Instant getAppleUpdatedAt()
      Gets the Apple Music update timestamp.
      Returns:
      The Apple Music update timestamp.
    • setName

      public void setName(String name)
      Sets the name of the playlist.
      Parameters:
      name - The playlist name.
    • setDescription

      public void setDescription(String description)
      Sets the description of the playlist.
      Parameters:
      description - The description.
    • setSpotifyId

      public void setSpotifyId(String spotifyId)
      Sets the Spotify ID of the playlist.
      Parameters:
      spotifyId - The Spotify ID.
    • setAppleId

      public void setAppleId(String appleId)
      Sets the Apple Music ID of the playlist.
      Parameters:
      appleId - The Apple Music ID.
    • setSpotifyCreatedAt

      public void setSpotifyCreatedAt()
      Sets the Spotify creation timestamp to now.
    • setSpotifyUpdatedAt

      public void setSpotifyUpdatedAt()
      Sets the Spotify update timestamp to now.
    • setAppleCreatedAt

      public void setAppleCreatedAt()
      Sets the Apple Music creation timestamp to now.
    • setAppleUpdatedAt

      public void setAppleUpdatedAt()
      Sets the Apple Music update timestamp to now.
    • getLegacyId

      public Integer getLegacyId()
      Gets the legacy ID of the playlist.
      Returns:
      The legacy ID.
    • setLegacyId

      public void setLegacyId(Integer legacyId)
      Sets the legacy ID of the playlist.
      Parameters:
      legacyId - The legacy ID.
    • getOwner

      public User getOwner()
      Gets the owner of the playlist.
      Returns:
      The owner.
    • setOwner

      public void setOwner(User owner)
      Sets the owner of the playlist.
      Parameters:
      owner - The owner.
    • toDto

      public PlaylistDto toDto()
      Converts the playlist to a DTO.
      Returns:
      The playlist DTO.