X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2Fimpl%2FPostReplyBuilderImpl.java;h=dac84addaf62186ff388b76337a6d8d3f576fdd8;hb=7df20dec7dcc9aa6d1aa657d24f273e1a82c60fc;hp=c553bc37be5a356aefff10bbb8476ac1d59ae81a;hpb=658a702c550e15bd3c868ed399621606eeb4ef20;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/data/impl/PostReplyBuilderImpl.java b/src/main/java/net/pterodactylus/sone/data/impl/PostReplyBuilderImpl.java
index c553bc3..dac84ad 100644
--- a/src/main/java/net/pterodactylus/sone/data/impl/PostReplyBuilderImpl.java
+++ b/src/main/java/net/pterodactylus/sone/data/impl/PostReplyBuilderImpl.java
@@ -22,8 +22,8 @@ import static com.google.common.base.Preconditions.checkState;
import java.util.UUID;
import net.pterodactylus.sone.data.PostReply;
-import net.pterodactylus.sone.data.PostReplyBuilder;
import net.pterodactylus.sone.database.PostProvider;
+import net.pterodactylus.sone.database.PostReplyBuilder;
import net.pterodactylus.sone.database.SoneProvider;
import org.apache.commons.lang.StringUtils;
@@ -34,7 +34,7 @@ import org.apache.commons.lang.StringUtils;
*
* @author David âBombeâ Roden
*/
-public class PostReplyBuilderImpl extends AbstractReplyBuilder implements PostReplyBuilder {
+public class PostReplyBuilderImpl extends AbstractPostReplyBuilder {
/** The Sone provider. */
private final SoneProvider soneProvider;
@@ -42,9 +42,6 @@ public class PostReplyBuilderImpl extends AbstractReplyBuilder
/** The post provider. */
private final PostProvider postProvider;
- /** The ID of the post the created reply refers to. */
- private String postId;
-
/**
* Creates a new post reply builder.
*
@@ -62,15 +59,6 @@ public class PostReplyBuilderImpl extends AbstractReplyBuilder
* {@inheritDoc}
*/
@Override
- public PostReplyBuilder to(String postId) {
- this.postId = postId;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
public PostReply build() {
checkState((randomId && (id == null)) || (!randomId && (id != null)), "either random ID nor custom ID must be set");
checkState(senderId != null, "sender must not be null");
@@ -81,4 +69,5 @@ public class PostReplyBuilderImpl extends AbstractReplyBuilder
/* create new post reply. */
return new PostReplyImpl(soneProvider, postProvider, randomId ? UUID.randomUUID().toString() : id, senderId, currentTime ? System.currentTimeMillis() : time, text, postId);
}
+
}