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);
}
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);
}