Package org.localify.playlist
Class Playlist
java.lang.Object
org.localify.playlist.Playlist
Represents a playlist.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the Apple Music creation timestamp.Gets the Apple Music ID of the playlist.Gets the Apple Music update timestamp.Gets the creation timestamp.Gets the description of the playlist.getId()Gets the ID of the playlist.Gets the legacy ID of the playlist.getName()Gets the name of the playlist.getOwner()Gets the owner of the playlist.Gets the list of song pairs in the playlist.Gets the Spotify creation timestamp.Gets the Spotify ID of the playlist.Gets the Spotify update timestamp.Gets the last update timestamp.voidSets the Apple Music creation timestamp to now.voidsetAppleId(String appleId) Sets the Apple Music ID of the playlist.voidSets the Apple Music update timestamp to now.voidsetDescription(String description) Sets the description of the playlist.voidsetLegacyId(Integer legacyId) Sets the legacy ID of the playlist.voidSets the name of the playlist.voidSets the owner of the playlist.voidsetPlaylistSongPairs(List<PlaylistSongPair> playlistSongPairs) Sets the list of song pairs in the playlist.voidSets the Spotify creation timestamp to now.voidsetSpotifyId(String spotifyId) Sets the Spotify ID of the playlist.voidSets the Spotify update timestamp to now.toDto()Converts the playlist to a DTO.
-
Constructor Details
-
Playlist
public Playlist()Default constructor. -
Playlist
Constructs a new Playlist with the specified name.- Parameters:
name- The name of the playlist.
-
-
Method Details
-
getPlaylistSongPairs
Gets the list of song pairs in the playlist.- Returns:
- The list of playlist song pairs.
-
setPlaylistSongPairs
Sets the list of song pairs in the playlist.- Parameters:
playlistSongPairs- The list of playlist song pairs.
-
getId
Gets the ID of the playlist.- Returns:
- The playlist ID.
-
getName
Gets the name of the playlist.- Returns:
- The playlist name.
-
getCreatedAt
Gets the creation timestamp.- Returns:
- The creation timestamp.
-
getUpdatedAt
Gets the last update timestamp.- Returns:
- The last update timestamp.
-
getDescription
Gets the description of the playlist.- Returns:
- The description.
-
getSpotifyId
Gets the Spotify ID of the playlist.- Returns:
- The Spotify ID.
-
getAppleId
Gets the Apple Music ID of the playlist.- Returns:
- The Apple Music ID.
-
getSpotifyCreatedAt
Gets the Spotify creation timestamp.- Returns:
- The Spotify creation timestamp.
-
getSpotifyUpdatedAt
Gets the Spotify update timestamp.- Returns:
- The Spotify update timestamp.
-
getAppleCreatedAt
Gets the Apple Music creation timestamp.- Returns:
- The Apple Music creation timestamp.
-
getAppleUpdatedAt
Gets the Apple Music update timestamp.- Returns:
- The Apple Music update timestamp.
-
setName
Sets the name of the playlist.- Parameters:
name- The playlist name.
-
setDescription
Sets the description of the playlist.- Parameters:
description- The description.
-
setSpotifyId
Sets the Spotify ID of the playlist.- Parameters:
spotifyId- The Spotify ID.
-
setAppleId
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
Gets the legacy ID of the playlist.- Returns:
- The legacy ID.
-
setLegacyId
Sets the legacy ID of the playlist.- Parameters:
legacyId- The legacy ID.
-
getOwner
Gets the owner of the playlist.- Returns:
- The owner.
-
setOwner
Sets the owner of the playlist.- Parameters:
owner- The owner.
-
toDto
Converts the playlist to a DTO.- Returns:
- The playlist DTO.
-