Subversion Repositories SmartDukaan

Rev

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

Rev 3430 Rev 7792
Line 23... Line 23...
23
public class ProviderDetails implements org.apache.thrift.TBase<ProviderDetails, ProviderDetails._Fields>, java.io.Serializable, Cloneable {
23
public class ProviderDetails implements org.apache.thrift.TBase<ProviderDetails, ProviderDetails._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProviderDetails");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProviderDetails");
25
 
25
 
26
  private static final org.apache.thrift.protocol.TField ACCOUNT_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("accountNo", org.apache.thrift.protocol.TType.STRING, (short)1);
26
  private static final org.apache.thrift.protocol.TField ACCOUNT_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("accountNo", org.apache.thrift.protocol.TType.STRING, (short)1);
27
  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)2);
27
  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)2);
-
 
28
  private static final org.apache.thrift.protocol.TField LOGISTIC_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("logisticLocation", org.apache.thrift.protocol.TType.I64, (short)3);
-
 
29
  private static final org.apache.thrift.protocol.TField DELIVERY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("deliveryType", org.apache.thrift.protocol.TType.I32, (short)4);
28
 
30
 
29
  private String accountNo; // required
31
  private String accountNo; // required
30
  private String email; // required
32
  private String email; // required
-
 
33
  private long logisticLocation; // required
-
 
34
  private DeliveryType deliveryType; // required
31
 
35
 
32
  /** 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. */
33
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
34
    ACCOUNT_NO((short)1, "accountNo"),
38
    ACCOUNT_NO((short)1, "accountNo"),
35
    EMAIL((short)2, "email");
39
    EMAIL((short)2, "email"),
-
 
40
    LOGISTIC_LOCATION((short)3, "logisticLocation"),
-
 
41
    /**
-
 
42
     * 
-
 
43
     * @see DeliveryType
-
 
44
     */
-
 
45
    DELIVERY_TYPE((short)4, "deliveryType");
36
 
46
 
37
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
47
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
38
 
48
 
39
    static {
49
    static {
40
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
50
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 49... Line 59...
49
      switch(fieldId) {
59
      switch(fieldId) {
50
        case 1: // ACCOUNT_NO
60
        case 1: // ACCOUNT_NO
51
          return ACCOUNT_NO;
61
          return ACCOUNT_NO;
52
        case 2: // EMAIL
62
        case 2: // EMAIL
53
          return EMAIL;
63
          return EMAIL;
-
 
64
        case 3: // LOGISTIC_LOCATION
-
 
65
          return LOGISTIC_LOCATION;
-
 
66
        case 4: // DELIVERY_TYPE
-
 
67
          return DELIVERY_TYPE;
54
        default:
68
        default:
55
          return null;
69
          return null;
56
      }
70
      }
57
    }
71
    }
58
 
72
 
Line 89... Line 103...
89
      return _fieldName;
103
      return _fieldName;
90
    }
104
    }
91
  }
105
  }
92
 
106
 
93
  // isset id assignments
107
  // isset id assignments
-
 
108
  private static final int __LOGISTICLOCATION_ISSET_ID = 0;
-
 
109
  private BitSet __isset_bit_vector = new BitSet(1);
94
 
110
 
95
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
111
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
96
  static {
112
  static {
97
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
113
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
98
    tmpMap.put(_Fields.ACCOUNT_NO, new org.apache.thrift.meta_data.FieldMetaData("accountNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
114
    tmpMap.put(_Fields.ACCOUNT_NO, new org.apache.thrift.meta_data.FieldMetaData("accountNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
99
        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)));
100
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
116
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
101
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
117
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
118
    tmpMap.put(_Fields.LOGISTIC_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("logisticLocation", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
119
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
120
    tmpMap.put(_Fields.DELIVERY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("deliveryType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
121
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DeliveryType.class)));
102
    metaDataMap = Collections.unmodifiableMap(tmpMap);
122
    metaDataMap = Collections.unmodifiableMap(tmpMap);
103
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ProviderDetails.class, metaDataMap);
123
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ProviderDetails.class, metaDataMap);
104
  }
124
  }
105
 
125
 
106
  public ProviderDetails() {
126
  public ProviderDetails() {
107
  }
127
  }
108
 
128
 
109
  public ProviderDetails(
129
  public ProviderDetails(
110
    String accountNo,
130
    String accountNo,
111
    String email)
131
    String email,
-
 
132
    long logisticLocation,
-
 
133
    DeliveryType deliveryType)
112
  {
134
  {
113
    this();
135
    this();
114
    this.accountNo = accountNo;
136
    this.accountNo = accountNo;
115
    this.email = email;
137
    this.email = email;
-
 
138
    this.logisticLocation = logisticLocation;
-
 
139
    setLogisticLocationIsSet(true);
-
 
140
    this.deliveryType = deliveryType;
116
  }
141
  }
117
 
142
 
118
  /**
143
  /**
119
   * Performs a deep copy on <i>other</i>.
144
   * Performs a deep copy on <i>other</i>.
120
   */
145
   */
121
  public ProviderDetails(ProviderDetails other) {
146
  public ProviderDetails(ProviderDetails other) {
-
 
147
    __isset_bit_vector.clear();
-
 
148
    __isset_bit_vector.or(other.__isset_bit_vector);
122
    if (other.isSetAccountNo()) {
149
    if (other.isSetAccountNo()) {
123
      this.accountNo = other.accountNo;
150
      this.accountNo = other.accountNo;
124
    }
151
    }
125
    if (other.isSetEmail()) {
152
    if (other.isSetEmail()) {
126
      this.email = other.email;
153
      this.email = other.email;
127
    }
154
    }
-
 
155
    this.logisticLocation = other.logisticLocation;
-
 
156
    if (other.isSetDeliveryType()) {
-
 
157
      this.deliveryType = other.deliveryType;
-
 
158
    }
128
  }
159
  }
129
 
160
 
130
  public ProviderDetails deepCopy() {
161
  public ProviderDetails deepCopy() {
131
    return new ProviderDetails(this);
162
    return new ProviderDetails(this);
132
  }
163
  }
133
 
164
 
134
  @Override
165
  @Override
135
  public void clear() {
166
  public void clear() {
136
    this.accountNo = null;
167
    this.accountNo = null;
137
    this.email = null;
168
    this.email = null;
-
 
169
    setLogisticLocationIsSet(false);
-
 
170
    this.logisticLocation = 0;
-
 
171
    this.deliveryType = null;
138
  }
172
  }
139
 
173
 
140
  public String getAccountNo() {
174
  public String getAccountNo() {
141
    return this.accountNo;
175
    return this.accountNo;
142
  }
176
  }
Line 181... Line 215...
181
    if (!value) {
215
    if (!value) {
182
      this.email = null;
216
      this.email = null;
183
    }
217
    }
184
  }
218
  }
185
 
219
 
-
 
220
  public long getLogisticLocation() {
-
 
221
    return this.logisticLocation;
-
 
222
  }
-
 
223
 
-
 
224
  public void setLogisticLocation(long logisticLocation) {
-
 
225
    this.logisticLocation = logisticLocation;
-
 
226
    setLogisticLocationIsSet(true);
-
 
227
  }
-
 
228
 
-
 
229
  public void unsetLogisticLocation() {
-
 
230
    __isset_bit_vector.clear(__LOGISTICLOCATION_ISSET_ID);
-
 
231
  }
-
 
232
 
-
 
233
  /** Returns true if field logisticLocation is set (has been assigned a value) and false otherwise */
-
 
234
  public boolean isSetLogisticLocation() {
-
 
235
    return __isset_bit_vector.get(__LOGISTICLOCATION_ISSET_ID);
-
 
236
  }
-
 
237
 
-
 
238
  public void setLogisticLocationIsSet(boolean value) {
-
 
239
    __isset_bit_vector.set(__LOGISTICLOCATION_ISSET_ID, value);
-
 
240
  }
-
 
241
 
-
 
242
  /**
-
 
243
   * 
-
 
244
   * @see DeliveryType
-
 
245
   */
-
 
246
  public DeliveryType getDeliveryType() {
-
 
247
    return this.deliveryType;
-
 
248
  }
-
 
249
 
-
 
250
  /**
-
 
251
   * 
-
 
252
   * @see DeliveryType
-
 
253
   */
-
 
254
  public void setDeliveryType(DeliveryType deliveryType) {
-
 
255
    this.deliveryType = deliveryType;
-
 
256
  }
-
 
257
 
-
 
258
  public void unsetDeliveryType() {
-
 
259
    this.deliveryType = null;
-
 
260
  }
-
 
261
 
-
 
262
  /** Returns true if field deliveryType is set (has been assigned a value) and false otherwise */
-
 
263
  public boolean isSetDeliveryType() {
-
 
264
    return this.deliveryType != null;
-
 
265
  }
-
 
266
 
-
 
267
  public void setDeliveryTypeIsSet(boolean value) {
-
 
268
    if (!value) {
-
 
269
      this.deliveryType = null;
-
 
270
    }
-
 
271
  }
-
 
272
 
186
  public void setFieldValue(_Fields field, Object value) {
273
  public void setFieldValue(_Fields field, Object value) {
187
    switch (field) {
274
    switch (field) {
188
    case ACCOUNT_NO:
275
    case ACCOUNT_NO:
189
      if (value == null) {
276
      if (value == null) {
190
        unsetAccountNo();
277
        unsetAccountNo();
Line 199... Line 286...
199
      } else {
286
      } else {
200
        setEmail((String)value);
287
        setEmail((String)value);
201
      }
288
      }
202
      break;
289
      break;
203
 
290
 
-
 
291
    case LOGISTIC_LOCATION:
-
 
292
      if (value == null) {
-
 
293
        unsetLogisticLocation();
-
 
294
      } else {
-
 
295
        setLogisticLocation((Long)value);
-
 
296
      }
-
 
297
      break;
-
 
298
 
-
 
299
    case DELIVERY_TYPE:
-
 
300
      if (value == null) {
-
 
301
        unsetDeliveryType();
-
 
302
      } else {
-
 
303
        setDeliveryType((DeliveryType)value);
-
 
304
      }
-
 
305
      break;
-
 
306
 
204
    }
307
    }
205
  }
308
  }
206
 
309
 
207
  public Object getFieldValue(_Fields field) {
310
  public Object getFieldValue(_Fields field) {
208
    switch (field) {
311
    switch (field) {
Line 210... Line 313...
210
      return getAccountNo();
313
      return getAccountNo();
211
 
314
 
212
    case EMAIL:
315
    case EMAIL:
213
      return getEmail();
316
      return getEmail();
214
 
317
 
-
 
318
    case LOGISTIC_LOCATION:
-
 
319
      return Long.valueOf(getLogisticLocation());
-
 
320
 
-
 
321
    case DELIVERY_TYPE:
-
 
322
      return getDeliveryType();
-
 
323
 
215
    }
324
    }
216
    throw new IllegalStateException();
325
    throw new IllegalStateException();
217
  }
326
  }
218
 
327
 
219
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
328
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 225... Line 334...
225
    switch (field) {
334
    switch (field) {
226
    case ACCOUNT_NO:
335
    case ACCOUNT_NO:
227
      return isSetAccountNo();
336
      return isSetAccountNo();
228
    case EMAIL:
337
    case EMAIL:
229
      return isSetEmail();
338
      return isSetEmail();
-
 
339
    case LOGISTIC_LOCATION:
-
 
340
      return isSetLogisticLocation();
-
 
341
    case DELIVERY_TYPE:
-
 
342
      return isSetDeliveryType();
230
    }
343
    }
231
    throw new IllegalStateException();
344
    throw new IllegalStateException();
232
  }
345
  }
233
 
346
 
234
  @Override
347
  @Override
Line 260... Line 373...
260
        return false;
373
        return false;
261
      if (!this.email.equals(that.email))
374
      if (!this.email.equals(that.email))
262
        return false;
375
        return false;
263
    }
376
    }
264
 
377
 
-
 
378
    boolean this_present_logisticLocation = true;
-
 
379
    boolean that_present_logisticLocation = true;
-
 
380
    if (this_present_logisticLocation || that_present_logisticLocation) {
-
 
381
      if (!(this_present_logisticLocation && that_present_logisticLocation))
-
 
382
        return false;
-
 
383
      if (this.logisticLocation != that.logisticLocation)
-
 
384
        return false;
-
 
385
    }
-
 
386
 
-
 
387
    boolean this_present_deliveryType = true && this.isSetDeliveryType();
-
 
388
    boolean that_present_deliveryType = true && that.isSetDeliveryType();
-
 
389
    if (this_present_deliveryType || that_present_deliveryType) {
-
 
390
      if (!(this_present_deliveryType && that_present_deliveryType))
-
 
391
        return false;
-
 
392
      if (!this.deliveryType.equals(that.deliveryType))
-
 
393
        return false;
-
 
394
    }
-
 
395
 
265
    return true;
396
    return true;
266
  }
397
  }
267
 
398
 
268
  @Override
399
  @Override
269
  public int hashCode() {
400
  public int hashCode() {
Line 296... Line 427...
296
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
427
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
297
      if (lastComparison != 0) {
428
      if (lastComparison != 0) {
298
        return lastComparison;
429
        return lastComparison;
299
      }
430
      }
300
    }
431
    }
-
 
432
    lastComparison = Boolean.valueOf(isSetLogisticLocation()).compareTo(typedOther.isSetLogisticLocation());
-
 
433
    if (lastComparison != 0) {
-
 
434
      return lastComparison;
-
 
435
    }
-
 
436
    if (isSetLogisticLocation()) {
-
 
437
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logisticLocation, typedOther.logisticLocation);
-
 
438
      if (lastComparison != 0) {
-
 
439
        return lastComparison;
-
 
440
      }
-
 
441
    }
-
 
442
    lastComparison = Boolean.valueOf(isSetDeliveryType()).compareTo(typedOther.isSetDeliveryType());
-
 
443
    if (lastComparison != 0) {
-
 
444
      return lastComparison;
-
 
445
    }
-
 
446
    if (isSetDeliveryType()) {
-
 
447
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deliveryType, typedOther.deliveryType);
-
 
448
      if (lastComparison != 0) {
-
 
449
        return lastComparison;
-
 
450
      }
-
 
451
    }
301
    return 0;
452
    return 0;
302
  }
453
  }
303
 
454
 
304
  public _Fields fieldForId(int fieldId) {
455
  public _Fields fieldForId(int fieldId) {
305
    return _Fields.findByThriftId(fieldId);
456
    return _Fields.findByThriftId(fieldId);
Line 327... Line 478...
327
            this.email = iprot.readString();
478
            this.email = iprot.readString();
328
          } else { 
479
          } else { 
329
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
480
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
330
          }
481
          }
331
          break;
482
          break;
-
 
483
        case 3: // LOGISTIC_LOCATION
-
 
484
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
485
            this.logisticLocation = iprot.readI64();
-
 
486
            setLogisticLocationIsSet(true);
-
 
487
          } else { 
-
 
488
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
489
          }
-
 
490
          break;
-
 
491
        case 4: // DELIVERY_TYPE
-
 
492
          if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
493
            this.deliveryType = DeliveryType.findByValue(iprot.readI32());
-
 
494
          } else { 
-
 
495
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
496
          }
-
 
497
          break;
332
        default:
498
        default:
333
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
499
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
334
      }
500
      }
335
      iprot.readFieldEnd();
501
      iprot.readFieldEnd();
336
    }
502
    }
Line 350... Line 516...
350
    if (this.email != null) {
516
    if (this.email != null) {
351
      oprot.writeFieldBegin(EMAIL_FIELD_DESC);
517
      oprot.writeFieldBegin(EMAIL_FIELD_DESC);
352
      oprot.writeString(this.email);
518
      oprot.writeString(this.email);
353
      oprot.writeFieldEnd();
519
      oprot.writeFieldEnd();
354
    }
520
    }
-
 
521
    oprot.writeFieldBegin(LOGISTIC_LOCATION_FIELD_DESC);
-
 
522
    oprot.writeI64(this.logisticLocation);
-
 
523
    oprot.writeFieldEnd();
-
 
524
    if (this.deliveryType != null) {
-
 
525
      oprot.writeFieldBegin(DELIVERY_TYPE_FIELD_DESC);
-
 
526
      oprot.writeI32(this.deliveryType.getValue());
-
 
527
      oprot.writeFieldEnd();
-
 
528
    }
355
    oprot.writeFieldStop();
529
    oprot.writeFieldStop();
356
    oprot.writeStructEnd();
530
    oprot.writeStructEnd();
357
  }
531
  }
358
 
532
 
359
  @Override
533
  @Override
Line 374... Line 548...
374
      sb.append("null");
548
      sb.append("null");
375
    } else {
549
    } else {
376
      sb.append(this.email);
550
      sb.append(this.email);
377
    }
551
    }
378
    first = false;
552
    first = false;
-
 
553
    if (!first) sb.append(", ");
-
 
554
    sb.append("logisticLocation:");
-
 
555
    sb.append(this.logisticLocation);
-
 
556
    first = false;
-
 
557
    if (!first) sb.append(", ");
-
 
558
    sb.append("deliveryType:");
-
 
559
    if (this.deliveryType == null) {
-
 
560
      sb.append("null");
-
 
561
    } else {
-
 
562
      sb.append(this.deliveryType);
-
 
563
    }
-
 
564
    first = false;
379
    sb.append(")");
565
    sb.append(")");
380
    return sb.toString();
566
    return sb.toString();
381
  }
567
  }
382
 
568
 
383
  public void validate() throws org.apache.thrift.TException {
569
  public void validate() throws org.apache.thrift.TException {
Line 392... Line 578...
392
    }
578
    }
393
  }
579
  }
394
 
580
 
395
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
581
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
396
    try {
582
    try {
-
 
583
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
584
      __isset_bit_vector = new BitSet(1);
397
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
585
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
398
    } catch (org.apache.thrift.TException te) {
586
    } catch (org.apache.thrift.TException te) {
399
      throw new java.io.IOException(te);
587
      throw new java.io.IOException(te);
400
    }
588
    }
401
  }
589
  }