}
/**
+ * Creates a new track with the given name.
+ *
+ * @param name
+ * The name of the track
+ * @return The created track
+ * @throws DatabaseException
+ * if a database error occurs
+ */
+ public Track createTrack(String name) throws DatabaseException {
+ Query query = new Query(Type.INSERT, "TRACKS");
+ String id = UUID.randomUUID().toString();
+ query.addValueField(new ValueField("ID", new StringParameter(id)));
+ query.addValueField(new ValueField("NAME", new StringParameter(name)));
+ database.insert(query);
+ return getTrackById(id);
+ }
+
+ /**
* Returns the derivative with the given ID.
*
* @param id