Subversion Repositories SmartDukaan

Rev

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

Rev 5945 Rev 6039
Line 56... Line 56...
56
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)32);
56
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)32);
57
  private static final org.apache.thrift.protocol.TField COMING_SOON_START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("comingSoonStartDate", org.apache.thrift.protocol.TType.I64, (short)33);
57
  private static final org.apache.thrift.protocol.TField COMING_SOON_START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("comingSoonStartDate", org.apache.thrift.protocol.TType.I64, (short)33);
58
  private static final org.apache.thrift.protocol.TField EXPECTED_ARRIVAL_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("expectedArrivalDate", org.apache.thrift.protocol.TType.I64, (short)34);
58
  private static final org.apache.thrift.protocol.TField EXPECTED_ARRIVAL_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("expectedArrivalDate", org.apache.thrift.protocol.TType.I64, (short)34);
59
  private static final org.apache.thrift.protocol.TField HAS_ITEM_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("hasItemNo", org.apache.thrift.protocol.TType.BOOL, (short)35);
59
  private static final org.apache.thrift.protocol.TField HAS_ITEM_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("hasItemNo", org.apache.thrift.protocol.TType.BOOL, (short)35);
60
  private static final org.apache.thrift.protocol.TField CLEARANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("clearance", org.apache.thrift.protocol.TType.BOOL, (short)36);
60
  private static final org.apache.thrift.protocol.TField CLEARANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("clearance", org.apache.thrift.protocol.TType.BOOL, (short)36);
-
 
61
  private static final org.apache.thrift.protocol.TField VAT_PERCENTAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatPercentage", org.apache.thrift.protocol.TType.DOUBLE, (short)37);
61
 
62
 
62
  private long id; // required
63
  private long id; // required
63
  private String productGroup; // required
64
  private String productGroup; // required
64
  private String brand; // required
65
  private String brand; // required
65
  private String modelNumber; // required
66
  private String modelNumber; // required
Line 92... Line 93...
92
  private ItemType type; // required
93
  private ItemType type; // required
93
  private long comingSoonStartDate; // required
94
  private long comingSoonStartDate; // required
94
  private long expectedArrivalDate; // required
95
  private long expectedArrivalDate; // required
95
  private boolean hasItemNo; // required
96
  private boolean hasItemNo; // required
96
  private boolean clearance; // required
97
  private boolean clearance; // required
-
 
98
  private double vatPercentage; // required
97
 
99
 
98
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
100
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
99
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
101
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
100
    ID((short)1, "id"),
102
    ID((short)1, "id"),
101
    PRODUCT_GROUP((short)2, "productGroup"),
103
    PRODUCT_GROUP((short)2, "productGroup"),
Line 137... Line 139...
137
     */
139
     */
138
    TYPE((short)32, "type"),
140
    TYPE((short)32, "type"),
139
    COMING_SOON_START_DATE((short)33, "comingSoonStartDate"),
141
    COMING_SOON_START_DATE((short)33, "comingSoonStartDate"),
140
    EXPECTED_ARRIVAL_DATE((short)34, "expectedArrivalDate"),
142
    EXPECTED_ARRIVAL_DATE((short)34, "expectedArrivalDate"),
141
    HAS_ITEM_NO((short)35, "hasItemNo"),
143
    HAS_ITEM_NO((short)35, "hasItemNo"),
142
    CLEARANCE((short)36, "clearance");
144
    CLEARANCE((short)36, "clearance"),
-
 
145
    VAT_PERCENTAGE((short)37, "vatPercentage");
143
 
146
 
144
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
147
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
145
 
148
 
146
    static {
149
    static {
147
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
150
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 222... Line 225...
222
          return EXPECTED_ARRIVAL_DATE;
225
          return EXPECTED_ARRIVAL_DATE;
223
        case 35: // HAS_ITEM_NO
226
        case 35: // HAS_ITEM_NO
224
          return HAS_ITEM_NO;
227
          return HAS_ITEM_NO;
225
        case 36: // CLEARANCE
228
        case 36: // CLEARANCE
226
          return CLEARANCE;
229
          return CLEARANCE;
-
 
230
        case 37: // VAT_PERCENTAGE
-
 
231
          return VAT_PERCENTAGE;
227
        default:
232
        default:
228
          return null;
233
          return null;
229
      }
234
      }
230
    }
235
    }
231
 
236
 
Line 285... Line 290...
285
  private static final int __PREFERREDVENDOR_ISSET_ID = 18;
290
  private static final int __PREFERREDVENDOR_ISSET_ID = 18;
286
  private static final int __COMINGSOONSTARTDATE_ISSET_ID = 19;
291
  private static final int __COMINGSOONSTARTDATE_ISSET_ID = 19;
287
  private static final int __EXPECTEDARRIVALDATE_ISSET_ID = 20;
292
  private static final int __EXPECTEDARRIVALDATE_ISSET_ID = 20;
288
  private static final int __HASITEMNO_ISSET_ID = 21;
293
  private static final int __HASITEMNO_ISSET_ID = 21;
289
  private static final int __CLEARANCE_ISSET_ID = 22;
294
  private static final int __CLEARANCE_ISSET_ID = 22;
-
 
295
  private static final int __VATPERCENTAGE_ISSET_ID = 23;
290
  private BitSet __isset_bit_vector = new BitSet(23);
296
  private BitSet __isset_bit_vector = new BitSet(24);
291
 
297
 
292
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
298
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
293
  static {
299
  static {
294
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
300
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
295
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
301
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 362... Line 368...
362
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
368
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
363
    tmpMap.put(_Fields.HAS_ITEM_NO, new org.apache.thrift.meta_data.FieldMetaData("hasItemNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
369
    tmpMap.put(_Fields.HAS_ITEM_NO, new org.apache.thrift.meta_data.FieldMetaData("hasItemNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
364
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
370
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
365
    tmpMap.put(_Fields.CLEARANCE, new org.apache.thrift.meta_data.FieldMetaData("clearance", org.apache.thrift.TFieldRequirementType.DEFAULT, 
371
    tmpMap.put(_Fields.CLEARANCE, new org.apache.thrift.meta_data.FieldMetaData("clearance", org.apache.thrift.TFieldRequirementType.DEFAULT, 
366
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
372
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
373
    tmpMap.put(_Fields.VAT_PERCENTAGE, new org.apache.thrift.meta_data.FieldMetaData("vatPercentage", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
374
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
367
    metaDataMap = Collections.unmodifiableMap(tmpMap);
375
    metaDataMap = Collections.unmodifiableMap(tmpMap);
368
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
376
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
369
  }
377
  }
370
 
378
 
371
  public Item() {
379
  public Item() {
Line 392... Line 400...
392
    long updatedOn,
400
    long updatedOn,
393
    boolean risky,
401
    boolean risky,
394
    int warrantyPeriod,
402
    int warrantyPeriod,
395
    ItemType type,
403
    ItemType type,
396
    boolean hasItemNo,
404
    boolean hasItemNo,
397
    boolean clearance)
405
    boolean clearance,
-
 
406
    double vatPercentage)
398
  {
407
  {
399
    this();
408
    this();
400
    this.id = id;
409
    this.id = id;
401
    setIdIsSet(true);
410
    setIdIsSet(true);
402
    this.productGroup = productGroup;
411
    this.productGroup = productGroup;
Line 429... Line 438...
429
    this.type = type;
438
    this.type = type;
430
    this.hasItemNo = hasItemNo;
439
    this.hasItemNo = hasItemNo;
431
    setHasItemNoIsSet(true);
440
    setHasItemNoIsSet(true);
432
    this.clearance = clearance;
441
    this.clearance = clearance;
433
    setClearanceIsSet(true);
442
    setClearanceIsSet(true);
-
 
443
    this.vatPercentage = vatPercentage;
-
 
444
    setVatPercentageIsSet(true);
434
  }
445
  }
435
 
446
 
436
  /**
447
  /**
437
   * Performs a deep copy on <i>other</i>.
448
   * Performs a deep copy on <i>other</i>.
438
   */
449
   */
Line 508... Line 519...
508
    }
519
    }
509
    this.comingSoonStartDate = other.comingSoonStartDate;
520
    this.comingSoonStartDate = other.comingSoonStartDate;
510
    this.expectedArrivalDate = other.expectedArrivalDate;
521
    this.expectedArrivalDate = other.expectedArrivalDate;
511
    this.hasItemNo = other.hasItemNo;
522
    this.hasItemNo = other.hasItemNo;
512
    this.clearance = other.clearance;
523
    this.clearance = other.clearance;
-
 
524
    this.vatPercentage = other.vatPercentage;
513
  }
525
  }
514
 
526
 
515
  public Item deepCopy() {
527
  public Item deepCopy() {
516
    return new Item(this);
528
    return new Item(this);
517
  }
529
  }
Line 574... Line 586...
574
    this.expectedArrivalDate = 0;
586
    this.expectedArrivalDate = 0;
575
    setHasItemNoIsSet(false);
587
    setHasItemNoIsSet(false);
576
    this.hasItemNo = false;
588
    this.hasItemNo = false;
577
    setClearanceIsSet(false);
589
    setClearanceIsSet(false);
578
    this.clearance = false;
590
    this.clearance = false;
-
 
591
    setVatPercentageIsSet(false);
-
 
592
    this.vatPercentage = 0.0;
579
  }
593
  }
580
 
594
 
581
  public long getId() {
595
  public long getId() {
582
    return this.id;
596
    return this.id;
583
  }
597
  }
Line 1385... Line 1399...
1385
 
1399
 
1386
  public void setClearanceIsSet(boolean value) {
1400
  public void setClearanceIsSet(boolean value) {
1387
    __isset_bit_vector.set(__CLEARANCE_ISSET_ID, value);
1401
    __isset_bit_vector.set(__CLEARANCE_ISSET_ID, value);
1388
  }
1402
  }
1389
 
1403
 
-
 
1404
  public double getVatPercentage() {
-
 
1405
    return this.vatPercentage;
-
 
1406
  }
-
 
1407
 
-
 
1408
  public void setVatPercentage(double vatPercentage) {
-
 
1409
    this.vatPercentage = vatPercentage;
-
 
1410
    setVatPercentageIsSet(true);
-
 
1411
  }
-
 
1412
 
-
 
1413
  public void unsetVatPercentage() {
-
 
1414
    __isset_bit_vector.clear(__VATPERCENTAGE_ISSET_ID);
-
 
1415
  }
-
 
1416
 
-
 
1417
  /** Returns true if field vatPercentage is set (has been assigned a value) and false otherwise */
-
 
1418
  public boolean isSetVatPercentage() {
-
 
1419
    return __isset_bit_vector.get(__VATPERCENTAGE_ISSET_ID);
-
 
1420
  }
-
 
1421
 
-
 
1422
  public void setVatPercentageIsSet(boolean value) {
-
 
1423
    __isset_bit_vector.set(__VATPERCENTAGE_ISSET_ID, value);
-
 
1424
  }
-
 
1425
 
1390
  public void setFieldValue(_Fields field, Object value) {
1426
  public void setFieldValue(_Fields field, Object value) {
1391
    switch (field) {
1427
    switch (field) {
1392
    case ID:
1428
    case ID:
1393
      if (value == null) {
1429
      if (value == null) {
1394
        unsetId();
1430
        unsetId();
Line 1667... Line 1703...
1667
      } else {
1703
      } else {
1668
        setClearance((Boolean)value);
1704
        setClearance((Boolean)value);
1669
      }
1705
      }
1670
      break;
1706
      break;
1671
 
1707
 
-
 
1708
    case VAT_PERCENTAGE:
-
 
1709
      if (value == null) {
-
 
1710
        unsetVatPercentage();
-
 
1711
      } else {
-
 
1712
        setVatPercentage((Double)value);
-
 
1713
      }
-
 
1714
      break;
-
 
1715
 
1672
    }
1716
    }
1673
  }
1717
  }
1674
 
1718
 
1675
  public Object getFieldValue(_Fields field) {
1719
  public Object getFieldValue(_Fields field) {
1676
    switch (field) {
1720
    switch (field) {
Line 1777... Line 1821...
1777
      return Boolean.valueOf(isHasItemNo());
1821
      return Boolean.valueOf(isHasItemNo());
1778
 
1822
 
1779
    case CLEARANCE:
1823
    case CLEARANCE:
1780
      return Boolean.valueOf(isClearance());
1824
      return Boolean.valueOf(isClearance());
1781
 
1825
 
-
 
1826
    case VAT_PERCENTAGE:
-
 
1827
      return Double.valueOf(getVatPercentage());
-
 
1828
 
1782
    }
1829
    }
1783
    throw new IllegalStateException();
1830
    throw new IllegalStateException();
1784
  }
1831
  }
1785
 
1832
 
1786
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1833
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1858... Line 1905...
1858
      return isSetExpectedArrivalDate();
1905
      return isSetExpectedArrivalDate();
1859
    case HAS_ITEM_NO:
1906
    case HAS_ITEM_NO:
1860
      return isSetHasItemNo();
1907
      return isSetHasItemNo();
1861
    case CLEARANCE:
1908
    case CLEARANCE:
1862
      return isSetClearance();
1909
      return isSetClearance();
-
 
1910
    case VAT_PERCENTAGE:
-
 
1911
      return isSetVatPercentage();
1863
    }
1912
    }
1864
    throw new IllegalStateException();
1913
    throw new IllegalStateException();
1865
  }
1914
  }
1866
 
1915
 
1867
  @Override
1916
  @Override
Line 2190... Line 2239...
2190
        return false;
2239
        return false;
2191
      if (this.clearance != that.clearance)
2240
      if (this.clearance != that.clearance)
2192
        return false;
2241
        return false;
2193
    }
2242
    }
2194
 
2243
 
-
 
2244
    boolean this_present_vatPercentage = true;
-
 
2245
    boolean that_present_vatPercentage = true;
-
 
2246
    if (this_present_vatPercentage || that_present_vatPercentage) {
-
 
2247
      if (!(this_present_vatPercentage && that_present_vatPercentage))
-
 
2248
        return false;
-
 
2249
      if (this.vatPercentage != that.vatPercentage)
-
 
2250
        return false;
-
 
2251
    }
-
 
2252
 
2195
    return true;
2253
    return true;
2196
  }
2254
  }
2197
 
2255
 
2198
  @Override
2256
  @Override
2199
  public int hashCode() {
2257
  public int hashCode() {
Line 2556... Line 2614...
2556
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clearance, typedOther.clearance);
2614
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clearance, typedOther.clearance);
2557
      if (lastComparison != 0) {
2615
      if (lastComparison != 0) {
2558
        return lastComparison;
2616
        return lastComparison;
2559
      }
2617
      }
2560
    }
2618
    }
-
 
2619
    lastComparison = Boolean.valueOf(isSetVatPercentage()).compareTo(typedOther.isSetVatPercentage());
-
 
2620
    if (lastComparison != 0) {
-
 
2621
      return lastComparison;
-
 
2622
    }
-
 
2623
    if (isSetVatPercentage()) {
-
 
2624
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vatPercentage, typedOther.vatPercentage);
-
 
2625
      if (lastComparison != 0) {
-
 
2626
        return lastComparison;
-
 
2627
      }
-
 
2628
    }
2561
    return 0;
2629
    return 0;
2562
  }
2630
  }
2563
 
2631
 
2564
  public _Fields fieldForId(int fieldId) {
2632
  public _Fields fieldForId(int fieldId) {
2565
    return _Fields.findByThriftId(fieldId);
2633
    return _Fields.findByThriftId(fieldId);
Line 2853... Line 2921...
2853
            setClearanceIsSet(true);
2921
            setClearanceIsSet(true);
2854
          } else { 
2922
          } else { 
2855
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2923
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2856
          }
2924
          }
2857
          break;
2925
          break;
-
 
2926
        case 37: // VAT_PERCENTAGE
-
 
2927
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
2928
            this.vatPercentage = iprot.readDouble();
-
 
2929
            setVatPercentageIsSet(true);
-
 
2930
          } else { 
-
 
2931
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2932
          }
-
 
2933
          break;
2858
        default:
2934
        default:
2859
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2935
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2860
      }
2936
      }
2861
      iprot.readFieldEnd();
2937
      iprot.readFieldEnd();
2862
    }
2938
    }
Line 3027... Line 3103...
3027
    oprot.writeBool(this.hasItemNo);
3103
    oprot.writeBool(this.hasItemNo);
3028
    oprot.writeFieldEnd();
3104
    oprot.writeFieldEnd();
3029
    oprot.writeFieldBegin(CLEARANCE_FIELD_DESC);
3105
    oprot.writeFieldBegin(CLEARANCE_FIELD_DESC);
3030
    oprot.writeBool(this.clearance);
3106
    oprot.writeBool(this.clearance);
3031
    oprot.writeFieldEnd();
3107
    oprot.writeFieldEnd();
-
 
3108
    oprot.writeFieldBegin(VAT_PERCENTAGE_FIELD_DESC);
-
 
3109
    oprot.writeDouble(this.vatPercentage);
-
 
3110
    oprot.writeFieldEnd();
3032
    oprot.writeFieldStop();
3111
    oprot.writeFieldStop();
3033
    oprot.writeStructEnd();
3112
    oprot.writeStructEnd();
3034
  }
3113
  }
3035
 
3114
 
3036
  @Override
3115
  @Override
Line 3247... Line 3326...
3247
    first = false;
3326
    first = false;
3248
    if (!first) sb.append(", ");
3327
    if (!first) sb.append(", ");
3249
    sb.append("clearance:");
3328
    sb.append("clearance:");
3250
    sb.append(this.clearance);
3329
    sb.append(this.clearance);
3251
    first = false;
3330
    first = false;
-
 
3331
    if (!first) sb.append(", ");
-
 
3332
    sb.append("vatPercentage:");
-
 
3333
    sb.append(this.vatPercentage);
-
 
3334
    first = false;
3252
    sb.append(")");
3335
    sb.append(")");
3253
    return sb.toString();
3336
    return sb.toString();
3254
  }
3337
  }
3255
 
3338
 
3256
  public void validate() throws org.apache.thrift.TException {
3339
  public void validate() throws org.apache.thrift.TException {