/**
* 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));
}
@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;
}