Subversion Repositories SmartDukaan

Rev

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

Rev 1910 Rev 2034
Line 45... Line 45...
45
  private static final TField WEIGHT_FIELD_DESC = new TField("weight", TType.DOUBLE, (short)17);
45
  private static final TField WEIGHT_FIELD_DESC = new TField("weight", TType.DOUBLE, (short)17);
46
  private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)18);
46
  private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)18);
47
  private static final TField START_DATE_FIELD_DESC = new TField("startDate", TType.I64, (short)19);
47
  private static final TField START_DATE_FIELD_DESC = new TField("startDate", TType.I64, (short)19);
48
  private static final TField RETIRE_DATE_FIELD_DESC = new TField("retireDate", TType.I64, (short)20);
48
  private static final TField RETIRE_DATE_FIELD_DESC = new TField("retireDate", TType.I64, (short)20);
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 STATUS_DESCRIPTION_FIELD_DESC = new TField("status_description", TType.STRING, (short)22);
50
  private static final TField OTHER_INFO_FIELD_DESC = new TField("otherInfo", TType.MAP, (short)22);
51
  private static final TField OTHER_INFO_FIELD_DESC = new TField("otherInfo", TType.MAP, (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_TEXT_FIELD_DESC = new TField("bestDealText", TType.STRING, (short)24);
52
  private static final TField BEST_DEAL_VALUE_FIELD_DESC = new TField("bestDealValue", TType.DOUBLE, (short)24);
53
  private static final TField BEST_DEAL_VALUE_FIELD_DESC = new TField("bestDealValue", 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 DEALER_PRICE_FIELD_DESC = new TField("dealerPrice", TType.DOUBLE, (short)26);
54
  private static final TField DEFAULT_FOR_ENTITY_FIELD_DESC = new TField("defaultForEntity", TType.BOOL, (short)26);
55
  private static final TField DEFAULT_FOR_ENTITY_FIELD_DESC = new TField("defaultForEntity", TType.BOOL, (short)27);
55
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)27);
56
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)28);
56
 
57
 
57
  private long id;
58
  private long id;
58
  private String productGroup;
59
  private String productGroup;
59
  private String brand;
60
  private String brand;
60
  private String modelNumber;
61
  private String modelNumber;
Line 73... Line 74...
73
  private double weight;
74
  private double weight;
74
  private long addedOn;
75
  private long addedOn;
75
  private long startDate;
76
  private long startDate;
76
  private long retireDate;
77
  private long retireDate;
77
  private status itemStatus;
78
  private status itemStatus;
-
 
79
  private String status_description;
78
  private Map<String,String> otherInfo;
80
  private Map<String,String> otherInfo;
79
  private String bestDealText;
81
  private String bestDealText;
80
  private double bestDealValue;
82
  private double bestDealValue;
81
  private double dealerPrice;
83
  private double dealerPrice;
82
  private boolean defaultForEntity;
84
  private boolean defaultForEntity;
Line 107... Line 109...
107
    /**
109
    /**
108
     * 
110
     * 
109
     * @see status
111
     * @see status
110
     */
112
     */
111
    ITEM_STATUS((short)21, "itemStatus"),
113
    ITEM_STATUS((short)21, "itemStatus"),
-
 
114
    STATUS_DESCRIPTION((short)22, "status_description"),
112
    OTHER_INFO((short)22, "otherInfo"),
115
    OTHER_INFO((short)23, "otherInfo"),
113
    BEST_DEAL_TEXT((short)23, "bestDealText"),
116
    BEST_DEAL_TEXT((short)24, "bestDealText"),
114
    BEST_DEAL_VALUE((short)24, "bestDealValue"),
117
    BEST_DEAL_VALUE((short)25, "bestDealValue"),
115
    DEALER_PRICE((short)25, "dealerPrice"),
118
    DEALER_PRICE((short)26, "dealerPrice"),
116
    DEFAULT_FOR_ENTITY((short)26, "defaultForEntity"),
119
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
117
    UPDATED_ON((short)27, "updatedOn");
120
    UPDATED_ON((short)28, "updatedOn");
118
 
121
 
119
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
122
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
120
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
123
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
121
 
124
 
122
    static {
125
    static {
Line 227... Line 230...
227
        new FieldValueMetaData(TType.I64)));
230
        new FieldValueMetaData(TType.I64)));
228
    put(_Fields.RETIRE_DATE, new FieldMetaData("retireDate", TFieldRequirementType.DEFAULT, 
231
    put(_Fields.RETIRE_DATE, new FieldMetaData("retireDate", TFieldRequirementType.DEFAULT, 
229
        new FieldValueMetaData(TType.I64)));
232
        new FieldValueMetaData(TType.I64)));
230
    put(_Fields.ITEM_STATUS, new FieldMetaData("itemStatus", TFieldRequirementType.DEFAULT, 
233
    put(_Fields.ITEM_STATUS, new FieldMetaData("itemStatus", TFieldRequirementType.DEFAULT, 
231
        new EnumMetaData(TType.ENUM, status.class)));
234
        new EnumMetaData(TType.ENUM, status.class)));
-
 
235
    put(_Fields.STATUS_DESCRIPTION, new FieldMetaData("status_description", TFieldRequirementType.DEFAULT, 
-
 
236
        new FieldValueMetaData(TType.STRING)));
232
    put(_Fields.OTHER_INFO, new FieldMetaData("otherInfo", TFieldRequirementType.DEFAULT, 
237
    put(_Fields.OTHER_INFO, new FieldMetaData("otherInfo", TFieldRequirementType.DEFAULT, 
233
        new MapMetaData(TType.MAP, 
238
        new MapMetaData(TType.MAP, 
234
            new FieldValueMetaData(TType.STRING), 
239
            new FieldValueMetaData(TType.STRING), 
235
            new FieldValueMetaData(TType.STRING))));
240
            new FieldValueMetaData(TType.STRING))));
236
    put(_Fields.BEST_DEAL_TEXT, new FieldMetaData("bestDealText", TFieldRequirementType.DEFAULT, 
241
    put(_Fields.BEST_DEAL_TEXT, new FieldMetaData("bestDealText", TFieldRequirementType.DEFAULT, 
Line 272... Line 277...
272
    double weight,
277
    double weight,
273
    long addedOn,
278
    long addedOn,
274
    long startDate,
279
    long startDate,
275
    long retireDate,
280
    long retireDate,
276
    status itemStatus,
281
    status itemStatus,
-
 
282
    String status_description,
277
    Map<String,String> otherInfo,
283
    Map<String,String> otherInfo,
278
    String bestDealText,
284
    String bestDealText,
279
    double bestDealValue,
285
    double bestDealValue,
280
    double dealerPrice,
286
    double dealerPrice,
281
    boolean defaultForEntity,
287
    boolean defaultForEntity,
Line 313... Line 319...
313
    this.startDate = startDate;
319
    this.startDate = startDate;
314
    setStartDateIsSet(true);
320
    setStartDateIsSet(true);
315
    this.retireDate = retireDate;
321
    this.retireDate = retireDate;
316
    setRetireDateIsSet(true);
322
    setRetireDateIsSet(true);
317
    this.itemStatus = itemStatus;
323
    this.itemStatus = itemStatus;
-
 
324
    this.status_description = status_description;
318
    this.otherInfo = otherInfo;
325
    this.otherInfo = otherInfo;
319
    this.bestDealText = bestDealText;
326
    this.bestDealText = bestDealText;
320
    this.bestDealValue = bestDealValue;
327
    this.bestDealValue = bestDealValue;
321
    setBestDealValueIsSet(true);
328
    setBestDealValueIsSet(true);
322
    this.dealerPrice = dealerPrice;
329
    this.dealerPrice = dealerPrice;
Line 370... Line 377...
370
    this.startDate = other.startDate;
377
    this.startDate = other.startDate;
371
    this.retireDate = other.retireDate;
378
    this.retireDate = other.retireDate;
372
    if (other.isSetItemStatus()) {
379
    if (other.isSetItemStatus()) {
373
      this.itemStatus = other.itemStatus;
380
      this.itemStatus = other.itemStatus;
374
    }
381
    }
-
 
382
    if (other.isSetStatus_description()) {
-
 
383
      this.status_description = other.status_description;
-
 
384
    }
375
    if (other.isSetOtherInfo()) {
385
    if (other.isSetOtherInfo()) {
376
      Map<String,String> __this__otherInfo = new HashMap<String,String>();
386
      Map<String,String> __this__otherInfo = new HashMap<String,String>();
377
      for (Map.Entry<String, String> other_element : other.otherInfo.entrySet()) {
387
      for (Map.Entry<String, String> other_element : other.otherInfo.entrySet()) {
378
 
388
 
379
        String other_element_key = other_element.getKey();
389
        String other_element_key = other_element.getKey();
Line 903... Line 913...
903
    if (!value) {
913
    if (!value) {
904
      this.itemStatus = null;
914
      this.itemStatus = null;
905
    }
915
    }
906
  }
916
  }
907
 
917
 
-
 
918
  public String getStatus_description() {
-
 
919
    return this.status_description;
-
 
920
  }
-
 
921
 
-
 
922
  public Item setStatus_description(String status_description) {
-
 
923
    this.status_description = status_description;
-
 
924
    return this;
-
 
925
  }
-
 
926
 
-
 
927
  public void unsetStatus_description() {
-
 
928
    this.status_description = null;
-
 
929
  }
-
 
930
 
-
 
931
  /** Returns true if field status_description is set (has been asigned a value) and false otherwise */
-
 
932
  public boolean isSetStatus_description() {
-
 
933
    return this.status_description != null;
-
 
934
  }
-
 
935
 
-
 
936
  public void setStatus_descriptionIsSet(boolean value) {
-
 
937
    if (!value) {
-
 
938
      this.status_description = null;
-
 
939
    }
-
 
940
  }
-
 
941
 
908
  public int getOtherInfoSize() {
942
  public int getOtherInfoSize() {
909
    return (this.otherInfo == null) ? 0 : this.otherInfo.size();
943
    return (this.otherInfo == null) ? 0 : this.otherInfo.size();
910
  }
944
  }
911
 
945
 
912
  public void putToOtherInfo(String key, String val) {
946
  public void putToOtherInfo(String key, String val) {
Line 1224... Line 1258...
1224
      } else {
1258
      } else {
1225
        setItemStatus((status)value);
1259
        setItemStatus((status)value);
1226
      }
1260
      }
1227
      break;
1261
      break;
1228
 
1262
 
-
 
1263
    case STATUS_DESCRIPTION:
-
 
1264
      if (value == null) {
-
 
1265
        unsetStatus_description();
-
 
1266
      } else {
-
 
1267
        setStatus_description((String)value);
-
 
1268
      }
-
 
1269
      break;
-
 
1270
 
1229
    case OTHER_INFO:
1271
    case OTHER_INFO:
1230
      if (value == null) {
1272
      if (value == null) {
1231
        unsetOtherInfo();
1273
        unsetOtherInfo();
1232
      } else {
1274
      } else {
1233
        setOtherInfo((Map<String,String>)value);
1275
        setOtherInfo((Map<String,String>)value);
Line 1344... Line 1386...
1344
      return new Long(getRetireDate());
1386
      return new Long(getRetireDate());
1345
 
1387
 
1346
    case ITEM_STATUS:
1388
    case ITEM_STATUS:
1347
      return getItemStatus();
1389
      return getItemStatus();
1348
 
1390
 
-
 
1391
    case STATUS_DESCRIPTION:
-
 
1392
      return getStatus_description();
-
 
1393
 
1349
    case OTHER_INFO:
1394
    case OTHER_INFO:
1350
      return getOtherInfo();
1395
      return getOtherInfo();
1351
 
1396
 
1352
    case BEST_DEAL_TEXT:
1397
    case BEST_DEAL_TEXT:
1353
      return getBestDealText();
1398
      return getBestDealText();
Line 1415... Line 1460...
1415
      return isSetStartDate();
1460
      return isSetStartDate();
1416
    case RETIRE_DATE:
1461
    case RETIRE_DATE:
1417
      return isSetRetireDate();
1462
      return isSetRetireDate();
1418
    case ITEM_STATUS:
1463
    case ITEM_STATUS:
1419
      return isSetItemStatus();
1464
      return isSetItemStatus();
-
 
1465
    case STATUS_DESCRIPTION:
-
 
1466
      return isSetStatus_description();
1420
    case OTHER_INFO:
1467
    case OTHER_INFO:
1421
      return isSetOtherInfo();
1468
      return isSetOtherInfo();
1422
    case BEST_DEAL_TEXT:
1469
    case BEST_DEAL_TEXT:
1423
      return isSetBestDealText();
1470
      return isSetBestDealText();
1424
    case BEST_DEAL_VALUE:
1471
    case BEST_DEAL_VALUE:
Line 1637... Line 1684...
1637
        return false;
1684
        return false;
1638
      if (!this.itemStatus.equals(that.itemStatus))
1685
      if (!this.itemStatus.equals(that.itemStatus))
1639
        return false;
1686
        return false;
1640
    }
1687
    }
1641
 
1688
 
-
 
1689
    boolean this_present_status_description = true && this.isSetStatus_description();
-
 
1690
    boolean that_present_status_description = true && that.isSetStatus_description();
-
 
1691
    if (this_present_status_description || that_present_status_description) {
-
 
1692
      if (!(this_present_status_description && that_present_status_description))
-
 
1693
        return false;
-
 
1694
      if (!this.status_description.equals(that.status_description))
-
 
1695
        return false;
-
 
1696
    }
-
 
1697
 
1642
    boolean this_present_otherInfo = true && this.isSetOtherInfo();
1698
    boolean this_present_otherInfo = true && this.isSetOtherInfo();
1643
    boolean that_present_otherInfo = true && that.isSetOtherInfo();
1699
    boolean that_present_otherInfo = true && that.isSetOtherInfo();
1644
    if (this_present_otherInfo || that_present_otherInfo) {
1700
    if (this_present_otherInfo || that_present_otherInfo) {
1645
      if (!(this_present_otherInfo && that_present_otherInfo))
1701
      if (!(this_present_otherInfo && that_present_otherInfo))
1646
        return false;
1702
        return false;
Line 1873... Line 1929...
1873
              this.itemStatus = status.findByValue(iprot.readI32());
1929
              this.itemStatus = status.findByValue(iprot.readI32());
1874
            } else { 
1930
            } else { 
1875
              TProtocolUtil.skip(iprot, field.type);
1931
              TProtocolUtil.skip(iprot, field.type);
1876
            }
1932
            }
1877
            break;
1933
            break;
-
 
1934
          case STATUS_DESCRIPTION:
-
 
1935
            if (field.type == TType.STRING) {
-
 
1936
              this.status_description = iprot.readString();
-
 
1937
            } else { 
-
 
1938
              TProtocolUtil.skip(iprot, field.type);
-
 
1939
            }
-
 
1940
            break;
1878
          case OTHER_INFO:
1941
          case OTHER_INFO:
1879
            if (field.type == TType.MAP) {
1942
            if (field.type == TType.MAP) {
1880
              {
1943
              {
1881
                TMap _map5 = iprot.readMapBegin();
1944
                TMap _map5 = iprot.readMapBegin();
1882
                this.otherInfo = new HashMap<String,String>(2*_map5.size);
1945
                this.otherInfo = new HashMap<String,String>(2*_map5.size);
Line 2024... Line 2087...
2024
    if (this.itemStatus != null) {
2087
    if (this.itemStatus != null) {
2025
      oprot.writeFieldBegin(ITEM_STATUS_FIELD_DESC);
2088
      oprot.writeFieldBegin(ITEM_STATUS_FIELD_DESC);
2026
      oprot.writeI32(this.itemStatus.getValue());
2089
      oprot.writeI32(this.itemStatus.getValue());
2027
      oprot.writeFieldEnd();
2090
      oprot.writeFieldEnd();
2028
    }
2091
    }
-
 
2092
    if (this.status_description != null) {
-
 
2093
      oprot.writeFieldBegin(STATUS_DESCRIPTION_FIELD_DESC);
-
 
2094
      oprot.writeString(this.status_description);
-
 
2095
      oprot.writeFieldEnd();
-
 
2096
    }
2029
    if (this.otherInfo != null) {
2097
    if (this.otherInfo != null) {
2030
      oprot.writeFieldBegin(OTHER_INFO_FIELD_DESC);
2098
      oprot.writeFieldBegin(OTHER_INFO_FIELD_DESC);
2031
      {
2099
      {
2032
        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.otherInfo.size()));
2100
        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.otherInfo.size()));
2033
        for (Map.Entry<String, String> _iter9 : this.otherInfo.entrySet())
2101
        for (Map.Entry<String, String> _iter9 : this.otherInfo.entrySet())
Line 2191... Line 2259...
2191
        sb.append(")");
2259
        sb.append(")");
2192
      }
2260
      }
2193
    }
2261
    }
2194
    first = false;
2262
    first = false;
2195
    if (!first) sb.append(", ");
2263
    if (!first) sb.append(", ");
-
 
2264
    sb.append("status_description:");
-
 
2265
    if (this.status_description == null) {
-
 
2266
      sb.append("null");
-
 
2267
    } else {
-
 
2268
      sb.append(this.status_description);
-
 
2269
    }
-
 
2270
    first = false;
-
 
2271
    if (!first) sb.append(", ");
2196
    sb.append("otherInfo:");
2272
    sb.append("otherInfo:");
2197
    if (this.otherInfo == null) {
2273
    if (this.otherInfo == null) {
2198
      sb.append("null");
2274
      sb.append("null");
2199
    } else {
2275
    } else {
2200
      sb.append(this.otherInfo);
2276
      sb.append(this.otherInfo);