Subversion Repositories SmartDukaan

Rev

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

Rev 1329 Rev 1910
Line 49... Line 49...
49
  private static final TField ITEM_STATUS_FIELD_DESC = new TField("itemStatus", TType.I32, (short)21);
49
  private static final TField ITEM_STATUS_FIELD_DESC = new TField("itemStatus", TType.I32, (short)21);
50
  private static final TField OTHER_INFO_FIELD_DESC = new TField("otherInfo", TType.MAP, (short)22);
50
  private static final TField OTHER_INFO_FIELD_DESC = new TField("otherInfo", TType.MAP, (short)22);
51
  private static final TField BEST_DEAL_TEXT_FIELD_DESC = new TField("bestDealText", TType.STRING, (short)23);
51
  private static final TField BEST_DEAL_TEXT_FIELD_DESC = new TField("bestDealText", TType.STRING, (short)23);
52
  private static final TField BEST_DEAL_VALUE_FIELD_DESC = new TField("bestDealValue", TType.DOUBLE, (short)24);
52
  private static final TField BEST_DEAL_VALUE_FIELD_DESC = new TField("bestDealValue", TType.DOUBLE, (short)24);
53
  private static final TField DEALER_PRICE_FIELD_DESC = new TField("dealerPrice", TType.DOUBLE, (short)25);
53
  private static final TField DEALER_PRICE_FIELD_DESC = new TField("dealerPrice", TType.DOUBLE, (short)25);
-
 
54
  private static final TField DEFAULT_FOR_ENTITY_FIELD_DESC = new TField("defaultForEntity", TType.BOOL, (short)26);
54
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)26);
55
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)27);
55
 
56
 
56
  private long id;
57
  private long id;
57
  private String productGroup;
58
  private String productGroup;
58
  private String brand;
59
  private String brand;
59
  private String modelNumber;
60
  private String modelNumber;
Line 76... Line 77...
76
  private status itemStatus;
77
  private status itemStatus;
77
  private Map<String,String> otherInfo;
78
  private Map<String,String> otherInfo;
78
  private String bestDealText;
79
  private String bestDealText;
79
  private double bestDealValue;
80
  private double bestDealValue;
80
  private double dealerPrice;
81
  private double dealerPrice;
-
 
82
  private boolean defaultForEntity;
81
  private long updatedOn;
83
  private long updatedOn;
82
 
84
 
83
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
85
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
84
  public enum _Fields implements TFieldIdEnum {
86
  public enum _Fields implements TFieldIdEnum {
85
    ID((short)1, "id"),
87
    ID((short)1, "id"),
Line 109... Line 111...
109
    ITEM_STATUS((short)21, "itemStatus"),
111
    ITEM_STATUS((short)21, "itemStatus"),
110
    OTHER_INFO((short)22, "otherInfo"),
112
    OTHER_INFO((short)22, "otherInfo"),
111
    BEST_DEAL_TEXT((short)23, "bestDealText"),
113
    BEST_DEAL_TEXT((short)23, "bestDealText"),
112
    BEST_DEAL_VALUE((short)24, "bestDealValue"),
114
    BEST_DEAL_VALUE((short)24, "bestDealValue"),
113
    DEALER_PRICE((short)25, "dealerPrice"),
115
    DEALER_PRICE((short)25, "dealerPrice"),
-
 
116
    DEFAULT_FOR_ENTITY((short)26, "defaultForEntity"),
114
    UPDATED_ON((short)26, "updatedOn");
117
    UPDATED_ON((short)27, "updatedOn");
115
 
118
 
116
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
119
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
117
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
120
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
118
 
121
 
119
    static {
122
    static {
Line 177... Line 180...
177
  private static final int __ADDEDON_ISSET_ID = 9;
180
  private static final int __ADDEDON_ISSET_ID = 9;
178
  private static final int __STARTDATE_ISSET_ID = 10;
181
  private static final int __STARTDATE_ISSET_ID = 10;
179
  private static final int __RETIREDATE_ISSET_ID = 11;
182
  private static final int __RETIREDATE_ISSET_ID = 11;
180
  private static final int __BESTDEALVALUE_ISSET_ID = 12;
183
  private static final int __BESTDEALVALUE_ISSET_ID = 12;
181
  private static final int __DEALERPRICE_ISSET_ID = 13;
184
  private static final int __DEALERPRICE_ISSET_ID = 13;
-
 
185
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
182
  private static final int __UPDATEDON_ISSET_ID = 14;
186
  private static final int __UPDATEDON_ISSET_ID = 15;
183
  private BitSet __isset_bit_vector = new BitSet(15);
187
  private BitSet __isset_bit_vector = new BitSet(16);
184
 
188
 
185
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
189
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
186
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
190
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
187
        new FieldValueMetaData(TType.I64)));
191
        new FieldValueMetaData(TType.I64)));
188
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
192
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
Line 233... Line 237...
233
        new FieldValueMetaData(TType.STRING)));
237
        new FieldValueMetaData(TType.STRING)));
234
    put(_Fields.BEST_DEAL_VALUE, new FieldMetaData("bestDealValue", TFieldRequirementType.DEFAULT, 
238
    put(_Fields.BEST_DEAL_VALUE, new FieldMetaData("bestDealValue", TFieldRequirementType.DEFAULT, 
235
        new FieldValueMetaData(TType.DOUBLE)));
239
        new FieldValueMetaData(TType.DOUBLE)));
236
    put(_Fields.DEALER_PRICE, new FieldMetaData("dealerPrice", TFieldRequirementType.DEFAULT, 
240
    put(_Fields.DEALER_PRICE, new FieldMetaData("dealerPrice", TFieldRequirementType.DEFAULT, 
237
        new FieldValueMetaData(TType.DOUBLE)));
241
        new FieldValueMetaData(TType.DOUBLE)));
-
 
242
    put(_Fields.DEFAULT_FOR_ENTITY, new FieldMetaData("defaultForEntity", TFieldRequirementType.DEFAULT, 
-
 
243
        new FieldValueMetaData(TType.BOOL)));
238
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
244
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
239
        new FieldValueMetaData(TType.I64)));
245
        new FieldValueMetaData(TType.I64)));
240
  }});
246
  }});
241
 
247
 
242
  static {
248
  static {
Line 270... Line 276...
270
    status itemStatus,
276
    status itemStatus,
271
    Map<String,String> otherInfo,
277
    Map<String,String> otherInfo,
272
    String bestDealText,
278
    String bestDealText,
273
    double bestDealValue,
279
    double bestDealValue,
274
    double dealerPrice,
280
    double dealerPrice,
-
 
281
    boolean defaultForEntity,
275
    long updatedOn)
282
    long updatedOn)
276
  {
283
  {
277
    this();
284
    this();
278
    this.id = id;
285
    this.id = id;
279
    setIdIsSet(true);
286
    setIdIsSet(true);
Line 312... Line 319...
312
    this.bestDealText = bestDealText;
319
    this.bestDealText = bestDealText;
313
    this.bestDealValue = bestDealValue;
320
    this.bestDealValue = bestDealValue;
314
    setBestDealValueIsSet(true);
321
    setBestDealValueIsSet(true);
315
    this.dealerPrice = dealerPrice;
322
    this.dealerPrice = dealerPrice;
316
    setDealerPriceIsSet(true);
323
    setDealerPriceIsSet(true);
-
 
324
    this.defaultForEntity = defaultForEntity;
-
 
325
    setDefaultForEntityIsSet(true);
317
    this.updatedOn = updatedOn;
326
    this.updatedOn = updatedOn;
318
    setUpdatedOnIsSet(true);
327
    setUpdatedOnIsSet(true);
319
  }
328
  }
320
 
329
 
321
  /**
330
  /**
Line 381... Line 390...
381
    if (other.isSetBestDealText()) {
390
    if (other.isSetBestDealText()) {
382
      this.bestDealText = other.bestDealText;
391
      this.bestDealText = other.bestDealText;
383
    }
392
    }
384
    this.bestDealValue = other.bestDealValue;
393
    this.bestDealValue = other.bestDealValue;
385
    this.dealerPrice = other.dealerPrice;
394
    this.dealerPrice = other.dealerPrice;
-
 
395
    this.defaultForEntity = other.defaultForEntity;
386
    this.updatedOn = other.updatedOn;
396
    this.updatedOn = other.updatedOn;
387
  }
397
  }
388
 
398
 
389
  public Item deepCopy() {
399
  public Item deepCopy() {
390
    return new Item(this);
400
    return new Item(this);
Line 998... Line 1008...
998
 
1008
 
999
  public void setDealerPriceIsSet(boolean value) {
1009
  public void setDealerPriceIsSet(boolean value) {
1000
    __isset_bit_vector.set(__DEALERPRICE_ISSET_ID, value);
1010
    __isset_bit_vector.set(__DEALERPRICE_ISSET_ID, value);
1001
  }
1011
  }
1002
 
1012
 
-
 
1013
  public boolean isDefaultForEntity() {
-
 
1014
    return this.defaultForEntity;
-
 
1015
  }
-
 
1016
 
-
 
1017
  public Item setDefaultForEntity(boolean defaultForEntity) {
-
 
1018
    this.defaultForEntity = defaultForEntity;
-
 
1019
    setDefaultForEntityIsSet(true);
-
 
1020
    return this;
-
 
1021
  }
-
 
1022
 
-
 
1023
  public void unsetDefaultForEntity() {
-
 
1024
    __isset_bit_vector.clear(__DEFAULTFORENTITY_ISSET_ID);
-
 
1025
  }
-
 
1026
 
-
 
1027
  /** Returns true if field defaultForEntity is set (has been asigned a value) and false otherwise */
-
 
1028
  public boolean isSetDefaultForEntity() {
-
 
1029
    return __isset_bit_vector.get(__DEFAULTFORENTITY_ISSET_ID);
-
 
1030
  }
-
 
1031
 
-
 
1032
  public void setDefaultForEntityIsSet(boolean value) {
-
 
1033
    __isset_bit_vector.set(__DEFAULTFORENTITY_ISSET_ID, value);
-
 
1034
  }
-
 
1035
 
1003
  public long getUpdatedOn() {
1036
  public long getUpdatedOn() {
1004
    return this.updatedOn;
1037
    return this.updatedOn;
1005
  }
1038
  }
1006
 
1039
 
1007
  public Item setUpdatedOn(long updatedOn) {
1040
  public Item setUpdatedOn(long updatedOn) {
Line 1223... Line 1256...
1223
      } else {
1256
      } else {
1224
        setDealerPrice((Double)value);
1257
        setDealerPrice((Double)value);
1225
      }
1258
      }
1226
      break;
1259
      break;
1227
 
1260
 
-
 
1261
    case DEFAULT_FOR_ENTITY:
-
 
1262
      if (value == null) {
-
 
1263
        unsetDefaultForEntity();
-
 
1264
      } else {
-
 
1265
        setDefaultForEntity((Boolean)value);
-
 
1266
      }
-
 
1267
      break;
-
 
1268
 
1228
    case UPDATED_ON:
1269
    case UPDATED_ON:
1229
      if (value == null) {
1270
      if (value == null) {
1230
        unsetUpdatedOn();
1271
        unsetUpdatedOn();
1231
      } else {
1272
      } else {
1232
        setUpdatedOn((Long)value);
1273
        setUpdatedOn((Long)value);
Line 1315... Line 1356...
1315
      return new Double(getBestDealValue());
1356
      return new Double(getBestDealValue());
1316
 
1357
 
1317
    case DEALER_PRICE:
1358
    case DEALER_PRICE:
1318
      return new Double(getDealerPrice());
1359
      return new Double(getDealerPrice());
1319
 
1360
 
-
 
1361
    case DEFAULT_FOR_ENTITY:
-
 
1362
      return new Boolean(isDefaultForEntity());
-
 
1363
 
1320
    case UPDATED_ON:
1364
    case UPDATED_ON:
1321
      return new Long(getUpdatedOn());
1365
      return new Long(getUpdatedOn());
1322
 
1366
 
1323
    }
1367
    }
1324
    throw new IllegalStateException();
1368
    throw new IllegalStateException();
Line 1379... Line 1423...
1379
      return isSetBestDealText();
1423
      return isSetBestDealText();
1380
    case BEST_DEAL_VALUE:
1424
    case BEST_DEAL_VALUE:
1381
      return isSetBestDealValue();
1425
      return isSetBestDealValue();
1382
    case DEALER_PRICE:
1426
    case DEALER_PRICE:
1383
      return isSetDealerPrice();
1427
      return isSetDealerPrice();
-
 
1428
    case DEFAULT_FOR_ENTITY:
-
 
1429
      return isSetDefaultForEntity();
1384
    case UPDATED_ON:
1430
    case UPDATED_ON:
1385
      return isSetUpdatedOn();
1431
      return isSetUpdatedOn();
1386
    }
1432
    }
1387
    throw new IllegalStateException();
1433
    throw new IllegalStateException();
1388
  }
1434
  }
Line 1627... Line 1673...
1627
        return false;
1673
        return false;
1628
      if (this.dealerPrice != that.dealerPrice)
1674
      if (this.dealerPrice != that.dealerPrice)
1629
        return false;
1675
        return false;
1630
    }
1676
    }
1631
 
1677
 
-
 
1678
    boolean this_present_defaultForEntity = true;
-
 
1679
    boolean that_present_defaultForEntity = true;
-
 
1680
    if (this_present_defaultForEntity || that_present_defaultForEntity) {
-
 
1681
      if (!(this_present_defaultForEntity && that_present_defaultForEntity))
-
 
1682
        return false;
-
 
1683
      if (this.defaultForEntity != that.defaultForEntity)
-
 
1684
        return false;
-
 
1685
    }
-
 
1686
 
1632
    boolean this_present_updatedOn = true;
1687
    boolean this_present_updatedOn = true;
1633
    boolean that_present_updatedOn = true;
1688
    boolean that_present_updatedOn = true;
1634
    if (this_present_updatedOn || that_present_updatedOn) {
1689
    if (this_present_updatedOn || that_present_updatedOn) {
1635
      if (!(this_present_updatedOn && that_present_updatedOn))
1690
      if (!(this_present_updatedOn && that_present_updatedOn))
1636
        return false;
1691
        return false;
Line 1860... Line 1915...
1860
              setDealerPriceIsSet(true);
1915
              setDealerPriceIsSet(true);
1861
            } else { 
1916
            } else { 
1862
              TProtocolUtil.skip(iprot, field.type);
1917
              TProtocolUtil.skip(iprot, field.type);
1863
            }
1918
            }
1864
            break;
1919
            break;
-
 
1920
          case DEFAULT_FOR_ENTITY:
-
 
1921
            if (field.type == TType.BOOL) {
-
 
1922
              this.defaultForEntity = iprot.readBool();
-
 
1923
              setDefaultForEntityIsSet(true);
-
 
1924
            } else { 
-
 
1925
              TProtocolUtil.skip(iprot, field.type);
-
 
1926
            }
-
 
1927
            break;
1865
          case UPDATED_ON:
1928
          case UPDATED_ON:
1866
            if (field.type == TType.I64) {
1929
            if (field.type == TType.I64) {
1867
              this.updatedOn = iprot.readI64();
1930
              this.updatedOn = iprot.readI64();
1868
              setUpdatedOnIsSet(true);
1931
              setUpdatedOnIsSet(true);
1869
            } else { 
1932
            } else { 
Line 1985... Line 2048...
1985
    oprot.writeDouble(this.bestDealValue);
2048
    oprot.writeDouble(this.bestDealValue);
1986
    oprot.writeFieldEnd();
2049
    oprot.writeFieldEnd();
1987
    oprot.writeFieldBegin(DEALER_PRICE_FIELD_DESC);
2050
    oprot.writeFieldBegin(DEALER_PRICE_FIELD_DESC);
1988
    oprot.writeDouble(this.dealerPrice);
2051
    oprot.writeDouble(this.dealerPrice);
1989
    oprot.writeFieldEnd();
2052
    oprot.writeFieldEnd();
-
 
2053
    oprot.writeFieldBegin(DEFAULT_FOR_ENTITY_FIELD_DESC);
-
 
2054
    oprot.writeBool(this.defaultForEntity);
-
 
2055
    oprot.writeFieldEnd();
1990
    oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);
2056
    oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);
1991
    oprot.writeI64(this.updatedOn);
2057
    oprot.writeI64(this.updatedOn);
1992
    oprot.writeFieldEnd();
2058
    oprot.writeFieldEnd();
1993
    oprot.writeFieldStop();
2059
    oprot.writeFieldStop();
1994
    oprot.writeStructEnd();
2060
    oprot.writeStructEnd();
Line 2149... Line 2215...
2149
    if (!first) sb.append(", ");
2215
    if (!first) sb.append(", ");
2150
    sb.append("dealerPrice:");
2216
    sb.append("dealerPrice:");
2151
    sb.append(this.dealerPrice);
2217
    sb.append(this.dealerPrice);
2152
    first = false;
2218
    first = false;
2153
    if (!first) sb.append(", ");
2219
    if (!first) sb.append(", ");
-
 
2220
    sb.append("defaultForEntity:");
-
 
2221
    sb.append(this.defaultForEntity);
-
 
2222
    first = false;
-
 
2223
    if (!first) sb.append(", ");
2154
    sb.append("updatedOn:");
2224
    sb.append("updatedOn:");
2155
    sb.append(this.updatedOn);
2225
    sb.append(this.updatedOn);
2156
    first = false;
2226
    first = false;
2157
    sb.append(")");
2227
    sb.append(")");
2158
    return sb.toString();
2228
    return sb.toString();