-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathForumThread.java
More file actions
130 lines (112 loc) · 2.07 KB
/
ForumThread.java
File metadata and controls
130 lines (112 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
package api.subscriptions;
import com.google.gson.annotations.SerializedName;
/**
* Describes a subscribed forum thread
*
* @author Gwindow
*/
public class ForumThread {
/**
* The forum id.
*/
private Number forumId;
/**
* The forum name
*/
private String forumName;
/**
* The thread id.
*/
private Number threadId;
/**
* The thread title.
*/
private String threadTitle;
/**
* id of the last read post in the thread
*/
private Number postId;
/**
* id of the most recent post made in the thread
*/
private Number lastPostId;
/**
* If the thread is locked
*/
private boolean locked;
/**
* If there's been a new post.
*/
@SerializedName("new")
private boolean isNew;
/**
* Get the forum id.
*
* @return the forum id
*/
public Number getForumId(){
return forumId;
}
/**
* Get the forum name.
*
* @return the forum name
*/
public String getForumName(){
return forumName;
}
/**
* Get the thread id.
*
* @return the thread id
*/
public Number getThreadId(){
return threadId;
}
/**
* Get the thread title.
*
* @return the thread title
*/
public String getThreadTitle(){
return threadTitle;
}
/**
* Get the last read post id
*
* @return last read post id
*/
public Number getPostId(){
return postId;
}
/**
* Get the most recent post id for the thread
*
* @return most recent post in the thread
*/
public Number getLastPostId(){
return lastPostId;
}
/**
* Check if the thread is locked
*
* @return True if locked
*/
public boolean isLocked(){
return locked;
}
/**
* Check if the thread has new posts
*
* @return True if it has new posts
*/
public boolean hasUnreadPosts(){
return isNew;
}
@Override
public String toString() {
return "ForumThread [getForumId=" + getForumId() + ", getForumName=" + getForumName() + ", getLastPostId=" + getLastPostId()
+ ", isLocked=" + isLocked() + ", hasUnreadPosts=" + hasUnreadPosts() + ", getPostId=" + getPostId() + ", getThreadId="
+ getThreadId() + ", getThreadTitle=" + getThreadTitle() + "]";
}
}