| 1396 |
varun.gupt |
1 |
/**
|
|
|
2 |
* Autogenerated by Thrift
|
|
|
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.utils;
|
|
|
7 |
|
|
|
8 |
import java.util.List;
|
|
|
9 |
import java.util.ArrayList;
|
|
|
10 |
import java.util.Map;
|
|
|
11 |
import java.util.HashMap;
|
|
|
12 |
import java.util.EnumMap;
|
|
|
13 |
import java.util.Set;
|
|
|
14 |
import java.util.HashSet;
|
|
|
15 |
import java.util.EnumSet;
|
|
|
16 |
import java.util.Collections;
|
|
|
17 |
import java.util.BitSet;
|
|
|
18 |
import java.util.Arrays;
|
|
|
19 |
import org.slf4j.Logger;
|
|
|
20 |
import org.slf4j.LoggerFactory;
|
|
|
21 |
|
|
|
22 |
import org.apache.thrift.*;
|
|
|
23 |
import org.apache.thrift.meta_data.*;
|
|
|
24 |
import org.apache.thrift.protocol.*;
|
|
|
25 |
|
|
|
26 |
public class UserEmail implements TBase<UserEmail._Fields>, java.io.Serializable, Cloneable, Comparable<UserEmail> {
|
|
|
27 |
private static final TStruct STRUCT_DESC = new TStruct("UserEmail");
|
|
|
28 |
|
| 1424 |
varun.gupt |
29 |
private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
|
|
|
30 |
private static final TField EMAIL_TO_FIELD_DESC = new TField("emailTo", TType.STRING, (short)2);
|
|
|
31 |
private static final TField EMAIL_FROM_FIELD_DESC = new TField("emailFrom", TType.STRING, (short)3);
|
|
|
32 |
private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)4);
|
|
|
33 |
private static final TField BODY_FIELD_DESC = new TField("body", TType.STRING, (short)5);
|
|
|
34 |
private static final TField SOURCE_FIELD_DESC = new TField("source", TType.STRING, (short)6);
|
|
|
35 |
private static final TField EMAIL_TYPE_FIELD_DESC = new TField("emailType", TType.STRING, (short)7);
|
|
|
36 |
private static final TField STATUS_FIELD_DESC = new TField("status", TType.BOOL, (short)8);
|
|
|
37 |
private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)9);
|
| 1396 |
varun.gupt |
38 |
|
| 1424 |
varun.gupt |
39 |
private long id;
|
| 1396 |
varun.gupt |
40 |
private String emailTo;
|
|
|
41 |
private String emailFrom;
|
|
|
42 |
private String subject;
|
|
|
43 |
private String body;
|
|
|
44 |
private String source;
|
|
|
45 |
private String emailType;
|
|
|
46 |
private boolean status;
|
|
|
47 |
private long timestamp;
|
|
|
48 |
|
|
|
49 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
50 |
public enum _Fields implements TFieldIdEnum {
|
| 1424 |
varun.gupt |
51 |
ID((short)1, "id"),
|
|
|
52 |
EMAIL_TO((short)2, "emailTo"),
|
|
|
53 |
EMAIL_FROM((short)3, "emailFrom"),
|
|
|
54 |
SUBJECT((short)4, "subject"),
|
|
|
55 |
BODY((short)5, "body"),
|
|
|
56 |
SOURCE((short)6, "source"),
|
|
|
57 |
EMAIL_TYPE((short)7, "emailType"),
|
|
|
58 |
STATUS((short)8, "status"),
|
|
|
59 |
TIMESTAMP((short)9, "timestamp");
|
| 1396 |
varun.gupt |
60 |
|
|
|
61 |
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
|
|
|
62 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
63 |
|
|
|
64 |
static {
|
|
|
65 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
66 |
byId.put((int)field._thriftId, field);
|
|
|
67 |
byName.put(field.getFieldName(), field);
|
|
|
68 |
}
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
/**
|
|
|
72 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
73 |
*/
|
|
|
74 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
75 |
return byId.get(fieldId);
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
/**
|
|
|
79 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
80 |
* if it is not found.
|
|
|
81 |
*/
|
|
|
82 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
83 |
_Fields fields = findByThriftId(fieldId);
|
|
|
84 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
85 |
return fields;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
/**
|
|
|
89 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
90 |
*/
|
|
|
91 |
public static _Fields findByName(String name) {
|
|
|
92 |
return byName.get(name);
|
|
|
93 |
}
|
|
|
94 |
|
|
|
95 |
private final short _thriftId;
|
|
|
96 |
private final String _fieldName;
|
|
|
97 |
|
|
|
98 |
_Fields(short thriftId, String fieldName) {
|
|
|
99 |
_thriftId = thriftId;
|
|
|
100 |
_fieldName = fieldName;
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
public short getThriftFieldId() {
|
|
|
104 |
return _thriftId;
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
public String getFieldName() {
|
|
|
108 |
return _fieldName;
|
|
|
109 |
}
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
// isset id assignments
|
| 1424 |
varun.gupt |
113 |
private static final int __ID_ISSET_ID = 0;
|
|
|
114 |
private static final int __STATUS_ISSET_ID = 1;
|
|
|
115 |
private static final int __TIMESTAMP_ISSET_ID = 2;
|
|
|
116 |
private BitSet __isset_bit_vector = new BitSet(3);
|
| 1396 |
varun.gupt |
117 |
|
|
|
118 |
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
|
| 1424 |
varun.gupt |
119 |
put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT,
|
|
|
120 |
new FieldValueMetaData(TType.I64)));
|
| 1396 |
varun.gupt |
121 |
put(_Fields.EMAIL_TO, new FieldMetaData("emailTo", TFieldRequirementType.DEFAULT,
|
|
|
122 |
new FieldValueMetaData(TType.STRING)));
|
|
|
123 |
put(_Fields.EMAIL_FROM, new FieldMetaData("emailFrom", TFieldRequirementType.DEFAULT,
|
|
|
124 |
new FieldValueMetaData(TType.STRING)));
|
|
|
125 |
put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT,
|
|
|
126 |
new FieldValueMetaData(TType.STRING)));
|
|
|
127 |
put(_Fields.BODY, new FieldMetaData("body", TFieldRequirementType.DEFAULT,
|
|
|
128 |
new FieldValueMetaData(TType.STRING)));
|
|
|
129 |
put(_Fields.SOURCE, new FieldMetaData("source", TFieldRequirementType.DEFAULT,
|
|
|
130 |
new FieldValueMetaData(TType.STRING)));
|
|
|
131 |
put(_Fields.EMAIL_TYPE, new FieldMetaData("emailType", TFieldRequirementType.DEFAULT,
|
|
|
132 |
new FieldValueMetaData(TType.STRING)));
|
|
|
133 |
put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT,
|
|
|
134 |
new FieldValueMetaData(TType.BOOL)));
|
|
|
135 |
put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT,
|
|
|
136 |
new FieldValueMetaData(TType.I64)));
|
|
|
137 |
}});
|
|
|
138 |
|
|
|
139 |
static {
|
|
|
140 |
FieldMetaData.addStructMetaDataMap(UserEmail.class, metaDataMap);
|
|
|
141 |
}
|
|
|
142 |
|
|
|
143 |
public UserEmail() {
|
|
|
144 |
}
|
|
|
145 |
|
|
|
146 |
public UserEmail(
|
| 1424 |
varun.gupt |
147 |
long id,
|
| 1396 |
varun.gupt |
148 |
String emailTo,
|
|
|
149 |
String emailFrom,
|
|
|
150 |
String subject,
|
|
|
151 |
String body,
|
|
|
152 |
String source,
|
|
|
153 |
String emailType,
|
|
|
154 |
boolean status,
|
|
|
155 |
long timestamp)
|
|
|
156 |
{
|
|
|
157 |
this();
|
| 1424 |
varun.gupt |
158 |
this.id = id;
|
|
|
159 |
setIdIsSet(true);
|
| 1396 |
varun.gupt |
160 |
this.emailTo = emailTo;
|
|
|
161 |
this.emailFrom = emailFrom;
|
|
|
162 |
this.subject = subject;
|
|
|
163 |
this.body = body;
|
|
|
164 |
this.source = source;
|
|
|
165 |
this.emailType = emailType;
|
|
|
166 |
this.status = status;
|
|
|
167 |
setStatusIsSet(true);
|
|
|
168 |
this.timestamp = timestamp;
|
|
|
169 |
setTimestampIsSet(true);
|
|
|
170 |
}
|
|
|
171 |
|
|
|
172 |
/**
|
|
|
173 |
* Performs a deep copy on <i>other</i>.
|
|
|
174 |
*/
|
|
|
175 |
public UserEmail(UserEmail other) {
|
|
|
176 |
__isset_bit_vector.clear();
|
|
|
177 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
| 1424 |
varun.gupt |
178 |
this.id = other.id;
|
| 1396 |
varun.gupt |
179 |
if (other.isSetEmailTo()) {
|
|
|
180 |
this.emailTo = other.emailTo;
|
|
|
181 |
}
|
|
|
182 |
if (other.isSetEmailFrom()) {
|
|
|
183 |
this.emailFrom = other.emailFrom;
|
|
|
184 |
}
|
|
|
185 |
if (other.isSetSubject()) {
|
|
|
186 |
this.subject = other.subject;
|
|
|
187 |
}
|
|
|
188 |
if (other.isSetBody()) {
|
|
|
189 |
this.body = other.body;
|
|
|
190 |
}
|
|
|
191 |
if (other.isSetSource()) {
|
|
|
192 |
this.source = other.source;
|
|
|
193 |
}
|
|
|
194 |
if (other.isSetEmailType()) {
|
|
|
195 |
this.emailType = other.emailType;
|
|
|
196 |
}
|
|
|
197 |
this.status = other.status;
|
|
|
198 |
this.timestamp = other.timestamp;
|
|
|
199 |
}
|
|
|
200 |
|
|
|
201 |
public UserEmail deepCopy() {
|
|
|
202 |
return new UserEmail(this);
|
|
|
203 |
}
|
|
|
204 |
|
|
|
205 |
@Deprecated
|
|
|
206 |
public UserEmail clone() {
|
|
|
207 |
return new UserEmail(this);
|
|
|
208 |
}
|
|
|
209 |
|
| 1424 |
varun.gupt |
210 |
public long getId() {
|
|
|
211 |
return this.id;
|
|
|
212 |
}
|
|
|
213 |
|
|
|
214 |
public UserEmail setId(long id) {
|
|
|
215 |
this.id = id;
|
|
|
216 |
setIdIsSet(true);
|
|
|
217 |
return this;
|
|
|
218 |
}
|
|
|
219 |
|
|
|
220 |
public void unsetId() {
|
|
|
221 |
__isset_bit_vector.clear(__ID_ISSET_ID);
|
|
|
222 |
}
|
|
|
223 |
|
|
|
224 |
/** Returns true if field id is set (has been asigned a value) and false otherwise */
|
|
|
225 |
public boolean isSetId() {
|
|
|
226 |
return __isset_bit_vector.get(__ID_ISSET_ID);
|
|
|
227 |
}
|
|
|
228 |
|
|
|
229 |
public void setIdIsSet(boolean value) {
|
|
|
230 |
__isset_bit_vector.set(__ID_ISSET_ID, value);
|
|
|
231 |
}
|
|
|
232 |
|
| 1396 |
varun.gupt |
233 |
public String getEmailTo() {
|
|
|
234 |
return this.emailTo;
|
|
|
235 |
}
|
|
|
236 |
|
|
|
237 |
public UserEmail setEmailTo(String emailTo) {
|
|
|
238 |
this.emailTo = emailTo;
|
|
|
239 |
return this;
|
|
|
240 |
}
|
|
|
241 |
|
|
|
242 |
public void unsetEmailTo() {
|
|
|
243 |
this.emailTo = null;
|
|
|
244 |
}
|
|
|
245 |
|
|
|
246 |
/** Returns true if field emailTo is set (has been asigned a value) and false otherwise */
|
|
|
247 |
public boolean isSetEmailTo() {
|
|
|
248 |
return this.emailTo != null;
|
|
|
249 |
}
|
|
|
250 |
|
|
|
251 |
public void setEmailToIsSet(boolean value) {
|
|
|
252 |
if (!value) {
|
|
|
253 |
this.emailTo = null;
|
|
|
254 |
}
|
|
|
255 |
}
|
|
|
256 |
|
|
|
257 |
public String getEmailFrom() {
|
|
|
258 |
return this.emailFrom;
|
|
|
259 |
}
|
|
|
260 |
|
|
|
261 |
public UserEmail setEmailFrom(String emailFrom) {
|
|
|
262 |
this.emailFrom = emailFrom;
|
|
|
263 |
return this;
|
|
|
264 |
}
|
|
|
265 |
|
|
|
266 |
public void unsetEmailFrom() {
|
|
|
267 |
this.emailFrom = null;
|
|
|
268 |
}
|
|
|
269 |
|
|
|
270 |
/** Returns true if field emailFrom is set (has been asigned a value) and false otherwise */
|
|
|
271 |
public boolean isSetEmailFrom() {
|
|
|
272 |
return this.emailFrom != null;
|
|
|
273 |
}
|
|
|
274 |
|
|
|
275 |
public void setEmailFromIsSet(boolean value) {
|
|
|
276 |
if (!value) {
|
|
|
277 |
this.emailFrom = null;
|
|
|
278 |
}
|
|
|
279 |
}
|
|
|
280 |
|
|
|
281 |
public String getSubject() {
|
|
|
282 |
return this.subject;
|
|
|
283 |
}
|
|
|
284 |
|
|
|
285 |
public UserEmail setSubject(String subject) {
|
|
|
286 |
this.subject = subject;
|
|
|
287 |
return this;
|
|
|
288 |
}
|
|
|
289 |
|
|
|
290 |
public void unsetSubject() {
|
|
|
291 |
this.subject = null;
|
|
|
292 |
}
|
|
|
293 |
|
|
|
294 |
/** Returns true if field subject is set (has been asigned a value) and false otherwise */
|
|
|
295 |
public boolean isSetSubject() {
|
|
|
296 |
return this.subject != null;
|
|
|
297 |
}
|
|
|
298 |
|
|
|
299 |
public void setSubjectIsSet(boolean value) {
|
|
|
300 |
if (!value) {
|
|
|
301 |
this.subject = null;
|
|
|
302 |
}
|
|
|
303 |
}
|
|
|
304 |
|
|
|
305 |
public String getBody() {
|
|
|
306 |
return this.body;
|
|
|
307 |
}
|
|
|
308 |
|
|
|
309 |
public UserEmail setBody(String body) {
|
|
|
310 |
this.body = body;
|
|
|
311 |
return this;
|
|
|
312 |
}
|
|
|
313 |
|
|
|
314 |
public void unsetBody() {
|
|
|
315 |
this.body = null;
|
|
|
316 |
}
|
|
|
317 |
|
|
|
318 |
/** Returns true if field body is set (has been asigned a value) and false otherwise */
|
|
|
319 |
public boolean isSetBody() {
|
|
|
320 |
return this.body != null;
|
|
|
321 |
}
|
|
|
322 |
|
|
|
323 |
public void setBodyIsSet(boolean value) {
|
|
|
324 |
if (!value) {
|
|
|
325 |
this.body = null;
|
|
|
326 |
}
|
|
|
327 |
}
|
|
|
328 |
|
|
|
329 |
public String getSource() {
|
|
|
330 |
return this.source;
|
|
|
331 |
}
|
|
|
332 |
|
|
|
333 |
public UserEmail setSource(String source) {
|
|
|
334 |
this.source = source;
|
|
|
335 |
return this;
|
|
|
336 |
}
|
|
|
337 |
|
|
|
338 |
public void unsetSource() {
|
|
|
339 |
this.source = null;
|
|
|
340 |
}
|
|
|
341 |
|
|
|
342 |
/** Returns true if field source is set (has been asigned a value) and false otherwise */
|
|
|
343 |
public boolean isSetSource() {
|
|
|
344 |
return this.source != null;
|
|
|
345 |
}
|
|
|
346 |
|
|
|
347 |
public void setSourceIsSet(boolean value) {
|
|
|
348 |
if (!value) {
|
|
|
349 |
this.source = null;
|
|
|
350 |
}
|
|
|
351 |
}
|
|
|
352 |
|
|
|
353 |
public String getEmailType() {
|
|
|
354 |
return this.emailType;
|
|
|
355 |
}
|
|
|
356 |
|
|
|
357 |
public UserEmail setEmailType(String emailType) {
|
|
|
358 |
this.emailType = emailType;
|
|
|
359 |
return this;
|
|
|
360 |
}
|
|
|
361 |
|
|
|
362 |
public void unsetEmailType() {
|
|
|
363 |
this.emailType = null;
|
|
|
364 |
}
|
|
|
365 |
|
|
|
366 |
/** Returns true if field emailType is set (has been asigned a value) and false otherwise */
|
|
|
367 |
public boolean isSetEmailType() {
|
|
|
368 |
return this.emailType != null;
|
|
|
369 |
}
|
|
|
370 |
|
|
|
371 |
public void setEmailTypeIsSet(boolean value) {
|
|
|
372 |
if (!value) {
|
|
|
373 |
this.emailType = null;
|
|
|
374 |
}
|
|
|
375 |
}
|
|
|
376 |
|
|
|
377 |
public boolean isStatus() {
|
|
|
378 |
return this.status;
|
|
|
379 |
}
|
|
|
380 |
|
|
|
381 |
public UserEmail setStatus(boolean status) {
|
|
|
382 |
this.status = status;
|
|
|
383 |
setStatusIsSet(true);
|
|
|
384 |
return this;
|
|
|
385 |
}
|
|
|
386 |
|
|
|
387 |
public void unsetStatus() {
|
|
|
388 |
__isset_bit_vector.clear(__STATUS_ISSET_ID);
|
|
|
389 |
}
|
|
|
390 |
|
|
|
391 |
/** Returns true if field status is set (has been asigned a value) and false otherwise */
|
|
|
392 |
public boolean isSetStatus() {
|
|
|
393 |
return __isset_bit_vector.get(__STATUS_ISSET_ID);
|
|
|
394 |
}
|
|
|
395 |
|
|
|
396 |
public void setStatusIsSet(boolean value) {
|
|
|
397 |
__isset_bit_vector.set(__STATUS_ISSET_ID, value);
|
|
|
398 |
}
|
|
|
399 |
|
|
|
400 |
public long getTimestamp() {
|
|
|
401 |
return this.timestamp;
|
|
|
402 |
}
|
|
|
403 |
|
|
|
404 |
public UserEmail setTimestamp(long timestamp) {
|
|
|
405 |
this.timestamp = timestamp;
|
|
|
406 |
setTimestampIsSet(true);
|
|
|
407 |
return this;
|
|
|
408 |
}
|
|
|
409 |
|
|
|
410 |
public void unsetTimestamp() {
|
|
|
411 |
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
|
|
|
412 |
}
|
|
|
413 |
|
|
|
414 |
/** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
|
|
|
415 |
public boolean isSetTimestamp() {
|
|
|
416 |
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
|
|
|
417 |
}
|
|
|
418 |
|
|
|
419 |
public void setTimestampIsSet(boolean value) {
|
|
|
420 |
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
|
|
|
421 |
}
|
|
|
422 |
|
|
|
423 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
424 |
switch (field) {
|
| 1424 |
varun.gupt |
425 |
case ID:
|
|
|
426 |
if (value == null) {
|
|
|
427 |
unsetId();
|
|
|
428 |
} else {
|
|
|
429 |
setId((Long)value);
|
|
|
430 |
}
|
|
|
431 |
break;
|
|
|
432 |
|
| 1396 |
varun.gupt |
433 |
case EMAIL_TO:
|
|
|
434 |
if (value == null) {
|
|
|
435 |
unsetEmailTo();
|
|
|
436 |
} else {
|
|
|
437 |
setEmailTo((String)value);
|
|
|
438 |
}
|
|
|
439 |
break;
|
|
|
440 |
|
|
|
441 |
case EMAIL_FROM:
|
|
|
442 |
if (value == null) {
|
|
|
443 |
unsetEmailFrom();
|
|
|
444 |
} else {
|
|
|
445 |
setEmailFrom((String)value);
|
|
|
446 |
}
|
|
|
447 |
break;
|
|
|
448 |
|
|
|
449 |
case SUBJECT:
|
|
|
450 |
if (value == null) {
|
|
|
451 |
unsetSubject();
|
|
|
452 |
} else {
|
|
|
453 |
setSubject((String)value);
|
|
|
454 |
}
|
|
|
455 |
break;
|
|
|
456 |
|
|
|
457 |
case BODY:
|
|
|
458 |
if (value == null) {
|
|
|
459 |
unsetBody();
|
|
|
460 |
} else {
|
|
|
461 |
setBody((String)value);
|
|
|
462 |
}
|
|
|
463 |
break;
|
|
|
464 |
|
|
|
465 |
case SOURCE:
|
|
|
466 |
if (value == null) {
|
|
|
467 |
unsetSource();
|
|
|
468 |
} else {
|
|
|
469 |
setSource((String)value);
|
|
|
470 |
}
|
|
|
471 |
break;
|
|
|
472 |
|
|
|
473 |
case EMAIL_TYPE:
|
|
|
474 |
if (value == null) {
|
|
|
475 |
unsetEmailType();
|
|
|
476 |
} else {
|
|
|
477 |
setEmailType((String)value);
|
|
|
478 |
}
|
|
|
479 |
break;
|
|
|
480 |
|
|
|
481 |
case STATUS:
|
|
|
482 |
if (value == null) {
|
|
|
483 |
unsetStatus();
|
|
|
484 |
} else {
|
|
|
485 |
setStatus((Boolean)value);
|
|
|
486 |
}
|
|
|
487 |
break;
|
|
|
488 |
|
|
|
489 |
case TIMESTAMP:
|
|
|
490 |
if (value == null) {
|
|
|
491 |
unsetTimestamp();
|
|
|
492 |
} else {
|
|
|
493 |
setTimestamp((Long)value);
|
|
|
494 |
}
|
|
|
495 |
break;
|
|
|
496 |
|
|
|
497 |
}
|
|
|
498 |
}
|
|
|
499 |
|
|
|
500 |
public void setFieldValue(int fieldID, Object value) {
|
|
|
501 |
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
|
|
|
502 |
}
|
|
|
503 |
|
|
|
504 |
public Object getFieldValue(_Fields field) {
|
|
|
505 |
switch (field) {
|
| 1424 |
varun.gupt |
506 |
case ID:
|
|
|
507 |
return new Long(getId());
|
|
|
508 |
|
| 1396 |
varun.gupt |
509 |
case EMAIL_TO:
|
|
|
510 |
return getEmailTo();
|
|
|
511 |
|
|
|
512 |
case EMAIL_FROM:
|
|
|
513 |
return getEmailFrom();
|
|
|
514 |
|
|
|
515 |
case SUBJECT:
|
|
|
516 |
return getSubject();
|
|
|
517 |
|
|
|
518 |
case BODY:
|
|
|
519 |
return getBody();
|
|
|
520 |
|
|
|
521 |
case SOURCE:
|
|
|
522 |
return getSource();
|
|
|
523 |
|
|
|
524 |
case EMAIL_TYPE:
|
|
|
525 |
return getEmailType();
|
|
|
526 |
|
|
|
527 |
case STATUS:
|
|
|
528 |
return new Boolean(isStatus());
|
|
|
529 |
|
|
|
530 |
case TIMESTAMP:
|
|
|
531 |
return new Long(getTimestamp());
|
|
|
532 |
|
|
|
533 |
}
|
|
|
534 |
throw new IllegalStateException();
|
|
|
535 |
}
|
|
|
536 |
|
|
|
537 |
public Object getFieldValue(int fieldId) {
|
|
|
538 |
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
|
|
|
539 |
}
|
|
|
540 |
|
|
|
541 |
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
|
|
|
542 |
public boolean isSet(_Fields field) {
|
|
|
543 |
switch (field) {
|
| 1424 |
varun.gupt |
544 |
case ID:
|
|
|
545 |
return isSetId();
|
| 1396 |
varun.gupt |
546 |
case EMAIL_TO:
|
|
|
547 |
return isSetEmailTo();
|
|
|
548 |
case EMAIL_FROM:
|
|
|
549 |
return isSetEmailFrom();
|
|
|
550 |
case SUBJECT:
|
|
|
551 |
return isSetSubject();
|
|
|
552 |
case BODY:
|
|
|
553 |
return isSetBody();
|
|
|
554 |
case SOURCE:
|
|
|
555 |
return isSetSource();
|
|
|
556 |
case EMAIL_TYPE:
|
|
|
557 |
return isSetEmailType();
|
|
|
558 |
case STATUS:
|
|
|
559 |
return isSetStatus();
|
|
|
560 |
case TIMESTAMP:
|
|
|
561 |
return isSetTimestamp();
|
|
|
562 |
}
|
|
|
563 |
throw new IllegalStateException();
|
|
|
564 |
}
|
|
|
565 |
|
|
|
566 |
public boolean isSet(int fieldID) {
|
|
|
567 |
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
|
|
|
568 |
}
|
|
|
569 |
|
|
|
570 |
@Override
|
|
|
571 |
public boolean equals(Object that) {
|
|
|
572 |
if (that == null)
|
|
|
573 |
return false;
|
|
|
574 |
if (that instanceof UserEmail)
|
|
|
575 |
return this.equals((UserEmail)that);
|
|
|
576 |
return false;
|
|
|
577 |
}
|
|
|
578 |
|
|
|
579 |
public boolean equals(UserEmail that) {
|
|
|
580 |
if (that == null)
|
|
|
581 |
return false;
|
|
|
582 |
|
| 1424 |
varun.gupt |
583 |
boolean this_present_id = true;
|
|
|
584 |
boolean that_present_id = true;
|
|
|
585 |
if (this_present_id || that_present_id) {
|
|
|
586 |
if (!(this_present_id && that_present_id))
|
|
|
587 |
return false;
|
|
|
588 |
if (this.id != that.id)
|
|
|
589 |
return false;
|
|
|
590 |
}
|
|
|
591 |
|
| 1396 |
varun.gupt |
592 |
boolean this_present_emailTo = true && this.isSetEmailTo();
|
|
|
593 |
boolean that_present_emailTo = true && that.isSetEmailTo();
|
|
|
594 |
if (this_present_emailTo || that_present_emailTo) {
|
|
|
595 |
if (!(this_present_emailTo && that_present_emailTo))
|
|
|
596 |
return false;
|
|
|
597 |
if (!this.emailTo.equals(that.emailTo))
|
|
|
598 |
return false;
|
|
|
599 |
}
|
|
|
600 |
|
|
|
601 |
boolean this_present_emailFrom = true && this.isSetEmailFrom();
|
|
|
602 |
boolean that_present_emailFrom = true && that.isSetEmailFrom();
|
|
|
603 |
if (this_present_emailFrom || that_present_emailFrom) {
|
|
|
604 |
if (!(this_present_emailFrom && that_present_emailFrom))
|
|
|
605 |
return false;
|
|
|
606 |
if (!this.emailFrom.equals(that.emailFrom))
|
|
|
607 |
return false;
|
|
|
608 |
}
|
|
|
609 |
|
|
|
610 |
boolean this_present_subject = true && this.isSetSubject();
|
|
|
611 |
boolean that_present_subject = true && that.isSetSubject();
|
|
|
612 |
if (this_present_subject || that_present_subject) {
|
|
|
613 |
if (!(this_present_subject && that_present_subject))
|
|
|
614 |
return false;
|
|
|
615 |
if (!this.subject.equals(that.subject))
|
|
|
616 |
return false;
|
|
|
617 |
}
|
|
|
618 |
|
|
|
619 |
boolean this_present_body = true && this.isSetBody();
|
|
|
620 |
boolean that_present_body = true && that.isSetBody();
|
|
|
621 |
if (this_present_body || that_present_body) {
|
|
|
622 |
if (!(this_present_body && that_present_body))
|
|
|
623 |
return false;
|
|
|
624 |
if (!this.body.equals(that.body))
|
|
|
625 |
return false;
|
|
|
626 |
}
|
|
|
627 |
|
|
|
628 |
boolean this_present_source = true && this.isSetSource();
|
|
|
629 |
boolean that_present_source = true && that.isSetSource();
|
|
|
630 |
if (this_present_source || that_present_source) {
|
|
|
631 |
if (!(this_present_source && that_present_source))
|
|
|
632 |
return false;
|
|
|
633 |
if (!this.source.equals(that.source))
|
|
|
634 |
return false;
|
|
|
635 |
}
|
|
|
636 |
|
|
|
637 |
boolean this_present_emailType = true && this.isSetEmailType();
|
|
|
638 |
boolean that_present_emailType = true && that.isSetEmailType();
|
|
|
639 |
if (this_present_emailType || that_present_emailType) {
|
|
|
640 |
if (!(this_present_emailType && that_present_emailType))
|
|
|
641 |
return false;
|
|
|
642 |
if (!this.emailType.equals(that.emailType))
|
|
|
643 |
return false;
|
|
|
644 |
}
|
|
|
645 |
|
|
|
646 |
boolean this_present_status = true;
|
|
|
647 |
boolean that_present_status = true;
|
|
|
648 |
if (this_present_status || that_present_status) {
|
|
|
649 |
if (!(this_present_status && that_present_status))
|
|
|
650 |
return false;
|
|
|
651 |
if (this.status != that.status)
|
|
|
652 |
return false;
|
|
|
653 |
}
|
|
|
654 |
|
|
|
655 |
boolean this_present_timestamp = true;
|
|
|
656 |
boolean that_present_timestamp = true;
|
|
|
657 |
if (this_present_timestamp || that_present_timestamp) {
|
|
|
658 |
if (!(this_present_timestamp && that_present_timestamp))
|
|
|
659 |
return false;
|
|
|
660 |
if (this.timestamp != that.timestamp)
|
|
|
661 |
return false;
|
|
|
662 |
}
|
|
|
663 |
|
|
|
664 |
return true;
|
|
|
665 |
}
|
|
|
666 |
|
|
|
667 |
@Override
|
|
|
668 |
public int hashCode() {
|
|
|
669 |
return 0;
|
|
|
670 |
}
|
|
|
671 |
|
|
|
672 |
public int compareTo(UserEmail other) {
|
|
|
673 |
if (!getClass().equals(other.getClass())) {
|
|
|
674 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
675 |
}
|
|
|
676 |
|
|
|
677 |
int lastComparison = 0;
|
|
|
678 |
UserEmail typedOther = (UserEmail)other;
|
|
|
679 |
|
| 1424 |
varun.gupt |
680 |
lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
|
|
|
681 |
if (lastComparison != 0) {
|
|
|
682 |
return lastComparison;
|
|
|
683 |
}
|
|
|
684 |
lastComparison = TBaseHelper.compareTo(id, typedOther.id);
|
|
|
685 |
if (lastComparison != 0) {
|
|
|
686 |
return lastComparison;
|
|
|
687 |
}
|
| 1396 |
varun.gupt |
688 |
lastComparison = Boolean.valueOf(isSetEmailTo()).compareTo(isSetEmailTo());
|
|
|
689 |
if (lastComparison != 0) {
|
|
|
690 |
return lastComparison;
|
|
|
691 |
}
|
|
|
692 |
lastComparison = TBaseHelper.compareTo(emailTo, typedOther.emailTo);
|
|
|
693 |
if (lastComparison != 0) {
|
|
|
694 |
return lastComparison;
|
|
|
695 |
}
|
|
|
696 |
lastComparison = Boolean.valueOf(isSetEmailFrom()).compareTo(isSetEmailFrom());
|
|
|
697 |
if (lastComparison != 0) {
|
|
|
698 |
return lastComparison;
|
|
|
699 |
}
|
|
|
700 |
lastComparison = TBaseHelper.compareTo(emailFrom, typedOther.emailFrom);
|
|
|
701 |
if (lastComparison != 0) {
|
|
|
702 |
return lastComparison;
|
|
|
703 |
}
|
|
|
704 |
lastComparison = Boolean.valueOf(isSetSubject()).compareTo(isSetSubject());
|
|
|
705 |
if (lastComparison != 0) {
|
|
|
706 |
return lastComparison;
|
|
|
707 |
}
|
|
|
708 |
lastComparison = TBaseHelper.compareTo(subject, typedOther.subject);
|
|
|
709 |
if (lastComparison != 0) {
|
|
|
710 |
return lastComparison;
|
|
|
711 |
}
|
|
|
712 |
lastComparison = Boolean.valueOf(isSetBody()).compareTo(isSetBody());
|
|
|
713 |
if (lastComparison != 0) {
|
|
|
714 |
return lastComparison;
|
|
|
715 |
}
|
|
|
716 |
lastComparison = TBaseHelper.compareTo(body, typedOther.body);
|
|
|
717 |
if (lastComparison != 0) {
|
|
|
718 |
return lastComparison;
|
|
|
719 |
}
|
|
|
720 |
lastComparison = Boolean.valueOf(isSetSource()).compareTo(isSetSource());
|
|
|
721 |
if (lastComparison != 0) {
|
|
|
722 |
return lastComparison;
|
|
|
723 |
}
|
|
|
724 |
lastComparison = TBaseHelper.compareTo(source, typedOther.source);
|
|
|
725 |
if (lastComparison != 0) {
|
|
|
726 |
return lastComparison;
|
|
|
727 |
}
|
|
|
728 |
lastComparison = Boolean.valueOf(isSetEmailType()).compareTo(isSetEmailType());
|
|
|
729 |
if (lastComparison != 0) {
|
|
|
730 |
return lastComparison;
|
|
|
731 |
}
|
|
|
732 |
lastComparison = TBaseHelper.compareTo(emailType, typedOther.emailType);
|
|
|
733 |
if (lastComparison != 0) {
|
|
|
734 |
return lastComparison;
|
|
|
735 |
}
|
|
|
736 |
lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
|
|
|
737 |
if (lastComparison != 0) {
|
|
|
738 |
return lastComparison;
|
|
|
739 |
}
|
|
|
740 |
lastComparison = TBaseHelper.compareTo(status, typedOther.status);
|
|
|
741 |
if (lastComparison != 0) {
|
|
|
742 |
return lastComparison;
|
|
|
743 |
}
|
|
|
744 |
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
|
|
|
745 |
if (lastComparison != 0) {
|
|
|
746 |
return lastComparison;
|
|
|
747 |
}
|
|
|
748 |
lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
|
|
|
749 |
if (lastComparison != 0) {
|
|
|
750 |
return lastComparison;
|
|
|
751 |
}
|
|
|
752 |
return 0;
|
|
|
753 |
}
|
|
|
754 |
|
|
|
755 |
public void read(TProtocol iprot) throws TException {
|
|
|
756 |
TField field;
|
|
|
757 |
iprot.readStructBegin();
|
|
|
758 |
while (true)
|
|
|
759 |
{
|
|
|
760 |
field = iprot.readFieldBegin();
|
|
|
761 |
if (field.type == TType.STOP) {
|
|
|
762 |
break;
|
|
|
763 |
}
|
|
|
764 |
_Fields fieldId = _Fields.findByThriftId(field.id);
|
|
|
765 |
if (fieldId == null) {
|
|
|
766 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
767 |
} else {
|
|
|
768 |
switch (fieldId) {
|
| 1424 |
varun.gupt |
769 |
case ID:
|
|
|
770 |
if (field.type == TType.I64) {
|
|
|
771 |
this.id = iprot.readI64();
|
|
|
772 |
setIdIsSet(true);
|
|
|
773 |
} else {
|
|
|
774 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
775 |
}
|
|
|
776 |
break;
|
| 1396 |
varun.gupt |
777 |
case EMAIL_TO:
|
|
|
778 |
if (field.type == TType.STRING) {
|
|
|
779 |
this.emailTo = iprot.readString();
|
|
|
780 |
} else {
|
|
|
781 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
782 |
}
|
|
|
783 |
break;
|
|
|
784 |
case EMAIL_FROM:
|
|
|
785 |
if (field.type == TType.STRING) {
|
|
|
786 |
this.emailFrom = iprot.readString();
|
|
|
787 |
} else {
|
|
|
788 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
789 |
}
|
|
|
790 |
break;
|
|
|
791 |
case SUBJECT:
|
|
|
792 |
if (field.type == TType.STRING) {
|
|
|
793 |
this.subject = iprot.readString();
|
|
|
794 |
} else {
|
|
|
795 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
796 |
}
|
|
|
797 |
break;
|
|
|
798 |
case BODY:
|
|
|
799 |
if (field.type == TType.STRING) {
|
|
|
800 |
this.body = iprot.readString();
|
|
|
801 |
} else {
|
|
|
802 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
803 |
}
|
|
|
804 |
break;
|
|
|
805 |
case SOURCE:
|
|
|
806 |
if (field.type == TType.STRING) {
|
|
|
807 |
this.source = iprot.readString();
|
|
|
808 |
} else {
|
|
|
809 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
810 |
}
|
|
|
811 |
break;
|
|
|
812 |
case EMAIL_TYPE:
|
|
|
813 |
if (field.type == TType.STRING) {
|
|
|
814 |
this.emailType = iprot.readString();
|
|
|
815 |
} else {
|
|
|
816 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
817 |
}
|
|
|
818 |
break;
|
|
|
819 |
case STATUS:
|
|
|
820 |
if (field.type == TType.BOOL) {
|
|
|
821 |
this.status = iprot.readBool();
|
|
|
822 |
setStatusIsSet(true);
|
|
|
823 |
} else {
|
|
|
824 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
825 |
}
|
|
|
826 |
break;
|
|
|
827 |
case TIMESTAMP:
|
|
|
828 |
if (field.type == TType.I64) {
|
|
|
829 |
this.timestamp = iprot.readI64();
|
|
|
830 |
setTimestampIsSet(true);
|
|
|
831 |
} else {
|
|
|
832 |
TProtocolUtil.skip(iprot, field.type);
|
|
|
833 |
}
|
|
|
834 |
break;
|
|
|
835 |
}
|
|
|
836 |
iprot.readFieldEnd();
|
|
|
837 |
}
|
|
|
838 |
}
|
|
|
839 |
iprot.readStructEnd();
|
|
|
840 |
validate();
|
|
|
841 |
}
|
|
|
842 |
|
|
|
843 |
public void write(TProtocol oprot) throws TException {
|
|
|
844 |
validate();
|
|
|
845 |
|
|
|
846 |
oprot.writeStructBegin(STRUCT_DESC);
|
| 1424 |
varun.gupt |
847 |
oprot.writeFieldBegin(ID_FIELD_DESC);
|
|
|
848 |
oprot.writeI64(this.id);
|
|
|
849 |
oprot.writeFieldEnd();
|
| 1396 |
varun.gupt |
850 |
if (this.emailTo != null) {
|
|
|
851 |
oprot.writeFieldBegin(EMAIL_TO_FIELD_DESC);
|
|
|
852 |
oprot.writeString(this.emailTo);
|
|
|
853 |
oprot.writeFieldEnd();
|
|
|
854 |
}
|
|
|
855 |
if (this.emailFrom != null) {
|
|
|
856 |
oprot.writeFieldBegin(EMAIL_FROM_FIELD_DESC);
|
|
|
857 |
oprot.writeString(this.emailFrom);
|
|
|
858 |
oprot.writeFieldEnd();
|
|
|
859 |
}
|
|
|
860 |
if (this.subject != null) {
|
|
|
861 |
oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
|
|
|
862 |
oprot.writeString(this.subject);
|
|
|
863 |
oprot.writeFieldEnd();
|
|
|
864 |
}
|
|
|
865 |
if (this.body != null) {
|
|
|
866 |
oprot.writeFieldBegin(BODY_FIELD_DESC);
|
|
|
867 |
oprot.writeString(this.body);
|
|
|
868 |
oprot.writeFieldEnd();
|
|
|
869 |
}
|
|
|
870 |
if (this.source != null) {
|
|
|
871 |
oprot.writeFieldBegin(SOURCE_FIELD_DESC);
|
|
|
872 |
oprot.writeString(this.source);
|
|
|
873 |
oprot.writeFieldEnd();
|
|
|
874 |
}
|
|
|
875 |
if (this.emailType != null) {
|
|
|
876 |
oprot.writeFieldBegin(EMAIL_TYPE_FIELD_DESC);
|
|
|
877 |
oprot.writeString(this.emailType);
|
|
|
878 |
oprot.writeFieldEnd();
|
|
|
879 |
}
|
|
|
880 |
oprot.writeFieldBegin(STATUS_FIELD_DESC);
|
|
|
881 |
oprot.writeBool(this.status);
|
|
|
882 |
oprot.writeFieldEnd();
|
|
|
883 |
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
|
|
884 |
oprot.writeI64(this.timestamp);
|
|
|
885 |
oprot.writeFieldEnd();
|
|
|
886 |
oprot.writeFieldStop();
|
|
|
887 |
oprot.writeStructEnd();
|
|
|
888 |
}
|
|
|
889 |
|
|
|
890 |
@Override
|
|
|
891 |
public String toString() {
|
|
|
892 |
StringBuilder sb = new StringBuilder("UserEmail(");
|
|
|
893 |
boolean first = true;
|
|
|
894 |
|
| 1424 |
varun.gupt |
895 |
sb.append("id:");
|
|
|
896 |
sb.append(this.id);
|
|
|
897 |
first = false;
|
|
|
898 |
if (!first) sb.append(", ");
|
| 1396 |
varun.gupt |
899 |
sb.append("emailTo:");
|
|
|
900 |
if (this.emailTo == null) {
|
|
|
901 |
sb.append("null");
|
|
|
902 |
} else {
|
|
|
903 |
sb.append(this.emailTo);
|
|
|
904 |
}
|
|
|
905 |
first = false;
|
|
|
906 |
if (!first) sb.append(", ");
|
|
|
907 |
sb.append("emailFrom:");
|
|
|
908 |
if (this.emailFrom == null) {
|
|
|
909 |
sb.append("null");
|
|
|
910 |
} else {
|
|
|
911 |
sb.append(this.emailFrom);
|
|
|
912 |
}
|
|
|
913 |
first = false;
|
|
|
914 |
if (!first) sb.append(", ");
|
|
|
915 |
sb.append("subject:");
|
|
|
916 |
if (this.subject == null) {
|
|
|
917 |
sb.append("null");
|
|
|
918 |
} else {
|
|
|
919 |
sb.append(this.subject);
|
|
|
920 |
}
|
|
|
921 |
first = false;
|
|
|
922 |
if (!first) sb.append(", ");
|
|
|
923 |
sb.append("body:");
|
|
|
924 |
if (this.body == null) {
|
|
|
925 |
sb.append("null");
|
|
|
926 |
} else {
|
|
|
927 |
sb.append(this.body);
|
|
|
928 |
}
|
|
|
929 |
first = false;
|
|
|
930 |
if (!first) sb.append(", ");
|
|
|
931 |
sb.append("source:");
|
|
|
932 |
if (this.source == null) {
|
|
|
933 |
sb.append("null");
|
|
|
934 |
} else {
|
|
|
935 |
sb.append(this.source);
|
|
|
936 |
}
|
|
|
937 |
first = false;
|
|
|
938 |
if (!first) sb.append(", ");
|
|
|
939 |
sb.append("emailType:");
|
|
|
940 |
if (this.emailType == null) {
|
|
|
941 |
sb.append("null");
|
|
|
942 |
} else {
|
|
|
943 |
sb.append(this.emailType);
|
|
|
944 |
}
|
|
|
945 |
first = false;
|
|
|
946 |
if (!first) sb.append(", ");
|
|
|
947 |
sb.append("status:");
|
|
|
948 |
sb.append(this.status);
|
|
|
949 |
first = false;
|
|
|
950 |
if (!first) sb.append(", ");
|
|
|
951 |
sb.append("timestamp:");
|
|
|
952 |
sb.append(this.timestamp);
|
|
|
953 |
first = false;
|
|
|
954 |
sb.append(")");
|
|
|
955 |
return sb.toString();
|
|
|
956 |
}
|
|
|
957 |
|
|
|
958 |
public void validate() throws TException {
|
|
|
959 |
// check for required fields
|
|
|
960 |
}
|
|
|
961 |
|
|
|
962 |
}
|
|
|
963 |
|