Subversion Repositories SmartDukaan

Rev

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

Rev 7263 Rev 7410
Line 24... Line 24...
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SourceDetail");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SourceDetail");
25
 
25
 
26
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)3);
28
  private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)3);
-
 
29
  private static final org.apache.thrift.protocol.TField TIN_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("tinNumber", org.apache.thrift.protocol.TType.STRING, (short)4);
29
 
30
 
30
  private long id; // required
31
  private long id; // required
31
  private String name; // required
32
  private String name; // required
32
  private String email; // required
33
  private String email; // required
-
 
34
  private String tinNumber; // required
33
 
35
 
34
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
36
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
36
    ID((short)1, "id"),
38
    ID((short)1, "id"),
37
    NAME((short)2, "name"),
39
    NAME((short)2, "name"),
38
    EMAIL((short)3, "email");
40
    EMAIL((short)3, "email"),
-
 
41
    TIN_NUMBER((short)4, "tinNumber");
39
 
42
 
40
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
43
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
41
 
44
 
42
    static {
45
    static {
43
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
46
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 54... Line 57...
54
          return ID;
57
          return ID;
55
        case 2: // NAME
58
        case 2: // NAME
56
          return NAME;
59
          return NAME;
57
        case 3: // EMAIL
60
        case 3: // EMAIL
58
          return EMAIL;
61
          return EMAIL;
-
 
62
        case 4: // TIN_NUMBER
-
 
63
          return TIN_NUMBER;
59
        default:
64
        default:
60
          return null;
65
          return null;
61
      }
66
      }
62
    }
67
    }
63
 
68
 
Line 106... Line 111...
106
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
111
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
107
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
112
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
108
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
113
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
109
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
114
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
110
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
115
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
116
    tmpMap.put(_Fields.TIN_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("tinNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
117
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
111
    metaDataMap = Collections.unmodifiableMap(tmpMap);
118
    metaDataMap = Collections.unmodifiableMap(tmpMap);
112
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SourceDetail.class, metaDataMap);
119
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SourceDetail.class, metaDataMap);
113
  }
120
  }
114
 
121
 
115
  public SourceDetail() {
122
  public SourceDetail() {
116
  }
123
  }
117
 
124
 
118
  public SourceDetail(
125
  public SourceDetail(
119
    long id,
126
    long id,
120
    String name,
127
    String name,
121
    String email)
128
    String email,
-
 
129
    String tinNumber)
122
  {
130
  {
123
    this();
131
    this();
124
    this.id = id;
132
    this.id = id;
125
    setIdIsSet(true);
133
    setIdIsSet(true);
126
    this.name = name;
134
    this.name = name;
127
    this.email = email;
135
    this.email = email;
-
 
136
    this.tinNumber = tinNumber;
128
  }
137
  }
129
 
138
 
130
  /**
139
  /**
131
   * Performs a deep copy on <i>other</i>.
140
   * Performs a deep copy on <i>other</i>.
132
   */
141
   */
Line 138... Line 147...
138
      this.name = other.name;
147
      this.name = other.name;
139
    }
148
    }
140
    if (other.isSetEmail()) {
149
    if (other.isSetEmail()) {
141
      this.email = other.email;
150
      this.email = other.email;
142
    }
151
    }
-
 
152
    if (other.isSetTinNumber()) {
-
 
153
      this.tinNumber = other.tinNumber;
-
 
154
    }
143
  }
155
  }
144
 
156
 
145
  public SourceDetail deepCopy() {
157
  public SourceDetail deepCopy() {
146
    return new SourceDetail(this);
158
    return new SourceDetail(this);
147
  }
159
  }
Line 150... Line 162...
150
  public void clear() {
162
  public void clear() {
151
    setIdIsSet(false);
163
    setIdIsSet(false);
152
    this.id = 0;
164
    this.id = 0;
153
    this.name = null;
165
    this.name = null;
154
    this.email = null;
166
    this.email = null;
-
 
167
    this.tinNumber = null;
155
  }
168
  }
156
 
169
 
157
  public long getId() {
170
  public long getId() {
158
    return this.id;
171
    return this.id;
159
  }
172
  }
Line 220... Line 233...
220
    if (!value) {
233
    if (!value) {
221
      this.email = null;
234
      this.email = null;
222
    }
235
    }
223
  }
236
  }
224
 
237
 
-
 
238
  public String getTinNumber() {
-
 
239
    return this.tinNumber;
-
 
240
  }
-
 
241
 
-
 
242
  public void setTinNumber(String tinNumber) {
-
 
243
    this.tinNumber = tinNumber;
-
 
244
  }
-
 
245
 
-
 
246
  public void unsetTinNumber() {
-
 
247
    this.tinNumber = null;
-
 
248
  }
-
 
249
 
-
 
250
  /** Returns true if field tinNumber is set (has been assigned a value) and false otherwise */
-
 
251
  public boolean isSetTinNumber() {
-
 
252
    return this.tinNumber != null;
-
 
253
  }
-
 
254
 
-
 
255
  public void setTinNumberIsSet(boolean value) {
-
 
256
    if (!value) {
-
 
257
      this.tinNumber = null;
-
 
258
    }
-
 
259
  }
-
 
260
 
225
  public void setFieldValue(_Fields field, Object value) {
261
  public void setFieldValue(_Fields field, Object value) {
226
    switch (field) {
262
    switch (field) {
227
    case ID:
263
    case ID:
228
      if (value == null) {
264
      if (value == null) {
229
        unsetId();
265
        unsetId();
Line 246... Line 282...
246
      } else {
282
      } else {
247
        setEmail((String)value);
283
        setEmail((String)value);
248
      }
284
      }
249
      break;
285
      break;
250
 
286
 
-
 
287
    case TIN_NUMBER:
-
 
288
      if (value == null) {
-
 
289
        unsetTinNumber();
-
 
290
      } else {
-
 
291
        setTinNumber((String)value);
-
 
292
      }
-
 
293
      break;
-
 
294
 
251
    }
295
    }
252
  }
296
  }
253
 
297
 
254
  public Object getFieldValue(_Fields field) {
298
  public Object getFieldValue(_Fields field) {
255
    switch (field) {
299
    switch (field) {
Line 260... Line 304...
260
      return getName();
304
      return getName();
261
 
305
 
262
    case EMAIL:
306
    case EMAIL:
263
      return getEmail();
307
      return getEmail();
264
 
308
 
-
 
309
    case TIN_NUMBER:
-
 
310
      return getTinNumber();
-
 
311
 
265
    }
312
    }
266
    throw new IllegalStateException();
313
    throw new IllegalStateException();
267
  }
314
  }
268
 
315
 
269
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
316
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 277... Line 324...
277
      return isSetId();
324
      return isSetId();
278
    case NAME:
325
    case NAME:
279
      return isSetName();
326
      return isSetName();
280
    case EMAIL:
327
    case EMAIL:
281
      return isSetEmail();
328
      return isSetEmail();
-
 
329
    case TIN_NUMBER:
-
 
330
      return isSetTinNumber();
282
    }
331
    }
283
    throw new IllegalStateException();
332
    throw new IllegalStateException();
284
  }
333
  }
285
 
334
 
286
  @Override
335
  @Override
Line 321... Line 370...
321
        return false;
370
        return false;
322
      if (!this.email.equals(that.email))
371
      if (!this.email.equals(that.email))
323
        return false;
372
        return false;
324
    }
373
    }
325
 
374
 
-
 
375
    boolean this_present_tinNumber = true && this.isSetTinNumber();
-
 
376
    boolean that_present_tinNumber = true && that.isSetTinNumber();
-
 
377
    if (this_present_tinNumber || that_present_tinNumber) {
-
 
378
      if (!(this_present_tinNumber && that_present_tinNumber))
-
 
379
        return false;
-
 
380
      if (!this.tinNumber.equals(that.tinNumber))
-
 
381
        return false;
-
 
382
    }
-
 
383
 
326
    return true;
384
    return true;
327
  }
385
  }
328
 
386
 
329
  @Override
387
  @Override
330
  public int hashCode() {
388
  public int hashCode() {
Line 367... Line 425...
367
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
425
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
368
      if (lastComparison != 0) {
426
      if (lastComparison != 0) {
369
        return lastComparison;
427
        return lastComparison;
370
      }
428
      }
371
    }
429
    }
-
 
430
    lastComparison = Boolean.valueOf(isSetTinNumber()).compareTo(typedOther.isSetTinNumber());
-
 
431
    if (lastComparison != 0) {
-
 
432
      return lastComparison;
-
 
433
    }
-
 
434
    if (isSetTinNumber()) {
-
 
435
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinNumber, typedOther.tinNumber);
-
 
436
      if (lastComparison != 0) {
-
 
437
        return lastComparison;
-
 
438
      }
-
 
439
    }
372
    return 0;
440
    return 0;
373
  }
441
  }
374
 
442
 
375
  public _Fields fieldForId(int fieldId) {
443
  public _Fields fieldForId(int fieldId) {
376
    return _Fields.findByThriftId(fieldId);
444
    return _Fields.findByThriftId(fieldId);
Line 406... Line 474...
406
            this.email = iprot.readString();
474
            this.email = iprot.readString();
407
          } else { 
475
          } else { 
408
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
476
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
409
          }
477
          }
410
          break;
478
          break;
-
 
479
        case 4: // TIN_NUMBER
-
 
480
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
481
            this.tinNumber = iprot.readString();
-
 
482
          } else { 
-
 
483
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
484
          }
-
 
485
          break;
411
        default:
486
        default:
412
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
487
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
413
      }
488
      }
414
      iprot.readFieldEnd();
489
      iprot.readFieldEnd();
415
    }
490
    }
Line 432... Line 507...
432
    if (this.email != null) {
507
    if (this.email != null) {
433
      oprot.writeFieldBegin(EMAIL_FIELD_DESC);
508
      oprot.writeFieldBegin(EMAIL_FIELD_DESC);
434
      oprot.writeString(this.email);
509
      oprot.writeString(this.email);
435
      oprot.writeFieldEnd();
510
      oprot.writeFieldEnd();
436
    }
511
    }
-
 
512
    if (this.tinNumber != null) {
-
 
513
      oprot.writeFieldBegin(TIN_NUMBER_FIELD_DESC);
-
 
514
      oprot.writeString(this.tinNumber);
-
 
515
      oprot.writeFieldEnd();
-
 
516
    }
437
    oprot.writeFieldStop();
517
    oprot.writeFieldStop();
438
    oprot.writeStructEnd();
518
    oprot.writeStructEnd();
439
  }
519
  }
440
 
520
 
441
  @Override
521
  @Override
Line 460... Line 540...
460
      sb.append("null");
540
      sb.append("null");
461
    } else {
541
    } else {
462
      sb.append(this.email);
542
      sb.append(this.email);
463
    }
543
    }
464
    first = false;
544
    first = false;
-
 
545
    if (!first) sb.append(", ");
-
 
546
    sb.append("tinNumber:");
-
 
547
    if (this.tinNumber == null) {
-
 
548
      sb.append("null");
-
 
549
    } else {
-
 
550
      sb.append(this.tinNumber);
-
 
551
    }
-
 
552
    first = false;
465
    sb.append(")");
553
    sb.append(")");
466
    return sb.toString();
554
    return sb.toString();
467
  }
555
  }
468
 
556
 
469
  public void validate() throws org.apache.thrift.TException {
557
  public void validate() throws org.apache.thrift.TException {