- this.soneProvider = soneProvider;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder copyPost(Post post) {
- this.randomId = false;
- this.id = post.getId();
- this.senderId = post.getSone().getId();
- this.currentTime = false;
- this.time = post.getTime();
- this.text = post.getText();
- this.recipientId = (post.getRecipient() != null) ? post.getRecipient().getId() : null;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder randomId() {
- randomId = true;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder withId(String id) {
- this.id = id;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder from(String senderId) {
- this.senderId = senderId;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder currentTime() {
- currentTime = true;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder withTime(long time) {
- this.time = time;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder withText(String text) {
- this.text = text;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder to(String recipientId) {
- this.recipientId = recipientId;
- return this;