X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fdemoscenemusic%2Fdata%2FDataManager.java;h=a11027c732cb881cb3da03edc31afdc141675911;hb=257828c82cfc12f1146387f741ce4c27ab2d94d3;hp=5523bbe89c013550d5cf680520701d7b506e4c12;hpb=72b624fa52cc839f22e8133288d858bc5c2e2196;p=demoscenemusic.git
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java
index 5523bbe..a11027c 100644
--- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java
+++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java
@@ -19,12 +19,18 @@ package net.pterodactylus.demoscenemusic.data;
import java.sql.ResultSet;
import java.sql.SQLException;
-import java.util.ArrayList;
import java.util.Collection;
+import java.util.EnumMap;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.UUID;
import java.util.concurrent.Callable;
+import net.pterodactylus.demoscenemusic.data.Track.Relationship;
import net.pterodactylus.util.collection.Memoizer;
import net.pterodactylus.util.database.Database;
import net.pterodactylus.util.database.DatabaseException;
@@ -32,8 +38,10 @@ import net.pterodactylus.util.database.Field;
import net.pterodactylus.util.database.Join;
import net.pterodactylus.util.database.Join.JoinType;
import net.pterodactylus.util.database.ObjectCreator;
+import net.pterodactylus.util.database.ObjectCreator.StringCreator;
+import net.pterodactylus.util.database.OrWhereClause;
import net.pterodactylus.util.database.OrderField;
-import net.pterodactylus.util.database.OrderField.Order;
+import net.pterodactylus.util.database.Parameter.IntegerParameter;
import net.pterodactylus.util.database.Parameter.StringParameter;
import net.pterodactylus.util.database.Query;
import net.pterodactylus.util.database.Query.Type;
@@ -42,81 +50,586 @@ import net.pterodactylus.util.database.ValueField;
import net.pterodactylus.util.database.ValueFieldWhereClause;
/**
- * TODO
+ * Interface between the database and the application.
*
* @author David âBombeâ Roden
*/
public class DataManager {
+ /** The artist object creator. */
+ @SuppressWarnings("synthetic-access")
private final ObjectCreator artistCreator = new ArtistCreator();
+
+ /** The group object creator. */
+ @SuppressWarnings("synthetic-access")
private final ObjectCreator groupCreator = new GroupCreator();
+
+ /** The track object creator. */
+ @SuppressWarnings("synthetic-access")
private final ObjectCreator