summaryrefslogtreecommitdiff
path: root/src/main/java/com/p4square/groupsindexer/model/GroupSearchDocument.java
blob: e336cb8b8420557d52f9e5ee7c8cce8f15af2daf (plain)
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
package com.p4square.groupsindexer.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.HashMap;
import java.util.Map;

/**
 * A group description in ElasticSearch.
 */
public class GroupSearchDocument {

    @JsonProperty("id")
    private int id;

    @JsonProperty("name")
    private String name;

    @JsonProperty("description")
    private String description;

    @JsonProperty("image-url")
    private String imageUrl;

    @JsonProperty("leader-id")
    private int leaderId;

    @JsonProperty("leader-name")
    private String leaderName;

    @JsonProperty("leader-email")
    private String leaderEmail;

    @JsonProperty("member-count")
    private int currentMembers;

    @JsonProperty("group-capacity")
    private Integer groupCapacity;

    @JsonProperty("childcare")
    private boolean childcareProvided;

    @JsonProperty("listed")
    private boolean listed;

    @JsonProperty("public")
    private boolean publicSearchListed;

    @JsonProperty("active")
    private boolean active;

    @JsonProperty("udf")
    private Map<String, Reference> customFields;

    private Reference campus;
    private Reference groupType;
    private Reference department;
    private Reference area;
    private Reference meetingDay;
    private Reference meetingTime;

    public GroupSearchDocument() {
        customFields = new HashMap<>();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getLeaderId() {
        return leaderId;
    }

    public void setLeaderId(int leaderId) {
        this.leaderId = leaderId;
    }

    public String getLeaderName() {
        return leaderName;
    }

    public void setLeaderName(String leaderName) {
        this.leaderName = leaderName;
    }

    public String getLeaderEmail() {
        return leaderEmail;
    }

    public void setLeaderEmail(String leaderEmail) {
        this.leaderEmail = leaderEmail;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public int getCurrentMembers() {
        return currentMembers;
    }

    public void setCurrentMembers(int currentMembers) {
        this.currentMembers = currentMembers;
    }

    public Integer getGroupCapacity() {
        return this.groupCapacity;
    }

    @JsonIgnore
    public boolean isGroupCapacityUnlimited() {
        return this.groupCapacity == null;
    }

    public void setGroupCapacity(Integer groupCapacity) {
        this.groupCapacity = groupCapacity;
    }

    public boolean isChildcareProvided() {
        return childcareProvided;
    }

    public void setChildcareProvided(boolean childcareProvided) {
        this.childcareProvided = childcareProvided;
    }

    public boolean isListed() {
        return listed;
    }

    public void setListed(boolean listed) {
        this.listed = listed;
    }

    public boolean isPublicSearchListed() {
        return publicSearchListed;
    }

    public void setPublicSearchListed(boolean publicSearchListed) {
        this.publicSearchListed = publicSearchListed;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public Reference getCampus() {
        return campus;
    }

    public void setCampus(Reference campus) {
        this.campus = campus;
    }

    public Reference getGroupType() {
        return groupType;
    }

    public void setGroupType(Reference groupType) {
        this.groupType = groupType;
    }

    public Reference getDepartment() {
        return department;
    }

    public void setDepartment(Reference department) {
        this.department = department;
    }

    public Reference getArea() {
        return area;
    }

    public void setArea(Reference area) {
        this.area = area;
    }

    public Reference getMeetingDay() {
        return meetingDay;
    }

    public void setMeetingDay(Reference meetingDay) {
        this.meetingDay = meetingDay;
    }

    public Reference getMeetingTime() {
        return meetingTime;
    }

    public void setMeetingTime(Reference meetingTime) {
        this.meetingTime = meetingTime;
    }

    public Map<String, Reference> getCustomFields() {
        return customFields;
    }

    public void setCustomFields(Map<String, Reference> customFields) {
        this.customFields = customFields;
    }

}