return trackLoader.all();
}
+ public Collection<Group> getGroupsByArtist(String artistId) throws DatabaseException {
+ Query query = new Query(Type.SELECT, "GROUPS");
+ query.addField(new Field("GROUPS.*"));
+ query.addJoin(new Join(JoinType.INNER, "GROUP_ARTISTS", new Field("GROUPS.ID"), new Field("GROUP_ARTISTS.GROUP_")));
+ query.addWhereClause(new ValueFieldWhereClause(new ValueField("GROUP_ARTISTS.ARTIST", new StringParameter(artistId))));
+ return database.getMultiple(query, DefaultGroup.CREATOR);
+ }
+
private class TrackLoader implements ResultProcessor {
private final List<Track> loadedTracks = new ArrayList<Track>();