+ /**
+ * Returns all styles for the track with the given ID.
+ *
+ * @param trackId
+ * The ID of the track
+ * @return All styles for the given track
+ * @throws DatabaseException
+ * if a database error occurs
+ */
+ public Collection<Style> getStylesByTrack(String trackId) throws DatabaseException {
+ Query query = new Query(Type.SELECT, "STYLES");
+ query.addField(new Field("STYLES.*"));
+ query.addJoin(new Join(JoinType.INNER, "TRACK_STYLES", new Field("STYLES.ID"), new Field("TRACK_STYLES.STYLE")));
+ query.addWhereClause(new ValueFieldWhereClause(new ValueField("TRACK_STYLES.TRACK", new StringParameter(trackId))));
+ return database.getMultiple(query, styleCreator);
+ }
+
+ /**
+ * {@link Artist} implementation that retrieves some attributes (such as
+ * {@link #getGroups()}, and {@link #getTracks()}) from the
+ * {@link DataManager} on demand.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */