Add method to expose a Sone loader.
[Sone.git] / src / main / java / net / pterodactylus / sone / database / SoneProvider.java
index bbe0abf..b944ab8 100644 (file)
 
 package net.pterodactylus.sone.database;
 
+import java.util.Collection;
+
 import net.pterodactylus.sone.data.Sone;
 
+import com.google.common.base.Function;
 import com.google.common.base.Optional;
 
 /**
@@ -28,6 +31,8 @@ import com.google.common.base.Optional;
  */
 public interface SoneProvider {
 
+       Function<String, Optional<Sone>> getSone();
+
        /**
         * Returns the Sone with the given ID, or {@link Optional#absent()} if it
         * does not exist.
@@ -38,4 +43,25 @@ public interface SoneProvider {
         */
        public Optional<Sone> getSone(String soneId);
 
+       /**
+        * Returns all Sones.
+        *
+        * @return All Sones
+        */
+       public Collection<Sone> getSones();
+
+       /**
+        * Returns all local Sones.
+        *
+        * @return All local Sones
+        */
+       public Collection<Sone> getLocalSones();
+
+       /**
+        * Returns all remote Sones.
+        *
+        * @return All remote Sones
+        */
+       public Collection<Sone> getRemoteSones();
+
 }