X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdatabase%2FPostReplyBuilder.java;h=2dc922a12aaa6703eb7ec3894687fc5630a90c7e;hb=24a1147058b1a8e4c3021dd61b0b24d4e350eabb;hp=c03144302aec6f686f3d5a365629af5da0107821;hpb=6f019de1d4d9742981d851ac3c9097cca8bff58e;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/database/PostReplyBuilder.java b/src/main/java/net/pterodactylus/sone/database/PostReplyBuilder.java index c031443..2dc922a 100644 --- a/src/main/java/net/pterodactylus/sone/database/PostReplyBuilder.java +++ b/src/main/java/net/pterodactylus/sone/database/PostReplyBuilder.java @@ -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 { /** - * 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. *

* The following conditions must be met in order for the configuration to be @@ -56,6 +48,12 @@ public interface PostReplyBuilder extends ReplyBuilder { * @throws IllegalStateException * if this builder’s configuration is not valid */ - public PostReply build() throws IllegalStateException; + public PostReply build(Optional postReplyCreated) throws IllegalStateException; + + interface PostReplyCreated { + + void postReplyCreated(PostReply postReply); + + } }