Subversion Repositories SmartDukaan

Rev

Rev 7410 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7410 Rev 7530
Line 25... Line 25...
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
  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);
-
 
30
  private static final org.apache.thrift.protocol.TField LAST_UPDATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUpdatedOn", org.apache.thrift.protocol.TType.I64, (short)5);
30
 
31
 
31
  private long id; // required
32
  private long id; // required
32
  private String name; // required
33
  private String name; // required
33
  private String email; // required
34
  private String email; // required
34
  private String tinNumber; // required
35
  private String tinNumber; // required
-
 
36
  private long lastUpdatedOn; // required
35
 
37
 
36
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
38
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
39
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
38
    ID((short)1, "id"),
40
    ID((short)1, "id"),
39
    NAME((short)2, "name"),
41
    NAME((short)2, "name"),
40
    EMAIL((short)3, "email"),
42
    EMAIL((short)3, "email"),
41
    TIN_NUMBER((short)4, "tinNumber");
43
    TIN_NUMBER((short)4, "tinNumber"),
-
 
44
    LAST_UPDATED_ON((short)5, "lastUpdatedOn");
42
 
45
 
43
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
44
 
47
 
45
    static {
48
    static {
46
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 59... Line 62...
59
          return NAME;
62
          return NAME;
60
        case 3: // EMAIL
63
        case 3: // EMAIL
61
          return EMAIL;
64
          return EMAIL;
62
        case 4: // TIN_NUMBER
65
        case 4: // TIN_NUMBER
63
          return TIN_NUMBER;
66
          return TIN_NUMBER;
-
 
67
        case 5: // LAST_UPDATED_ON
-
 
68
          return LAST_UPDATED_ON;
64
        default:
69
        default:
65
          return null;
70
          return null;
66
      }
71
      }
67
    }
72
    }
68
 
73
 
Line 100... Line 105...
100
    }
105
    }
101
  }
106
  }
102
 
107
 
103
  // isset id assignments
108
  // isset id assignments
104
  private static final int __ID_ISSET_ID = 0;
109
  private static final int __ID_ISSET_ID = 0;
-
 
110
  private static final int __LASTUPDATEDON_ISSET_ID = 1;
105
  private BitSet __isset_bit_vector = new BitSet(1);
111
  private BitSet __isset_bit_vector = new BitSet(2);
106
 
112
 
107
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
113
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
108
  static {
114
  static {
109
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
115
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
110
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
116
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 113... Line 119...
113
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
119
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
114
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
120
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
115
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
121
        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, 
122
    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)));
123
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
124
    tmpMap.put(_Fields.LAST_UPDATED_ON, new org.apache.thrift.meta_data.FieldMetaData("lastUpdatedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
118
    metaDataMap = Collections.unmodifiableMap(tmpMap);
126
    metaDataMap = Collections.unmodifiableMap(tmpMap);
119
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SourceDetail.class, metaDataMap);
127
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SourceDetail.class, metaDataMap);
120
  }
128
  }
121
 
129
 
122
  public SourceDetail() {
130
  public SourceDetail() {
Line 124... Line 132...
124
 
132
 
125
  public SourceDetail(
133
  public SourceDetail(
126
    long id,
134
    long id,
127
    String name,
135
    String name,
128
    String email,
136
    String email,
129
    String tinNumber)
137
    String tinNumber,
-
 
138
    long lastUpdatedOn)
130
  {
139
  {
131
    this();
140
    this();
132
    this.id = id;
141
    this.id = id;
133
    setIdIsSet(true);
142
    setIdIsSet(true);
134
    this.name = name;
143
    this.name = name;
135
    this.email = email;
144
    this.email = email;
136
    this.tinNumber = tinNumber;
145
    this.tinNumber = tinNumber;
-
 
146
    this.lastUpdatedOn = lastUpdatedOn;
-
 
147
    setLastUpdatedOnIsSet(true);
137
  }
148
  }
138
 
149
 
139
  /**
150
  /**
140
   * Performs a deep copy on <i>other</i>.
151
   * Performs a deep copy on <i>other</i>.
141
   */
152
   */
Line 150... Line 161...
150
      this.email = other.email;
161
      this.email = other.email;
151
    }
162
    }
152
    if (other.isSetTinNumber()) {
163
    if (other.isSetTinNumber()) {
153
      this.tinNumber = other.tinNumber;
164
      this.tinNumber = other.tinNumber;
154
    }
165
    }
-
 
166
    this.lastUpdatedOn = other.lastUpdatedOn;
155
  }
167
  }
156
 
168
 
157
  public SourceDetail deepCopy() {
169
  public SourceDetail deepCopy() {
158
    return new SourceDetail(this);
170
    return new SourceDetail(this);
159
  }
171
  }
Line 163... Line 175...
163
    setIdIsSet(false);
175
    setIdIsSet(false);
164
    this.id = 0;
176
    this.id = 0;
165
    this.name = null;
177
    this.name = null;
166
    this.email = null;
178
    this.email = null;
167
    this.tinNumber = null;
179
    this.tinNumber = null;
-
 
180
    setLastUpdatedOnIsSet(false);
-
 
181
    this.lastUpdatedOn = 0;
168
  }
182
  }
169
 
183
 
170
  public long getId() {
184
  public long getId() {
171
    return this.id;
185
    return this.id;
172
  }
186
  }
Line 256... Line 270...
256
    if (!value) {
270
    if (!value) {
257
      this.tinNumber = null;
271
      this.tinNumber = null;
258
    }
272
    }
259
  }
273
  }
260
 
274
 
-
 
275
  public long getLastUpdatedOn() {
-
 
276
    return this.lastUpdatedOn;
-
 
277
  }
-
 
278
 
-
 
279
  public void setLastUpdatedOn(long lastUpdatedOn) {
-
 
280
    this.lastUpdatedOn = lastUpdatedOn;
-
 
281
    setLastUpdatedOnIsSet(true);
-
 
282
  }
-
 
283
 
-
 
284
  public void unsetLastUpdatedOn() {
-
 
285
    __isset_bit_vector.clear(__LASTUPDATEDON_ISSET_ID);
-
 
286
  }
-
 
287
 
-
 
288
  /** Returns true if field lastUpdatedOn is set (has been assigned a value) and false otherwise */
-
 
289
  public boolean isSetLastUpdatedOn() {
-
 
290
    return __isset_bit_vector.get(__LASTUPDATEDON_ISSET_ID);
-
 
291
  }
-
 
292
 
-
 
293
  public void setLastUpdatedOnIsSet(boolean value) {
-
 
294
    __isset_bit_vector.set(__LASTUPDATEDON_ISSET_ID, value);
-
 
295
  }
-
 
296
 
261
  public void setFieldValue(_Fields field, Object value) {
297
  public void setFieldValue(_Fields field, Object value) {
262
    switch (field) {
298
    switch (field) {
263
    case ID:
299
    case ID:
264
      if (value == null) {
300
      if (value == null) {
265
        unsetId();
301
        unsetId();
Line 290... Line 326...
290
      } else {
326
      } else {
291
        setTinNumber((String)value);
327
        setTinNumber((String)value);
292
      }
328
      }
293
      break;
329
      break;
294
 
330
 
-
 
331
    case LAST_UPDATED_ON:
-
 
332
      if (value == null) {
-
 
333
        unsetLastUpdatedOn();
-
 
334
      } else {
-
 
335
        setLastUpdatedOn((Long)value);
-
 
336
      }
-
 
337
      break;
-
 
338
 
295
    }
339
    }
296
  }
340
  }
297
 
341
 
298
  public Object getFieldValue(_Fields field) {
342
  public Object getFieldValue(_Fields field) {
299
    switch (field) {
343
    switch (field) {
Line 307... Line 351...
307
      return getEmail();
351
      return getEmail();
308
 
352
 
309
    case TIN_NUMBER:
353
    case TIN_NUMBER:
310
      return getTinNumber();
354
      return getTinNumber();
311
 
355
 
-
 
356
    case LAST_UPDATED_ON:
-
 
357
      return Long.valueOf(getLastUpdatedOn());
-
 
358
 
312
    }
359
    }
313
    throw new IllegalStateException();
360
    throw new IllegalStateException();
314
  }
361
  }
315
 
362
 
316
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
363
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 326... Line 373...
326
      return isSetName();
373
      return isSetName();
327
    case EMAIL:
374
    case EMAIL:
328
      return isSetEmail();
375
      return isSetEmail();
329
    case TIN_NUMBER:
376
    case TIN_NUMBER:
330
      return isSetTinNumber();
377
      return isSetTinNumber();
-
 
378
    case LAST_UPDATED_ON:
-
 
379
      return isSetLastUpdatedOn();
331
    }
380
    }
332
    throw new IllegalStateException();
381
    throw new IllegalStateException();
333
  }
382
  }
334
 
383
 
335
  @Override
384
  @Override
Line 379... Line 428...
379
        return false;
428
        return false;
380
      if (!this.tinNumber.equals(that.tinNumber))
429
      if (!this.tinNumber.equals(that.tinNumber))
381
        return false;
430
        return false;
382
    }
431
    }
383
 
432
 
-
 
433
    boolean this_present_lastUpdatedOn = true;
-
 
434
    boolean that_present_lastUpdatedOn = true;
-
 
435
    if (this_present_lastUpdatedOn || that_present_lastUpdatedOn) {
-
 
436
      if (!(this_present_lastUpdatedOn && that_present_lastUpdatedOn))
-
 
437
        return false;
-
 
438
      if (this.lastUpdatedOn != that.lastUpdatedOn)
-
 
439
        return false;
-
 
440
    }
-
 
441
 
384
    return true;
442
    return true;
385
  }
443
  }
386
 
444
 
387
  @Override
445
  @Override
388
  public int hashCode() {
446
  public int hashCode() {
Line 435... Line 493...
435
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinNumber, typedOther.tinNumber);
493
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinNumber, typedOther.tinNumber);
436
      if (lastComparison != 0) {
494
      if (lastComparison != 0) {
437
        return lastComparison;
495
        return lastComparison;
438
      }
496
      }
439
    }
497
    }
-
 
498
    lastComparison = Boolean.valueOf(isSetLastUpdatedOn()).compareTo(typedOther.isSetLastUpdatedOn());
-
 
499
    if (lastComparison != 0) {
-
 
500
      return lastComparison;
-
 
501
    }
-
 
502
    if (isSetLastUpdatedOn()) {
-
 
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastUpdatedOn, typedOther.lastUpdatedOn);
-
 
504
      if (lastComparison != 0) {
-
 
505
        return lastComparison;
-
 
506
      }
-
 
507
    }
440
    return 0;
508
    return 0;
441
  }
509
  }
442
 
510
 
443
  public _Fields fieldForId(int fieldId) {
511
  public _Fields fieldForId(int fieldId) {
444
    return _Fields.findByThriftId(fieldId);
512
    return _Fields.findByThriftId(fieldId);
Line 481... Line 549...
481
            this.tinNumber = iprot.readString();
549
            this.tinNumber = iprot.readString();
482
          } else { 
550
          } else { 
483
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
551
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
484
          }
552
          }
485
          break;
553
          break;
-
 
554
        case 5: // LAST_UPDATED_ON
-
 
555
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
556
            this.lastUpdatedOn = iprot.readI64();
-
 
557
            setLastUpdatedOnIsSet(true);
-
 
558
          } else { 
-
 
559
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
560
          }
-
 
561
          break;
486
        default:
562
        default:
487
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
563
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
488
      }
564
      }
489
      iprot.readFieldEnd();
565
      iprot.readFieldEnd();
490
    }
566
    }
Line 512... Line 588...
512
    if (this.tinNumber != null) {
588
    if (this.tinNumber != null) {
513
      oprot.writeFieldBegin(TIN_NUMBER_FIELD_DESC);
589
      oprot.writeFieldBegin(TIN_NUMBER_FIELD_DESC);
514
      oprot.writeString(this.tinNumber);
590
      oprot.writeString(this.tinNumber);
515
      oprot.writeFieldEnd();
591
      oprot.writeFieldEnd();
516
    }
592
    }
-
 
593
    oprot.writeFieldBegin(LAST_UPDATED_ON_FIELD_DESC);
-
 
594
    oprot.writeI64(this.lastUpdatedOn);
-
 
595
    oprot.writeFieldEnd();
517
    oprot.writeFieldStop();
596
    oprot.writeFieldStop();
518
    oprot.writeStructEnd();
597
    oprot.writeStructEnd();
519
  }
598
  }
520
 
599
 
521
  @Override
600
  @Override
Line 548... Line 627...
548
      sb.append("null");
627
      sb.append("null");
549
    } else {
628
    } else {
550
      sb.append(this.tinNumber);
629
      sb.append(this.tinNumber);
551
    }
630
    }
552
    first = false;
631
    first = false;
-
 
632
    if (!first) sb.append(", ");
-
 
633
    sb.append("lastUpdatedOn:");
-
 
634
    sb.append(this.lastUpdatedOn);
-
 
635
    first = false;
553
    sb.append(")");
636
    sb.append(")");
554
    return sb.toString();
637
    return sb.toString();
555
  }
638
  }
556
 
639
 
557
  public void validate() throws org.apache.thrift.TException {
640
  public void validate() throws org.apache.thrift.TException {