Subversion Repositories SmartDukaan

Rev

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

Rev 6903 Rev 7190
Line 89... Line 89...
89
  private static final org.apache.thrift.protocol.TField COURIER_DELIVERY_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("courier_delivery_time", org.apache.thrift.protocol.TType.I64, (short)64);
89
  private static final org.apache.thrift.protocol.TField COURIER_DELIVERY_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("courier_delivery_time", org.apache.thrift.protocol.TType.I64, (short)64);
90
  private static final org.apache.thrift.protocol.TField INSURER_FIELD_DESC = new org.apache.thrift.protocol.TField("insurer", org.apache.thrift.protocol.TType.I64, (short)65);
90
  private static final org.apache.thrift.protocol.TField INSURER_FIELD_DESC = new org.apache.thrift.protocol.TField("insurer", org.apache.thrift.protocol.TType.I64, (short)65);
91
  private static final org.apache.thrift.protocol.TField INSURANCE_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("insuranceAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)66);
91
  private static final org.apache.thrift.protocol.TField INSURANCE_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("insuranceAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)66);
92
  private static final org.apache.thrift.protocol.TField DOB_FIELD_DESC = new org.apache.thrift.protocol.TField("dob", org.apache.thrift.protocol.TType.STRING, (short)67);
92
  private static final org.apache.thrift.protocol.TField DOB_FIELD_DESC = new org.apache.thrift.protocol.TField("dob", org.apache.thrift.protocol.TType.STRING, (short)67);
93
  private static final org.apache.thrift.protocol.TField GUARDIAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("guardianName", org.apache.thrift.protocol.TType.STRING, (short)68);
93
  private static final org.apache.thrift.protocol.TField GUARDIAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("guardianName", org.apache.thrift.protocol.TType.STRING, (short)68);
-
 
94
  private static final org.apache.thrift.protocol.TField FREEBIE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieItemId", org.apache.thrift.protocol.TType.I64, (short)69);
94
 
95
 
95
  private long id; // required
96
  private long id; // required
96
  private long warehouse_id; // required
97
  private long warehouse_id; // required
97
  private List<LineItem> lineitems; // required
98
  private List<LineItem> lineitems; // required
98
  private long logistics_provider_id; // required
99
  private long logistics_provider_id; // required
Line 158... Line 159...
158
  private long courier_delivery_time; // required
159
  private long courier_delivery_time; // required
159
  private long insurer; // required
160
  private long insurer; // required
160
  private double insuranceAmount; // required
161
  private double insuranceAmount; // required
161
  private String dob; // required
162
  private String dob; // required
162
  private String guardianName; // required
163
  private String guardianName; // required
-
 
164
  private long freebieItemId; // required
163
 
165
 
164
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
166
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
165
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
167
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
166
    ID((short)1, "id"),
168
    ID((short)1, "id"),
167
    WAREHOUSE_ID((short)2, "warehouse_id"),
169
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 266... Line 268...
266
    OTG((short)63, "otg"),
268
    OTG((short)63, "otg"),
267
    COURIER_DELIVERY_TIME((short)64, "courier_delivery_time"),
269
    COURIER_DELIVERY_TIME((short)64, "courier_delivery_time"),
268
    INSURER((short)65, "insurer"),
270
    INSURER((short)65, "insurer"),
269
    INSURANCE_AMOUNT((short)66, "insuranceAmount"),
271
    INSURANCE_AMOUNT((short)66, "insuranceAmount"),
270
    DOB((short)67, "dob"),
272
    DOB((short)67, "dob"),
271
    GUARDIAN_NAME((short)68, "guardianName");
273
    GUARDIAN_NAME((short)68, "guardianName"),
-
 
274
    FREEBIE_ITEM_ID((short)69, "freebieItemId");
272
 
275
 
273
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
276
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
274
 
277
 
275
    static {
278
    static {
276
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
279
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 417... Line 420...
417
          return INSURANCE_AMOUNT;
420
          return INSURANCE_AMOUNT;
418
        case 67: // DOB
421
        case 67: // DOB
419
          return DOB;
422
          return DOB;
420
        case 68: // GUARDIAN_NAME
423
        case 68: // GUARDIAN_NAME
421
          return GUARDIAN_NAME;
424
          return GUARDIAN_NAME;
-
 
425
        case 69: // FREEBIE_ITEM_ID
-
 
426
          return FREEBIE_ITEM_ID;
422
        default:
427
        default:
423
          return null;
428
          return null;
424
      }
429
      }
425
    }
430
    }
426
 
431
 
Line 500... Line 505...
500
  private static final int __GVAMOUNT_ISSET_ID = 38;
505
  private static final int __GVAMOUNT_ISSET_ID = 38;
501
  private static final int __OTG_ISSET_ID = 39;
506
  private static final int __OTG_ISSET_ID = 39;
502
  private static final int __COURIER_DELIVERY_TIME_ISSET_ID = 40;
507
  private static final int __COURIER_DELIVERY_TIME_ISSET_ID = 40;
503
  private static final int __INSURER_ISSET_ID = 41;
508
  private static final int __INSURER_ISSET_ID = 41;
504
  private static final int __INSURANCEAMOUNT_ISSET_ID = 42;
509
  private static final int __INSURANCEAMOUNT_ISSET_ID = 42;
-
 
510
  private static final int __FREEBIEITEMID_ISSET_ID = 43;
505
  private BitSet __isset_bit_vector = new BitSet(43);
511
  private BitSet __isset_bit_vector = new BitSet(44);
506
 
512
 
507
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
513
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
508
  static {
514
  static {
509
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
515
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
510
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
516
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 642... Line 648...
642
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
648
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
643
    tmpMap.put(_Fields.DOB, new org.apache.thrift.meta_data.FieldMetaData("dob", org.apache.thrift.TFieldRequirementType.DEFAULT, 
649
    tmpMap.put(_Fields.DOB, new org.apache.thrift.meta_data.FieldMetaData("dob", org.apache.thrift.TFieldRequirementType.DEFAULT, 
644
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
650
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
645
    tmpMap.put(_Fields.GUARDIAN_NAME, new org.apache.thrift.meta_data.FieldMetaData("guardianName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
651
    tmpMap.put(_Fields.GUARDIAN_NAME, new org.apache.thrift.meta_data.FieldMetaData("guardianName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
646
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
652
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
653
    tmpMap.put(_Fields.FREEBIE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
654
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
647
    metaDataMap = Collections.unmodifiableMap(tmpMap);
655
    metaDataMap = Collections.unmodifiableMap(tmpMap);
648
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
656
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
649
  }
657
  }
650
 
658
 
651
  public Order() {
659
  public Order() {
Line 710... Line 718...
710
    boolean otg,
718
    boolean otg,
711
    long courier_delivery_time,
719
    long courier_delivery_time,
712
    long insurer,
720
    long insurer,
713
    double insuranceAmount,
721
    double insuranceAmount,
714
    String dob,
722
    String dob,
715
    String guardianName)
723
    String guardianName,
-
 
724
    long freebieItemId)
716
  {
725
  {
717
    this();
726
    this();
718
    this.id = id;
727
    this.id = id;
719
    setIdIsSet(true);
728
    setIdIsSet(true);
720
    this.warehouse_id = warehouse_id;
729
    this.warehouse_id = warehouse_id;
Line 810... Line 819...
810
    setInsurerIsSet(true);
819
    setInsurerIsSet(true);
811
    this.insuranceAmount = insuranceAmount;
820
    this.insuranceAmount = insuranceAmount;
812
    setInsuranceAmountIsSet(true);
821
    setInsuranceAmountIsSet(true);
813
    this.dob = dob;
822
    this.dob = dob;
814
    this.guardianName = guardianName;
823
    this.guardianName = guardianName;
-
 
824
    this.freebieItemId = freebieItemId;
-
 
825
    setFreebieItemIdIsSet(true);
815
  }
826
  }
816
 
827
 
817
  /**
828
  /**
818
   * Performs a deep copy on <i>other</i>.
829
   * Performs a deep copy on <i>other</i>.
819
   */
830
   */
Line 940... Line 951...
940
      this.dob = other.dob;
951
      this.dob = other.dob;
941
    }
952
    }
942
    if (other.isSetGuardianName()) {
953
    if (other.isSetGuardianName()) {
943
      this.guardianName = other.guardianName;
954
      this.guardianName = other.guardianName;
944
    }
955
    }
-
 
956
    this.freebieItemId = other.freebieItemId;
945
  }
957
  }
946
 
958
 
947
  public Order deepCopy() {
959
  public Order deepCopy() {
948
    return new Order(this);
960
    return new Order(this);
949
  }
961
  }
Line 1059... Line 1071...
1059
    this.insurer = 0;
1071
    this.insurer = 0;
1060
    setInsuranceAmountIsSet(false);
1072
    setInsuranceAmountIsSet(false);
1061
    this.insuranceAmount = 0.0;
1073
    this.insuranceAmount = 0.0;
1062
    this.dob = null;
1074
    this.dob = null;
1063
    this.guardianName = null;
1075
    this.guardianName = null;
-
 
1076
    setFreebieItemIdIsSet(false);
-
 
1077
    this.freebieItemId = 0;
1064
  }
1078
  }
1065
 
1079
 
1066
  public long getId() {
1080
  public long getId() {
1067
    return this.id;
1081
    return this.id;
1068
  }
1082
  }
Line 2673... Line 2687...
2673
    if (!value) {
2687
    if (!value) {
2674
      this.guardianName = null;
2688
      this.guardianName = null;
2675
    }
2689
    }
2676
  }
2690
  }
2677
 
2691
 
-
 
2692
  public long getFreebieItemId() {
-
 
2693
    return this.freebieItemId;
-
 
2694
  }
-
 
2695
 
-
 
2696
  public void setFreebieItemId(long freebieItemId) {
-
 
2697
    this.freebieItemId = freebieItemId;
-
 
2698
    setFreebieItemIdIsSet(true);
-
 
2699
  }
-
 
2700
 
-
 
2701
  public void unsetFreebieItemId() {
-
 
2702
    __isset_bit_vector.clear(__FREEBIEITEMID_ISSET_ID);
-
 
2703
  }
-
 
2704
 
-
 
2705
  /** Returns true if field freebieItemId is set (has been assigned a value) and false otherwise */
-
 
2706
  public boolean isSetFreebieItemId() {
-
 
2707
    return __isset_bit_vector.get(__FREEBIEITEMID_ISSET_ID);
-
 
2708
  }
-
 
2709
 
-
 
2710
  public void setFreebieItemIdIsSet(boolean value) {
-
 
2711
    __isset_bit_vector.set(__FREEBIEITEMID_ISSET_ID, value);
-
 
2712
  }
-
 
2713
 
2678
  public void setFieldValue(_Fields field, Object value) {
2714
  public void setFieldValue(_Fields field, Object value) {
2679
    switch (field) {
2715
    switch (field) {
2680
    case ID:
2716
    case ID:
2681
      if (value == null) {
2717
      if (value == null) {
2682
        unsetId();
2718
        unsetId();
Line 3219... Line 3255...
3219
      } else {
3255
      } else {
3220
        setGuardianName((String)value);
3256
        setGuardianName((String)value);
3221
      }
3257
      }
3222
      break;
3258
      break;
3223
 
3259
 
-
 
3260
    case FREEBIE_ITEM_ID:
-
 
3261
      if (value == null) {
-
 
3262
        unsetFreebieItemId();
-
 
3263
      } else {
-
 
3264
        setFreebieItemId((Long)value);
-
 
3265
      }
-
 
3266
      break;
-
 
3267
 
3224
    }
3268
    }
3225
  }
3269
  }
3226
 
3270
 
3227
  public Object getFieldValue(_Fields field) {
3271
  public Object getFieldValue(_Fields field) {
3228
    switch (field) {
3272
    switch (field) {
Line 3428... Line 3472...
3428
      return getDob();
3472
      return getDob();
3429
 
3473
 
3430
    case GUARDIAN_NAME:
3474
    case GUARDIAN_NAME:
3431
      return getGuardianName();
3475
      return getGuardianName();
3432
 
3476
 
-
 
3477
    case FREEBIE_ITEM_ID:
-
 
3478
      return Long.valueOf(getFreebieItemId());
-
 
3479
 
3433
    }
3480
    }
3434
    throw new IllegalStateException();
3481
    throw new IllegalStateException();
3435
  }
3482
  }
3436
 
3483
 
3437
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3484
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 3575... Line 3622...
3575
      return isSetInsuranceAmount();
3622
      return isSetInsuranceAmount();
3576
    case DOB:
3623
    case DOB:
3577
      return isSetDob();
3624
      return isSetDob();
3578
    case GUARDIAN_NAME:
3625
    case GUARDIAN_NAME:
3579
      return isSetGuardianName();
3626
      return isSetGuardianName();
-
 
3627
    case FREEBIE_ITEM_ID:
-
 
3628
      return isSetFreebieItemId();
3580
    }
3629
    }
3581
    throw new IllegalStateException();
3630
    throw new IllegalStateException();
3582
  }
3631
  }
3583
 
3632
 
3584
  @Override
3633
  @Override
Line 4204... Line 4253...
4204
        return false;
4253
        return false;
4205
      if (!this.guardianName.equals(that.guardianName))
4254
      if (!this.guardianName.equals(that.guardianName))
4206
        return false;
4255
        return false;
4207
    }
4256
    }
4208
 
4257
 
-
 
4258
    boolean this_present_freebieItemId = true;
-
 
4259
    boolean that_present_freebieItemId = true;
-
 
4260
    if (this_present_freebieItemId || that_present_freebieItemId) {
-
 
4261
      if (!(this_present_freebieItemId && that_present_freebieItemId))
-
 
4262
        return false;
-
 
4263
      if (this.freebieItemId != that.freebieItemId)
-
 
4264
        return false;
-
 
4265
    }
-
 
4266
 
4209
    return true;
4267
    return true;
4210
  }
4268
  }
4211
 
4269
 
4212
  @Override
4270
  @Override
4213
  public int hashCode() {
4271
  public int hashCode() {
Line 4900... Line 4958...
4900
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guardianName, typedOther.guardianName);
4958
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guardianName, typedOther.guardianName);
4901
      if (lastComparison != 0) {
4959
      if (lastComparison != 0) {
4902
        return lastComparison;
4960
        return lastComparison;
4903
      }
4961
      }
4904
    }
4962
    }
-
 
4963
    lastComparison = Boolean.valueOf(isSetFreebieItemId()).compareTo(typedOther.isSetFreebieItemId());
-
 
4964
    if (lastComparison != 0) {
-
 
4965
      return lastComparison;
-
 
4966
    }
-
 
4967
    if (isSetFreebieItemId()) {
-
 
4968
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieItemId, typedOther.freebieItemId);
-
 
4969
      if (lastComparison != 0) {
-
 
4970
        return lastComparison;
-
 
4971
      }
-
 
4972
    }
4905
    return 0;
4973
    return 0;
4906
  }
4974
  }
4907
 
4975
 
4908
  public _Fields fieldForId(int fieldId) {
4976
  public _Fields fieldForId(int fieldId) {
4909
    return _Fields.findByThriftId(fieldId);
4977
    return _Fields.findByThriftId(fieldId);
Line 5447... Line 5515...
5447
            this.guardianName = iprot.readString();
5515
            this.guardianName = iprot.readString();
5448
          } else { 
5516
          } else { 
5449
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5517
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5450
          }
5518
          }
5451
          break;
5519
          break;
-
 
5520
        case 69: // FREEBIE_ITEM_ID
-
 
5521
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
5522
            this.freebieItemId = iprot.readI64();
-
 
5523
            setFreebieItemIdIsSet(true);
-
 
5524
          } else { 
-
 
5525
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
5526
          }
-
 
5527
          break;
5452
        default:
5528
        default:
5453
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5529
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5454
      }
5530
      }
5455
      iprot.readFieldEnd();
5531
      iprot.readFieldEnd();
5456
    }
5532
    }
Line 5735... Line 5811...
5735
    if (this.guardianName != null) {
5811
    if (this.guardianName != null) {
5736
      oprot.writeFieldBegin(GUARDIAN_NAME_FIELD_DESC);
5812
      oprot.writeFieldBegin(GUARDIAN_NAME_FIELD_DESC);
5737
      oprot.writeString(this.guardianName);
5813
      oprot.writeString(this.guardianName);
5738
      oprot.writeFieldEnd();
5814
      oprot.writeFieldEnd();
5739
    }
5815
    }
-
 
5816
    oprot.writeFieldBegin(FREEBIE_ITEM_ID_FIELD_DESC);
-
 
5817
    oprot.writeI64(this.freebieItemId);
-
 
5818
    oprot.writeFieldEnd();
5740
    oprot.writeFieldStop();
5819
    oprot.writeFieldStop();
5741
    oprot.writeStructEnd();
5820
    oprot.writeStructEnd();
5742
  }
5821
  }
5743
 
5822
 
5744
  @Override
5823
  @Override
Line 6129... Line 6208...
6129
      sb.append("null");
6208
      sb.append("null");
6130
    } else {
6209
    } else {
6131
      sb.append(this.guardianName);
6210
      sb.append(this.guardianName);
6132
    }
6211
    }
6133
    first = false;
6212
    first = false;
-
 
6213
    if (!first) sb.append(", ");
-
 
6214
    sb.append("freebieItemId:");
-
 
6215
    sb.append(this.freebieItemId);
-
 
6216
    first = false;
6134
    sb.append(")");
6217
    sb.append(")");
6135
    return sb.toString();
6218
    return sb.toString();
6136
  }
6219
  }
6137
 
6220
 
6138
  public void validate() throws org.apache.thrift.TException {
6221
  public void validate() throws org.apache.thrift.TException {