Subversion Repositories SmartDukaan

Rev

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

Rev 19421 Rev 19691
Line 44... Line 44...
44
  private static final org.apache.thrift.protocol.TField WARRANTRY_EXPIRY_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("warrantry_expiry_timestamp", org.apache.thrift.protocol.TType.I64, (short)19);
44
  private static final org.apache.thrift.protocol.TField WARRANTRY_EXPIRY_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("warrantry_expiry_timestamp", org.apache.thrift.protocol.TType.I64, (short)19);
45
  private static final org.apache.thrift.protocol.TField VAT_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatRate", org.apache.thrift.protocol.TType.DOUBLE, (short)20);
45
  private static final org.apache.thrift.protocol.TField VAT_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatRate", org.apache.thrift.protocol.TType.DOUBLE, (short)20);
46
  private static final org.apache.thrift.protocol.TField NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("nlc", org.apache.thrift.protocol.TType.DOUBLE, (short)21);
46
  private static final org.apache.thrift.protocol.TField NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("nlc", org.apache.thrift.protocol.TType.DOUBLE, (short)21);
47
  private static final org.apache.thrift.protocol.TField LOGISTICS_COST_FIELD_DESC = new org.apache.thrift.protocol.TField("logisticsCost", org.apache.thrift.protocol.TType.DOUBLE, (short)22);
47
  private static final org.apache.thrift.protocol.TField LOGISTICS_COST_FIELD_DESC = new org.apache.thrift.protocol.TField("logisticsCost", org.apache.thrift.protocol.TType.DOUBLE, (short)22);
48
  private static final org.apache.thrift.protocol.TField COD_COLLECTION_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("codCollectionCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)23);
48
  private static final org.apache.thrift.protocol.TField COD_COLLECTION_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("codCollectionCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)23);
-
 
49
  private static final org.apache.thrift.protocol.TField RETURN_QTY_FIELD_DESC = new org.apache.thrift.protocol.TField("returnQty", org.apache.thrift.protocol.TType.DOUBLE, (short)24);
49
 
50
 
50
  private long id; // required
51
  private long id; // required
51
  private long item_id; // required
52
  private long item_id; // required
52
  private String productGroup; // required
53
  private String productGroup; // required
53
  private String brand; // required
54
  private String brand; // required
Line 68... Line 69...
68
  private long warrantry_expiry_timestamp; // required
69
  private long warrantry_expiry_timestamp; // required
69
  private double vatRate; // required
70
  private double vatRate; // required
70
  private double nlc; // required
71
  private double nlc; // required
71
  private double logisticsCost; // required
72
  private double logisticsCost; // required
72
  private double codCollectionCharges; // required
73
  private double codCollectionCharges; // required
-
 
74
  private double returnQty; // required
73
 
75
 
74
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
76
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
75
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
77
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
76
    ID((short)1, "id"),
78
    ID((short)1, "id"),
77
    ITEM_ID((short)2, "item_id"),
79
    ITEM_ID((short)2, "item_id"),
Line 93... Line 95...
93
    DEAL_TEXT((short)18, "dealText"),
95
    DEAL_TEXT((short)18, "dealText"),
94
    WARRANTRY_EXPIRY_TIMESTAMP((short)19, "warrantry_expiry_timestamp"),
96
    WARRANTRY_EXPIRY_TIMESTAMP((short)19, "warrantry_expiry_timestamp"),
95
    VAT_RATE((short)20, "vatRate"),
97
    VAT_RATE((short)20, "vatRate"),
96
    NLC((short)21, "nlc"),
98
    NLC((short)21, "nlc"),
97
    LOGISTICS_COST((short)22, "logisticsCost"),
99
    LOGISTICS_COST((short)22, "logisticsCost"),
98
    COD_COLLECTION_CHARGES((short)23, "codCollectionCharges");
100
    COD_COLLECTION_CHARGES((short)23, "codCollectionCharges"),
-
 
101
    RETURN_QTY((short)24, "returnQty");
99
 
102
 
100
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
103
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
101
 
104
 
102
    static {
105
    static {
103
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
106
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 154... Line 157...
154
          return NLC;
157
          return NLC;
155
        case 22: // LOGISTICS_COST
158
        case 22: // LOGISTICS_COST
156
          return LOGISTICS_COST;
159
          return LOGISTICS_COST;
157
        case 23: // COD_COLLECTION_CHARGES
160
        case 23: // COD_COLLECTION_CHARGES
158
          return COD_COLLECTION_CHARGES;
161
          return COD_COLLECTION_CHARGES;
-
 
162
        case 24: // RETURN_QTY
-
 
163
          return RETURN_QTY;
159
        default:
164
        default:
160
          return null;
165
          return null;
161
      }
166
      }
162
    }
167
    }
163
 
168
 
Line 208... Line 213...
208
  private static final int __WARRANTRY_EXPIRY_TIMESTAMP_ISSET_ID = 9;
213
  private static final int __WARRANTRY_EXPIRY_TIMESTAMP_ISSET_ID = 9;
209
  private static final int __VATRATE_ISSET_ID = 10;
214
  private static final int __VATRATE_ISSET_ID = 10;
210
  private static final int __NLC_ISSET_ID = 11;
215
  private static final int __NLC_ISSET_ID = 11;
211
  private static final int __LOGISTICSCOST_ISSET_ID = 12;
216
  private static final int __LOGISTICSCOST_ISSET_ID = 12;
212
  private static final int __CODCOLLECTIONCHARGES_ISSET_ID = 13;
217
  private static final int __CODCOLLECTIONCHARGES_ISSET_ID = 13;
-
 
218
  private static final int __RETURNQTY_ISSET_ID = 14;
213
  private BitSet __isset_bit_vector = new BitSet(14);
219
  private BitSet __isset_bit_vector = new BitSet(15);
214
 
220
 
215
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
221
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
216
  static {
222
  static {
217
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
223
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
218
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
224
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 259... Line 265...
259
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
265
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
260
    tmpMap.put(_Fields.LOGISTICS_COST, new org.apache.thrift.meta_data.FieldMetaData("logisticsCost", org.apache.thrift.TFieldRequirementType.DEFAULT, 
266
    tmpMap.put(_Fields.LOGISTICS_COST, new org.apache.thrift.meta_data.FieldMetaData("logisticsCost", org.apache.thrift.TFieldRequirementType.DEFAULT, 
261
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
267
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
262
    tmpMap.put(_Fields.COD_COLLECTION_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("codCollectionCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
268
    tmpMap.put(_Fields.COD_COLLECTION_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("codCollectionCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
263
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
269
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
270
    tmpMap.put(_Fields.RETURN_QTY, new org.apache.thrift.meta_data.FieldMetaData("returnQty", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
271
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
264
    metaDataMap = Collections.unmodifiableMap(tmpMap);
272
    metaDataMap = Collections.unmodifiableMap(tmpMap);
265
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
273
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
266
  }
274
  }
267
 
275
 
268
  public LineItem() {
276
  public LineItem() {
Line 286... Line 294...
286
    double total_weight,
294
    double total_weight,
287
    long warrantry_expiry_timestamp,
295
    long warrantry_expiry_timestamp,
288
    double vatRate,
296
    double vatRate,
289
    double nlc,
297
    double nlc,
290
    double logisticsCost,
298
    double logisticsCost,
291
    double codCollectionCharges)
299
    double codCollectionCharges,
-
 
300
    double returnQty)
292
  {
301
  {
293
    this();
302
    this();
294
    this.id = id;
303
    this.id = id;
295
    setIdIsSet(true);
304
    setIdIsSet(true);
296
    this.item_id = item_id;
305
    this.item_id = item_id;
Line 323... Line 332...
323
    setNlcIsSet(true);
332
    setNlcIsSet(true);
324
    this.logisticsCost = logisticsCost;
333
    this.logisticsCost = logisticsCost;
325
    setLogisticsCostIsSet(true);
334
    setLogisticsCostIsSet(true);
326
    this.codCollectionCharges = codCollectionCharges;
335
    this.codCollectionCharges = codCollectionCharges;
327
    setCodCollectionChargesIsSet(true);
336
    setCodCollectionChargesIsSet(true);
-
 
337
    this.returnQty = returnQty;
-
 
338
    setReturnQtyIsSet(true);
328
  }
339
  }
329
 
340
 
330
  /**
341
  /**
331
   * Performs a deep copy on <i>other</i>.
342
   * Performs a deep copy on <i>other</i>.
332
   */
343
   */
Line 372... Line 383...
372
    this.warrantry_expiry_timestamp = other.warrantry_expiry_timestamp;
383
    this.warrantry_expiry_timestamp = other.warrantry_expiry_timestamp;
373
    this.vatRate = other.vatRate;
384
    this.vatRate = other.vatRate;
374
    this.nlc = other.nlc;
385
    this.nlc = other.nlc;
375
    this.logisticsCost = other.logisticsCost;
386
    this.logisticsCost = other.logisticsCost;
376
    this.codCollectionCharges = other.codCollectionCharges;
387
    this.codCollectionCharges = other.codCollectionCharges;
-
 
388
    this.returnQty = other.returnQty;
377
  }
389
  }
378
 
390
 
379
  public LineItem deepCopy() {
391
  public LineItem deepCopy() {
380
    return new LineItem(this);
392
    return new LineItem(this);
381
  }
393
  }
Line 417... Line 429...
417
    this.nlc = 0.0;
429
    this.nlc = 0.0;
418
    setLogisticsCostIsSet(false);
430
    setLogisticsCostIsSet(false);
419
    this.logisticsCost = 0.0;
431
    this.logisticsCost = 0.0;
420
    setCodCollectionChargesIsSet(false);
432
    setCodCollectionChargesIsSet(false);
421
    this.codCollectionCharges = 0.0;
433
    this.codCollectionCharges = 0.0;
-
 
434
    setReturnQtyIsSet(false);
-
 
435
    this.returnQty = 0.0;
422
  }
436
  }
423
 
437
 
424
  public long getId() {
438
  public long getId() {
425
    return this.id;
439
    return this.id;
426
  }
440
  }
Line 934... Line 948...
934
 
948
 
935
  public void setCodCollectionChargesIsSet(boolean value) {
949
  public void setCodCollectionChargesIsSet(boolean value) {
936
    __isset_bit_vector.set(__CODCOLLECTIONCHARGES_ISSET_ID, value);
950
    __isset_bit_vector.set(__CODCOLLECTIONCHARGES_ISSET_ID, value);
937
  }
951
  }
938
 
952
 
-
 
953
  public double getReturnQty() {
-
 
954
    return this.returnQty;
-
 
955
  }
-
 
956
 
-
 
957
  public void setReturnQty(double returnQty) {
-
 
958
    this.returnQty = returnQty;
-
 
959
    setReturnQtyIsSet(true);
-
 
960
  }
-
 
961
 
-
 
962
  public void unsetReturnQty() {
-
 
963
    __isset_bit_vector.clear(__RETURNQTY_ISSET_ID);
-
 
964
  }
-
 
965
 
-
 
966
  /** Returns true if field returnQty is set (has been assigned a value) and false otherwise */
-
 
967
  public boolean isSetReturnQty() {
-
 
968
    return __isset_bit_vector.get(__RETURNQTY_ISSET_ID);
-
 
969
  }
-
 
970
 
-
 
971
  public void setReturnQtyIsSet(boolean value) {
-
 
972
    __isset_bit_vector.set(__RETURNQTY_ISSET_ID, value);
-
 
973
  }
-
 
974
 
939
  public void setFieldValue(_Fields field, Object value) {
975
  public void setFieldValue(_Fields field, Object value) {
940
    switch (field) {
976
    switch (field) {
941
    case ID:
977
    case ID:
942
      if (value == null) {
978
      if (value == null) {
943
        unsetId();
979
        unsetId();
Line 1120... Line 1156...
1120
      } else {
1156
      } else {
1121
        setCodCollectionCharges((Double)value);
1157
        setCodCollectionCharges((Double)value);
1122
      }
1158
      }
1123
      break;
1159
      break;
1124
 
1160
 
-
 
1161
    case RETURN_QTY:
-
 
1162
      if (value == null) {
-
 
1163
        unsetReturnQty();
-
 
1164
      } else {
-
 
1165
        setReturnQty((Double)value);
-
 
1166
      }
-
 
1167
      break;
-
 
1168
 
1125
    }
1169
    }
1126
  }
1170
  }
1127
 
1171
 
1128
  public Object getFieldValue(_Fields field) {
1172
  public Object getFieldValue(_Fields field) {
1129
    switch (field) {
1173
    switch (field) {
Line 1194... Line 1238...
1194
      return Double.valueOf(getLogisticsCost());
1238
      return Double.valueOf(getLogisticsCost());
1195
 
1239
 
1196
    case COD_COLLECTION_CHARGES:
1240
    case COD_COLLECTION_CHARGES:
1197
      return Double.valueOf(getCodCollectionCharges());
1241
      return Double.valueOf(getCodCollectionCharges());
1198
 
1242
 
-
 
1243
    case RETURN_QTY:
-
 
1244
      return Double.valueOf(getReturnQty());
-
 
1245
 
1199
    }
1246
    }
1200
    throw new IllegalStateException();
1247
    throw new IllegalStateException();
1201
  }
1248
  }
1202
 
1249
 
1203
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1250
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1251... Line 1298...
1251
      return isSetNlc();
1298
      return isSetNlc();
1252
    case LOGISTICS_COST:
1299
    case LOGISTICS_COST:
1253
      return isSetLogisticsCost();
1300
      return isSetLogisticsCost();
1254
    case COD_COLLECTION_CHARGES:
1301
    case COD_COLLECTION_CHARGES:
1255
      return isSetCodCollectionCharges();
1302
      return isSetCodCollectionCharges();
-
 
1303
    case RETURN_QTY:
-
 
1304
      return isSetReturnQty();
1256
    }
1305
    }
1257
    throw new IllegalStateException();
1306
    throw new IllegalStateException();
1258
  }
1307
  }
1259
 
1308
 
1260
  @Override
1309
  @Override
Line 1475... Line 1524...
1475
        return false;
1524
        return false;
1476
      if (this.codCollectionCharges != that.codCollectionCharges)
1525
      if (this.codCollectionCharges != that.codCollectionCharges)
1477
        return false;
1526
        return false;
1478
    }
1527
    }
1479
 
1528
 
-
 
1529
    boolean this_present_returnQty = true;
-
 
1530
    boolean that_present_returnQty = true;
-
 
1531
    if (this_present_returnQty || that_present_returnQty) {
-
 
1532
      if (!(this_present_returnQty && that_present_returnQty))
-
 
1533
        return false;
-
 
1534
      if (this.returnQty != that.returnQty)
-
 
1535
        return false;
-
 
1536
    }
-
 
1537
 
1480
    return true;
1538
    return true;
1481
  }
1539
  }
1482
 
1540
 
1483
  @Override
1541
  @Override
1484
  public int hashCode() {
1542
  public int hashCode() {
Line 1721... Line 1779...
1721
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCollectionCharges, typedOther.codCollectionCharges);
1779
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCollectionCharges, typedOther.codCollectionCharges);
1722
      if (lastComparison != 0) {
1780
      if (lastComparison != 0) {
1723
        return lastComparison;
1781
        return lastComparison;
1724
      }
1782
      }
1725
    }
1783
    }
-
 
1784
    lastComparison = Boolean.valueOf(isSetReturnQty()).compareTo(typedOther.isSetReturnQty());
-
 
1785
    if (lastComparison != 0) {
-
 
1786
      return lastComparison;
-
 
1787
    }
-
 
1788
    if (isSetReturnQty()) {
-
 
1789
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.returnQty, typedOther.returnQty);
-
 
1790
      if (lastComparison != 0) {
-
 
1791
        return lastComparison;
-
 
1792
      }
-
 
1793
    }
1726
    return 0;
1794
    return 0;
1727
  }
1795
  }
1728
 
1796
 
1729
  public _Fields fieldForId(int fieldId) {
1797
  public _Fields fieldForId(int fieldId) {
1730
    return _Fields.findByThriftId(fieldId);
1798
    return _Fields.findByThriftId(fieldId);
Line 1913... Line 1981...
1913
            setCodCollectionChargesIsSet(true);
1981
            setCodCollectionChargesIsSet(true);
1914
          } else { 
1982
          } else { 
1915
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1983
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1916
          }
1984
          }
1917
          break;
1985
          break;
-
 
1986
        case 24: // RETURN_QTY
-
 
1987
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1988
            this.returnQty = iprot.readDouble();
-
 
1989
            setReturnQtyIsSet(true);
-
 
1990
          } else { 
-
 
1991
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1992
          }
-
 
1993
          break;
1918
        default:
1994
        default:
1919
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1995
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1920
      }
1996
      }
1921
      iprot.readFieldEnd();
1997
      iprot.readFieldEnd();
1922
    }
1998
    }
Line 2019... Line 2095...
2019
    oprot.writeDouble(this.logisticsCost);
2095
    oprot.writeDouble(this.logisticsCost);
2020
    oprot.writeFieldEnd();
2096
    oprot.writeFieldEnd();
2021
    oprot.writeFieldBegin(COD_COLLECTION_CHARGES_FIELD_DESC);
2097
    oprot.writeFieldBegin(COD_COLLECTION_CHARGES_FIELD_DESC);
2022
    oprot.writeDouble(this.codCollectionCharges);
2098
    oprot.writeDouble(this.codCollectionCharges);
2023
    oprot.writeFieldEnd();
2099
    oprot.writeFieldEnd();
-
 
2100
    oprot.writeFieldBegin(RETURN_QTY_FIELD_DESC);
-
 
2101
    oprot.writeDouble(this.returnQty);
-
 
2102
    oprot.writeFieldEnd();
2024
    oprot.writeFieldStop();
2103
    oprot.writeFieldStop();
2025
    oprot.writeStructEnd();
2104
    oprot.writeStructEnd();
2026
  }
2105
  }
2027
 
2106
 
2028
  @Override
2107
  @Override
Line 2161... Line 2240...
2161
    first = false;
2240
    first = false;
2162
    if (!first) sb.append(", ");
2241
    if (!first) sb.append(", ");
2163
    sb.append("codCollectionCharges:");
2242
    sb.append("codCollectionCharges:");
2164
    sb.append(this.codCollectionCharges);
2243
    sb.append(this.codCollectionCharges);
2165
    first = false;
2244
    first = false;
-
 
2245
    if (!first) sb.append(", ");
-
 
2246
    sb.append("returnQty:");
-
 
2247
    sb.append(this.returnQty);
-
 
2248
    first = false;
2166
    sb.append(")");
2249
    sb.append(")");
2167
    return sb.toString();
2250
    return sb.toString();
2168
  }
2251
  }
2169
 
2252
 
2170
  public void validate() throws org.apache.thrift.TException {
2253
  public void validate() throws org.apache.thrift.TException {