Subversion Repositories SmartDukaan

Rev

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

Rev 3089 Rev 3355
Line 55... Line 55...
55
  private static final TField DEFAULT_FOR_ENTITY_FIELD_DESC = new TField("defaultForEntity", TType.BOOL, (short)27);
55
  private static final TField DEFAULT_FOR_ENTITY_FIELD_DESC = new TField("defaultForEntity", TType.BOOL, (short)27);
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
 
61
 
61
  private long id;
62
  private long id;
62
  private String productGroup;
63
  private String productGroup;
63
  private String brand;
64
  private String brand;
64
  private String modelNumber;
65
  private String modelNumber;
Line 87... Line 88...
87
  private boolean defaultForEntity;
88
  private boolean defaultForEntity;
88
  private long updatedOn;
89
  private long updatedOn;
89
  private long bestSellingRank;
90
  private long bestSellingRank;
90
  private String hotspotCategory;
91
  private String hotspotCategory;
91
  private boolean risky;
92
  private boolean risky;
-
 
93
  private int expectedDelay;
92
 
94
 
93
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
95
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
94
  public enum _Fields implements TFieldIdEnum {
96
  public enum _Fields implements TFieldIdEnum {
95
    ID((short)1, "id"),
97
    ID((short)1, "id"),
96
    PRODUCT_GROUP((short)2, "productGroup"),
98
    PRODUCT_GROUP((short)2, "productGroup"),
Line 124... Line 126...
124
    DEALER_PRICE((short)26, "dealerPrice"),
126
    DEALER_PRICE((short)26, "dealerPrice"),
125
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
127
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
126
    UPDATED_ON((short)28, "updatedOn"),
128
    UPDATED_ON((short)28, "updatedOn"),
127
    BEST_SELLING_RANK((short)29, "bestSellingRank"),
129
    BEST_SELLING_RANK((short)29, "bestSellingRank"),
128
    HOTSPOT_CATEGORY((short)30, "hotspotCategory"),
130
    HOTSPOT_CATEGORY((short)30, "hotspotCategory"),
129
    RISKY((short)31, "risky");
131
    RISKY((short)31, "risky"),
-
 
132
    EXPECTED_DELAY((short)32, "expectedDelay");
130
 
133
 
131
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
134
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
132
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
135
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
133
 
136
 
134
    static {
137
    static {
Line 196... Line 199...
196
  private static final int __DEALERPRICE_ISSET_ID = 13;
199
  private static final int __DEALERPRICE_ISSET_ID = 13;
197
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
200
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
198
  private static final int __UPDATEDON_ISSET_ID = 15;
201
  private static final int __UPDATEDON_ISSET_ID = 15;
199
  private static final int __BESTSELLINGRANK_ISSET_ID = 16;
202
  private static final int __BESTSELLINGRANK_ISSET_ID = 16;
200
  private static final int __RISKY_ISSET_ID = 17;
203
  private static final int __RISKY_ISSET_ID = 17;
-
 
204
  private static final int __EXPECTEDDELAY_ISSET_ID = 18;
201
  private BitSet __isset_bit_vector = new BitSet(18);
205
  private BitSet __isset_bit_vector = new BitSet(19);
202
 
206
 
203
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
207
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
204
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
208
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
205
        new FieldValueMetaData(TType.I64)));
209
        new FieldValueMetaData(TType.I64)));
206
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
210
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
Line 263... Line 267...
263
        new FieldValueMetaData(TType.I64)));
267
        new FieldValueMetaData(TType.I64)));
264
    put(_Fields.HOTSPOT_CATEGORY, new FieldMetaData("hotspotCategory", TFieldRequirementType.DEFAULT, 
268
    put(_Fields.HOTSPOT_CATEGORY, new FieldMetaData("hotspotCategory", TFieldRequirementType.DEFAULT, 
265
        new FieldValueMetaData(TType.STRING)));
269
        new FieldValueMetaData(TType.STRING)));
266
    put(_Fields.RISKY, new FieldMetaData("risky", TFieldRequirementType.DEFAULT, 
270
    put(_Fields.RISKY, new FieldMetaData("risky", TFieldRequirementType.DEFAULT, 
267
        new FieldValueMetaData(TType.BOOL)));
271
        new FieldValueMetaData(TType.BOOL)));
-
 
272
    put(_Fields.EXPECTED_DELAY, new FieldMetaData("expectedDelay", TFieldRequirementType.OPTIONAL, 
-
 
273
        new FieldValueMetaData(TType.I32)));
268
  }});
274
  }});
269
 
275
 
270
  static {
276
  static {
271
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
277
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
272
  }
278
  }
Line 402... Line 408...
402
    this.bestSellingRank = other.bestSellingRank;
408
    this.bestSellingRank = other.bestSellingRank;
403
    if (other.isSetHotspotCategory()) {
409
    if (other.isSetHotspotCategory()) {
404
      this.hotspotCategory = other.hotspotCategory;
410
      this.hotspotCategory = other.hotspotCategory;
405
    }
411
    }
406
    this.risky = other.risky;
412
    this.risky = other.risky;
-
 
413
    this.expectedDelay = other.expectedDelay;
407
  }
414
  }
408
 
415
 
409
  public Item deepCopy() {
416
  public Item deepCopy() {
410
    return new Item(this);
417
    return new Item(this);
411
  }
418
  }
Line 1158... Line 1165...
1158
 
1165
 
1159
  public void setRiskyIsSet(boolean value) {
1166
  public void setRiskyIsSet(boolean value) {
1160
    __isset_bit_vector.set(__RISKY_ISSET_ID, value);
1167
    __isset_bit_vector.set(__RISKY_ISSET_ID, value);
1161
  }
1168
  }
1162
 
1169
 
-
 
1170
  public int getExpectedDelay() {
-
 
1171
    return this.expectedDelay;
-
 
1172
  }
-
 
1173
 
-
 
1174
  public Item setExpectedDelay(int expectedDelay) {
-
 
1175
    this.expectedDelay = expectedDelay;
-
 
1176
    setExpectedDelayIsSet(true);
-
 
1177
    return this;
-
 
1178
  }
-
 
1179
 
-
 
1180
  public void unsetExpectedDelay() {
-
 
1181
    __isset_bit_vector.clear(__EXPECTEDDELAY_ISSET_ID);
-
 
1182
  }
-
 
1183
 
-
 
1184
  /** Returns true if field expectedDelay is set (has been asigned a value) and false otherwise */
-
 
1185
  public boolean isSetExpectedDelay() {
-
 
1186
    return __isset_bit_vector.get(__EXPECTEDDELAY_ISSET_ID);
-
 
1187
  }
-
 
1188
 
-
 
1189
  public void setExpectedDelayIsSet(boolean value) {
-
 
1190
    __isset_bit_vector.set(__EXPECTEDDELAY_ISSET_ID, value);
-
 
1191
  }
-
 
1192
 
1163
  public void setFieldValue(_Fields field, Object value) {
1193
  public void setFieldValue(_Fields field, Object value) {
1164
    switch (field) {
1194
    switch (field) {
1165
    case ID:
1195
    case ID:
1166
      if (value == null) {
1196
      if (value == null) {
1167
        unsetId();
1197
        unsetId();
Line 1408... Line 1438...
1408
      } else {
1438
      } else {
1409
        setRisky((Boolean)value);
1439
        setRisky((Boolean)value);
1410
      }
1440
      }
1411
      break;
1441
      break;
1412
 
1442
 
-
 
1443
    case EXPECTED_DELAY:
-
 
1444
      if (value == null) {
-
 
1445
        unsetExpectedDelay();
-
 
1446
      } else {
-
 
1447
        setExpectedDelay((Integer)value);
-
 
1448
      }
-
 
1449
      break;
-
 
1450
 
1413
    }
1451
    }
1414
  }
1452
  }
1415
 
1453
 
1416
  public void setFieldValue(int fieldID, Object value) {
1454
  public void setFieldValue(int fieldID, Object value) {
1417
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1455
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1510... Line 1548...
1510
      return getHotspotCategory();
1548
      return getHotspotCategory();
1511
 
1549
 
1512
    case RISKY:
1550
    case RISKY:
1513
      return new Boolean(isRisky());
1551
      return new Boolean(isRisky());
1514
 
1552
 
-
 
1553
    case EXPECTED_DELAY:
-
 
1554
      return new Integer(getExpectedDelay());
-
 
1555
 
1515
    }
1556
    }
1516
    throw new IllegalStateException();
1557
    throw new IllegalStateException();
1517
  }
1558
  }
1518
 
1559
 
1519
  public Object getFieldValue(int fieldId) {
1560
  public Object getFieldValue(int fieldId) {
Line 1583... Line 1624...
1583
      return isSetBestSellingRank();
1624
      return isSetBestSellingRank();
1584
    case HOTSPOT_CATEGORY:
1625
    case HOTSPOT_CATEGORY:
1585
      return isSetHotspotCategory();
1626
      return isSetHotspotCategory();
1586
    case RISKY:
1627
    case RISKY:
1587
      return isSetRisky();
1628
      return isSetRisky();
-
 
1629
    case EXPECTED_DELAY:
-
 
1630
      return isSetExpectedDelay();
1588
    }
1631
    }
1589
    throw new IllegalStateException();
1632
    throw new IllegalStateException();
1590
  }
1633
  }
1591
 
1634
 
1592
  public boolean isSet(int fieldID) {
1635
  public boolean isSet(int fieldID) {
Line 1883... Line 1926...
1883
        return false;
1926
        return false;
1884
      if (this.risky != that.risky)
1927
      if (this.risky != that.risky)
1885
        return false;
1928
        return false;
1886
    }
1929
    }
1887
 
1930
 
-
 
1931
    boolean this_present_expectedDelay = true && this.isSetExpectedDelay();
-
 
1932
    boolean that_present_expectedDelay = true && that.isSetExpectedDelay();
-
 
1933
    if (this_present_expectedDelay || that_present_expectedDelay) {
-
 
1934
      if (!(this_present_expectedDelay && that_present_expectedDelay))
-
 
1935
        return false;
-
 
1936
      if (this.expectedDelay != that.expectedDelay)
-
 
1937
        return false;
-
 
1938
    }
-
 
1939
 
1888
    return true;
1940
    return true;
1889
  }
1941
  }
1890
 
1942
 
1891
  @Override
1943
  @Override
1892
  public int hashCode() {
1944
  public int hashCode() {
Line 2153... Line 2205...
2153
              setRiskyIsSet(true);
2205
              setRiskyIsSet(true);
2154
            } else { 
2206
            } else { 
2155
              TProtocolUtil.skip(iprot, field.type);
2207
              TProtocolUtil.skip(iprot, field.type);
2156
            }
2208
            }
2157
            break;
2209
            break;
-
 
2210
          case EXPECTED_DELAY:
-
 
2211
            if (field.type == TType.I32) {
-
 
2212
              this.expectedDelay = iprot.readI32();
-
 
2213
              setExpectedDelayIsSet(true);
-
 
2214
            } else { 
-
 
2215
              TProtocolUtil.skip(iprot, field.type);
-
 
2216
            }
-
 
2217
            break;
2158
        }
2218
        }
2159
        iprot.readFieldEnd();
2219
        iprot.readFieldEnd();
2160
      }
2220
      }
2161
    }
2221
    }
2162
    iprot.readStructEnd();
2222
    iprot.readStructEnd();
Line 2312... Line 2372...
2312
      oprot.writeFieldEnd();
2372
      oprot.writeFieldEnd();
2313
    }
2373
    }
2314
    oprot.writeFieldBegin(RISKY_FIELD_DESC);
2374
    oprot.writeFieldBegin(RISKY_FIELD_DESC);
2315
    oprot.writeBool(this.risky);
2375
    oprot.writeBool(this.risky);
2316
    oprot.writeFieldEnd();
2376
    oprot.writeFieldEnd();
-
 
2377
    if (isSetExpectedDelay()) {
-
 
2378
      oprot.writeFieldBegin(EXPECTED_DELAY_FIELD_DESC);
-
 
2379
      oprot.writeI32(this.expectedDelay);
-
 
2380
      oprot.writeFieldEnd();
-
 
2381
    }
2317
    oprot.writeFieldStop();
2382
    oprot.writeFieldStop();
2318
    oprot.writeStructEnd();
2383
    oprot.writeStructEnd();
2319
  }
2384
  }
2320
 
2385
 
2321
  @Override
2386
  @Override
Line 2524... Line 2589...
2524
    first = false;
2589
    first = false;
2525
    if (!first) sb.append(", ");
2590
    if (!first) sb.append(", ");
2526
    sb.append("risky:");
2591
    sb.append("risky:");
2527
    sb.append(this.risky);
2592
    sb.append(this.risky);
2528
    first = false;
2593
    first = false;
-
 
2594
    if (isSetExpectedDelay()) {
-
 
2595
      if (!first) sb.append(", ");
-
 
2596
      sb.append("expectedDelay:");
-
 
2597
      sb.append(this.expectedDelay);
-
 
2598
      first = false;
-
 
2599
    }
2529
    sb.append(")");
2600
    sb.append(")");
2530
    return sb.toString();
2601
    return sb.toString();
2531
  }
2602
  }
2532
 
2603
 
2533
  public void validate() throws TException {
2604
  public void validate() throws TException {