Change method signature.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 27 Jul 2012 23:32:45 +0000 (01:32 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 27 Jul 2012 23:32:45 +0000 (01:32 +0200)
src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java

index c87df73..5f20905 100644 (file)
@@ -410,16 +410,16 @@ public class DataManager {
        /**
         * Returns the derivatives for the given track.
         *
-        * @param track
-        *            The track to get the derivatives for
+        * @param trackId
+        *            The track ID to get the derivatives for
         * @return The derivatives for the given track
         * @throws DatabaseException
         *             if a database error occurs
         */
-       public Collection<TrackDerivative> getTrackDerivativesByTrack(Track track) throws DatabaseException {
+       public Collection<TrackDerivative> getTrackDerivativesByTrack(String trackId) throws DatabaseException {
                Query query = new Query(Type.SELECT, "TRACK_DERIVATIVES");
                query.addField(new Field("TRACK_DERIVATIVES.*"));
-               query.addWhereClause(new ValueFieldWhereClause(new ValueField("TRACK_DERIVATIVES.TRACK", new StringParameter(track.getId()))));
+               query.addWhereClause(new ValueFieldWhereClause(new ValueField("TRACK_DERIVATIVES.TRACK", new StringParameter(trackId))));
                return loadTrackDerivativeProperties(database.getMultiple(query, trackDerivativeCreator));
        }
 
@@ -797,7 +797,7 @@ public class DataManager {
                        @Override
                        public Void call() throws Exception {
                                if (!hasValue("derivatives")) {
-                                       getValue("derivatives", Collection.class).set(getTrackDerivativesByTrack(LazyTrack.this));
+                                       getValue("derivatives", Collection.class).set(getTrackDerivativesByTrack(getId()));
                                }
                                return null;
                        }