blob: 6e9a40d335b824b316a7ed7f918bec93db8c01b2 (
plain) (
blame)
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
|
package ml.docilealligator.infinityforreddit.subreddit;
import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
@Entity(tableName = "subreddits")
public class SubredditData {
@PrimaryKey
@NonNull
@ColumnInfo(name = "id")
private final String id;
@ColumnInfo(name = "name")
private final String name;
@ColumnInfo(name = "icon")
private final String iconUrl;
@ColumnInfo(name = "banner")
private final String bannerUrl;
@ColumnInfo(name = "description")
private final String description;
@ColumnInfo(name = "sidebar_description")
private final String sidebarDescription;
@ColumnInfo(name = "subscribers_count")
private final int nSubscribers;
@ColumnInfo(name = "created_utc")
private final long createdUTC;
@ColumnInfo(name = "suggested_comment_sort")
private final String suggestedCommentSort;
@ColumnInfo(name = "over18")
private final boolean isNSFW;
@Ignore
private boolean isSelected;
public SubredditData(@NonNull String id, String name, String iconUrl, String bannerUrl,
String description, String sidebarDescription, int nSubscribers, long createdUTC,
String suggestedCommentSort, boolean isNSFW) {
this.id = id;
this.name = name;
this.iconUrl = iconUrl;
this.bannerUrl = bannerUrl;
this.description = description;
this.sidebarDescription = sidebarDescription;
this.nSubscribers = nSubscribers;
this.createdUTC = createdUTC;
this.suggestedCommentSort = suggestedCommentSort;
this.isNSFW = isNSFW;
this.isSelected = false;
}
@NonNull
public String getId() {
return id;
}
public String getName() {
return name;
}
public String getIconUrl() {
return iconUrl;
}
public String getBannerUrl() {
return bannerUrl;
}
public String getDescription() {
return description;
}
public String getSidebarDescription() {
return sidebarDescription;
}
public int getNSubscribers() {
return nSubscribers;
}
public long getCreatedUTC() {
return createdUTC;
}
public String getSuggestedCommentSort() {
return suggestedCommentSort;
}
public boolean isNSFW() {
return isNSFW;
}
public boolean isSelected() {
return isSelected;
}
public void setSelected(boolean selected) {
isSelected = selected;
}
}
|