for (Artist a : artists) {
if (a.getName().equalsIgnoreCase(artist)) {
return a; // already contained
}
}
Artist a = new ArtistHibernateImpl(artist);
List<?> l = artists; // old trick, we know Genre is a repo object
InsertionSort.insert((List<RepositoryObjectHibernateImpl>)l, (RepositoryObjectHibernateImpl) a);
save(a);
return a;
}