From: David ‘Bombe’ Roden Date: Fri, 27 Jul 2012 11:17:02 +0000 (+0200) Subject: Rename all methods that load properties for specific objects. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=85c163fe9be9ffaec2c737ecb7284bf9f792dd57;p=demoscenemusic.git Rename all methods that load properties for specific objects. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java index 77f5ade..7744116 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java @@ -99,7 +99,7 @@ public class DataManager { public Collection getAllArtists() throws DatabaseException { Query query = new Query(Type.SELECT, "ARTISTS"); query.addField(new Field("ARTISTS.*")); - return loadProperties(database.getMultiple(query, artistCreator)); + return loadArtistProperties(database.getMultiple(query, artistCreator)); } /** @@ -116,7 +116,7 @@ public class DataManager { Query query = new Query(Type.SELECT, "ARTISTS"); query.addField(new Field("ARTISTS.*")); query.addWhereClause(new ValueFieldWhereClause(new ValueField("ARTISTS.ID", new StringParameter(id)))); - return loadProperties(database.getSingle(query, artistCreator)); + return loadArtistProperties(database.getSingle(query, artistCreator)); } /** @@ -133,7 +133,7 @@ public class DataManager { query.addField(new Field("ARTISTS.*")); query.addJoin(new Join(JoinType.INNER, "GROUP_ARTISTS", new Field("ARTISTS.ID"), new Field("GROUP_ARTISTS.ARTIST"))); query.addWhereClause(new ValueFieldWhereClause(new ValueField("GROUP_ARTISTS.GROUP_", new StringParameter(groupId)))); - return loadProperties(database.getMultiple(query, artistCreator)); + return loadArtistProperties(database.getMultiple(query, artistCreator)); } /** @@ -151,7 +151,7 @@ public class DataManager { query.addJoin(new Join(JoinType.INNER, "TRACK_ARTISTS", new Field("TRACK_ARTISTS.ARTIST"), new Field("ARTISTS.ID"))); query.addWhereClause(new ValueFieldWhereClause(new ValueField("TRACK_ARTISTS.TRACK", new StringParameter(trackId)))); query.addOrderField(new OrderField(new Field("TRACK_ARTISTS.DISPLAY_ORDER"))); - return loadProperties(database.getMultiple(query, artistCreator)); + return loadArtistProperties(database.getMultiple(query, artistCreator)); } /** @@ -169,7 +169,7 @@ public class DataManager { query.addValueField(new ValueField("ID", new StringParameter(id))); query.addValueField(new ValueField("NAME", new StringParameter(name))); database.insert(query); - return loadProperties(getArtistById(id)); + return loadArtistProperties(getArtistById(id)); } /** @@ -240,7 +240,7 @@ public class DataManager { * @throws DatabaseException * if a database error occurs */ - public Artist loadProperties(final Artist artist) throws DatabaseException { + public Artist loadArtistProperties(final Artist artist) throws DatabaseException { return loadProperties(artist, "ARTIST_PROPERTIES", "ARTIST"); } @@ -253,9 +253,9 @@ public class DataManager { * @throws DatabaseException * if a database error occurs */ - public List loadProperties(List artists) throws DatabaseException { + public List loadArtistProperties(List artists) throws DatabaseException { for (Artist artist : artists) { - loadProperties(artist); + loadArtistProperties(artist); } return artists; }