From 7da3008f2142348efd4efc21c5ce36a018227d6e 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:12:37 +0200 Subject: [PATCH] Revert to using Java default getter and setter names. --- .../demoscenemusic/core/TemplateServlet.java | 6 ++-- .../pterodactylus/demoscenemusic/data/Artist.java | 12 +++---- .../pterodactylus/demoscenemusic/data/Base.java | 2 +- .../demoscenemusic/data/DataManager.java | 38 +++++++++++----------- .../demoscenemusic/data/DefaultArtist.java | 24 +++++++------- .../demoscenemusic/data/DefaultBase.java | 16 ++++----- .../demoscenemusic/data/DefaultGroup.java | 24 +++++++------- .../demoscenemusic/data/DefaultParty.java | 8 ++--- .../demoscenemusic/data/DefaultStyle.java | 8 ++--- .../demoscenemusic/data/DefaultTrack.java | 24 +++++++------- .../pterodactylus/demoscenemusic/data/Group.java | 12 +++---- .../pterodactylus/demoscenemusic/data/Party.java | 4 +-- .../pterodactylus/demoscenemusic/data/Style.java | 4 +-- .../pterodactylus/demoscenemusic/data/Track.java | 12 +++---- 14 files changed, 97 insertions(+), 97 deletions(-) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java b/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java index acbb034..c0edf44 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java @@ -86,7 +86,7 @@ public class TemplateServlet extends HttpServlet { @Override public int compare(Artist leftArtist, Artist rightArtist) { - return leftArtist.name().compareToIgnoreCase(rightArtist.name()); + return leftArtist.getName().compareToIgnoreCase(rightArtist.getName()); } }); @@ -94,7 +94,7 @@ public class TemplateServlet extends HttpServlet { @Override public int compare(Track leftTrack, Track rightTrack) { - return leftTrack.name().compareToIgnoreCase(rightTrack.name()); + return leftTrack.getName().compareToIgnoreCase(rightTrack.getName()); } }); @@ -102,7 +102,7 @@ public class TemplateServlet extends HttpServlet { @Override public int compare(Style leftStyle, Style rightStyle) { - return leftStyle.name().compareToIgnoreCase(rightStyle.name()); + return leftStyle.getName().compareToIgnoreCase(rightStyle.getName()); } }); diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java b/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java index f0948da..d9e6682 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/Artist.java @@ -26,16 +26,16 @@ import java.util.Collection; */ public interface Artist extends Base { - public String name(); + public String getName(); - public Artist name(String name); + public Artist setName(String name); - public Collection groups(); + public Collection getGroups(); - public Artist groups(Collection groups); + public Artist setGroups(Collection groups); - public Collection tracks(); + public Collection getTracks(); - public Artist tracks(Collection tracks); + 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 7a36493..921ca30 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/Base.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/Base.java @@ -25,6 +25,6 @@ package net.pterodactylus.demoscenemusic.data; */ public interface Base { - public String id(); + 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 06cfccc..ef3c151 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java @@ -122,7 +122,7 @@ public class DataManager { @Override public Void call() throws DatabaseException { if (!hasValue("tracks")) { - value("tracks", Collection.class).set(getTracksByArtist(id())); + getValue("tracks", Collection.class).set(getTracksByArtist(getId())); } return null; } @@ -133,7 +133,7 @@ public class DataManager { @Override public Void call() throws Exception { if (!hasValue("groups")) { - value("groups", Collection.class).set(getGroupsByArtist(id())); + getValue("groups", Collection.class).set(getGroupsByArtist(getId())); } return null; } @@ -148,15 +148,15 @@ public class DataManager { * {@inheritDoc} */ @Override - public Collection groups() { + public Collection getGroups() { groupsMemoizer.get(); - return super.groups(); + return super.getGroups(); } @Override - public Collection tracks() { + public Collection getTracks() { tracksMemoizer.get(); - return super.tracks(); + return super.getTracks(); } } @@ -168,7 +168,7 @@ public class DataManager { */ @Override public Artist createObject(ResultSet resultSet) throws SQLException { - return new LazyArtist(resultSet.getString("ARTISTS.ID")).name(resultSet.getString("ARTISTS.NAME")); + return new LazyArtist(resultSet.getString("ARTISTS.ID")).setName(resultSet.getString("ARTISTS.NAME")); } } @@ -180,7 +180,7 @@ public class DataManager { @Override public Void call() throws Exception { if (!hasValue("artists")) { - value("artists", Collection.class).set(getArtistsByGroup(id())); + getValue("artists", Collection.class).set(getArtistsByGroup(getId())); } return null; } @@ -195,9 +195,9 @@ public class DataManager { * {@inheritDoc} */ @Override - public Collection artists() { + public Collection getArtists() { artistsMemoizer.get(); - return super.artists(); + return super.getArtists(); } } @@ -209,7 +209,7 @@ public class DataManager { */ @Override public Group createObject(ResultSet resultSet) throws SQLException { - return new LazyGroup(resultSet.getString("GROUPS.ID")).name(resultSet.getString("GROUPS.NAME")).url(resultSet.getString("GROUPS.URL")); + return new LazyGroup(resultSet.getString("GROUPS.ID")).setName(resultSet.getString("GROUPS.NAME")).setUrl(resultSet.getString("GROUPS.URL")); } } @@ -221,7 +221,7 @@ public class DataManager { @Override public Void call() throws Exception { if (!hasValue("artists")) { - value("artists", List.class).set(getArtistsByTrack(id())); + getValue("artists", List.class).set(getArtistsByTrack(getId())); } return null; } @@ -233,7 +233,7 @@ public class DataManager { @Override public Void call() throws Exception { if (!hasValue("styles")) { - value("styles", Collection.class).set(getStylesByTrack(id())); + getValue("styles", Collection.class).set(getStylesByTrack(getId())); } return null; } @@ -251,18 +251,18 @@ public class DataManager { * {@inheritDoc} */ @Override - public List artists() { + public List getArtists() { artistsMemoizer.get(); - return super.artists(); + return super.getArtists(); } /** * {@inheritDoc} */ @Override - public Collection