Add album builder creation to memory database.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 9 Oct 2013 19:47:08 +0000 (21:47 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 9 Oct 2013 19:47:08 +0000 (21:47 +0200)
src/main/java/net/pterodactylus/sone/database/AlbumDatabase.java
src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java

index 446debc..01d91b6 100644 (file)
@@ -23,7 +23,7 @@ package net.pterodactylus.sone.database;
  *
  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
-public interface AlbumDatabase extends AlbumProvider, AlbumStore {
+public interface AlbumDatabase extends AlbumProvider, AlbumBuilderFactory, AlbumStore {
 
        /* nothing here. */
 
index bc96715..77ff2f4 100644 (file)
@@ -39,6 +39,8 @@ import net.pterodactylus.sone.data.Post;
 import net.pterodactylus.sone.data.PostReply;
 import net.pterodactylus.sone.data.Reply;
 import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.data.impl.AlbumBuilderImpl;
+import net.pterodactylus.sone.database.AlbumBuilder;
 import net.pterodactylus.sone.database.Database;
 import net.pterodactylus.sone.database.DatabaseException;
 import net.pterodactylus.sone.database.PostBuilder;
@@ -430,6 +432,15 @@ public class MemoryDatabase extends AbstractService implements Database {
        }
 
        //
+       // ALBUMBUILDERFACTORY METHODS
+       //
+
+       @Override
+       public AlbumBuilder newAlbumBuilder() {
+               return new AlbumBuilderImpl();
+       }
+
+       //
        // ALBUMSTORE METHODS
        //