From: David ‘Bombe’ Roden Date: Thu, 19 Apr 2012 14:00:13 +0000 (+0200) Subject: Add method to get all tracks by an artist to artist interface. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6d10c7b00bdadf78b5045fbd5e9a869e8f257ed7;p=demoscenemusic.git Add method to get all tracks by an artist to artist interface. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java b/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java index f1874b2..36d2e2c 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java @@ -17,6 +17,7 @@ package net.pterodactylus.demoscenemusic.data; +import java.util.Collection; import java.util.Set; /** @@ -34,4 +35,8 @@ public interface Artist extends Base { public Artist groups(Set groups); + public Collection tracks(); + + public Artist tracks(Collection tracks); + } diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java index 6fa8d43..4b7b5ef 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java @@ -17,6 +17,7 @@ package net.pterodactylus.demoscenemusic.data; +import java.util.Collection; import java.util.Set; /** @@ -55,4 +56,14 @@ public class DefaultArtist extends DefaultBase implements Artist { return this; } + public Collection tracks() { + return value("tracks", Collection.class).get(); + } + + @Override + public Artist tracks(Collection tracks) { + value("tracks", Collection.class).set(tracks); + return this; + } + }