Subversion Repositories SmartDukaan

Rev

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

Rev 3430 Rev 4009
Line 25... Line 25...
25
 
25
 
26
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)2);
27
  private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField DELIVERY_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("deliveryTime", org.apache.thrift.protocol.TType.I64, (short)3);
28
  private static final org.apache.thrift.protocol.TField DELIVERY_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("deliveryTime", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField AIRWAY_BILLNO_FIELD_DESC = new org.apache.thrift.protocol.TField("airway_billno", org.apache.thrift.protocol.TType.STRING, (short)4);
29
  private static final org.apache.thrift.protocol.TField AIRWAY_BILLNO_FIELD_DESC = new org.apache.thrift.protocol.TField("airway_billno", org.apache.thrift.protocol.TType.STRING, (short)4);
-
 
30
  private static final org.apache.thrift.protocol.TField SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingTime", org.apache.thrift.protocol.TType.I64, (short)5);
30
 
31
 
31
  private long warehouseId; // required
32
  private long warehouseId; // required
32
  private long providerId; // required
33
  private long providerId; // required
33
  private long deliveryTime; // required
34
  private long deliveryTime; // required
34
  private String airway_billno; // required
35
  private String airway_billno; // required
-
 
36
  private long shippingTime; // 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
    WAREHOUSE_ID((short)1, "warehouseId"),
40
    WAREHOUSE_ID((short)1, "warehouseId"),
39
    PROVIDER_ID((short)2, "providerId"),
41
    PROVIDER_ID((short)2, "providerId"),
40
    DELIVERY_TIME((short)3, "deliveryTime"),
42
    DELIVERY_TIME((short)3, "deliveryTime"),
41
    AIRWAY_BILLNO((short)4, "airway_billno");
43
    AIRWAY_BILLNO((short)4, "airway_billno"),
-
 
44
    SHIPPING_TIME((short)5, "shippingTime");
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 PROVIDER_ID;
62
          return PROVIDER_ID;
60
        case 3: // DELIVERY_TIME
63
        case 3: // DELIVERY_TIME
61
          return DELIVERY_TIME;
64
          return DELIVERY_TIME;
62
        case 4: // AIRWAY_BILLNO
65
        case 4: // AIRWAY_BILLNO
63
          return AIRWAY_BILLNO;
66
          return AIRWAY_BILLNO;
-
 
67
        case 5: // SHIPPING_TIME
-
 
68
          return SHIPPING_TIME;
64
        default:
69
        default:
65
          return null;
70
          return null;
66
      }
71
      }
67
    }
72
    }
68
 
73
 
Line 102... Line 107...
102
 
107
 
103
  // isset id assignments
108
  // isset id assignments
104
  private static final int __WAREHOUSEID_ISSET_ID = 0;
109
  private static final int __WAREHOUSEID_ISSET_ID = 0;
105
  private static final int __PROVIDERID_ISSET_ID = 1;
110
  private static final int __PROVIDERID_ISSET_ID = 1;
106
  private static final int __DELIVERYTIME_ISSET_ID = 2;
111
  private static final int __DELIVERYTIME_ISSET_ID = 2;
-
 
112
  private static final int __SHIPPINGTIME_ISSET_ID = 3;
107
  private BitSet __isset_bit_vector = new BitSet(3);
113
  private BitSet __isset_bit_vector = new BitSet(4);
108
 
114
 
109
  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;
110
  static {
116
  static {
111
    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);
112
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
118
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 115... Line 121...
115
        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)));
116
    tmpMap.put(_Fields.DELIVERY_TIME, new org.apache.thrift.meta_data.FieldMetaData("deliveryTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
122
    tmpMap.put(_Fields.DELIVERY_TIME, new org.apache.thrift.meta_data.FieldMetaData("deliveryTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
117
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
123
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
118
    tmpMap.put(_Fields.AIRWAY_BILLNO, new org.apache.thrift.meta_data.FieldMetaData("airway_billno", org.apache.thrift.TFieldRequirementType.DEFAULT, 
124
    tmpMap.put(_Fields.AIRWAY_BILLNO, new org.apache.thrift.meta_data.FieldMetaData("airway_billno", org.apache.thrift.TFieldRequirementType.DEFAULT, 
119
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
126
    tmpMap.put(_Fields.SHIPPING_TIME, new org.apache.thrift.meta_data.FieldMetaData("shippingTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
120
    metaDataMap = Collections.unmodifiableMap(tmpMap);
128
    metaDataMap = Collections.unmodifiableMap(tmpMap);
121
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogisticsInfo.class, metaDataMap);
129
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogisticsInfo.class, metaDataMap);
122
  }
130
  }
123
 
131
 
124
  public LogisticsInfo() {
132
  public LogisticsInfo() {
Line 126... Line 134...
126
 
134
 
127
  public LogisticsInfo(
135
  public LogisticsInfo(
128
    long warehouseId,
136
    long warehouseId,
129
    long providerId,
137
    long providerId,
130
    long deliveryTime,
138
    long deliveryTime,
131
    String airway_billno)
139
    String airway_billno,
-
 
140
    long shippingTime)
132
  {
141
  {
133
    this();
142
    this();
134
    this.warehouseId = warehouseId;
143
    this.warehouseId = warehouseId;
135
    setWarehouseIdIsSet(true);
144
    setWarehouseIdIsSet(true);
136
    this.providerId = providerId;
145
    this.providerId = providerId;
137
    setProviderIdIsSet(true);
146
    setProviderIdIsSet(true);
138
    this.deliveryTime = deliveryTime;
147
    this.deliveryTime = deliveryTime;
139
    setDeliveryTimeIsSet(true);
148
    setDeliveryTimeIsSet(true);
140
    this.airway_billno = airway_billno;
149
    this.airway_billno = airway_billno;
-
 
150
    this.shippingTime = shippingTime;
-
 
151
    setShippingTimeIsSet(true);
141
  }
152
  }
142
 
153
 
143
  /**
154
  /**
144
   * Performs a deep copy on <i>other</i>.
155
   * Performs a deep copy on <i>other</i>.
145
   */
156
   */
Line 150... Line 161...
150
    this.providerId = other.providerId;
161
    this.providerId = other.providerId;
151
    this.deliveryTime = other.deliveryTime;
162
    this.deliveryTime = other.deliveryTime;
152
    if (other.isSetAirway_billno()) {
163
    if (other.isSetAirway_billno()) {
153
      this.airway_billno = other.airway_billno;
164
      this.airway_billno = other.airway_billno;
154
    }
165
    }
-
 
166
    this.shippingTime = other.shippingTime;
155
  }
167
  }
156
 
168
 
157
  public LogisticsInfo deepCopy() {
169
  public LogisticsInfo deepCopy() {
158
    return new LogisticsInfo(this);
170
    return new LogisticsInfo(this);
159
  }
171
  }
Line 165... Line 177...
165
    setProviderIdIsSet(false);
177
    setProviderIdIsSet(false);
166
    this.providerId = 0;
178
    this.providerId = 0;
167
    setDeliveryTimeIsSet(false);
179
    setDeliveryTimeIsSet(false);
168
    this.deliveryTime = 0;
180
    this.deliveryTime = 0;
169
    this.airway_billno = null;
181
    this.airway_billno = null;
-
 
182
    setShippingTimeIsSet(false);
-
 
183
    this.shippingTime = 0;
170
  }
184
  }
171
 
185
 
172
  public long getWarehouseId() {
186
  public long getWarehouseId() {
173
    return this.warehouseId;
187
    return this.warehouseId;
174
  }
188
  }
Line 256... Line 270...
256
    if (!value) {
270
    if (!value) {
257
      this.airway_billno = null;
271
      this.airway_billno = null;
258
    }
272
    }
259
  }
273
  }
260
 
274
 
-
 
275
  public long getShippingTime() {
-
 
276
    return this.shippingTime;
-
 
277
  }
-
 
278
 
-
 
279
  public void setShippingTime(long shippingTime) {
-
 
280
    this.shippingTime = shippingTime;
-
 
281
    setShippingTimeIsSet(true);
-
 
282
  }
-
 
283
 
-
 
284
  public void unsetShippingTime() {
-
 
285
    __isset_bit_vector.clear(__SHIPPINGTIME_ISSET_ID);
-
 
286
  }
-
 
287
 
-
 
288
  /** Returns true if field shippingTime is set (has been assigned a value) and false otherwise */
-
 
289
  public boolean isSetShippingTime() {
-
 
290
    return __isset_bit_vector.get(__SHIPPINGTIME_ISSET_ID);
-
 
291
  }
-
 
292
 
-
 
293
  public void setShippingTimeIsSet(boolean value) {
-
 
294
    __isset_bit_vector.set(__SHIPPINGTIME_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 WAREHOUSE_ID:
299
    case WAREHOUSE_ID:
264
      if (value == null) {
300
      if (value == null) {
265
        unsetWarehouseId();
301
        unsetWarehouseId();
Line 290... Line 326...
290
      } else {
326
      } else {
291
        setAirway_billno((String)value);
327
        setAirway_billno((String)value);
292
      }
328
      }
293
      break;
329
      break;
294
 
330
 
-
 
331
    case SHIPPING_TIME:
-
 
332
      if (value == null) {
-
 
333
        unsetShippingTime();
-
 
334
      } else {
-
 
335
        setShippingTime((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 Long.valueOf(getDeliveryTime());
351
      return Long.valueOf(getDeliveryTime());
308
 
352
 
309
    case AIRWAY_BILLNO:
353
    case AIRWAY_BILLNO:
310
      return getAirway_billno();
354
      return getAirway_billno();
311
 
355
 
-
 
356
    case SHIPPING_TIME:
-
 
357
      return Long.valueOf(getShippingTime());
-
 
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 isSetProviderId();
373
      return isSetProviderId();
327
    case DELIVERY_TIME:
374
    case DELIVERY_TIME:
328
      return isSetDeliveryTime();
375
      return isSetDeliveryTime();
329
    case AIRWAY_BILLNO:
376
    case AIRWAY_BILLNO:
330
      return isSetAirway_billno();
377
      return isSetAirway_billno();
-
 
378
    case SHIPPING_TIME:
-
 
379
      return isSetShippingTime();
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.airway_billno.equals(that.airway_billno))
429
      if (!this.airway_billno.equals(that.airway_billno))
381
        return false;
430
        return false;
382
    }
431
    }
383
 
432
 
-
 
433
    boolean this_present_shippingTime = true;
-
 
434
    boolean that_present_shippingTime = true;
-
 
435
    if (this_present_shippingTime || that_present_shippingTime) {
-
 
436
      if (!(this_present_shippingTime && that_present_shippingTime))
-
 
437
        return false;
-
 
438
      if (this.shippingTime != that.shippingTime)
-
 
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.airway_billno, typedOther.airway_billno);
493
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airway_billno, typedOther.airway_billno);
436
      if (lastComparison != 0) {
494
      if (lastComparison != 0) {
437
        return lastComparison;
495
        return lastComparison;
438
      }
496
      }
439
    }
497
    }
-
 
498
    lastComparison = Boolean.valueOf(isSetShippingTime()).compareTo(typedOther.isSetShippingTime());
-
 
499
    if (lastComparison != 0) {
-
 
500
      return lastComparison;
-
 
501
    }
-
 
502
    if (isSetShippingTime()) {
-
 
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingTime, typedOther.shippingTime);
-
 
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 483... Line 551...
483
            this.airway_billno = iprot.readString();
551
            this.airway_billno = iprot.readString();
484
          } else { 
552
          } else { 
485
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
553
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
486
          }
554
          }
487
          break;
555
          break;
-
 
556
        case 5: // SHIPPING_TIME
-
 
557
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
558
            this.shippingTime = iprot.readI64();
-
 
559
            setShippingTimeIsSet(true);
-
 
560
          } else { 
-
 
561
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
562
          }
-
 
563
          break;
488
        default:
564
        default:
489
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
565
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
490
      }
566
      }
491
      iprot.readFieldEnd();
567
      iprot.readFieldEnd();
492
    }
568
    }
Line 510... Line 586...
510
    if (this.airway_billno != null) {
586
    if (this.airway_billno != null) {
511
      oprot.writeFieldBegin(AIRWAY_BILLNO_FIELD_DESC);
587
      oprot.writeFieldBegin(AIRWAY_BILLNO_FIELD_DESC);
512
      oprot.writeString(this.airway_billno);
588
      oprot.writeString(this.airway_billno);
513
      oprot.writeFieldEnd();
589
      oprot.writeFieldEnd();
514
    }
590
    }
-
 
591
    oprot.writeFieldBegin(SHIPPING_TIME_FIELD_DESC);
-
 
592
    oprot.writeI64(this.shippingTime);
-
 
593
    oprot.writeFieldEnd();
515
    oprot.writeFieldStop();
594
    oprot.writeFieldStop();
516
    oprot.writeStructEnd();
595
    oprot.writeStructEnd();
517
  }
596
  }
518
 
597
 
519
  @Override
598
  @Override
Line 538... Line 617...
538
      sb.append("null");
617
      sb.append("null");
539
    } else {
618
    } else {
540
      sb.append(this.airway_billno);
619
      sb.append(this.airway_billno);
541
    }
620
    }
542
    first = false;
621
    first = false;
-
 
622
    if (!first) sb.append(", ");
-
 
623
    sb.append("shippingTime:");
-
 
624
    sb.append(this.shippingTime);
-
 
625
    first = false;
543
    sb.append(")");
626
    sb.append(")");
544
    return sb.toString();
627
    return sb.toString();
545
  }
628
  }
546
 
629
 
547
  public void validate() throws org.apache.thrift.TException {
630
  public void validate() throws org.apache.thrift.TException {