Declare context in the try-catch block.
[demoscenemusic.git] / src / main / java / net / pterodactylus / demoscenemusic / data / AbstractTrack.java
index c83380e..810a528 100644 (file)
 
 package net.pterodactylus.demoscenemusic.data;
 
+import java.util.List;
+import java.util.Set;
+
 /**
  * TODO
  *
  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
-public abstract class AbstractTrack extends Base implements Track {
-
-       private String name;
-
-       private String style;
+public abstract class AbstractTrack extends AbstractBase implements Track {
 
        public AbstractTrack(String id) {
                super(id);
        }
 
        public String name() {
-               return name;
+               return value("name", String.class).get();
        }
 
        public Track name(String name) {
-               this.name = name;
+               value("name", String.class).set(name);
                return this;
        }
 
-       public String style() {
-               return style;
+       public List<Artist> artists() {
+               return value("artists", List.class).get();
        }
 
-       public Track style(String style) {
-               this.style = style;
+       public Track artists(List<Artist> artists) {
+               value("artists", List.class).set(artists);
                return this;
        }
 
-       public abstract Artist artist();
+       public Set<Style> styles() {
+               return value("styles", Set.class).get();
+       }
 
-       public abstract Track artist(Artist artist);
+       public Track styles(Set<? extends Style> styles) {
+               value("styles", Set.class).set(styles);
+               return this;
+       }
 
 }