}
/**
+ * Removes the given track derivative and all its properties from the
+ * database.
+ *
+ * @param trackDerivative
+ * The track derivative to remove
+ * @throws DatabaseException
+ * if a database error occurs
+ */
+ public void removeTrackDerivative(TrackDerivative trackDerivative) throws DatabaseException {
+ Query query = new Query(Type.DELETE, "TRACK_DERIVATIVES");
+ query.addWhereClause(new ValueFieldWhereClause(new ValueField("TRACK_DERIVATIVES.ID", new StringParameter(trackDerivative.getId()))));
+ database.update(query);
+ /* remove the properties. */
+ saveProperties(new Properties(), "TRACK_DERIVATIVE_PROPERTIES", "TRACK_DERIVATIVE", trackDerivative.getId());
+ }
+
+ /**
* Returns all groups the artist with the given ID belongs to.
*
* @param artistId