Subversion Repositories SmartDukaan

Rev

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

Rev 5336 Rev 5385
Line 57... Line 57...
57
  private static final org.apache.thrift.protocol.TField WARRANTY_PERIOD_FIELD_DESC = new org.apache.thrift.protocol.TField("warrantyPeriod", org.apache.thrift.protocol.TType.I32, (short)32);
57
  private static final org.apache.thrift.protocol.TField WARRANTY_PERIOD_FIELD_DESC = new org.apache.thrift.protocol.TField("warrantyPeriod", org.apache.thrift.protocol.TType.I32, (short)32);
58
  private static final org.apache.thrift.protocol.TField PREFERRED_VENDOR_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredVendor", org.apache.thrift.protocol.TType.I64, (short)33);
58
  private static final org.apache.thrift.protocol.TField PREFERRED_VENDOR_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredVendor", org.apache.thrift.protocol.TType.I64, (short)33);
59
  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)34);
59
  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)34);
60
  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)35);
60
  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)35);
61
  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)36);
61
  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)36);
-
 
62
  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)37);
62
 
63
 
63
  private long id; // required
64
  private long id; // required
64
  private String productGroup; // required
65
  private String productGroup; // required
65
  private String brand; // required
66
  private String brand; // required
66
  private String modelNumber; // required
67
  private String modelNumber; // required
Line 94... Line 95...
94
  private int warrantyPeriod; // required
95
  private int warrantyPeriod; // required
95
  private long preferredVendor; // required
96
  private long preferredVendor; // required
96
  private ItemType type; // required
97
  private ItemType type; // required
97
  private long comingSoonStartDate; // required
98
  private long comingSoonStartDate; // required
98
  private long expectedArrivalDate; // required
99
  private long expectedArrivalDate; // required
-
 
100
  private boolean hasItemNo; // required
99
 
101
 
100
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
102
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
101
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
103
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
102
    ID((short)1, "id"),
104
    ID((short)1, "id"),
103
    PRODUCT_GROUP((short)2, "productGroup"),
105
    PRODUCT_GROUP((short)2, "productGroup"),
Line 140... Line 142...
140
     * 
142
     * 
141
     * @see ItemType
143
     * @see ItemType
142
     */
144
     */
143
    TYPE((short)34, "type"),
145
    TYPE((short)34, "type"),
144
    COMING_SOON_START_DATE((short)35, "comingSoonStartDate"),
146
    COMING_SOON_START_DATE((short)35, "comingSoonStartDate"),
145
    EXPECTED_ARRIVAL_DATE((short)36, "expectedArrivalDate");
147
    EXPECTED_ARRIVAL_DATE((short)36, "expectedArrivalDate"),
-
 
148
    HAS_ITEM_NO((short)37, "hasItemNo");
146
 
149
 
147
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
150
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
148
 
151
 
149
    static {
152
    static {
150
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
153
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 227... Line 230...
227
          return TYPE;
230
          return TYPE;
228
        case 35: // COMING_SOON_START_DATE
231
        case 35: // COMING_SOON_START_DATE
229
          return COMING_SOON_START_DATE;
232
          return COMING_SOON_START_DATE;
230
        case 36: // EXPECTED_ARRIVAL_DATE
233
        case 36: // EXPECTED_ARRIVAL_DATE
231
          return EXPECTED_ARRIVAL_DATE;
234
          return EXPECTED_ARRIVAL_DATE;
-
 
235
        case 37: // HAS_ITEM_NO
-
 
236
          return HAS_ITEM_NO;
232
        default:
237
        default:
233
          return null;
238
          return null;
234
      }
239
      }
235
    }
240
    }
236
 
241
 
Line 290... Line 295...
290
  private static final int __ISWAREHOUSEPREFERENCESTICKY_ISSET_ID = 18;
295
  private static final int __ISWAREHOUSEPREFERENCESTICKY_ISSET_ID = 18;
291
  private static final int __WARRANTYPERIOD_ISSET_ID = 19;
296
  private static final int __WARRANTYPERIOD_ISSET_ID = 19;
292
  private static final int __PREFERREDVENDOR_ISSET_ID = 20;
297
  private static final int __PREFERREDVENDOR_ISSET_ID = 20;
293
  private static final int __COMINGSOONSTARTDATE_ISSET_ID = 21;
298
  private static final int __COMINGSOONSTARTDATE_ISSET_ID = 21;
294
  private static final int __EXPECTEDARRIVALDATE_ISSET_ID = 22;
299
  private static final int __EXPECTEDARRIVALDATE_ISSET_ID = 22;
-
 
300
  private static final int __HASITEMNO_ISSET_ID = 23;
295
  private BitSet __isset_bit_vector = new BitSet(23);
301
  private BitSet __isset_bit_vector = new BitSet(24);
296
 
302
 
297
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
303
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
298
  static {
304
  static {
299
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
305
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
300
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
306
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 369... Line 375...
369
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ItemType.class)));
375
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ItemType.class)));
370
    tmpMap.put(_Fields.COMING_SOON_START_DATE, new org.apache.thrift.meta_data.FieldMetaData("comingSoonStartDate", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
376
    tmpMap.put(_Fields.COMING_SOON_START_DATE, new org.apache.thrift.meta_data.FieldMetaData("comingSoonStartDate", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
371
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
377
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
372
    tmpMap.put(_Fields.EXPECTED_ARRIVAL_DATE, new org.apache.thrift.meta_data.FieldMetaData("expectedArrivalDate", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
378
    tmpMap.put(_Fields.EXPECTED_ARRIVAL_DATE, new org.apache.thrift.meta_data.FieldMetaData("expectedArrivalDate", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
373
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
379
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
380
    tmpMap.put(_Fields.HAS_ITEM_NO, new org.apache.thrift.meta_data.FieldMetaData("hasItemNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
381
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
374
    metaDataMap = Collections.unmodifiableMap(tmpMap);
382
    metaDataMap = Collections.unmodifiableMap(tmpMap);
375
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
383
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
376
  }
384
  }
377
 
385
 
378
  public Item() {
386
  public Item() {
Line 398... Line 406...
398
    String bestDealText,
406
    String bestDealText,
399
    boolean defaultForEntity,
407
    boolean defaultForEntity,
400
    long updatedOn,
408
    long updatedOn,
401
    boolean risky,
409
    boolean risky,
402
    int warrantyPeriod,
410
    int warrantyPeriod,
403
    ItemType type)
411
    ItemType type,
-
 
412
    boolean hasItemNo)
404
  {
413
  {
405
    this();
414
    this();
406
    this.id = id;
415
    this.id = id;
407
    setIdIsSet(true);
416
    setIdIsSet(true);
408
    this.productGroup = productGroup;
417
    this.productGroup = productGroup;
Line 432... Line 441...
432
    this.risky = risky;
441
    this.risky = risky;
433
    setRiskyIsSet(true);
442
    setRiskyIsSet(true);
434
    this.warrantyPeriod = warrantyPeriod;
443
    this.warrantyPeriod = warrantyPeriod;
435
    setWarrantyPeriodIsSet(true);
444
    setWarrantyPeriodIsSet(true);
436
    this.type = type;
445
    this.type = type;
-
 
446
    this.hasItemNo = hasItemNo;
-
 
447
    setHasItemNoIsSet(true);
437
  }
448
  }
438
 
449
 
439
  /**
450
  /**
440
   * Performs a deep copy on <i>other</i>.
451
   * Performs a deep copy on <i>other</i>.
441
   */
452
   */
Line 514... Line 525...
514
    if (other.isSetType()) {
525
    if (other.isSetType()) {
515
      this.type = other.type;
526
      this.type = other.type;
516
    }
527
    }
517
    this.comingSoonStartDate = other.comingSoonStartDate;
528
    this.comingSoonStartDate = other.comingSoonStartDate;
518
    this.expectedArrivalDate = other.expectedArrivalDate;
529
    this.expectedArrivalDate = other.expectedArrivalDate;
-
 
530
    this.hasItemNo = other.hasItemNo;
519
  }
531
  }
520
 
532
 
521
  public Item deepCopy() {
533
  public Item deepCopy() {
522
    return new Item(this);
534
    return new Item(this);
523
  }
535
  }
Line 581... Line 593...
581
    this.type = null;
593
    this.type = null;
582
    setComingSoonStartDateIsSet(false);
594
    setComingSoonStartDateIsSet(false);
583
    this.comingSoonStartDate = 0;
595
    this.comingSoonStartDate = 0;
584
    setExpectedArrivalDateIsSet(false);
596
    setExpectedArrivalDateIsSet(false);
585
    this.expectedArrivalDate = 0;
597
    this.expectedArrivalDate = 0;
-
 
598
    setHasItemNoIsSet(false);
-
 
599
    this.hasItemNo = false;
586
  }
600
  }
587
 
601
 
588
  public long getId() {
602
  public long getId() {
589
    return this.id;
603
    return this.id;
590
  }
604
  }
Line 1415... Line 1429...
1415
 
1429
 
1416
  public void setExpectedArrivalDateIsSet(boolean value) {
1430
  public void setExpectedArrivalDateIsSet(boolean value) {
1417
    __isset_bit_vector.set(__EXPECTEDARRIVALDATE_ISSET_ID, value);
1431
    __isset_bit_vector.set(__EXPECTEDARRIVALDATE_ISSET_ID, value);
1418
  }
1432
  }
1419
 
1433
 
-
 
1434
  public boolean isHasItemNo() {
-
 
1435
    return this.hasItemNo;
-
 
1436
  }
-
 
1437
 
-
 
1438
  public void setHasItemNo(boolean hasItemNo) {
-
 
1439
    this.hasItemNo = hasItemNo;
-
 
1440
    setHasItemNoIsSet(true);
-
 
1441
  }
-
 
1442
 
-
 
1443
  public void unsetHasItemNo() {
-
 
1444
    __isset_bit_vector.clear(__HASITEMNO_ISSET_ID);
-
 
1445
  }
-
 
1446
 
-
 
1447
  /** Returns true if field hasItemNo is set (has been assigned a value) and false otherwise */
-
 
1448
  public boolean isSetHasItemNo() {
-
 
1449
    return __isset_bit_vector.get(__HASITEMNO_ISSET_ID);
-
 
1450
  }
-
 
1451
 
-
 
1452
  public void setHasItemNoIsSet(boolean value) {
-
 
1453
    __isset_bit_vector.set(__HASITEMNO_ISSET_ID, value);
-
 
1454
  }
-
 
1455
 
1420
  public void setFieldValue(_Fields field, Object value) {
1456
  public void setFieldValue(_Fields field, Object value) {
1421
    switch (field) {
1457
    switch (field) {
1422
    case ID:
1458
    case ID:
1423
      if (value == null) {
1459
      if (value == null) {
1424
        unsetId();
1460
        unsetId();
Line 1705... Line 1741...
1705
      } else {
1741
      } else {
1706
        setExpectedArrivalDate((Long)value);
1742
        setExpectedArrivalDate((Long)value);
1707
      }
1743
      }
1708
      break;
1744
      break;
1709
 
1745
 
-
 
1746
    case HAS_ITEM_NO:
-
 
1747
      if (value == null) {
-
 
1748
        unsetHasItemNo();
-
 
1749
      } else {
-
 
1750
        setHasItemNo((Boolean)value);
-
 
1751
      }
-
 
1752
      break;
-
 
1753
 
1710
    }
1754
    }
1711
  }
1755
  }
1712
 
1756
 
1713
  public Object getFieldValue(_Fields field) {
1757
  public Object getFieldValue(_Fields field) {
1714
    switch (field) {
1758
    switch (field) {
Line 1818... Line 1862...
1818
      return Long.valueOf(getComingSoonStartDate());
1862
      return Long.valueOf(getComingSoonStartDate());
1819
 
1863
 
1820
    case EXPECTED_ARRIVAL_DATE:
1864
    case EXPECTED_ARRIVAL_DATE:
1821
      return Long.valueOf(getExpectedArrivalDate());
1865
      return Long.valueOf(getExpectedArrivalDate());
1822
 
1866
 
-
 
1867
    case HAS_ITEM_NO:
-
 
1868
      return Boolean.valueOf(isHasItemNo());
-
 
1869
 
1823
    }
1870
    }
1824
    throw new IllegalStateException();
1871
    throw new IllegalStateException();
1825
  }
1872
  }
1826
 
1873
 
1827
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1874
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1901... Line 1948...
1901
      return isSetType();
1948
      return isSetType();
1902
    case COMING_SOON_START_DATE:
1949
    case COMING_SOON_START_DATE:
1903
      return isSetComingSoonStartDate();
1950
      return isSetComingSoonStartDate();
1904
    case EXPECTED_ARRIVAL_DATE:
1951
    case EXPECTED_ARRIVAL_DATE:
1905
      return isSetExpectedArrivalDate();
1952
      return isSetExpectedArrivalDate();
-
 
1953
    case HAS_ITEM_NO:
-
 
1954
      return isSetHasItemNo();
1906
    }
1955
    }
1907
    throw new IllegalStateException();
1956
    throw new IllegalStateException();
1908
  }
1957
  }
1909
 
1958
 
1910
  @Override
1959
  @Override
Line 2242... Line 2291...
2242
        return false;
2291
        return false;
2243
      if (this.expectedArrivalDate != that.expectedArrivalDate)
2292
      if (this.expectedArrivalDate != that.expectedArrivalDate)
2244
        return false;
2293
        return false;
2245
    }
2294
    }
2246
 
2295
 
-
 
2296
    boolean this_present_hasItemNo = true;
-
 
2297
    boolean that_present_hasItemNo = true;
-
 
2298
    if (this_present_hasItemNo || that_present_hasItemNo) {
-
 
2299
      if (!(this_present_hasItemNo && that_present_hasItemNo))
-
 
2300
        return false;
-
 
2301
      if (this.hasItemNo != that.hasItemNo)
-
 
2302
        return false;
-
 
2303
    }
-
 
2304
 
2247
    return true;
2305
    return true;
2248
  }
2306
  }
2249
 
2307
 
2250
  @Override
2308
  @Override
2251
  public int hashCode() {
2309
  public int hashCode() {
Line 2618... Line 2676...
2618
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expectedArrivalDate, typedOther.expectedArrivalDate);
2676
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expectedArrivalDate, typedOther.expectedArrivalDate);
2619
      if (lastComparison != 0) {
2677
      if (lastComparison != 0) {
2620
        return lastComparison;
2678
        return lastComparison;
2621
      }
2679
      }
2622
    }
2680
    }
-
 
2681
    lastComparison = Boolean.valueOf(isSetHasItemNo()).compareTo(typedOther.isSetHasItemNo());
-
 
2682
    if (lastComparison != 0) {
-
 
2683
      return lastComparison;
-
 
2684
    }
-
 
2685
    if (isSetHasItemNo()) {
-
 
2686
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasItemNo, typedOther.hasItemNo);
-
 
2687
      if (lastComparison != 0) {
-
 
2688
        return lastComparison;
-
 
2689
      }
-
 
2690
    }
2623
    return 0;
2691
    return 0;
2624
  }
2692
  }
2625
 
2693
 
2626
  public _Fields fieldForId(int fieldId) {
2694
  public _Fields fieldForId(int fieldId) {
2627
    return _Fields.findByThriftId(fieldId);
2695
    return _Fields.findByThriftId(fieldId);
Line 2923... Line 2991...
2923
            setExpectedArrivalDateIsSet(true);
2991
            setExpectedArrivalDateIsSet(true);
2924
          } else { 
2992
          } else { 
2925
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2993
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2926
          }
2994
          }
2927
          break;
2995
          break;
-
 
2996
        case 37: // HAS_ITEM_NO
-
 
2997
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
2998
            this.hasItemNo = iprot.readBool();
-
 
2999
            setHasItemNoIsSet(true);
-
 
3000
          } else { 
-
 
3001
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3002
          }
-
 
3003
          break;
2928
        default:
3004
        default:
2929
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3005
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2930
      }
3006
      }
2931
      iprot.readFieldEnd();
3007
      iprot.readFieldEnd();
2932
    }
3008
    }
Line 3106... Line 3182...
3106
    if (isSetExpectedArrivalDate()) {
3182
    if (isSetExpectedArrivalDate()) {
3107
      oprot.writeFieldBegin(EXPECTED_ARRIVAL_DATE_FIELD_DESC);
3183
      oprot.writeFieldBegin(EXPECTED_ARRIVAL_DATE_FIELD_DESC);
3108
      oprot.writeI64(this.expectedArrivalDate);
3184
      oprot.writeI64(this.expectedArrivalDate);
3109
      oprot.writeFieldEnd();
3185
      oprot.writeFieldEnd();
3110
    }
3186
    }
-
 
3187
    oprot.writeFieldBegin(HAS_ITEM_NO_FIELD_DESC);
-
 
3188
    oprot.writeBool(this.hasItemNo);
-
 
3189
    oprot.writeFieldEnd();
3111
    oprot.writeFieldStop();
3190
    oprot.writeFieldStop();
3112
    oprot.writeStructEnd();
3191
    oprot.writeStructEnd();
3113
  }
3192
  }
3114
 
3193
 
3115
  @Override
3194
  @Override
Line 3338... Line 3417...
3338
      if (!first) sb.append(", ");
3417
      if (!first) sb.append(", ");
3339
      sb.append("expectedArrivalDate:");
3418
      sb.append("expectedArrivalDate:");
3340
      sb.append(this.expectedArrivalDate);
3419
      sb.append(this.expectedArrivalDate);
3341
      first = false;
3420
      first = false;
3342
    }
3421
    }
-
 
3422
    if (!first) sb.append(", ");
-
 
3423
    sb.append("hasItemNo:");
-
 
3424
    sb.append(this.hasItemNo);
-
 
3425
    first = false;
3343
    sb.append(")");
3426
    sb.append(")");
3344
    return sb.toString();
3427
    return sb.toString();
3345
  }
3428
  }
3346
 
3429
 
3347
  public void validate() throws org.apache.thrift.TException {
3430
  public void validate() throws org.apache.thrift.TException {