From cc3a4940ce06e23e0d480d5db706878a11c007c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 19 Apr 2012 16:55:35 +0200 Subject: [PATCH] Remove obsolete track and artist loaders. --- .../demoscenemusic/data/DataManager.java | 69 ---------------------- 1 file changed, 69 deletions(-) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java index 5d3c1de..0c6f422 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java @@ -19,9 +19,7 @@ package net.pterodactylus.demoscenemusic.data; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.ArrayList; import java.util.Collection; -import java.util.HashSet; import java.util.List; import java.util.concurrent.Callable; @@ -33,11 +31,9 @@ import net.pterodactylus.util.database.Join; import net.pterodactylus.util.database.Join.JoinType; import net.pterodactylus.util.database.ObjectCreator; import net.pterodactylus.util.database.OrderField; -import net.pterodactylus.util.database.OrderField.Order; import net.pterodactylus.util.database.Parameter.StringParameter; import net.pterodactylus.util.database.Query; import net.pterodactylus.util.database.Query.Type; -import net.pterodactylus.util.database.ResultProcessor; import net.pterodactylus.util.database.ValueField; import net.pterodactylus.util.database.ValueFieldWhereClause; @@ -102,71 +98,6 @@ public class DataManager { return database.getMultiple(query, groupCreator); } - private class TrackLoader implements ResultProcessor { - - private final List loadedTracks = new ArrayList(); - private Track track; - - public Track get() { - return loadedTracks.isEmpty() ? null : loadedTracks.get(0); - } - - public List all() { - return loadedTracks; - } - - /** - * {@inheritDoc} - */ - public void processResult(ResultSet resultSet) throws SQLException { - String trackId = resultSet.getString("TRACKS.ID"); - if ((track == null) || (!track.id().equals(trackId))) { - track = new DefaultTrack(trackId).name(resultSet.getString("TRACKS.NAME")).artists(new ArrayList()).styles(new HashSet