- /** The parent album. */
- private final DefaultAlbum parent;
-
- /** Nested albums. */
- private final List<Album> albums = new ArrayList<Album>();
-
- /** The image IDs in order. */
- final List<String> imageIds = new ArrayList<String>();
-
- /** The images in this album. */
- final Map<String, Image> images = new HashMap<String, Image>();
-
- /** Creates a new album with a random ID. */
- public DefaultAlbum(Sone sone, DefaultAlbum parent) {
- this(UUID.randomUUID().toString(), sone, parent);
- }
-
- /**
- * Creates a new album with the given ID.
- *
- * @param id
- * The ID of the album
- */
- public DefaultAlbum(String id, Sone sone, DefaultAlbum parent) {
+ protected DefaultAlbum(Database database, String id, Sone sone, String parentId) {