X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FAlbum.java;h=7b245f96697ba3091974cd412537665a09108274;hb=5a9585e9a43a35e675fb59a9d9135ff62efac21a;hp=e8efb59a9b4012d7c9d477ccdac710f57f28cdd8;hpb=31a732a2e18008ea65a31a4e8180c337458b2df9;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/data/Album.java b/src/main/java/net/pterodactylus/sone/data/Album.java
index e8efb59..7b245f9 100644
--- a/src/main/java/net/pterodactylus/sone/data/Album.java
+++ b/src/main/java/net/pterodactylus/sone/data/Album.java
@@ -26,10 +26,11 @@ import java.util.Comparator;
import java.util.List;
import javax.annotation.Nonnull;
-import net.pterodactylus.sone.database.AlbumBuilder;
+import net.pterodactylus.sone.database.AlbumBuilderFactory;
import net.pterodactylus.sone.database.ImageBuilder;
import com.google.common.base.Function;
+import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
@@ -39,7 +40,7 @@ import com.google.common.collect.ImmutableList;
*
* @author David âBombeâ Roden
*/
-public interface Album extends Identified, Fingerprintable {
+public interface Album extends Identified, Fingerprintable, AlbumBuilderFactory {
/** Compares two {@link Album}s by {@link #getTitle()}. */
Comparator TITLE_COMPARATOR = new Comparator() {
@@ -127,13 +128,7 @@ public interface Album extends Identified, Fingerprintable {
*/
List getImages();
- /**
- * Returns the album image of this album, or {@code null} if no album image has
- * been set.
- *
- * @return The image to show when this album is listed
- */
- Image getAlbumImage();
+ Optional getAlbumImage();
/**
* Returns whether this album contains any other albums or images.
@@ -172,8 +167,6 @@ public interface Album extends Identified, Fingerprintable {
*/
String getDescription();
- AlbumBuilder newAlbumBuilder() throws IllegalStateException;
-
ImageBuilder newImageBuilder() throws IllegalStateException;
/**