public void renameGenre(Integer id, String newName) { List songs = getSongsByGenreId(id); log.debug("Setting genre "+getGenreName(id)+"("+id+") to " + newName); genres.set(id.intValue(), newName); for(Iterator songsI=songs.iterator(); songsI.hasNext(); ) { Song s = (Song)songsI.next(); s.setGenre(newName); }