X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdatabase%2FPostBuilder.java;h=775378c87e897dfbcc75f83f921f414cbc5f4d22;hb=40e4cfe73a346f7dc9d46aedbeccd6a38798f175;hp=c46bd6926a3caf529974e592296b57f4f5ec15cc;hpb=027615fa64c78ef5ebc198e852cfd6d39b18aad0;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/database/PostBuilder.java b/src/main/java/net/pterodactylus/sone/database/PostBuilder.java index c46bd69..775378c 100644 --- a/src/main/java/net/pterodactylus/sone/database/PostBuilder.java +++ b/src/main/java/net/pterodactylus/sone/database/PostBuilder.java @@ -20,6 +20,8 @@ package net.pterodactylus.sone.database; import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Sone; +import com.google.common.base.Optional; + /** * Builder for {@link Post} objects. *
@@ -43,25 +45,6 @@ import net.pterodactylus.sone.data.Sone;
public interface PostBuilder {
/**
- * Copies all attributes of the given post to this post builder.
- *
- * @param post
- * The post whose attributes to copy into this builder
- * @return This builder
- * @throws NullPointerException
- * if {@code post} is {@code null}
- */
- public PostBuilder copyPost(Post post) throws NullPointerException;
-
- /**
- * Configures this builder to use a random ID for the new post. If this
- * method is used, {@link #withId(String)} must not be used.
- *
- * @return This post builder
- */
- public PostBuilder randomId();
-
- /**
* Configures this builder to use the given ID as ID for the new post. If
* this method is used, {@link #randomId()} must not be used.
*
@@ -72,14 +55,6 @@ public interface PostBuilder {
public PostBuilder withId(String id);
/**
- * Configures this builder to use the current time when creating the post.
- * If this method is used, {@link #withTime(long)} must not be used.
- *
- * @return This post builder
- */
- public PostBuilder currentTime();
-
- /**
* Configures the builder to use the given time as time for the new post. If
* this method is used, {@link #currentTime()} must not be used.
*
@@ -106,7 +81,7 @@ public interface PostBuilder {
* The ID of the recipient of the post
* @return This post builder
*/
- public PostBuilder to(String recipientId);
+ public PostBuilder to(Optional