Rename all methods that load properties for specific objects.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 27 Jul 2012 11:17:02 +0000 (13:17 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 27 Jul 2012 11:17:02 +0000 (13:17 +0200)
src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java

index 77f5ade..7744116 100644 (file)
@@ -99,7 +99,7 @@ public class DataManager {
        public Collection<Artist> 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<Artist> loadProperties(List<Artist> artists) throws DatabaseException {
+       public List<Artist> loadArtistProperties(List<Artist> artists) throws DatabaseException {
                for (Artist artist : artists) {
-                       loadProperties(artist);
+                       loadArtistProperties(artist);
                }
                return artists;
        }