From e3ac92367c0fde656598f388e9026f45c2868c4b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 25 Apr 2012 16:35:59 +0200 Subject: [PATCH] Add javadoc. --- .../pterodactylus/demoscenemusic/data/Artist.java | 38 ++++- .../pterodactylus/demoscenemusic/data/Base.java | 8 +- .../demoscenemusic/data/DataManager.java | 170 ++++++++++++++++++++- .../demoscenemusic/data/DefaultArtist.java | 24 ++- .../demoscenemusic/data/DefaultBase.java | 87 ++++++++++- .../demoscenemusic/data/DefaultGroup.java | 12 +- .../demoscenemusic/data/DefaultParty.java | 18 ++- .../demoscenemusic/data/DefaultStyle.java | 18 ++- .../demoscenemusic/data/DefaultTrack.java | 30 +++- .../pterodactylus/demoscenemusic/data/Group.java | 38 ++++- .../pterodactylus/demoscenemusic/data/Party.java | 15 +- .../pterodactylus/demoscenemusic/data/Style.java | 14 +- .../pterodactylus/demoscenemusic/data/Track.java | 38 ++++- 13 files changed, 495 insertions(+), 15 deletions(-) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java b/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java index d9e6682..563a3bc 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java @@ -20,22 +20,58 @@ package net.pterodactylus.demoscenemusic.data; import java.util.Collection; /** - * TODO + * Data interface for artists. * * @author David ‘Bombe’ Roden */ public interface Artist extends Base { + /** + * Returns the name of this artist. + * + * @return The name of this artist + */ public String getName(); + /** + * Sets the name of this artist. + * + * @param name + * The new name of this artist + * @return This artist + */ public Artist setName(String name); + /** + * Returns the groups this artist belongs to. + * + * @return The groups this artist belongs to + */ public Collection getGroups(); + /** + * Sets the groups this artist belongs to. + * + * @param groups + * The groups this artist belongs to + * @return This artist + */ public Artist setGroups(Collection groups); + /** + * Returns the tracks created by this artist. + * + * @return The tracks created by this artist + */ public Collection getTracks(); + /** + * Sets the tracks created by this artist. + * + * @param tracks + * The tracks created by this artist + * @return This artist + */ public Artist setTracks(Collection tracks); } diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/Base.java b/src/main/java/net/pterodactylus/demoscenemusic/data/Base.java index 921ca30..e187041 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/Base.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/Base.java @@ -17,14 +17,18 @@ package net.pterodactylus.demoscenemusic.data; - /** - * TODO + * Base class for all data interfaces and implementations. * * @author David ‘Bombe’ Roden */ public interface Base { + /** + * Returns the ID of the data container. + * + * @return The ID of the data container + */ public String getId(); } diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java index b2a3337..f3252f0 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java @@ -38,33 +38,64 @@ import net.pterodactylus.util.database.ValueField; import net.pterodactylus.util.database.ValueFieldWhereClause; /** - * TODO + * Interface between the database and the application. * * @author David ‘Bombe’ Roden */ public class DataManager { + /** The artist object creator. */ @SuppressWarnings("synthetic-access") private final ObjectCreator artistCreator = new ArtistCreator(); + + /** The group object creator. */ @SuppressWarnings("synthetic-access") private final ObjectCreator groupCreator = new GroupCreator(); + + /** The track object creator. */ @SuppressWarnings("synthetic-access") private final ObjectCreator trackCreator = new TrackCreator(); + + /** The style object creator. */ @SuppressWarnings("synthetic-access") private final ObjectCreator