diff options
author | 2017-09-22 16:39:00 +0300 | |
---|---|---|
committer | 2017-09-22 16:39:00 +0300 | |
commit | f3963f0b12055ba6710b9b28ddc93a5b5fe91d67 (patch) | |
tree | e05c2a4ab6cdbda573c800d79b89572840222fea /juick-core/src/main/java/com/juick/Message.java | |
parent | 030257f473a92693a4b696acfa745bbf64c98580 (diff) |
Initial getNotifications query
* using Java 8 DateTime API where possible
Diffstat (limited to 'juick-core/src/main/java/com/juick/Message.java')
-rw-r--r-- | juick-core/src/main/java/com/juick/Message.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/juick-core/src/main/java/com/juick/Message.java b/juick-core/src/main/java/com/juick/Message.java index 72f60c82..25463c46 100644 --- a/juick-core/src/main/java/com/juick/Message.java +++ b/juick-core/src/main/java/com/juick/Message.java @@ -26,7 +26,11 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import java.util.*; +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; /** * @author Ugnich Anton @@ -40,7 +44,7 @@ public class Message implements Comparable { private String text = null; private User user = null; private final List<Tag> tags; - private Date date; + private Instant ts; @XmlTransient @JsonIgnore public int TimeAgo = 0; @@ -239,12 +243,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 Date getDate() { - return date; + public Instant getTimestamp() { + return ts; } - public void setDate(Date date) { - this.date = date; + public void setTimestamp(Instant timestamp) { + this.ts = timestamp; } public com.juick.PM getPM() { |