From f910bfec8c988bc9baf7e5e3a05b19237e899cec Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 25 Apr 2012 15:10:34 +0200 Subject: [PATCH] Add missing @Override annotations. --- src/main/java/net/pterodactylus/demoscenemusic/core/Core.java | 2 ++ .../java/net/pterodactylus/demoscenemusic/data/DataManager.java | 2 ++ .../java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java | 5 +++++ .../java/net/pterodactylus/demoscenemusic/data/DefaultBase.java | 1 + .../java/net/pterodactylus/demoscenemusic/data/DefaultGroup.java | 4 ++++ .../java/net/pterodactylus/demoscenemusic/data/DefaultParty.java | 2 ++ .../java/net/pterodactylus/demoscenemusic/data/DefaultStyle.java | 2 ++ .../java/net/pterodactylus/demoscenemusic/data/DefaultTrack.java | 6 ++++++ 8 files changed, 24 insertions(+) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/core/Core.java b/src/main/java/net/pterodactylus/demoscenemusic/core/Core.java index f079af1..af73754 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/core/Core.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/core/Core.java @@ -48,6 +48,7 @@ public class Core implements ServletContextListener { /** * {@inheritDoc} */ + @Override public void contextInitialized(ServletContextEvent servletContextEvent) { servletContextEvent.getServletContext().setAttribute("core", this); try { @@ -64,6 +65,7 @@ public class Core implements ServletContextListener { /** * {@inheritDoc} */ + @Override public void contextDestroyed(ServletContextEvent arg0) { /* do nothing. */ } diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java index f53559e..06cfccc 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java @@ -119,6 +119,7 @@ public class DataManager { private class LazyArtist extends DefaultArtist { private final Memoizer tracksMemoizer = new Memoizer(new Callable() { + @Override public Void call() throws DatabaseException { if (!hasValue("tracks")) { value("tracks", Collection.class).set(getTracksByArtist(id())); @@ -152,6 +153,7 @@ public class DataManager { return super.groups(); } + @Override public Collection tracks() { tracksMemoizer.get(); return super.tracks(); diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java index d876169..c739275 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java @@ -30,10 +30,12 @@ public class DefaultArtist extends DefaultBase implements Artist { super(id); } + @Override public String name() { return value("name", String.class).get(); } + @Override public Artist name(String name) { value("name", String.class).set(name); return this; @@ -42,6 +44,7 @@ public class DefaultArtist extends DefaultBase implements Artist { /** * {@inheritDoc} */ + @Override @SuppressWarnings("unchecked") public Collection groups() { return value("groups", Collection.class).get(); @@ -50,11 +53,13 @@ public class DefaultArtist extends DefaultBase implements Artist { /** * {@inheritDoc} */ + @Override public Artist groups(Collection groups) { value("groups", Collection.class).set(groups); return this; } + @Override public Collection tracks() { return value("tracks", Collection.class).get(); } diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java index 83f3cee..589ba86 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java @@ -37,6 +37,7 @@ public class DefaultBase implements Base { } public String id() { + @Override return id; } diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultGroup.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultGroup.java index 0899b6d..16b2cca 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultGroup.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultGroup.java @@ -33,6 +33,7 @@ public class DefaultGroup extends DefaultBase implements Group { /** * {@inheritDoc} */ + @Override public String name() { return value("name", String.class).get(); } @@ -40,6 +41,7 @@ public class DefaultGroup extends DefaultBase implements Group { /** * {@inheritDoc} */ + @Override public Group name(String name) { value("name", String.class).set(name); return this; @@ -48,6 +50,7 @@ public class DefaultGroup extends DefaultBase implements Group { /** * {@inheritDoc} */ + @Override public String url() { return value("url", String.class).get(); } @@ -55,6 +58,7 @@ public class DefaultGroup extends DefaultBase implements Group { /** * {@inheritDoc} */ + @Override public Group url(String url) { value("url", String.class).set(url); return this; diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java index 353e6bb..dd684b3 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java @@ -28,10 +28,12 @@ public class DefaultParty extends DefaultBase implements Party { super(id); } + @Override public String name() { return value("name", String.class).get(); } + @Override public DefaultParty name(String name) { value("name", String.class).set(name); return this; diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultStyle.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultStyle.java index 4a0ceec..50b489f 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultStyle.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultStyle.java @@ -28,10 +28,12 @@ public class DefaultStyle extends DefaultBase implements Style { super(id); } + @Override public String name() { return value("name", String.class).get(); } + @Override public Style name(String name) { value("name", String.class).set(name); return this; diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultTrack.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultTrack.java index ee882a1..db358f8 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultTrack.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultTrack.java @@ -31,28 +31,34 @@ public class DefaultTrack extends DefaultBase implements Track { super(id); } + @Override public String name() { return value("name", String.class).get(); } + @Override public Track name(String name) { value("name", String.class).set(name); return this; } + @Override public List artists() { return value("artists", List.class).get(); } + @Override public Track artists(List artists) { value("artists", List.class).set(artists); return this; } + @Override public Collection