aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/Message.java27
-rw-r--r--src/main/java/com/juick/PM.java16
-rw-r--r--src/main/java/com/juick/Recommendation.java16
3 files changed, 54 insertions, 5 deletions
diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java
index 003622ec..c6e10214 100644
--- a/src/main/java/com/juick/Message.java
+++ b/src/main/java/com/juick/Message.java
@@ -17,9 +17,7 @@
*/
package com.juick;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
+import java.util.*;
/**
*
@@ -34,7 +32,7 @@ public class Message {
public int ReplyTo = 0;
private String Text = null;
private User User = null;
- public ArrayList<String> Tags = new ArrayList<String>();
+ public List<String> Tags = new ArrayList<>();
private Date date = null;
public int TimeAgo = 0;
public int Privacy = 1;
@@ -50,7 +48,9 @@ public class Message {
public Place Place = null;
public int Likes = 0;
public boolean UserLike = false;
- public ArrayList<Message> childs = new ArrayList<Message>();
+ public ArrayList<Message> childs = new ArrayList<>();
+ private Optional<PM> PM = Optional.empty();
+ Optional<Recommendation> Recommendation = Optional.empty();
public Message() {
}
@@ -76,6 +76,8 @@ public class Message {
Likes = msg.Likes;
UserLike = msg.UserLike;
childs = msg.childs;
+ PM = msg.PM;
+ Recommendation = msg.Recommendation;
}
public void parseTags(String strTags) {
@@ -215,4 +217,19 @@ public class Message {
this.date = date;
}
+
+ public Optional<com.juick.PM> getPM() {
+ return PM;
+ }
+
+ public void setPM(com.juick.PM PM) {
+ this.PM = Optional.ofNullable(PM);
+ }
+
+ public Optional<Recommendation> getRecommendation() {
+ return Recommendation;
+ }
+ public void setRecommendation(Recommendation recommendation) {
+ this.Recommendation = Optional.ofNullable(recommendation);
+ }
}
diff --git a/src/main/java/com/juick/PM.java b/src/main/java/com/juick/PM.java
new file mode 100644
index 00000000..658cafc9
--- /dev/null
+++ b/src/main/java/com/juick/PM.java
@@ -0,0 +1,16 @@
+package com.juick;
+
+/**
+ * Created by vt on 08/02/16.
+ */
+public class PM {
+ private User to;
+
+ public User getTo() {
+ return to;
+ }
+
+ public PM(User to) {
+ this.to = to;
+ }
+}
diff --git a/src/main/java/com/juick/Recommendation.java b/src/main/java/com/juick/Recommendation.java
new file mode 100644
index 00000000..4cfa67c2
--- /dev/null
+++ b/src/main/java/com/juick/Recommendation.java
@@ -0,0 +1,16 @@
+package com.juick;
+
+/**
+ * Created by vt on 08/02/16.
+ */
+public class Recommendation {
+ User from;
+
+ public User getFrom() {
+ return from;
+ }
+
+ public Recommendation(User from) {
+ this.from = from;
+ }
+}