projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix duplicate-field detection.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
database
/
PostReplyBuilder.java
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
(file)
--- 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 net.pterodactylus.sone.data.PostReply;
+import com.google.common.base.Optional;
+
/**
* Builder for a {@link PostReply} object.
*
/**
* Builder for a {@link PostReply} object.
*
@@
-27,16
+29,6
@@
import net.pterodactylus.sone.data.PostReply;
public interface PostReplyBuilder extends ReplyBuilder<PostReplyBuilder> {
/**
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
* 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
*/
* @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);
+
+ }
}
}