Subversion Repositories SmartDukaan

Rev

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

Rev 11890 Rev 12696
Line 24... Line 24...
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrivateDealUser");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrivateDealUser");
25
 
25
 
26
  private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)2);
27
  private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)3);
28
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)3);
-
 
29
  private static final org.apache.thrift.protocol.TField COUNTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("counterId", org.apache.thrift.protocol.TType.I64, (short)4);
-
 
30
  private static final org.apache.thrift.protocol.TField TIN_FIELD_DESC = new org.apache.thrift.protocol.TField("tin", org.apache.thrift.protocol.TType.STRING, (short)5);
29
 
31
 
30
  private long userId; // required
32
  private long userId; // required
31
  private long addedOn; // required
33
  private long addedOn; // required
32
  private boolean isActive; // required
34
  private boolean isActive; // required
-
 
35
  private long counterId; // required
-
 
36
  private String tin; // required
33
 
37
 
34
  /** 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. */
35
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
39
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
36
    USER_ID((short)1, "userId"),
40
    USER_ID((short)1, "userId"),
37
    ADDED_ON((short)2, "addedOn"),
41
    ADDED_ON((short)2, "addedOn"),
38
    IS_ACTIVE((short)3, "isActive");
42
    IS_ACTIVE((short)3, "isActive"),
-
 
43
    COUNTER_ID((short)4, "counterId"),
-
 
44
    TIN((short)5, "tin");
39
 
45
 
40
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
41
 
47
 
42
    static {
48
    static {
43
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 54... Line 60...
54
          return USER_ID;
60
          return USER_ID;
55
        case 2: // ADDED_ON
61
        case 2: // ADDED_ON
56
          return ADDED_ON;
62
          return ADDED_ON;
57
        case 3: // IS_ACTIVE
63
        case 3: // IS_ACTIVE
58
          return IS_ACTIVE;
64
          return IS_ACTIVE;
-
 
65
        case 4: // COUNTER_ID
-
 
66
          return COUNTER_ID;
-
 
67
        case 5: // TIN
-
 
68
          return TIN;
59
        default:
69
        default:
60
          return null;
70
          return null;
61
      }
71
      }
62
    }
72
    }
63
 
73
 
Line 97... Line 107...
97
 
107
 
98
  // isset id assignments
108
  // isset id assignments
99
  private static final int __USERID_ISSET_ID = 0;
109
  private static final int __USERID_ISSET_ID = 0;
100
  private static final int __ADDEDON_ISSET_ID = 1;
110
  private static final int __ADDEDON_ISSET_ID = 1;
101
  private static final int __ISACTIVE_ISSET_ID = 2;
111
  private static final int __ISACTIVE_ISSET_ID = 2;
-
 
112
  private static final int __COUNTERID_ISSET_ID = 3;
102
  private BitSet __isset_bit_vector = new BitSet(3);
113
  private BitSet __isset_bit_vector = new BitSet(4);
103
 
114
 
104
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
115
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
105
  static {
116
  static {
106
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
117
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
107
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
118
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
108
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
119
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
109
    tmpMap.put(_Fields.ADDED_ON, new org.apache.thrift.meta_data.FieldMetaData("addedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
120
    tmpMap.put(_Fields.ADDED_ON, new org.apache.thrift.meta_data.FieldMetaData("addedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
110
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
121
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
111
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
122
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
112
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
123
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
124
    tmpMap.put(_Fields.COUNTER_ID, new org.apache.thrift.meta_data.FieldMetaData("counterId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
126
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
113
    metaDataMap = Collections.unmodifiableMap(tmpMap);
128
    metaDataMap = Collections.unmodifiableMap(tmpMap);
114
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivateDealUser.class, metaDataMap);
129
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivateDealUser.class, metaDataMap);
115
  }
130
  }
116
 
131
 
117
  public PrivateDealUser() {
132
  public PrivateDealUser() {
118
  }
133
  }
119
 
134
 
120
  public PrivateDealUser(
135
  public PrivateDealUser(
121
    long userId,
136
    long userId,
122
    long addedOn,
137
    long addedOn,
123
    boolean isActive)
138
    boolean isActive,
-
 
139
    long counterId,
-
 
140
    String tin)
124
  {
141
  {
125
    this();
142
    this();
126
    this.userId = userId;
143
    this.userId = userId;
127
    setUserIdIsSet(true);
144
    setUserIdIsSet(true);
128
    this.addedOn = addedOn;
145
    this.addedOn = addedOn;
129
    setAddedOnIsSet(true);
146
    setAddedOnIsSet(true);
130
    this.isActive = isActive;
147
    this.isActive = isActive;
131
    setIsActiveIsSet(true);
148
    setIsActiveIsSet(true);
-
 
149
    this.counterId = counterId;
-
 
150
    setCounterIdIsSet(true);
-
 
151
    this.tin = tin;
132
  }
152
  }
133
 
153
 
134
  /**
154
  /**
135
   * Performs a deep copy on <i>other</i>.
155
   * Performs a deep copy on <i>other</i>.
136
   */
156
   */
Line 138... Line 158...
138
    __isset_bit_vector.clear();
158
    __isset_bit_vector.clear();
139
    __isset_bit_vector.or(other.__isset_bit_vector);
159
    __isset_bit_vector.or(other.__isset_bit_vector);
140
    this.userId = other.userId;
160
    this.userId = other.userId;
141
    this.addedOn = other.addedOn;
161
    this.addedOn = other.addedOn;
142
    this.isActive = other.isActive;
162
    this.isActive = other.isActive;
-
 
163
    this.counterId = other.counterId;
-
 
164
    if (other.isSetTin()) {
-
 
165
      this.tin = other.tin;
-
 
166
    }
143
  }
167
  }
144
 
168
 
145
  public PrivateDealUser deepCopy() {
169
  public PrivateDealUser deepCopy() {
146
    return new PrivateDealUser(this);
170
    return new PrivateDealUser(this);
147
  }
171
  }
Line 152... Line 176...
152
    this.userId = 0;
176
    this.userId = 0;
153
    setAddedOnIsSet(false);
177
    setAddedOnIsSet(false);
154
    this.addedOn = 0;
178
    this.addedOn = 0;
155
    setIsActiveIsSet(false);
179
    setIsActiveIsSet(false);
156
    this.isActive = false;
180
    this.isActive = false;
-
 
181
    setCounterIdIsSet(false);
-
 
182
    this.counterId = 0;
-
 
183
    this.tin = null;
157
  }
184
  }
158
 
185
 
159
  public long getUserId() {
186
  public long getUserId() {
160
    return this.userId;
187
    return this.userId;
161
  }
188
  }
Line 220... Line 247...
220
 
247
 
221
  public void setIsActiveIsSet(boolean value) {
248
  public void setIsActiveIsSet(boolean value) {
222
    __isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
249
    __isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
223
  }
250
  }
224
 
251
 
-
 
252
  public long getCounterId() {
-
 
253
    return this.counterId;
-
 
254
  }
-
 
255
 
-
 
256
  public void setCounterId(long counterId) {
-
 
257
    this.counterId = counterId;
-
 
258
    setCounterIdIsSet(true);
-
 
259
  }
-
 
260
 
-
 
261
  public void unsetCounterId() {
-
 
262
    __isset_bit_vector.clear(__COUNTERID_ISSET_ID);
-
 
263
  }
-
 
264
 
-
 
265
  /** Returns true if field counterId is set (has been assigned a value) and false otherwise */
-
 
266
  public boolean isSetCounterId() {
-
 
267
    return __isset_bit_vector.get(__COUNTERID_ISSET_ID);
-
 
268
  }
-
 
269
 
-
 
270
  public void setCounterIdIsSet(boolean value) {
-
 
271
    __isset_bit_vector.set(__COUNTERID_ISSET_ID, value);
-
 
272
  }
-
 
273
 
-
 
274
  public String getTin() {
-
 
275
    return this.tin;
-
 
276
  }
-
 
277
 
-
 
278
  public void setTin(String tin) {
-
 
279
    this.tin = tin;
-
 
280
  }
-
 
281
 
-
 
282
  public void unsetTin() {
-
 
283
    this.tin = null;
-
 
284
  }
-
 
285
 
-
 
286
  /** Returns true if field tin is set (has been assigned a value) and false otherwise */
-
 
287
  public boolean isSetTin() {
-
 
288
    return this.tin != null;
-
 
289
  }
-
 
290
 
-
 
291
  public void setTinIsSet(boolean value) {
-
 
292
    if (!value) {
-
 
293
      this.tin = null;
-
 
294
    }
-
 
295
  }
-
 
296
 
225
  public void setFieldValue(_Fields field, Object value) {
297
  public void setFieldValue(_Fields field, Object value) {
226
    switch (field) {
298
    switch (field) {
227
    case USER_ID:
299
    case USER_ID:
228
      if (value == null) {
300
      if (value == null) {
229
        unsetUserId();
301
        unsetUserId();
Line 246... Line 318...
246
      } else {
318
      } else {
247
        setIsActive((Boolean)value);
319
        setIsActive((Boolean)value);
248
      }
320
      }
249
      break;
321
      break;
250
 
322
 
-
 
323
    case COUNTER_ID:
-
 
324
      if (value == null) {
-
 
325
        unsetCounterId();
-
 
326
      } else {
-
 
327
        setCounterId((Long)value);
-
 
328
      }
-
 
329
      break;
-
 
330
 
-
 
331
    case TIN:
-
 
332
      if (value == null) {
-
 
333
        unsetTin();
-
 
334
      } else {
-
 
335
        setTin((String)value);
-
 
336
      }
-
 
337
      break;
-
 
338
 
251
    }
339
    }
252
  }
340
  }
253
 
341
 
254
  public Object getFieldValue(_Fields field) {
342
  public Object getFieldValue(_Fields field) {
255
    switch (field) {
343
    switch (field) {
Line 260... Line 348...
260
      return Long.valueOf(getAddedOn());
348
      return Long.valueOf(getAddedOn());
261
 
349
 
262
    case IS_ACTIVE:
350
    case IS_ACTIVE:
263
      return Boolean.valueOf(isIsActive());
351
      return Boolean.valueOf(isIsActive());
264
 
352
 
-
 
353
    case COUNTER_ID:
-
 
354
      return Long.valueOf(getCounterId());
-
 
355
 
-
 
356
    case TIN:
-
 
357
      return getTin();
-
 
358
 
265
    }
359
    }
266
    throw new IllegalStateException();
360
    throw new IllegalStateException();
267
  }
361
  }
268
 
362
 
269
  /** 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 277... Line 371...
277
      return isSetUserId();
371
      return isSetUserId();
278
    case ADDED_ON:
372
    case ADDED_ON:
279
      return isSetAddedOn();
373
      return isSetAddedOn();
280
    case IS_ACTIVE:
374
    case IS_ACTIVE:
281
      return isSetIsActive();
375
      return isSetIsActive();
-
 
376
    case COUNTER_ID:
-
 
377
      return isSetCounterId();
-
 
378
    case TIN:
-
 
379
      return isSetTin();
282
    }
380
    }
283
    throw new IllegalStateException();
381
    throw new IllegalStateException();
284
  }
382
  }
285
 
383
 
286
  @Override
384
  @Override
Line 321... Line 419...
321
        return false;
419
        return false;
322
      if (this.isActive != that.isActive)
420
      if (this.isActive != that.isActive)
323
        return false;
421
        return false;
324
    }
422
    }
325
 
423
 
-
 
424
    boolean this_present_counterId = true;
-
 
425
    boolean that_present_counterId = true;
-
 
426
    if (this_present_counterId || that_present_counterId) {
-
 
427
      if (!(this_present_counterId && that_present_counterId))
-
 
428
        return false;
-
 
429
      if (this.counterId != that.counterId)
-
 
430
        return false;
-
 
431
    }
-
 
432
 
-
 
433
    boolean this_present_tin = true && this.isSetTin();
-
 
434
    boolean that_present_tin = true && that.isSetTin();
-
 
435
    if (this_present_tin || that_present_tin) {
-
 
436
      if (!(this_present_tin && that_present_tin))
-
 
437
        return false;
-
 
438
      if (!this.tin.equals(that.tin))
-
 
439
        return false;
-
 
440
    }
-
 
441
 
326
    return true;
442
    return true;
327
  }
443
  }
328
 
444
 
329
  @Override
445
  @Override
330
  public int hashCode() {
446
  public int hashCode() {
Line 367... Line 483...
367
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
483
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
368
      if (lastComparison != 0) {
484
      if (lastComparison != 0) {
369
        return lastComparison;
485
        return lastComparison;
370
      }
486
      }
371
    }
487
    }
-
 
488
    lastComparison = Boolean.valueOf(isSetCounterId()).compareTo(typedOther.isSetCounterId());
-
 
489
    if (lastComparison != 0) {
-
 
490
      return lastComparison;
-
 
491
    }
-
 
492
    if (isSetCounterId()) {
-
 
493
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.counterId, typedOther.counterId);
-
 
494
      if (lastComparison != 0) {
-
 
495
        return lastComparison;
-
 
496
      }
-
 
497
    }
-
 
498
    lastComparison = Boolean.valueOf(isSetTin()).compareTo(typedOther.isSetTin());
-
 
499
    if (lastComparison != 0) {
-
 
500
      return lastComparison;
-
 
501
    }
-
 
502
    if (isSetTin()) {
-
 
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tin, typedOther.tin);
-
 
504
      if (lastComparison != 0) {
-
 
505
        return lastComparison;
-
 
506
      }
-
 
507
    }
372
    return 0;
508
    return 0;
373
  }
509
  }
374
 
510
 
375
  public _Fields fieldForId(int fieldId) {
511
  public _Fields fieldForId(int fieldId) {
376
    return _Fields.findByThriftId(fieldId);
512
    return _Fields.findByThriftId(fieldId);
Line 408... Line 544...
408
            setIsActiveIsSet(true);
544
            setIsActiveIsSet(true);
409
          } else { 
545
          } else { 
410
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
546
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
411
          }
547
          }
412
          break;
548
          break;
-
 
549
        case 4: // COUNTER_ID
-
 
550
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
551
            this.counterId = iprot.readI64();
-
 
552
            setCounterIdIsSet(true);
-
 
553
          } else { 
-
 
554
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
555
          }
-
 
556
          break;
-
 
557
        case 5: // TIN
-
 
558
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
559
            this.tin = iprot.readString();
-
 
560
          } else { 
-
 
561
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
562
          }
-
 
563
          break;
413
        default:
564
        default:
414
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
565
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
415
      }
566
      }
416
      iprot.readFieldEnd();
567
      iprot.readFieldEnd();
417
    }
568
    }
Line 430... Line 581...
430
    oprot.writeI64(this.addedOn);
581
    oprot.writeI64(this.addedOn);
431
    oprot.writeFieldEnd();
582
    oprot.writeFieldEnd();
432
    oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
583
    oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
433
    oprot.writeBool(this.isActive);
584
    oprot.writeBool(this.isActive);
434
    oprot.writeFieldEnd();
585
    oprot.writeFieldEnd();
-
 
586
    oprot.writeFieldBegin(COUNTER_ID_FIELD_DESC);
-
 
587
    oprot.writeI64(this.counterId);
-
 
588
    oprot.writeFieldEnd();
-
 
589
    if (this.tin != null) {
-
 
590
      oprot.writeFieldBegin(TIN_FIELD_DESC);
-
 
591
      oprot.writeString(this.tin);
-
 
592
      oprot.writeFieldEnd();
-
 
593
    }
435
    oprot.writeFieldStop();
594
    oprot.writeFieldStop();
436
    oprot.writeStructEnd();
595
    oprot.writeStructEnd();
437
  }
596
  }
438
 
597
 
439
  @Override
598
  @Override
Line 450... Line 609...
450
    first = false;
609
    first = false;
451
    if (!first) sb.append(", ");
610
    if (!first) sb.append(", ");
452
    sb.append("isActive:");
611
    sb.append("isActive:");
453
    sb.append(this.isActive);
612
    sb.append(this.isActive);
454
    first = false;
613
    first = false;
-
 
614
    if (!first) sb.append(", ");
-
 
615
    sb.append("counterId:");
-
 
616
    sb.append(this.counterId);
-
 
617
    first = false;
-
 
618
    if (!first) sb.append(", ");
-
 
619
    sb.append("tin:");
-
 
620
    if (this.tin == null) {
-
 
621
      sb.append("null");
-
 
622
    } else {
-
 
623
      sb.append(this.tin);
-
 
624
    }
-
 
625
    first = false;
455
    sb.append(")");
626
    sb.append(")");
456
    return sb.toString();
627
    return sb.toString();
457
  }
628
  }
458
 
629
 
459
  public void validate() throws org.apache.thrift.TException {
630
  public void validate() throws org.apache.thrift.TException {