return database.getMultiple(query, artistCreator);
}
+ public List<Artist> getArtistsByTrack(String trackId) throws DatabaseException {
+ Query query = new Query(Type.SELECT, "ARTISTS");
+ query.addField(new Field("ARTISTS.*"));
+ query.addJoin(new Join(JoinType.INNER, "TRACK_ARTISTS", new Field("TRACK_ARTISTS.ARTIST"), new Field("ARTISTS.ID")));
+ query.addWhereClause(new ValueFieldWhereClause(new ValueField("TRACK_ARTISTS.TRACK", new StringParameter(trackId))));
+ query.addOrderField(new OrderField(new Field("TRACK_ARTISTS.DISPLAY_ORDER")));
+ return database.getMultiple(query, artistCreator);
+ }
+
public Track trackById(String id) throws DatabaseException {
Query query = new Query(Type.SELECT, "TRACKS");
query.addField(new Field("TRACKS.*"));