- /**
- * Returns the nested albums.
- *
- * @return The nested albums
- */
- public List<Album> getAlbums() {
- return new ArrayList<Album>(albums);
- }
-
- /**
- * Adds an album to this album.
- *
- * @param album
- * The album to add
- */
- public void addAlbum(Album album) {
- Validation.begin().isNotNull("Album", album).check().isEqual("Album Owner", album.sone, sone).isNull("Album Parent", album.parent).check();
- albums.add(album);
- album.setParent(this);
- }
-
- /**
- * Removes an album from this album.
- *
- * @param album
- * The album to remove
- */
- public void removeAlbum(Album album) {
- Validation.begin().isNotNull("Album", album).check().isEqual("Album Owner", album.sone, sone).isEqual("Album Parent", album.parent, this).check();
- albums.remove(album);
- album.removeParent();
- }