3 import interfaces
.Track
;
4 import interfaces
.collection
.AbstractCollection
;
5 import interfaces
.collection
.Collection
;
6 import interfaces
.collection
.EditableCollection
;
7 import interfaces
.collection
.Source
;
9 public class Playlist
extends AbstractCollection
<Track
> implements EditableCollection
<Track
> {
11 public static class PlaylistFactory
implements api
.nodes
.PlaylistNode
.PlaylistFactory
{
12 public EditableCollection
<?
extends Track
> create(int id
, long pid
) {
13 return new Playlist(id
, pid
);
17 private int editStatus
;
19 private Playlist parent
;
23 public Playlist(int id
, long persistentId
, int editStatus
, String name
, int parent
, boolean root
, int size
) {
24 super(id
, persistentId
);
26 this.editStatus
= editStatus
;
28 this.parent
= new Playlist(parent
, parent
);
33 public Playlist(int id
, long persistentId
) {
34 super(id
, persistentId
);
37 public int editStatus() {
41 public boolean isRoot() {
45 public String
name() {
53 public Collection
<?
extends Track
> parent() {
57 public void setEditStatus(int editStatus
) {
58 this.editStatus
= editStatus
;
61 public void setName(String name
) {
65 public void setParentId(int parentId
) {
66 this.parent
= new Playlist(parentId
, parentId
);
69 public void setRoot(boolean root
) {
73 public void setSize(int size
) {
77 public Source
<Track
> source() {
78 // TODO Auto-generated method stub