Subversion Repositories SmartDukaan

Rev

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

Rev 4172 Rev 4295
Line 38... Line 38...
38
  private static final org.apache.thrift.protocol.TField TRANSFER_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("transfer_price", org.apache.thrift.protocol.TType.DOUBLE, (short)13);
38
  private static final org.apache.thrift.protocol.TField TRANSFER_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("transfer_price", org.apache.thrift.protocol.TType.DOUBLE, (short)13);
39
  private static final org.apache.thrift.protocol.TField TOTAL_WEIGHT_FIELD_DESC = new org.apache.thrift.protocol.TField("total_weight", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
39
  private static final org.apache.thrift.protocol.TField TOTAL_WEIGHT_FIELD_DESC = new org.apache.thrift.protocol.TField("total_weight", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
40
  private static final org.apache.thrift.protocol.TField IMEI_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("imei_number", org.apache.thrift.protocol.TType.I64, (short)15);
40
  private static final org.apache.thrift.protocol.TField IMEI_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("imei_number", org.apache.thrift.protocol.TType.I64, (short)15);
41
  private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("item_number", org.apache.thrift.protocol.TType.STRING, (short)16);
41
  private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("item_number", org.apache.thrift.protocol.TType.STRING, (short)16);
42
  private static final org.apache.thrift.protocol.TField DEAL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("dealText", org.apache.thrift.protocol.TType.STRING, (short)17);
42
  private static final org.apache.thrift.protocol.TField DEAL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("dealText", org.apache.thrift.protocol.TType.STRING, (short)17);
-
 
43
  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)18);
43
 
44
 
44
  private long id; // required
45
  private long id; // required
45
  private long item_id; // required
46
  private long item_id; // required
46
  private String productGroup; // required
47
  private String productGroup; // required
47
  private String brand; // required
48
  private String brand; // required
Line 56... Line 57...
56
  private double transfer_price; // required
57
  private double transfer_price; // required
57
  private double total_weight; // required
58
  private double total_weight; // required
58
  private long imei_number; // required
59
  private long imei_number; // required
59
  private String item_number; // required
60
  private String item_number; // required
60
  private String dealText; // required
61
  private String dealText; // required
-
 
62
  private long warrantry_expiry_timestamp; // required
61
 
63
 
62
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
64
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
63
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
65
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
64
    ID((short)1, "id"),
66
    ID((short)1, "id"),
65
    ITEM_ID((short)2, "item_id"),
67
    ITEM_ID((short)2, "item_id"),
Line 75... Line 77...
75
    TOTAL_PRICE((short)12, "total_price"),
77
    TOTAL_PRICE((short)12, "total_price"),
76
    TRANSFER_PRICE((short)13, "transfer_price"),
78
    TRANSFER_PRICE((short)13, "transfer_price"),
77
    TOTAL_WEIGHT((short)14, "total_weight"),
79
    TOTAL_WEIGHT((short)14, "total_weight"),
78
    IMEI_NUMBER((short)15, "imei_number"),
80
    IMEI_NUMBER((short)15, "imei_number"),
79
    ITEM_NUMBER((short)16, "item_number"),
81
    ITEM_NUMBER((short)16, "item_number"),
80
    DEAL_TEXT((short)17, "dealText");
82
    DEAL_TEXT((short)17, "dealText"),
-
 
83
    WARRANTRY_EXPIRY_TIMESTAMP((short)18, "warrantry_expiry_timestamp");
81
 
84
 
82
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
85
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
83
 
86
 
84
    static {
87
    static {
85
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
88
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 124... Line 127...
124
          return IMEI_NUMBER;
127
          return IMEI_NUMBER;
125
        case 16: // ITEM_NUMBER
128
        case 16: // ITEM_NUMBER
126
          return ITEM_NUMBER;
129
          return ITEM_NUMBER;
127
        case 17: // DEAL_TEXT
130
        case 17: // DEAL_TEXT
128
          return DEAL_TEXT;
131
          return DEAL_TEXT;
-
 
132
        case 18: // WARRANTRY_EXPIRY_TIMESTAMP
-
 
133
          return WARRANTRY_EXPIRY_TIMESTAMP;
129
        default:
134
        default:
130
          return null;
135
          return null;
131
      }
136
      }
132
    }
137
    }
133
 
138
 
Line 173... Line 178...
173
  private static final int __UNIT_WEIGHT_ISSET_ID = 4;
178
  private static final int __UNIT_WEIGHT_ISSET_ID = 4;
174
  private static final int __TOTAL_PRICE_ISSET_ID = 5;
179
  private static final int __TOTAL_PRICE_ISSET_ID = 5;
175
  private static final int __TRANSFER_PRICE_ISSET_ID = 6;
180
  private static final int __TRANSFER_PRICE_ISSET_ID = 6;
176
  private static final int __TOTAL_WEIGHT_ISSET_ID = 7;
181
  private static final int __TOTAL_WEIGHT_ISSET_ID = 7;
177
  private static final int __IMEI_NUMBER_ISSET_ID = 8;
182
  private static final int __IMEI_NUMBER_ISSET_ID = 8;
-
 
183
  private static final int __WARRANTRY_EXPIRY_TIMESTAMP_ISSET_ID = 9;
178
  private BitSet __isset_bit_vector = new BitSet(9);
184
  private BitSet __isset_bit_vector = new BitSet(10);
179
 
185
 
180
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
186
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
181
  static {
187
  static {
182
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
188
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
183
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
189
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 212... Line 218...
212
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
218
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
213
    tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("item_number", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
219
    tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("item_number", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
214
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
220
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
215
    tmpMap.put(_Fields.DEAL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("dealText", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
221
    tmpMap.put(_Fields.DEAL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("dealText", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
216
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
222
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
223
    tmpMap.put(_Fields.WARRANTRY_EXPIRY_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("warrantry_expiry_timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
224
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
217
    metaDataMap = Collections.unmodifiableMap(tmpMap);
225
    metaDataMap = Collections.unmodifiableMap(tmpMap);
218
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
226
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
219
  }
227
  }
220
 
228
 
221
  public LineItem() {
229
  public LineItem() {
Line 233... Line 241...
233
    double quantity,
241
    double quantity,
234
    double unit_price,
242
    double unit_price,
235
    double unit_weight,
243
    double unit_weight,
236
    double total_price,
244
    double total_price,
237
    double transfer_price,
245
    double transfer_price,
238
    double total_weight)
246
    double total_weight,
-
 
247
    long warrantry_expiry_timestamp)
239
  {
248
  {
240
    this();
249
    this();
241
    this.id = id;
250
    this.id = id;
242
    setIdIsSet(true);
251
    setIdIsSet(true);
243
    this.item_id = item_id;
252
    this.item_id = item_id;
Line 258... Line 267...
258
    setTotal_priceIsSet(true);
267
    setTotal_priceIsSet(true);
259
    this.transfer_price = transfer_price;
268
    this.transfer_price = transfer_price;
260
    setTransfer_priceIsSet(true);
269
    setTransfer_priceIsSet(true);
261
    this.total_weight = total_weight;
270
    this.total_weight = total_weight;
262
    setTotal_weightIsSet(true);
271
    setTotal_weightIsSet(true);
-
 
272
    this.warrantry_expiry_timestamp = warrantry_expiry_timestamp;
-
 
273
    setWarrantry_expiry_timestampIsSet(true);
263
  }
274
  }
264
 
275
 
265
  /**
276
  /**
266
   * Performs a deep copy on <i>other</i>.
277
   * Performs a deep copy on <i>other</i>.
267
   */
278
   */
Line 299... Line 310...
299
      this.item_number = other.item_number;
310
      this.item_number = other.item_number;
300
    }
311
    }
301
    if (other.isSetDealText()) {
312
    if (other.isSetDealText()) {
302
      this.dealText = other.dealText;
313
      this.dealText = other.dealText;
303
    }
314
    }
-
 
315
    this.warrantry_expiry_timestamp = other.warrantry_expiry_timestamp;
304
  }
316
  }
305
 
317
 
306
  public LineItem deepCopy() {
318
  public LineItem deepCopy() {
307
    return new LineItem(this);
319
    return new LineItem(this);
308
  }
320
  }
Line 333... Line 345...
333
    this.total_weight = 0.0;
345
    this.total_weight = 0.0;
334
    setImei_numberIsSet(false);
346
    setImei_numberIsSet(false);
335
    this.imei_number = 0;
347
    this.imei_number = 0;
336
    this.item_number = null;
348
    this.item_number = null;
337
    this.dealText = null;
349
    this.dealText = null;
-
 
350
    setWarrantry_expiry_timestampIsSet(false);
-
 
351
    this.warrantry_expiry_timestamp = 0;
338
  }
352
  }
339
 
353
 
340
  public long getId() {
354
  public long getId() {
341
    return this.id;
355
    return this.id;
342
  }
356
  }
Line 717... Line 731...
717
    if (!value) {
731
    if (!value) {
718
      this.dealText = null;
732
      this.dealText = null;
719
    }
733
    }
720
  }
734
  }
721
 
735
 
-
 
736
  public long getWarrantry_expiry_timestamp() {
-
 
737
    return this.warrantry_expiry_timestamp;
-
 
738
  }
-
 
739
 
-
 
740
  public void setWarrantry_expiry_timestamp(long warrantry_expiry_timestamp) {
-
 
741
    this.warrantry_expiry_timestamp = warrantry_expiry_timestamp;
-
 
742
    setWarrantry_expiry_timestampIsSet(true);
-
 
743
  }
-
 
744
 
-
 
745
  public void unsetWarrantry_expiry_timestamp() {
-
 
746
    __isset_bit_vector.clear(__WARRANTRY_EXPIRY_TIMESTAMP_ISSET_ID);
-
 
747
  }
-
 
748
 
-
 
749
  /** Returns true if field warrantry_expiry_timestamp is set (has been assigned a value) and false otherwise */
-
 
750
  public boolean isSetWarrantry_expiry_timestamp() {
-
 
751
    return __isset_bit_vector.get(__WARRANTRY_EXPIRY_TIMESTAMP_ISSET_ID);
-
 
752
  }
-
 
753
 
-
 
754
  public void setWarrantry_expiry_timestampIsSet(boolean value) {
-
 
755
    __isset_bit_vector.set(__WARRANTRY_EXPIRY_TIMESTAMP_ISSET_ID, value);
-
 
756
  }
-
 
757
 
722
  public void setFieldValue(_Fields field, Object value) {
758
  public void setFieldValue(_Fields field, Object value) {
723
    switch (field) {
759
    switch (field) {
724
    case ID:
760
    case ID:
725
      if (value == null) {
761
      if (value == null) {
726
        unsetId();
762
        unsetId();
Line 855... Line 891...
855
      } else {
891
      } else {
856
        setDealText((String)value);
892
        setDealText((String)value);
857
      }
893
      }
858
      break;
894
      break;
859
 
895
 
-
 
896
    case WARRANTRY_EXPIRY_TIMESTAMP:
-
 
897
      if (value == null) {
-
 
898
        unsetWarrantry_expiry_timestamp();
-
 
899
      } else {
-
 
900
        setWarrantry_expiry_timestamp((Long)value);
-
 
901
      }
-
 
902
      break;
-
 
903
 
860
    }
904
    }
861
  }
905
  }
862
 
906
 
863
  public Object getFieldValue(_Fields field) {
907
  public Object getFieldValue(_Fields field) {
864
    switch (field) {
908
    switch (field) {
Line 911... Line 955...
911
      return getItem_number();
955
      return getItem_number();
912
 
956
 
913
    case DEAL_TEXT:
957
    case DEAL_TEXT:
914
      return getDealText();
958
      return getDealText();
915
 
959
 
-
 
960
    case WARRANTRY_EXPIRY_TIMESTAMP:
-
 
961
      return Long.valueOf(getWarrantry_expiry_timestamp());
-
 
962
 
916
    }
963
    }
917
    throw new IllegalStateException();
964
    throw new IllegalStateException();
918
  }
965
  }
919
 
966
 
920
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
967
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 956... Line 1003...
956
      return isSetImei_number();
1003
      return isSetImei_number();
957
    case ITEM_NUMBER:
1004
    case ITEM_NUMBER:
958
      return isSetItem_number();
1005
      return isSetItem_number();
959
    case DEAL_TEXT:
1006
    case DEAL_TEXT:
960
      return isSetDealText();
1007
      return isSetDealText();
-
 
1008
    case WARRANTRY_EXPIRY_TIMESTAMP:
-
 
1009
      return isSetWarrantry_expiry_timestamp();
961
    }
1010
    }
962
    throw new IllegalStateException();
1011
    throw new IllegalStateException();
963
  }
1012
  }
964
 
1013
 
965
  @Override
1014
  @Override
Line 1126... Line 1175...
1126
        return false;
1175
        return false;
1127
      if (!this.dealText.equals(that.dealText))
1176
      if (!this.dealText.equals(that.dealText))
1128
        return false;
1177
        return false;
1129
    }
1178
    }
1130
 
1179
 
-
 
1180
    boolean this_present_warrantry_expiry_timestamp = true;
-
 
1181
    boolean that_present_warrantry_expiry_timestamp = true;
-
 
1182
    if (this_present_warrantry_expiry_timestamp || that_present_warrantry_expiry_timestamp) {
-
 
1183
      if (!(this_present_warrantry_expiry_timestamp && that_present_warrantry_expiry_timestamp))
-
 
1184
        return false;
-
 
1185
      if (this.warrantry_expiry_timestamp != that.warrantry_expiry_timestamp)
-
 
1186
        return false;
-
 
1187
    }
-
 
1188
 
1131
    return true;
1189
    return true;
1132
  }
1190
  }
1133
 
1191
 
1134
  @Override
1192
  @Override
1135
  public int hashCode() {
1193
  public int hashCode() {
Line 1312... Line 1370...
1312
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealText, typedOther.dealText);
1370
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealText, typedOther.dealText);
1313
      if (lastComparison != 0) {
1371
      if (lastComparison != 0) {
1314
        return lastComparison;
1372
        return lastComparison;
1315
      }
1373
      }
1316
    }
1374
    }
-
 
1375
    lastComparison = Boolean.valueOf(isSetWarrantry_expiry_timestamp()).compareTo(typedOther.isSetWarrantry_expiry_timestamp());
-
 
1376
    if (lastComparison != 0) {
-
 
1377
      return lastComparison;
-
 
1378
    }
-
 
1379
    if (isSetWarrantry_expiry_timestamp()) {
-
 
1380
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warrantry_expiry_timestamp, typedOther.warrantry_expiry_timestamp);
-
 
1381
      if (lastComparison != 0) {
-
 
1382
        return lastComparison;
-
 
1383
      }
-
 
1384
    }
1317
    return 0;
1385
    return 0;
1318
  }
1386
  }
1319
 
1387
 
1320
  public _Fields fieldForId(int fieldId) {
1388
  public _Fields fieldForId(int fieldId) {
1321
    return _Fields.findByThriftId(fieldId);
1389
    return _Fields.findByThriftId(fieldId);
Line 1457... Line 1525...
1457
            this.dealText = iprot.readString();
1525
            this.dealText = iprot.readString();
1458
          } else { 
1526
          } else { 
1459
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1527
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1460
          }
1528
          }
1461
          break;
1529
          break;
-
 
1530
        case 18: // WARRANTRY_EXPIRY_TIMESTAMP
-
 
1531
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1532
            this.warrantry_expiry_timestamp = iprot.readI64();
-
 
1533
            setWarrantry_expiry_timestampIsSet(true);
-
 
1534
          } else { 
-
 
1535
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1536
          }
-
 
1537
          break;
1462
        default:
1538
        default:
1463
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1539
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1464
      }
1540
      }
1465
      iprot.readFieldEnd();
1541
      iprot.readFieldEnd();
1466
    }
1542
    }
Line 1543... Line 1619...
1543
        oprot.writeFieldBegin(DEAL_TEXT_FIELD_DESC);
1619
        oprot.writeFieldBegin(DEAL_TEXT_FIELD_DESC);
1544
        oprot.writeString(this.dealText);
1620
        oprot.writeString(this.dealText);
1545
        oprot.writeFieldEnd();
1621
        oprot.writeFieldEnd();
1546
      }
1622
      }
1547
    }
1623
    }
-
 
1624
    oprot.writeFieldBegin(WARRANTRY_EXPIRY_TIMESTAMP_FIELD_DESC);
-
 
1625
    oprot.writeI64(this.warrantry_expiry_timestamp);
-
 
1626
    oprot.writeFieldEnd();
1548
    oprot.writeFieldStop();
1627
    oprot.writeFieldStop();
1549
    oprot.writeStructEnd();
1628
    oprot.writeStructEnd();
1550
  }
1629
  }
1551
 
1630
 
1552
  @Override
1631
  @Override
Line 1657... Line 1736...
1657
      } else {
1736
      } else {
1658
        sb.append(this.dealText);
1737
        sb.append(this.dealText);
1659
      }
1738
      }
1660
      first = false;
1739
      first = false;
1661
    }
1740
    }
-
 
1741
    if (!first) sb.append(", ");
-
 
1742
    sb.append("warrantry_expiry_timestamp:");
-
 
1743
    sb.append(this.warrantry_expiry_timestamp);
-
 
1744
    first = false;
1662
    sb.append(")");
1745
    sb.append(")");
1663
    return sb.toString();
1746
    return sb.toString();
1664
  }
1747
  }
1665
 
1748
 
1666
  public void validate() throws org.apache.thrift.TException {
1749
  public void validate() throws org.apache.thrift.TException {