import net.pterodactylus.sone.core.event.SoneRemovedEvent;
import net.pterodactylus.sone.core.event.SoneUnlockedEvent;
import net.pterodactylus.sone.data.Album;
-import net.pterodactylus.sone.data.AlbumImpl;
import net.pterodactylus.sone.data.Client;
import net.pterodactylus.sone.data.Image;
import net.pterodactylus.sone.data.Post;
if (!create) {
return null;
}
- Album newAlbum = new AlbumImpl(albumId);
+ Album newAlbum = database.newAlbumBuilder().withId(albumId).build();
database.storeAlbum(newAlbum);
return newAlbum;
}
* @return The new album
*/
public Album createAlbum(Sone sone, Album parent) {
- AlbumImpl album = new AlbumImpl();
+ Album album = database.newAlbumBuilder().randomId().build();
database.storeAlbum(album);
album.setSone(sone);
parent.addAlbum(album);