Store identities in database.
[Sone.git] / src / main / java / net / pterodactylus / sone / database / PostReplyBuilder.java
index c031443..2dc922a 100644 (file)
@@ -19,6 +19,8 @@ package net.pterodactylus.sone.database;
 
 import net.pterodactylus.sone.data.PostReply;
 
+import com.google.common.base.Optional;
+
 /**
  * Builder for a {@link PostReply} object.
  *
@@ -27,16 +29,6 @@ import net.pterodactylus.sone.data.PostReply;
 public interface PostReplyBuilder extends ReplyBuilder<PostReplyBuilder> {
 
        /**
-        * Configures this builder to set the given post as post the created reply
-        * refers to.
-        *
-        * @param postId
-        *            The ID of the post the reply refers to
-        * @return This builder
-        */
-       public PostReplyBuilder to(String postId);
-
-       /**
         * Verifies the configuration of this builder and creates a new post reply.
         * <p>
         * The following conditions must be met in order for the configuration to be
@@ -56,6 +48,12 @@ public interface PostReplyBuilder extends ReplyBuilder<PostReplyBuilder> {
         * @throws IllegalStateException
         *             if this builder’s configuration is not valid
         */
-       public PostReply build() throws IllegalStateException;
+       public PostReply build(Optional<PostReplyCreated> postReplyCreated) throws IllegalStateException;
+
+       interface PostReplyCreated {
+
+               void postReplyCreated(PostReply postReply);
+
+       }
 
 }