From 6d10c7b00bdadf78b5045fbd5e9a869e8f257ed7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 19 Apr 2012 16:00:13 +0200 Subject: [PATCH] Add method to get all tracks by an artist to artist interface. --- .../java/net/pterodactylus/demoscenemusic/data/Artist.java | 5 +++++ .../net/pterodactylus/demoscenemusic/data/DefaultArtist.java | 11 +++++++++++ 2 files changed, 16 insertions(+) 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; + } + } -- 2.7.4