+ @Override
+ public PostReplyBuilder newPostReplyBuilder(String postId) throws IllegalStateException {
+ return new DefaultPostReplyBuilder(database, getId(), postId) {
+ @Override
+ public PostReply build(Optional<PostReplyCreated> postReplyCreated) {
+ PostReply postReply = super.build(postReplyCreated);
+ database.storePostReply(postReply);
+ return postReply;
+ }
+ };
+ }
+
+ public Modifier modify() {
+ return new Modifier() {
+ private long latestEdition = DefaultSone.this.latestEdition;
+ @Override
+ public Modifier setLatestEdition(long latestEdition) {
+ this.latestEdition = latestEdition;
+ return this;
+ }
+
+ @Override
+ public Sone update() {
+ DefaultSone.this.latestEdition = latestEdition;
+ return DefaultSone.this;
+ }
+ };
+ }
+