Subversion Repositories SmartDukaan

Rev

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

Rev 20873 Rev 21134
Line 104... Line 104...
104
  private static final org.apache.thrift.protocol.TField COD_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("codCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)79);
104
  private static final org.apache.thrift.protocol.TField COD_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("codCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)79);
105
  private static final org.apache.thrift.protocol.TField SELLER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("seller_id", org.apache.thrift.protocol.TType.I64, (short)80);
105
  private static final org.apache.thrift.protocol.TField SELLER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("seller_id", org.apache.thrift.protocol.TType.I64, (short)80);
106
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_address_id", org.apache.thrift.protocol.TType.I64, (short)81);
106
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_address_id", org.apache.thrift.protocol.TType.I64, (short)81);
107
  private static final org.apache.thrift.protocol.TField WALLET_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallet_amount", org.apache.thrift.protocol.TType.DOUBLE, (short)82);
107
  private static final org.apache.thrift.protocol.TField WALLET_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallet_amount", org.apache.thrift.protocol.TType.DOUBLE, (short)82);
108
  private static final org.apache.thrift.protocol.TField NET_PAYABLE_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("net_payable_amount", org.apache.thrift.protocol.TType.DOUBLE, (short)83);
108
  private static final org.apache.thrift.protocol.TField NET_PAYABLE_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("net_payable_amount", org.apache.thrift.protocol.TType.DOUBLE, (short)83);
-
 
109
  private static final org.apache.thrift.protocol.TField SHIPPING_REFUND_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingRefund", org.apache.thrift.protocol.TType.DOUBLE, (short)84);
109
 
110
 
110
  private long id; // required
111
  private long id; // required
111
  private long warehouse_id; // required
112
  private long warehouse_id; // required
112
  private List<LineItem> lineitems; // required
113
  private List<LineItem> lineitems; // required
113
  private long logistics_provider_id; // required
114
  private long logistics_provider_id; // required
Line 188... Line 189...
188
  private double codCharges; // required
189
  private double codCharges; // required
189
  private long seller_id; // required
190
  private long seller_id; // required
190
  private long warehouse_address_id; // required
191
  private long warehouse_address_id; // required
191
  private double wallet_amount; // required
192
  private double wallet_amount; // required
192
  private double net_payable_amount; // required
193
  private double net_payable_amount; // required
-
 
194
  private double shippingRefund; // required
193
 
195
 
194
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
196
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
195
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
197
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
196
    ID((short)1, "id"),
198
    ID((short)1, "id"),
197
    WAREHOUSE_ID((short)2, "warehouse_id"),
199
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 319... Line 321...
319
    SHIPPING_COST((short)78, "shippingCost"),
321
    SHIPPING_COST((short)78, "shippingCost"),
320
    COD_CHARGES((short)79, "codCharges"),
322
    COD_CHARGES((short)79, "codCharges"),
321
    SELLER_ID((short)80, "seller_id"),
323
    SELLER_ID((short)80, "seller_id"),
322
    WAREHOUSE_ADDRESS_ID((short)81, "warehouse_address_id"),
324
    WAREHOUSE_ADDRESS_ID((short)81, "warehouse_address_id"),
323
    WALLET_AMOUNT((short)82, "wallet_amount"),
325
    WALLET_AMOUNT((short)82, "wallet_amount"),
324
    NET_PAYABLE_AMOUNT((short)83, "net_payable_amount");
326
    NET_PAYABLE_AMOUNT((short)83, "net_payable_amount"),
-
 
327
    SHIPPING_REFUND((short)84, "shippingRefund");
325
 
328
 
326
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
329
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
327
 
330
 
328
    static {
331
    static {
329
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
332
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 500... Line 503...
500
          return WAREHOUSE_ADDRESS_ID;
503
          return WAREHOUSE_ADDRESS_ID;
501
        case 82: // WALLET_AMOUNT
504
        case 82: // WALLET_AMOUNT
502
          return WALLET_AMOUNT;
505
          return WALLET_AMOUNT;
503
        case 83: // NET_PAYABLE_AMOUNT
506
        case 83: // NET_PAYABLE_AMOUNT
504
          return NET_PAYABLE_AMOUNT;
507
          return NET_PAYABLE_AMOUNT;
-
 
508
        case 84: // SHIPPING_REFUND
-
 
509
          return SHIPPING_REFUND;
505
        default:
510
        default:
506
          return null;
511
          return null;
507
      }
512
      }
508
    }
513
    }
509
 
514
 
Line 595... Line 600...
595
  private static final int __CODCHARGES_ISSET_ID = 50;
600
  private static final int __CODCHARGES_ISSET_ID = 50;
596
  private static final int __SELLER_ID_ISSET_ID = 51;
601
  private static final int __SELLER_ID_ISSET_ID = 51;
597
  private static final int __WAREHOUSE_ADDRESS_ID_ISSET_ID = 52;
602
  private static final int __WAREHOUSE_ADDRESS_ID_ISSET_ID = 52;
598
  private static final int __WALLET_AMOUNT_ISSET_ID = 53;
603
  private static final int __WALLET_AMOUNT_ISSET_ID = 53;
599
  private static final int __NET_PAYABLE_AMOUNT_ISSET_ID = 54;
604
  private static final int __NET_PAYABLE_AMOUNT_ISSET_ID = 54;
-
 
605
  private static final int __SHIPPINGREFUND_ISSET_ID = 55;
600
  private BitSet __isset_bit_vector = new BitSet(55);
606
  private BitSet __isset_bit_vector = new BitSet(56);
601
 
607
 
602
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
608
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
603
  static {
609
  static {
604
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
610
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
605
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
611
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 767... Line 773...
767
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
773
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
768
    tmpMap.put(_Fields.WALLET_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("wallet_amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
774
    tmpMap.put(_Fields.WALLET_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("wallet_amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
769
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
775
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
770
    tmpMap.put(_Fields.NET_PAYABLE_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("net_payable_amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
776
    tmpMap.put(_Fields.NET_PAYABLE_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("net_payable_amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
771
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
777
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
778
    tmpMap.put(_Fields.SHIPPING_REFUND, new org.apache.thrift.meta_data.FieldMetaData("shippingRefund", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
779
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
772
    metaDataMap = Collections.unmodifiableMap(tmpMap);
780
    metaDataMap = Collections.unmodifiableMap(tmpMap);
773
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
781
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
774
  }
782
  }
775
 
783
 
776
  public Order() {
784
  public Order() {
Line 850... Line 858...
850
    double shippingCost,
858
    double shippingCost,
851
    double codCharges,
859
    double codCharges,
852
    long seller_id,
860
    long seller_id,
853
    long warehouse_address_id,
861
    long warehouse_address_id,
854
    double wallet_amount,
862
    double wallet_amount,
855
    double net_payable_amount)
863
    double net_payable_amount,
-
 
864
    double shippingRefund)
856
  {
865
  {
857
    this();
866
    this();
858
    this.id = id;
867
    this.id = id;
859
    setIdIsSet(true);
868
    setIdIsSet(true);
860
    this.warehouse_id = warehouse_id;
869
    this.warehouse_id = warehouse_id;
Line 977... Line 986...
977
    setWarehouse_address_idIsSet(true);
986
    setWarehouse_address_idIsSet(true);
978
    this.wallet_amount = wallet_amount;
987
    this.wallet_amount = wallet_amount;
979
    setWallet_amountIsSet(true);
988
    setWallet_amountIsSet(true);
980
    this.net_payable_amount = net_payable_amount;
989
    this.net_payable_amount = net_payable_amount;
981
    setNet_payable_amountIsSet(true);
990
    setNet_payable_amountIsSet(true);
-
 
991
    this.shippingRefund = shippingRefund;
-
 
992
    setShippingRefundIsSet(true);
982
  }
993
  }
983
 
994
 
984
  /**
995
  /**
985
   * Performs a deep copy on <i>other</i>.
996
   * Performs a deep copy on <i>other</i>.
986
   */
997
   */
Line 1128... Line 1139...
1128
    this.codCharges = other.codCharges;
1139
    this.codCharges = other.codCharges;
1129
    this.seller_id = other.seller_id;
1140
    this.seller_id = other.seller_id;
1130
    this.warehouse_address_id = other.warehouse_address_id;
1141
    this.warehouse_address_id = other.warehouse_address_id;
1131
    this.wallet_amount = other.wallet_amount;
1142
    this.wallet_amount = other.wallet_amount;
1132
    this.net_payable_amount = other.net_payable_amount;
1143
    this.net_payable_amount = other.net_payable_amount;
-
 
1144
    this.shippingRefund = other.shippingRefund;
1133
  }
1145
  }
1134
 
1146
 
1135
  public Order deepCopy() {
1147
  public Order deepCopy() {
1136
    return new Order(this);
1148
    return new Order(this);
1137
  }
1149
  }
Line 1274... Line 1286...
1274
    this.warehouse_address_id = 0;
1286
    this.warehouse_address_id = 0;
1275
    setWallet_amountIsSet(false);
1287
    setWallet_amountIsSet(false);
1276
    this.wallet_amount = 0.0;
1288
    this.wallet_amount = 0.0;
1277
    setNet_payable_amountIsSet(false);
1289
    setNet_payable_amountIsSet(false);
1278
    this.net_payable_amount = 0.0;
1290
    this.net_payable_amount = 0.0;
-
 
1291
    setShippingRefundIsSet(false);
-
 
1292
    this.shippingRefund = 0.0;
1279
  }
1293
  }
1280
 
1294
 
1281
  public long getId() {
1295
  public long getId() {
1282
    return this.id;
1296
    return this.id;
1283
  }
1297
  }
Line 3237... Line 3251...
3237
 
3251
 
3238
  public void setNet_payable_amountIsSet(boolean value) {
3252
  public void setNet_payable_amountIsSet(boolean value) {
3239
    __isset_bit_vector.set(__NET_PAYABLE_AMOUNT_ISSET_ID, value);
3253
    __isset_bit_vector.set(__NET_PAYABLE_AMOUNT_ISSET_ID, value);
3240
  }
3254
  }
3241
 
3255
 
-
 
3256
  public double getShippingRefund() {
-
 
3257
    return this.shippingRefund;
-
 
3258
  }
-
 
3259
 
-
 
3260
  public void setShippingRefund(double shippingRefund) {
-
 
3261
    this.shippingRefund = shippingRefund;
-
 
3262
    setShippingRefundIsSet(true);
-
 
3263
  }
-
 
3264
 
-
 
3265
  public void unsetShippingRefund() {
-
 
3266
    __isset_bit_vector.clear(__SHIPPINGREFUND_ISSET_ID);
-
 
3267
  }
-
 
3268
 
-
 
3269
  /** Returns true if field shippingRefund is set (has been assigned a value) and false otherwise */
-
 
3270
  public boolean isSetShippingRefund() {
-
 
3271
    return __isset_bit_vector.get(__SHIPPINGREFUND_ISSET_ID);
-
 
3272
  }
-
 
3273
 
-
 
3274
  public void setShippingRefundIsSet(boolean value) {
-
 
3275
    __isset_bit_vector.set(__SHIPPINGREFUND_ISSET_ID, value);
-
 
3276
  }
-
 
3277
 
3242
  public void setFieldValue(_Fields field, Object value) {
3278
  public void setFieldValue(_Fields field, Object value) {
3243
    switch (field) {
3279
    switch (field) {
3244
    case ID:
3280
    case ID:
3245
      if (value == null) {
3281
      if (value == null) {
3246
        unsetId();
3282
        unsetId();
Line 3903... Line 3939...
3903
      } else {
3939
      } else {
3904
        setNet_payable_amount((Double)value);
3940
        setNet_payable_amount((Double)value);
3905
      }
3941
      }
3906
      break;
3942
      break;
3907
 
3943
 
-
 
3944
    case SHIPPING_REFUND:
-
 
3945
      if (value == null) {
-
 
3946
        unsetShippingRefund();
-
 
3947
      } else {
-
 
3948
        setShippingRefund((Double)value);
-
 
3949
      }
-
 
3950
      break;
-
 
3951
 
3908
    }
3952
    }
3909
  }
3953
  }
3910
 
3954
 
3911
  public Object getFieldValue(_Fields field) {
3955
  public Object getFieldValue(_Fields field) {
3912
    switch (field) {
3956
    switch (field) {
Line 4157... Line 4201...
4157
      return Double.valueOf(getWallet_amount());
4201
      return Double.valueOf(getWallet_amount());
4158
 
4202
 
4159
    case NET_PAYABLE_AMOUNT:
4203
    case NET_PAYABLE_AMOUNT:
4160
      return Double.valueOf(getNet_payable_amount());
4204
      return Double.valueOf(getNet_payable_amount());
4161
 
4205
 
-
 
4206
    case SHIPPING_REFUND:
-
 
4207
      return Double.valueOf(getShippingRefund());
-
 
4208
 
4162
    }
4209
    }
4163
    throw new IllegalStateException();
4210
    throw new IllegalStateException();
4164
  }
4211
  }
4165
 
4212
 
4166
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4213
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 4334... Line 4381...
4334
      return isSetWarehouse_address_id();
4381
      return isSetWarehouse_address_id();
4335
    case WALLET_AMOUNT:
4382
    case WALLET_AMOUNT:
4336
      return isSetWallet_amount();
4383
      return isSetWallet_amount();
4337
    case NET_PAYABLE_AMOUNT:
4384
    case NET_PAYABLE_AMOUNT:
4338
      return isSetNet_payable_amount();
4385
      return isSetNet_payable_amount();
-
 
4386
    case SHIPPING_REFUND:
-
 
4387
      return isSetShippingRefund();
4339
    }
4388
    }
4340
    throw new IllegalStateException();
4389
    throw new IllegalStateException();
4341
  }
4390
  }
4342
 
4391
 
4343
  @Override
4392
  @Override
Line 5098... Line 5147...
5098
        return false;
5147
        return false;
5099
      if (this.net_payable_amount != that.net_payable_amount)
5148
      if (this.net_payable_amount != that.net_payable_amount)
5100
        return false;
5149
        return false;
5101
    }
5150
    }
5102
 
5151
 
-
 
5152
    boolean this_present_shippingRefund = true;
-
 
5153
    boolean that_present_shippingRefund = true;
-
 
5154
    if (this_present_shippingRefund || that_present_shippingRefund) {
-
 
5155
      if (!(this_present_shippingRefund && that_present_shippingRefund))
-
 
5156
        return false;
-
 
5157
      if (this.shippingRefund != that.shippingRefund)
-
 
5158
        return false;
-
 
5159
    }
-
 
5160
 
5103
    return true;
5161
    return true;
5104
  }
5162
  }
5105
 
5163
 
5106
  @Override
5164
  @Override
5107
  public int hashCode() {
5165
  public int hashCode() {
Line 5944... Line 6002...
5944
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.net_payable_amount, typedOther.net_payable_amount);
6002
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.net_payable_amount, typedOther.net_payable_amount);
5945
      if (lastComparison != 0) {
6003
      if (lastComparison != 0) {
5946
        return lastComparison;
6004
        return lastComparison;
5947
      }
6005
      }
5948
    }
6006
    }
-
 
6007
    lastComparison = Boolean.valueOf(isSetShippingRefund()).compareTo(typedOther.isSetShippingRefund());
-
 
6008
    if (lastComparison != 0) {
-
 
6009
      return lastComparison;
-
 
6010
    }
-
 
6011
    if (isSetShippingRefund()) {
-
 
6012
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingRefund, typedOther.shippingRefund);
-
 
6013
      if (lastComparison != 0) {
-
 
6014
        return lastComparison;
-
 
6015
      }
-
 
6016
    }
5949
    return 0;
6017
    return 0;
5950
  }
6018
  }
5951
 
6019
 
5952
  public _Fields fieldForId(int fieldId) {
6020
  public _Fields fieldForId(int fieldId) {
5953
    return _Fields.findByThriftId(fieldId);
6021
    return _Fields.findByThriftId(fieldId);
Line 6608... Line 6676...
6608
            setNet_payable_amountIsSet(true);
6676
            setNet_payable_amountIsSet(true);
6609
          } else { 
6677
          } else { 
6610
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6678
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6611
          }
6679
          }
6612
          break;
6680
          break;
-
 
6681
        case 84: // SHIPPING_REFUND
-
 
6682
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
6683
            this.shippingRefund = iprot.readDouble();
-
 
6684
            setShippingRefundIsSet(true);
-
 
6685
          } else { 
-
 
6686
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
6687
          }
-
 
6688
          break;
6613
        default:
6689
        default:
6614
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6690
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6615
      }
6691
      }
6616
      iprot.readFieldEnd();
6692
      iprot.readFieldEnd();
6617
    }
6693
    }
Line 6947... Line 7023...
6947
    oprot.writeDouble(this.wallet_amount);
7023
    oprot.writeDouble(this.wallet_amount);
6948
    oprot.writeFieldEnd();
7024
    oprot.writeFieldEnd();
6949
    oprot.writeFieldBegin(NET_PAYABLE_AMOUNT_FIELD_DESC);
7025
    oprot.writeFieldBegin(NET_PAYABLE_AMOUNT_FIELD_DESC);
6950
    oprot.writeDouble(this.net_payable_amount);
7026
    oprot.writeDouble(this.net_payable_amount);
6951
    oprot.writeFieldEnd();
7027
    oprot.writeFieldEnd();
-
 
7028
    oprot.writeFieldBegin(SHIPPING_REFUND_FIELD_DESC);
-
 
7029
    oprot.writeDouble(this.shippingRefund);
-
 
7030
    oprot.writeFieldEnd();
6952
    oprot.writeFieldStop();
7031
    oprot.writeFieldStop();
6953
    oprot.writeStructEnd();
7032
    oprot.writeStructEnd();
6954
  }
7033
  }
6955
 
7034
 
6956
  @Override
7035
  @Override
Line 7413... Line 7492...
7413
    first = false;
7492
    first = false;
7414
    if (!first) sb.append(", ");
7493
    if (!first) sb.append(", ");
7415
    sb.append("net_payable_amount:");
7494
    sb.append("net_payable_amount:");
7416
    sb.append(this.net_payable_amount);
7495
    sb.append(this.net_payable_amount);
7417
    first = false;
7496
    first = false;
-
 
7497
    if (!first) sb.append(", ");
-
 
7498
    sb.append("shippingRefund:");
-
 
7499
    sb.append(this.shippingRefund);
-
 
7500
    first = false;
7418
    sb.append(")");
7501
    sb.append(")");
7419
    return sb.toString();
7502
    return sb.toString();
7420
  }
7503
  }
7421
 
7504
 
7422
  public void validate() throws org.apache.thrift.TException {
7505
  public void validate() throws org.apache.thrift.TException {