From 7bae34cd2768314df3c169da542c2403161be3a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 28 Jul 2012 11:46:59 +0200 Subject: [PATCH] Add method to save track derivatives. --- .../net/pterodactylus/demoscenemusic/data/DataManager.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java index 6499603..ad01bfe 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java @@ -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 -- 2.7.4