import net.pterodactylus.sone.data.Client;
import net.pterodactylus.sone.data.Post;
+import net.pterodactylus.sone.data.PostReply;
import net.pterodactylus.sone.database.SoneBuilder;
import net.pterodactylus.sone.freenet.wot.Identity;
import net.pterodactylus.sone.freenet.wot.OwnIdentity;
protected long lastUpdated;
protected Client client;
protected final Collection<Post> posts = new HashSet<Post>();
+ protected final Collection<PostReply> postReplies = new HashSet<PostReply>();
@Override
public SoneBuilder from(Identity identity) {
return this;
}
+ @Override
+ public SoneBuilder withPostReplies(Collection<PostReply> postReplies) {
+ this.postReplies.clear();
+ this.postReplies.addAll(postReplies);
+ return this;
+ }
+
protected void validate() throws IllegalStateException {
checkState(identity != null, "identity must not be null");
checkState(!local || (identity instanceof OwnIdentity),