Subversion Repositories SmartDukaan

Rev

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

Rev 3355 Rev 3359
Line 56... Line 56...
56
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)28);
56
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)28);
57
  private static final TField BEST_SELLING_RANK_FIELD_DESC = new TField("bestSellingRank", TType.I64, (short)29);
57
  private static final TField BEST_SELLING_RANK_FIELD_DESC = new TField("bestSellingRank", TType.I64, (short)29);
58
  private static final TField HOTSPOT_CATEGORY_FIELD_DESC = new TField("hotspotCategory", TType.STRING, (short)30);
58
  private static final TField HOTSPOT_CATEGORY_FIELD_DESC = new TField("hotspotCategory", TType.STRING, (short)30);
59
  private static final TField RISKY_FIELD_DESC = new TField("risky", TType.BOOL, (short)31);
59
  private static final TField RISKY_FIELD_DESC = new TField("risky", TType.BOOL, (short)31);
60
  private static final TField EXPECTED_DELAY_FIELD_DESC = new TField("expectedDelay", TType.I32, (short)32);
60
  private static final TField EXPECTED_DELAY_FIELD_DESC = new TField("expectedDelay", TType.I32, (short)32);
-
 
61
  private static final TField PREFERRED_WAREHOUSE_FIELD_DESC = new TField("preferredWarehouse", TType.I64, (short)33);
61
 
62
 
62
  private long id;
63
  private long id;
63
  private String productGroup;
64
  private String productGroup;
64
  private String brand;
65
  private String brand;
65
  private String modelNumber;
66
  private String modelNumber;
Line 89... Line 90...
89
  private long updatedOn;
90
  private long updatedOn;
90
  private long bestSellingRank;
91
  private long bestSellingRank;
91
  private String hotspotCategory;
92
  private String hotspotCategory;
92
  private boolean risky;
93
  private boolean risky;
93
  private int expectedDelay;
94
  private int expectedDelay;
-
 
95
  private long preferredWarehouse;
94
 
96
 
95
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
97
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
96
  public enum _Fields implements TFieldIdEnum {
98
  public enum _Fields implements TFieldIdEnum {
97
    ID((short)1, "id"),
99
    ID((short)1, "id"),
98
    PRODUCT_GROUP((short)2, "productGroup"),
100
    PRODUCT_GROUP((short)2, "productGroup"),
Line 127... Line 129...
127
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
129
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
128
    UPDATED_ON((short)28, "updatedOn"),
130
    UPDATED_ON((short)28, "updatedOn"),
129
    BEST_SELLING_RANK((short)29, "bestSellingRank"),
131
    BEST_SELLING_RANK((short)29, "bestSellingRank"),
130
    HOTSPOT_CATEGORY((short)30, "hotspotCategory"),
132
    HOTSPOT_CATEGORY((short)30, "hotspotCategory"),
131
    RISKY((short)31, "risky"),
133
    RISKY((short)31, "risky"),
132
    EXPECTED_DELAY((short)32, "expectedDelay");
134
    EXPECTED_DELAY((short)32, "expectedDelay"),
-
 
135
    PREFERRED_WAREHOUSE((short)33, "preferredWarehouse");
133
 
136
 
134
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
137
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
135
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
138
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
136
 
139
 
137
    static {
140
    static {
Line 200... Line 203...
200
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
203
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
201
  private static final int __UPDATEDON_ISSET_ID = 15;
204
  private static final int __UPDATEDON_ISSET_ID = 15;
202
  private static final int __BESTSELLINGRANK_ISSET_ID = 16;
205
  private static final int __BESTSELLINGRANK_ISSET_ID = 16;
203
  private static final int __RISKY_ISSET_ID = 17;
206
  private static final int __RISKY_ISSET_ID = 17;
204
  private static final int __EXPECTEDDELAY_ISSET_ID = 18;
207
  private static final int __EXPECTEDDELAY_ISSET_ID = 18;
-
 
208
  private static final int __PREFERREDWAREHOUSE_ISSET_ID = 19;
205
  private BitSet __isset_bit_vector = new BitSet(19);
209
  private BitSet __isset_bit_vector = new BitSet(20);
206
 
210
 
207
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
211
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
208
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
212
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
209
        new FieldValueMetaData(TType.I64)));
213
        new FieldValueMetaData(TType.I64)));
210
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
214
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
Line 269... Line 273...
269
        new FieldValueMetaData(TType.STRING)));
273
        new FieldValueMetaData(TType.STRING)));
270
    put(_Fields.RISKY, new FieldMetaData("risky", TFieldRequirementType.DEFAULT, 
274
    put(_Fields.RISKY, new FieldMetaData("risky", TFieldRequirementType.DEFAULT, 
271
        new FieldValueMetaData(TType.BOOL)));
275
        new FieldValueMetaData(TType.BOOL)));
272
    put(_Fields.EXPECTED_DELAY, new FieldMetaData("expectedDelay", TFieldRequirementType.OPTIONAL, 
276
    put(_Fields.EXPECTED_DELAY, new FieldMetaData("expectedDelay", TFieldRequirementType.OPTIONAL, 
273
        new FieldValueMetaData(TType.I32)));
277
        new FieldValueMetaData(TType.I32)));
-
 
278
    put(_Fields.PREFERRED_WAREHOUSE, new FieldMetaData("preferredWarehouse", TFieldRequirementType.OPTIONAL, 
-
 
279
        new FieldValueMetaData(TType.I64)));
274
  }});
280
  }});
275
 
281
 
276
  static {
282
  static {
277
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
283
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
278
  }
284
  }
Line 409... Line 415...
409
    if (other.isSetHotspotCategory()) {
415
    if (other.isSetHotspotCategory()) {
410
      this.hotspotCategory = other.hotspotCategory;
416
      this.hotspotCategory = other.hotspotCategory;
411
    }
417
    }
412
    this.risky = other.risky;
418
    this.risky = other.risky;
413
    this.expectedDelay = other.expectedDelay;
419
    this.expectedDelay = other.expectedDelay;
-
 
420
    this.preferredWarehouse = other.preferredWarehouse;
414
  }
421
  }
415
 
422
 
416
  public Item deepCopy() {
423
  public Item deepCopy() {
417
    return new Item(this);
424
    return new Item(this);
418
  }
425
  }
Line 1188... Line 1195...
1188
 
1195
 
1189
  public void setExpectedDelayIsSet(boolean value) {
1196
  public void setExpectedDelayIsSet(boolean value) {
1190
    __isset_bit_vector.set(__EXPECTEDDELAY_ISSET_ID, value);
1197
    __isset_bit_vector.set(__EXPECTEDDELAY_ISSET_ID, value);
1191
  }
1198
  }
1192
 
1199
 
-
 
1200
  public long getPreferredWarehouse() {
-
 
1201
    return this.preferredWarehouse;
-
 
1202
  }
-
 
1203
 
-
 
1204
  public Item setPreferredWarehouse(long preferredWarehouse) {
-
 
1205
    this.preferredWarehouse = preferredWarehouse;
-
 
1206
    setPreferredWarehouseIsSet(true);
-
 
1207
    return this;
-
 
1208
  }
-
 
1209
 
-
 
1210
  public void unsetPreferredWarehouse() {
-
 
1211
    __isset_bit_vector.clear(__PREFERREDWAREHOUSE_ISSET_ID);
-
 
1212
  }
-
 
1213
 
-
 
1214
  /** Returns true if field preferredWarehouse is set (has been asigned a value) and false otherwise */
-
 
1215
  public boolean isSetPreferredWarehouse() {
-
 
1216
    return __isset_bit_vector.get(__PREFERREDWAREHOUSE_ISSET_ID);
-
 
1217
  }
-
 
1218
 
-
 
1219
  public void setPreferredWarehouseIsSet(boolean value) {
-
 
1220
    __isset_bit_vector.set(__PREFERREDWAREHOUSE_ISSET_ID, value);
-
 
1221
  }
-
 
1222
 
1193
  public void setFieldValue(_Fields field, Object value) {
1223
  public void setFieldValue(_Fields field, Object value) {
1194
    switch (field) {
1224
    switch (field) {
1195
    case ID:
1225
    case ID:
1196
      if (value == null) {
1226
      if (value == null) {
1197
        unsetId();
1227
        unsetId();
Line 1446... Line 1476...
1446
      } else {
1476
      } else {
1447
        setExpectedDelay((Integer)value);
1477
        setExpectedDelay((Integer)value);
1448
      }
1478
      }
1449
      break;
1479
      break;
1450
 
1480
 
-
 
1481
    case PREFERRED_WAREHOUSE:
-
 
1482
      if (value == null) {
-
 
1483
        unsetPreferredWarehouse();
-
 
1484
      } else {
-
 
1485
        setPreferredWarehouse((Long)value);
-
 
1486
      }
-
 
1487
      break;
-
 
1488
 
1451
    }
1489
    }
1452
  }
1490
  }
1453
 
1491
 
1454
  public void setFieldValue(int fieldID, Object value) {
1492
  public void setFieldValue(int fieldID, Object value) {
1455
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1493
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1551... Line 1589...
1551
      return new Boolean(isRisky());
1589
      return new Boolean(isRisky());
1552
 
1590
 
1553
    case EXPECTED_DELAY:
1591
    case EXPECTED_DELAY:
1554
      return new Integer(getExpectedDelay());
1592
      return new Integer(getExpectedDelay());
1555
 
1593
 
-
 
1594
    case PREFERRED_WAREHOUSE:
-
 
1595
      return new Long(getPreferredWarehouse());
-
 
1596
 
1556
    }
1597
    }
1557
    throw new IllegalStateException();
1598
    throw new IllegalStateException();
1558
  }
1599
  }
1559
 
1600
 
1560
  public Object getFieldValue(int fieldId) {
1601
  public Object getFieldValue(int fieldId) {
Line 1626... Line 1667...
1626
      return isSetHotspotCategory();
1667
      return isSetHotspotCategory();
1627
    case RISKY:
1668
    case RISKY:
1628
      return isSetRisky();
1669
      return isSetRisky();
1629
    case EXPECTED_DELAY:
1670
    case EXPECTED_DELAY:
1630
      return isSetExpectedDelay();
1671
      return isSetExpectedDelay();
-
 
1672
    case PREFERRED_WAREHOUSE:
-
 
1673
      return isSetPreferredWarehouse();
1631
    }
1674
    }
1632
    throw new IllegalStateException();
1675
    throw new IllegalStateException();
1633
  }
1676
  }
1634
 
1677
 
1635
  public boolean isSet(int fieldID) {
1678
  public boolean isSet(int fieldID) {
Line 1935... Line 1978...
1935
        return false;
1978
        return false;
1936
      if (this.expectedDelay != that.expectedDelay)
1979
      if (this.expectedDelay != that.expectedDelay)
1937
        return false;
1980
        return false;
1938
    }
1981
    }
1939
 
1982
 
-
 
1983
    boolean this_present_preferredWarehouse = true && this.isSetPreferredWarehouse();
-
 
1984
    boolean that_present_preferredWarehouse = true && that.isSetPreferredWarehouse();
-
 
1985
    if (this_present_preferredWarehouse || that_present_preferredWarehouse) {
-
 
1986
      if (!(this_present_preferredWarehouse && that_present_preferredWarehouse))
-
 
1987
        return false;
-
 
1988
      if (this.preferredWarehouse != that.preferredWarehouse)
-
 
1989
        return false;
-
 
1990
    }
-
 
1991
 
1940
    return true;
1992
    return true;
1941
  }
1993
  }
1942
 
1994
 
1943
  @Override
1995
  @Override
1944
  public int hashCode() {
1996
  public int hashCode() {
Line 2213... Line 2265...
2213
              setExpectedDelayIsSet(true);
2265
              setExpectedDelayIsSet(true);
2214
            } else { 
2266
            } else { 
2215
              TProtocolUtil.skip(iprot, field.type);
2267
              TProtocolUtil.skip(iprot, field.type);
2216
            }
2268
            }
2217
            break;
2269
            break;
-
 
2270
          case PREFERRED_WAREHOUSE:
-
 
2271
            if (field.type == TType.I64) {
-
 
2272
              this.preferredWarehouse = iprot.readI64();
-
 
2273
              setPreferredWarehouseIsSet(true);
-
 
2274
            } else { 
-
 
2275
              TProtocolUtil.skip(iprot, field.type);
-
 
2276
            }
-
 
2277
            break;
2218
        }
2278
        }
2219
        iprot.readFieldEnd();
2279
        iprot.readFieldEnd();
2220
      }
2280
      }
2221
    }
2281
    }
2222
    iprot.readStructEnd();
2282
    iprot.readStructEnd();
Line 2377... Line 2437...
2377
    if (isSetExpectedDelay()) {
2437
    if (isSetExpectedDelay()) {
2378
      oprot.writeFieldBegin(EXPECTED_DELAY_FIELD_DESC);
2438
      oprot.writeFieldBegin(EXPECTED_DELAY_FIELD_DESC);
2379
      oprot.writeI32(this.expectedDelay);
2439
      oprot.writeI32(this.expectedDelay);
2380
      oprot.writeFieldEnd();
2440
      oprot.writeFieldEnd();
2381
    }
2441
    }
-
 
2442
    if (isSetPreferredWarehouse()) {
-
 
2443
      oprot.writeFieldBegin(PREFERRED_WAREHOUSE_FIELD_DESC);
-
 
2444
      oprot.writeI64(this.preferredWarehouse);
-
 
2445
      oprot.writeFieldEnd();
-
 
2446
    }
2382
    oprot.writeFieldStop();
2447
    oprot.writeFieldStop();
2383
    oprot.writeStructEnd();
2448
    oprot.writeStructEnd();
2384
  }
2449
  }
2385
 
2450
 
2386
  @Override
2451
  @Override
Line 2595... Line 2660...
2595
      if (!first) sb.append(", ");
2660
      if (!first) sb.append(", ");
2596
      sb.append("expectedDelay:");
2661
      sb.append("expectedDelay:");
2597
      sb.append(this.expectedDelay);
2662
      sb.append(this.expectedDelay);
2598
      first = false;
2663
      first = false;
2599
    }
2664
    }
-
 
2665
    if (isSetPreferredWarehouse()) {
-
 
2666
      if (!first) sb.append(", ");
-
 
2667
      sb.append("preferredWarehouse:");
-
 
2668
      sb.append(this.preferredWarehouse);
-
 
2669
      first = false;
-
 
2670
    }
2600
    sb.append(")");
2671
    sb.append(")");
2601
    return sb.toString();
2672
    return sb.toString();
2602
  }
2673
  }
2603
 
2674
 
2604
  public void validate() throws TException {
2675
  public void validate() throws TException {