Add method to save track derivatives.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 28 Jul 2012 09:46:59 +0000 (11:46 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 28 Jul 2012 09:46:59 +0000 (11:46 +0200)
src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java

index 6499603..ad01bfe 100644 (file)
@@ -502,6 +502,19 @@ public class DataManager {
        }
 
        /**
+        * Saves the given track derivative. As a track derivative does not have any
+        * attributes of its own only its properties are saved.
+        *
+        * @param trackDerivative
+        *            The track derivative to save
+        * @throws DatabaseException
+        *             if a database error occurs
+        */
+       public void saveTrackDerivate(TrackDerivative trackDerivative) throws DatabaseException {
+               saveProperties(trackDerivative.getProperties(), "TRACK_DERIVATIVE_PROPERTIES", "TRACK_DERIVATIVE", trackDerivative.getId());
+       }
+
+       /**
         * Returns all groups the artist with the given ID belongs to.
         *
         * @param artistId