Use local Sone for loading the Sone in the database.
[Sone.git] / src / main / java / net / pterodactylus / sone / database / LocalSoneDatabase.java
index b53d890..0240080 100644 (file)
@@ -1,8 +1,11 @@
 package net.pterodactylus.sone.database;
 
+import net.pterodactylus.sone.data.LocalSone;
 import net.pterodactylus.sone.data.Sone;
 import net.pterodactylus.sone.freenet.wot.OwnIdentity;
 
+import com.google.common.base.Optional;
+
 /**
  * Database functions for local Sones.
  *
@@ -10,7 +13,8 @@ import net.pterodactylus.sone.freenet.wot.OwnIdentity;
  */
 public interface LocalSoneDatabase {
 
-       Sone registerLocalSone(OwnIdentity ownIdentity);
+       Optional<LocalSone> getLocalSone(String localSoneId);
+       LocalSone registerLocalSone(OwnIdentity ownIdentity);
        String getLastInsertFingerprint(Sone sone);
        void setLastInsertFingerprint(Sone sone, String lastInsertFingerprint);