Add methods to manage artists of a group.
[demoscenemusic.git] / src / main / java / net / pterodactylus / demoscenemusic / data / DefaultGroup.java
index 38ababe..4495830 100644 (file)
@@ -19,6 +19,7 @@ package net.pterodactylus.demoscenemusic.data;
 
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.Collection;
 
 import net.pterodactylus.util.database.ObjectCreator;
 
@@ -65,6 +66,24 @@ public class DefaultGroup extends DefaultBase implements Group {
                return this;
        }
 
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       @SuppressWarnings("unchecked")
+       public Collection<Artist> artists() {
+               return value("artists", Collection.class).get();
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public Group artists(Collection<Artist> artists) {
+               value("artists", Collection.class).set(artists);
+               return this;
+       }
+
        private static class GroupCreator implements ObjectCreator<Group> {
 
                /**