From 1e26b571992db3757943c00ac4db6d7131c5aed3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 9 Oct 2013 21:47:08 +0200 Subject: [PATCH] Add album builder creation to memory database. --- .../java/net/pterodactylus/sone/database/AlbumDatabase.java | 2 +- .../pterodactylus/sone/database/memory/MemoryDatabase.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/database/AlbumDatabase.java b/src/main/java/net/pterodactylus/sone/database/AlbumDatabase.java index 446debc..01d91b6 100644 --- a/src/main/java/net/pterodactylus/sone/database/AlbumDatabase.java +++ b/src/main/java/net/pterodactylus/sone/database/AlbumDatabase.java @@ -23,7 +23,7 @@ package net.pterodactylus.sone.database; * * @author David ‘Bombe’ Roden */ -public interface AlbumDatabase extends AlbumProvider, AlbumStore { +public interface AlbumDatabase extends AlbumProvider, AlbumBuilderFactory, AlbumStore { /* nothing here. */ diff --git a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java index bc96715..77ff2f4 100644 --- a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java +++ b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java @@ -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 // -- 2.7.4