From: David ‘Bombe’ Roden Date: Mon, 30 Jul 2012 07:48:08 +0000 (+0200) Subject: Make releases of a party availabable. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f3d8fcb4cd0be44270bfab8c58c4a07565ce6a87;p=demoscenemusic.git Make releases of a party availabable. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java index 993d69a..1b3ace4 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java @@ -17,6 +17,7 @@ package net.pterodactylus.demoscenemusic.data; +import java.util.Collection; /** * Default implementation of a party data container. * @@ -55,4 +56,22 @@ public class DefaultParty extends DefaultBase implements Party { return this; } + /** + * {@inheritDoc} + */ + @Override + @SuppressWarnings("unchecked") + public Collection getReleases() { + return getValue("releases", Collection.class).get(); + } + + /** + * {@inheritDoc} + */ + @Override + public Party setReleases(Collection tracks) { + getValue("releases", Collection.class).set(tracks); + return this; + } + } diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/Party.java b/src/main/java/net/pterodactylus/demoscenemusic/data/Party.java index 8ce4bcc..301e9c8 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/Party.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/Party.java @@ -17,6 +17,8 @@ package net.pterodactylus.demoscenemusic.data; +import java.util.Collection; + /** * Data interface for parties. * @@ -40,4 +42,20 @@ public interface Party extends Base { */ public Party setName(String name); + /** + * Returns all tracks that were released at this party. + * + * @return All tracks that were released at this party + */ + public Collection getReleases(); + + /** + * Sets all tracks that were released at this party. + * + * @param tracks + * All tracks that were released at this party + * @return This party + */ + public Party setReleases(Collection tracks); + }