Subversion Repositories SmartDukaan

Rev

Rev 1013 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1013 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.utils;
6
package in.shop2020.utils;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
/**
23
/**
27
 * Helper service
24
 * Helper service
28
 * created by @ashish
25
 * created by @ashish
29
 * *
26
 * *
30
 */
27
 */
31
public class Mail implements TBase<Mail._Fields>, java.io.Serializable, Cloneable, Comparable<Mail> {
28
public class Mail implements org.apache.thrift.TBase<Mail, Mail._Fields>, java.io.Serializable, Cloneable {
32
  private static final TStruct STRUCT_DESC = new TStruct("Mail");
29
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Mail");
33
 
30
 
34
  private static final TField TO_FIELD_DESC = new TField("to", TType.LIST, (short)1);
31
  private static final org.apache.thrift.protocol.TField TO_FIELD_DESC = new org.apache.thrift.protocol.TField("to", org.apache.thrift.protocol.TType.LIST, (short)1);
35
  private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)2);
32
  private static final org.apache.thrift.protocol.TField SUBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("subject", org.apache.thrift.protocol.TType.STRING, (short)2);
36
  private static final TField DATA_FIELD_DESC = new TField("data", TType.STRING, (short)3);
33
  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)3);
37
  private static final TField SENDER_FIELD_DESC = new TField("sender", TType.STRING, (short)4);
34
  private static final org.apache.thrift.protocol.TField SENDER_FIELD_DESC = new org.apache.thrift.protocol.TField("sender", org.apache.thrift.protocol.TType.STRING, (short)4);
38
  private static final TField ATTACHMENTS_FIELD_DESC = new TField("attachments", TType.LIST, (short)5);
35
  private static final org.apache.thrift.protocol.TField ATTACHMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("attachments", org.apache.thrift.protocol.TType.LIST, (short)5);
39
  private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)6);
36
  private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)6);
40
 
37
 
41
  private List<String> to;
38
  private List<String> to; // required
42
  private String subject;
39
  private String subject; // required
43
  private String data;
40
  private String data; // required
44
  private String sender;
41
  private String sender; // required
45
  private List<String> attachments;
42
  private List<String> attachments; // required
46
  private String password;
43
  private String password; // required
47
 
44
 
48
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
45
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
49
  public enum _Fields implements TFieldIdEnum {
46
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
50
    TO((short)1, "to"),
47
    TO((short)1, "to"),
51
    SUBJECT((short)2, "subject"),
48
    SUBJECT((short)2, "subject"),
52
    DATA((short)3, "data"),
49
    DATA((short)3, "data"),
53
    SENDER((short)4, "sender"),
50
    SENDER((short)4, "sender"),
54
    ATTACHMENTS((short)5, "attachments"),
51
    ATTACHMENTS((short)5, "attachments"),
55
    PASSWORD((short)6, "password");
52
    PASSWORD((short)6, "password");
56
 
53
 
57
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
58
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
54
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
59
 
55
 
60
    static {
56
    static {
61
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
57
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
62
        byId.put((int)field._thriftId, field);
-
 
63
        byName.put(field.getFieldName(), field);
58
        byName.put(field.getFieldName(), field);
64
      }
59
      }
65
    }
60
    }
66
 
61
 
67
    /**
62
    /**
68
     * Find the _Fields constant that matches fieldId, or null if its not found.
63
     * Find the _Fields constant that matches fieldId, or null if its not found.
69
     */
64
     */
70
    public static _Fields findByThriftId(int fieldId) {
65
    public static _Fields findByThriftId(int fieldId) {
71
      return byId.get(fieldId);
66
      switch(fieldId) {
-
 
67
        case 1: // TO
-
 
68
          return TO;
-
 
69
        case 2: // SUBJECT
-
 
70
          return SUBJECT;
-
 
71
        case 3: // DATA
-
 
72
          return DATA;
-
 
73
        case 4: // SENDER
-
 
74
          return SENDER;
-
 
75
        case 5: // ATTACHMENTS
-
 
76
          return ATTACHMENTS;
-
 
77
        case 6: // PASSWORD
-
 
78
          return PASSWORD;
-
 
79
        default:
-
 
80
          return null;
-
 
81
      }
72
    }
82
    }
73
 
83
 
74
    /**
84
    /**
75
     * Find the _Fields constant that matches fieldId, throwing an exception
85
     * Find the _Fields constant that matches fieldId, throwing an exception
76
     * if it is not found.
86
     * if it is not found.
Line 105... Line 115...
105
    }
115
    }
106
  }
116
  }
107
 
117
 
108
  // isset id assignments
118
  // isset id assignments
109
 
119
 
110
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
120
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
111
    put(_Fields.TO, new FieldMetaData("to", TFieldRequirementType.DEFAULT, 
-
 
112
        new ListMetaData(TType.LIST, 
-
 
113
            new FieldValueMetaData(TType.STRING))));
-
 
114
    put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
-
 
115
        new FieldValueMetaData(TType.STRING)));
-
 
116
    put(_Fields.DATA, new FieldMetaData("data", TFieldRequirementType.DEFAULT, 
-
 
117
        new FieldValueMetaData(TType.STRING)));
-
 
118
    put(_Fields.SENDER, new FieldMetaData("sender", TFieldRequirementType.DEFAULT, 
-
 
119
        new FieldValueMetaData(TType.STRING)));
-
 
120
    put(_Fields.ATTACHMENTS, new FieldMetaData("attachments", TFieldRequirementType.DEFAULT, 
-
 
121
        new ListMetaData(TType.LIST, 
-
 
122
            new FieldValueMetaData(TType.STRING))));
-
 
123
    put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
-
 
124
        new FieldValueMetaData(TType.STRING)));
-
 
125
  }});
-
 
126
 
-
 
127
  static {
121
  static {
-
 
122
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
123
    tmpMap.put(_Fields.TO, new org.apache.thrift.meta_data.FieldMetaData("to", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
124
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
125
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
-
 
126
    tmpMap.put(_Fields.SUBJECT, new org.apache.thrift.meta_data.FieldMetaData("subject", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
128
    tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
130
    tmpMap.put(_Fields.SENDER, new org.apache.thrift.meta_data.FieldMetaData("sender", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
132
    tmpMap.put(_Fields.ATTACHMENTS, new org.apache.thrift.meta_data.FieldMetaData("attachments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
133
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
134
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
-
 
135
    tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
136
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
137
    metaDataMap = Collections.unmodifiableMap(tmpMap);
128
    FieldMetaData.addStructMetaDataMap(Mail.class, metaDataMap);
138
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Mail.class, metaDataMap);
129
  }
139
  }
130
 
140
 
131
  public Mail() {
141
  public Mail() {
132
  }
142
  }
133
 
143
 
Line 182... Line 192...
182
 
192
 
183
  public Mail deepCopy() {
193
  public Mail deepCopy() {
184
    return new Mail(this);
194
    return new Mail(this);
185
  }
195
  }
186
 
196
 
187
  @Deprecated
197
  @Override
188
  public Mail clone() {
198
  public void clear() {
-
 
199
    this.to = null;
-
 
200
    this.subject = null;
-
 
201
    this.data = null;
189
    return new Mail(this);
202
    this.sender = null;
-
 
203
    this.attachments = null;
-
 
204
    this.password = null;
190
  }
205
  }
191
 
206
 
192
  public int getToSize() {
207
  public int getToSize() {
193
    return (this.to == null) ? 0 : this.to.size();
208
    return (this.to == null) ? 0 : this.to.size();
194
  }
209
  }
Line 206... Line 221...
206
 
221
 
207
  public List<String> getTo() {
222
  public List<String> getTo() {
208
    return this.to;
223
    return this.to;
209
  }
224
  }
210
 
225
 
211
  public Mail setTo(List<String> to) {
226
  public void setTo(List<String> to) {
212
    this.to = to;
227
    this.to = to;
213
    return this;
-
 
214
  }
228
  }
215
 
229
 
216
  public void unsetTo() {
230
  public void unsetTo() {
217
    this.to = null;
231
    this.to = null;
218
  }
232
  }
219
 
233
 
220
  /** Returns true if field to is set (has been asigned a value) and false otherwise */
234
  /** Returns true if field to is set (has been assigned a value) and false otherwise */
221
  public boolean isSetTo() {
235
  public boolean isSetTo() {
222
    return this.to != null;
236
    return this.to != null;
223
  }
237
  }
224
 
238
 
225
  public void setToIsSet(boolean value) {
239
  public void setToIsSet(boolean value) {
Line 230... Line 244...
230
 
244
 
231
  public String getSubject() {
245
  public String getSubject() {
232
    return this.subject;
246
    return this.subject;
233
  }
247
  }
234
 
248
 
235
  public Mail setSubject(String subject) {
249
  public void setSubject(String subject) {
236
    this.subject = subject;
250
    this.subject = subject;
237
    return this;
-
 
238
  }
251
  }
239
 
252
 
240
  public void unsetSubject() {
253
  public void unsetSubject() {
241
    this.subject = null;
254
    this.subject = null;
242
  }
255
  }
243
 
256
 
244
  /** Returns true if field subject is set (has been asigned a value) and false otherwise */
257
  /** Returns true if field subject is set (has been assigned a value) and false otherwise */
245
  public boolean isSetSubject() {
258
  public boolean isSetSubject() {
246
    return this.subject != null;
259
    return this.subject != null;
247
  }
260
  }
248
 
261
 
249
  public void setSubjectIsSet(boolean value) {
262
  public void setSubjectIsSet(boolean value) {
Line 254... Line 267...
254
 
267
 
255
  public String getData() {
268
  public String getData() {
256
    return this.data;
269
    return this.data;
257
  }
270
  }
258
 
271
 
259
  public Mail setData(String data) {
272
  public void setData(String data) {
260
    this.data = data;
273
    this.data = data;
261
    return this;
-
 
262
  }
274
  }
263
 
275
 
264
  public void unsetData() {
276
  public void unsetData() {
265
    this.data = null;
277
    this.data = null;
266
  }
278
  }
267
 
279
 
268
  /** Returns true if field data is set (has been asigned a value) and false otherwise */
280
  /** Returns true if field data is set (has been assigned a value) and false otherwise */
269
  public boolean isSetData() {
281
  public boolean isSetData() {
270
    return this.data != null;
282
    return this.data != null;
271
  }
283
  }
272
 
284
 
273
  public void setDataIsSet(boolean value) {
285
  public void setDataIsSet(boolean value) {
Line 278... Line 290...
278
 
290
 
279
  public String getSender() {
291
  public String getSender() {
280
    return this.sender;
292
    return this.sender;
281
  }
293
  }
282
 
294
 
283
  public Mail setSender(String sender) {
295
  public void setSender(String sender) {
284
    this.sender = sender;
296
    this.sender = sender;
285
    return this;
-
 
286
  }
297
  }
287
 
298
 
288
  public void unsetSender() {
299
  public void unsetSender() {
289
    this.sender = null;
300
    this.sender = null;
290
  }
301
  }
291
 
302
 
292
  /** Returns true if field sender is set (has been asigned a value) and false otherwise */
303
  /** Returns true if field sender is set (has been assigned a value) and false otherwise */
293
  public boolean isSetSender() {
304
  public boolean isSetSender() {
294
    return this.sender != null;
305
    return this.sender != null;
295
  }
306
  }
296
 
307
 
297
  public void setSenderIsSet(boolean value) {
308
  public void setSenderIsSet(boolean value) {
Line 317... Line 328...
317
 
328
 
318
  public List<String> getAttachments() {
329
  public List<String> getAttachments() {
319
    return this.attachments;
330
    return this.attachments;
320
  }
331
  }
321
 
332
 
322
  public Mail setAttachments(List<String> attachments) {
333
  public void setAttachments(List<String> attachments) {
323
    this.attachments = attachments;
334
    this.attachments = attachments;
324
    return this;
-
 
325
  }
335
  }
326
 
336
 
327
  public void unsetAttachments() {
337
  public void unsetAttachments() {
328
    this.attachments = null;
338
    this.attachments = null;
329
  }
339
  }
330
 
340
 
331
  /** Returns true if field attachments is set (has been asigned a value) and false otherwise */
341
  /** Returns true if field attachments is set (has been assigned a value) and false otherwise */
332
  public boolean isSetAttachments() {
342
  public boolean isSetAttachments() {
333
    return this.attachments != null;
343
    return this.attachments != null;
334
  }
344
  }
335
 
345
 
336
  public void setAttachmentsIsSet(boolean value) {
346
  public void setAttachmentsIsSet(boolean value) {
Line 341... Line 351...
341
 
351
 
342
  public String getPassword() {
352
  public String getPassword() {
343
    return this.password;
353
    return this.password;
344
  }
354
  }
345
 
355
 
346
  public Mail setPassword(String password) {
356
  public void setPassword(String password) {
347
    this.password = password;
357
    this.password = password;
348
    return this;
-
 
349
  }
358
  }
350
 
359
 
351
  public void unsetPassword() {
360
  public void unsetPassword() {
352
    this.password = null;
361
    this.password = null;
353
  }
362
  }
354
 
363
 
355
  /** Returns true if field password is set (has been asigned a value) and false otherwise */
364
  /** Returns true if field password is set (has been assigned a value) and false otherwise */
356
  public boolean isSetPassword() {
365
  public boolean isSetPassword() {
357
    return this.password != null;
366
    return this.password != null;
358
  }
367
  }
359
 
368
 
360
  public void setPasswordIsSet(boolean value) {
369
  public void setPasswordIsSet(boolean value) {
Line 414... Line 423...
414
      break;
423
      break;
415
 
424
 
416
    }
425
    }
417
  }
426
  }
418
 
427
 
419
  public void setFieldValue(int fieldID, Object value) {
-
 
420
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
421
  }
-
 
422
 
-
 
423
  public Object getFieldValue(_Fields field) {
428
  public Object getFieldValue(_Fields field) {
424
    switch (field) {
429
    switch (field) {
425
    case TO:
430
    case TO:
426
      return getTo();
431
      return getTo();
427
 
432
 
Line 442... Line 447...
442
 
447
 
443
    }
448
    }
444
    throw new IllegalStateException();
449
    throw new IllegalStateException();
445
  }
450
  }
446
 
451
 
447
  public Object getFieldValue(int fieldId) {
-
 
448
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
449
  }
-
 
450
 
-
 
451
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
452
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
452
  public boolean isSet(_Fields field) {
453
  public boolean isSet(_Fields field) {
-
 
454
    if (field == null) {
-
 
455
      throw new IllegalArgumentException();
-
 
456
    }
-
 
457
 
453
    switch (field) {
458
    switch (field) {
454
    case TO:
459
    case TO:
455
      return isSetTo();
460
      return isSetTo();
456
    case SUBJECT:
461
    case SUBJECT:
457
      return isSetSubject();
462
      return isSetSubject();
Line 465... Line 470...
465
      return isSetPassword();
470
      return isSetPassword();
466
    }
471
    }
467
    throw new IllegalStateException();
472
    throw new IllegalStateException();
468
  }
473
  }
469
 
474
 
470
  public boolean isSet(int fieldID) {
-
 
471
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
472
  }
-
 
473
 
-
 
474
  @Override
475
  @Override
475
  public boolean equals(Object that) {
476
  public boolean equals(Object that) {
476
    if (that == null)
477
    if (that == null)
477
      return false;
478
      return false;
478
    if (that instanceof Mail)
479
    if (that instanceof Mail)
Line 552... Line 553...
552
    }
553
    }
553
 
554
 
554
    int lastComparison = 0;
555
    int lastComparison = 0;
555
    Mail typedOther = (Mail)other;
556
    Mail typedOther = (Mail)other;
556
 
557
 
557
    lastComparison = Boolean.valueOf(isSetTo()).compareTo(isSetTo());
558
    lastComparison = Boolean.valueOf(isSetTo()).compareTo(typedOther.isSetTo());
558
    if (lastComparison != 0) {
559
    if (lastComparison != 0) {
559
      return lastComparison;
560
      return lastComparison;
560
    }
561
    }
-
 
562
    if (isSetTo()) {
561
    lastComparison = TBaseHelper.compareTo(to, typedOther.to);
563
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.to, typedOther.to);
562
    if (lastComparison != 0) {
564
      if (lastComparison != 0) {
563
      return lastComparison;
565
        return lastComparison;
-
 
566
      }
564
    }
567
    }
565
    lastComparison = Boolean.valueOf(isSetSubject()).compareTo(isSetSubject());
568
    lastComparison = Boolean.valueOf(isSetSubject()).compareTo(typedOther.isSetSubject());
566
    if (lastComparison != 0) {
569
    if (lastComparison != 0) {
567
      return lastComparison;
570
      return lastComparison;
568
    }
571
    }
-
 
572
    if (isSetSubject()) {
569
    lastComparison = TBaseHelper.compareTo(subject, typedOther.subject);
573
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subject, typedOther.subject);
570
    if (lastComparison != 0) {
574
      if (lastComparison != 0) {
571
      return lastComparison;
575
        return lastComparison;
-
 
576
      }
572
    }
577
    }
573
    lastComparison = Boolean.valueOf(isSetData()).compareTo(isSetData());
578
    lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());
574
    if (lastComparison != 0) {
579
    if (lastComparison != 0) {
575
      return lastComparison;
580
      return lastComparison;
576
    }
581
    }
-
 
582
    if (isSetData()) {
577
    lastComparison = TBaseHelper.compareTo(data, typedOther.data);
583
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);
578
    if (lastComparison != 0) {
584
      if (lastComparison != 0) {
579
      return lastComparison;
585
        return lastComparison;
-
 
586
      }
580
    }
587
    }
581
    lastComparison = Boolean.valueOf(isSetSender()).compareTo(isSetSender());
588
    lastComparison = Boolean.valueOf(isSetSender()).compareTo(typedOther.isSetSender());
582
    if (lastComparison != 0) {
589
    if (lastComparison != 0) {
583
      return lastComparison;
590
      return lastComparison;
584
    }
591
    }
-
 
592
    if (isSetSender()) {
585
    lastComparison = TBaseHelper.compareTo(sender, typedOther.sender);
593
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sender, typedOther.sender);
586
    if (lastComparison != 0) {
594
      if (lastComparison != 0) {
587
      return lastComparison;
595
        return lastComparison;
-
 
596
      }
588
    }
597
    }
589
    lastComparison = Boolean.valueOf(isSetAttachments()).compareTo(isSetAttachments());
598
    lastComparison = Boolean.valueOf(isSetAttachments()).compareTo(typedOther.isSetAttachments());
590
    if (lastComparison != 0) {
599
    if (lastComparison != 0) {
591
      return lastComparison;
600
      return lastComparison;
592
    }
601
    }
-
 
602
    if (isSetAttachments()) {
593
    lastComparison = TBaseHelper.compareTo(attachments, typedOther.attachments);
603
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attachments, typedOther.attachments);
594
    if (lastComparison != 0) {
604
      if (lastComparison != 0) {
595
      return lastComparison;
605
        return lastComparison;
-
 
606
      }
596
    }
607
    }
597
    lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
608
    lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword());
598
    if (lastComparison != 0) {
609
    if (lastComparison != 0) {
599
      return lastComparison;
610
      return lastComparison;
600
    }
611
    }
-
 
612
    if (isSetPassword()) {
601
    lastComparison = TBaseHelper.compareTo(password, typedOther.password);
613
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password);
602
    if (lastComparison != 0) {
614
      if (lastComparison != 0) {
603
      return lastComparison;
615
        return lastComparison;
-
 
616
      }
604
    }
617
    }
605
    return 0;
618
    return 0;
606
  }
619
  }
607
 
620
 
-
 
621
  public _Fields fieldForId(int fieldId) {
-
 
622
    return _Fields.findByThriftId(fieldId);
-
 
623
  }
-
 
624
 
608
  public void read(TProtocol iprot) throws TException {
625
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
609
    TField field;
626
    org.apache.thrift.protocol.TField field;
610
    iprot.readStructBegin();
627
    iprot.readStructBegin();
611
    while (true)
628
    while (true)
612
    {
629
    {
613
      field = iprot.readFieldBegin();
630
      field = iprot.readFieldBegin();
614
      if (field.type == TType.STOP) { 
631
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
615
        break;
632
        break;
616
      }
633
      }
617
      _Fields fieldId = _Fields.findByThriftId(field.id);
634
      switch (field.id) {
618
      if (fieldId == null) {
635
        case 1: // TO
619
        TProtocolUtil.skip(iprot, field.type);
636
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
620
      } else {
637
            {
621
        switch (fieldId) {
638
              org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
622
          case TO:
639
              this.to = new ArrayList<String>(_list0.size);
623
            if (field.type == TType.LIST) {
640
              for (int _i1 = 0; _i1 < _list0.size; ++_i1)
624
              {
641
              {
625
                TList _list0 = iprot.readListBegin();
-
 
626
                this.to = new ArrayList<String>(_list0.size);
-
 
627
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
-
 
628
                {
-
 
629
                  String _elem2;
642
                String _elem2; // required
630
                  _elem2 = iprot.readString();
643
                _elem2 = iprot.readString();
631
                  this.to.add(_elem2);
644
                this.to.add(_elem2);
632
                }
-
 
633
                iprot.readListEnd();
-
 
634
              }
645
              }
635
            } else { 
-
 
636
              TProtocolUtil.skip(iprot, field.type);
-
 
637
            }
-
 
638
            break;
-
 
639
          case SUBJECT:
-
 
640
            if (field.type == TType.STRING) {
-
 
641
              this.subject = iprot.readString();
-
 
642
            } else { 
-
 
643
              TProtocolUtil.skip(iprot, field.type);
-
 
644
            }
-
 
645
            break;
-
 
646
          case DATA:
-
 
647
            if (field.type == TType.STRING) {
-
 
648
              this.data = iprot.readString();
646
              iprot.readListEnd();
649
            } else { 
-
 
650
              TProtocolUtil.skip(iprot, field.type);
-
 
651
            }
647
            }
-
 
648
          } else { 
-
 
649
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
650
          }
652
            break;
651
          break;
-
 
652
        case 2: // SUBJECT
-
 
653
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
654
            this.subject = iprot.readString();
-
 
655
          } else { 
-
 
656
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
657
          }
-
 
658
          break;
-
 
659
        case 3: // DATA
-
 
660
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
661
            this.data = iprot.readString();
-
 
662
          } else { 
-
 
663
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
664
          }
-
 
665
          break;
653
          case SENDER:
666
        case 4: // SENDER
654
            if (field.type == TType.STRING) {
667
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
655
              this.sender = iprot.readString();
668
            this.sender = iprot.readString();
656
            } else { 
669
          } else { 
657
              TProtocolUtil.skip(iprot, field.type);
670
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
658
            }
671
          }
659
            break;
672
          break;
660
          case ATTACHMENTS:
673
        case 5: // ATTACHMENTS
661
            if (field.type == TType.LIST) {
674
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
675
            {
-
 
676
              org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
-
 
677
              this.attachments = new ArrayList<String>(_list3.size);
-
 
678
              for (int _i4 = 0; _i4 < _list3.size; ++_i4)
662
              {
679
              {
663
                TList _list3 = iprot.readListBegin();
-
 
664
                this.attachments = new ArrayList<String>(_list3.size);
-
 
665
                for (int _i4 = 0; _i4 < _list3.size; ++_i4)
-
 
666
                {
-
 
667
                  String _elem5;
680
                String _elem5; // required
668
                  _elem5 = iprot.readString();
681
                _elem5 = iprot.readString();
669
                  this.attachments.add(_elem5);
682
                this.attachments.add(_elem5);
670
                }
-
 
671
                iprot.readListEnd();
-
 
672
              }
683
              }
673
            } else { 
-
 
674
              TProtocolUtil.skip(iprot, field.type);
-
 
675
            }
-
 
676
            break;
-
 
677
          case PASSWORD:
-
 
678
            if (field.type == TType.STRING) {
-
 
679
              this.password = iprot.readString();
684
              iprot.readListEnd();
680
            } else { 
-
 
681
              TProtocolUtil.skip(iprot, field.type);
-
 
682
            }
685
            }
-
 
686
          } else { 
-
 
687
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
688
          }
683
            break;
689
          break;
-
 
690
        case 6: // PASSWORD
-
 
691
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
692
            this.password = iprot.readString();
-
 
693
          } else { 
-
 
694
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
684
        }
695
          }
685
        iprot.readFieldEnd();
696
          break;
-
 
697
        default:
-
 
698
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
686
      }
699
      }
-
 
700
      iprot.readFieldEnd();
687
    }
701
    }
688
    iprot.readStructEnd();
702
    iprot.readStructEnd();
689
    validate();
703
    validate();
690
  }
704
  }
691
 
705
 
692
  public void write(TProtocol oprot) throws TException {
706
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
693
    validate();
707
    validate();
694
 
708
 
695
    oprot.writeStructBegin(STRUCT_DESC);
709
    oprot.writeStructBegin(STRUCT_DESC);
696
    if (this.to != null) {
710
    if (this.to != null) {
697
      oprot.writeFieldBegin(TO_FIELD_DESC);
711
      oprot.writeFieldBegin(TO_FIELD_DESC);
698
      {
712
      {
699
        oprot.writeListBegin(new TList(TType.STRING, this.to.size()));
713
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.to.size()));
700
        for (String _iter6 : this.to)
714
        for (String _iter6 : this.to)
701
        {
715
        {
702
          oprot.writeString(_iter6);
716
          oprot.writeString(_iter6);
703
        }
717
        }
704
        oprot.writeListEnd();
718
        oprot.writeListEnd();
Line 721... Line 735...
721
      oprot.writeFieldEnd();
735
      oprot.writeFieldEnd();
722
    }
736
    }
723
    if (this.attachments != null) {
737
    if (this.attachments != null) {
724
      oprot.writeFieldBegin(ATTACHMENTS_FIELD_DESC);
738
      oprot.writeFieldBegin(ATTACHMENTS_FIELD_DESC);
725
      {
739
      {
726
        oprot.writeListBegin(new TList(TType.STRING, this.attachments.size()));
740
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.attachments.size()));
727
        for (String _iter7 : this.attachments)
741
        for (String _iter7 : this.attachments)
728
        {
742
        {
729
          oprot.writeString(_iter7);
743
          oprot.writeString(_iter7);
730
        }
744
        }
731
        oprot.writeListEnd();
745
        oprot.writeListEnd();
Line 795... Line 809...
795
    first = false;
809
    first = false;
796
    sb.append(")");
810
    sb.append(")");
797
    return sb.toString();
811
    return sb.toString();
798
  }
812
  }
799
 
813
 
800
  public void validate() throws TException {
814
  public void validate() throws org.apache.thrift.TException {
801
    // check for required fields
815
    // check for required fields
802
  }
816
  }
803
 
817
 
-
 
818
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
819
    try {
-
 
820
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
821
    } catch (org.apache.thrift.TException te) {
-
 
822
      throw new java.io.IOException(te);
-
 
823
    }
-
 
824
  }
-
 
825
 
-
 
826
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
827
    try {
-
 
828
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
829
    } catch (org.apache.thrift.TException te) {
-
 
830
      throw new java.io.IOException(te);
-
 
831
    }
-
 
832
  }
-
 
833
 
804
}
834
}
805
 
835