import net.pterodactylus.sone.core.event.SoneUnlockedEvent;
import net.pterodactylus.sone.data.Album;
import net.pterodactylus.sone.data.Image;
+import net.pterodactylus.sone.data.LocalSone;
import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.PostReply;
import net.pterodactylus.sone.data.Reply;
return database.getSone(id);
}
- /**
- * {@inheritDocs}
- */
@Override
- public Collection<Sone> getLocalSones() {
+ public Collection<LocalSone> getLocalSones() {
return database.getLocalSones();
}
- /**
- * Returns the local Sone with the given ID, optionally creating a new Sone.
- *
- * @param id
- * The ID of the Sone
- * @return The Sone with the given ID, or {@code null}
- */
- public Sone getLocalSone(String id) {
- Optional<Sone> sone = database.getSone(id);
- if (sone.isPresent() && sone.get().isLocal()) {
- return sone.get();
- }
- return null;
+ public Optional<LocalSone> getLocalSone(String id) {
+ return database.getLocalSone(id);
}
/**