aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/Message.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/Message.java')
-rw-r--r--src/main/java/com/juick/Message.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java
index fb6be67c..2035d4c6 100644
--- a/src/main/java/com/juick/Message.java
+++ b/src/main/java/com/juick/Message.java
@@ -21,7 +21,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.juick.adapters.SimpleDateAdapter;
import com.juick.model.Entity;
-import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import javax.annotation.Nonnull;
@@ -46,8 +45,8 @@ public class Message implements Comparable {
private int replyto = 0;
private String text = null;
private User user = null;
- private final Set<Tag> tags;
- private Instant ts;
+ private Set<Tag> tags;
+ private Instant created;
private Instant updated;
private Instant updatedAt;
private boolean unread;
@@ -181,12 +180,12 @@ public class Message implements Comparable {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "UTC")
@XmlAttribute(name = "ts")
@XmlJavaTypeAdapter(SimpleDateAdapter.class)
- public Instant getTimestamp() {
- return ts;
+ public Instant getCreated() {
+ return created;
}
- public void setTimestamp(Instant timestamp) {
- this.ts = timestamp;
+ public void setCreated(Instant timestamp) {
+ this.created = timestamp;
}
@XmlTransient
@@ -224,9 +223,7 @@ public class Message implements Comparable {
}
public void setTags(Set<Tag> tags) {
- this.tags.clear();
- if (CollectionUtils.isNotEmpty(tags))
- this.tags.addAll(tags);
+ this.tags = tags;
}
@XmlAttribute