Use new artist implementation.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Apr 2012 14:01:10 +0000 (16:01 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Apr 2012 14:01:10 +0000 (16:01 +0200)
src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java

index 5183226..ea02550 100644 (file)
@@ -140,7 +140,7 @@ public class DataManager {
                                track = new DefaultTrack(trackId).name(resultSet.getString("TRACKS.NAME")).artists(new ArrayList<Artist>()).styles(new HashSet<Style>());
                                loadedTracks.add(track);
                        }
-                       Artist artist = new DefaultArtist(resultSet.getString("ARTISTS.ID")).name(resultSet.getString("ARTISTS.NAME"));
+                       Artist artist = new LazyArtist(resultSet.getString("ARTISTS.ID")).name(resultSet.getString("ARTISTS.NAME"));
                        if (!track.artists().contains(artist)) {
                                track.artists().add(artist);
                        }
@@ -173,7 +173,7 @@ public class DataManager {
                public void processResult(ResultSet resultSet) throws SQLException {
                        String artistId = resultSet.getString("ARTISTS.ID");
                        if ((artist == null) || (!artist.id().equals(artistId))) {
-                               artist = new DefaultArtist(artistId).name(resultSet.getString("ARTISTS.NAME")).groups(new HashSet<Group>());
+                               artist = new LazyArtist(artistId).name(resultSet.getString("ARTISTS.NAME")).groups(new HashSet<Group>());
                                artists.add(artist);
                        }