Subversion Repositories SmartDukaan

Rev

Rev 19317 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19317 Rev 21441
Line 44... Line 44...
44
  private static final org.apache.thrift.protocol.TField PACK_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("packQuantity", org.apache.thrift.protocol.TType.I64, (short)16);
44
  private static final org.apache.thrift.protocol.TField PACK_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("packQuantity", org.apache.thrift.protocol.TType.I64, (short)16);
45
  private static final org.apache.thrift.protocol.TField NET_PRICE_AFTER_CASH_BACK_FIELD_DESC = new org.apache.thrift.protocol.TField("netPriceAfterCashBack", org.apache.thrift.protocol.TType.DOUBLE, (short)17);
45
  private static final org.apache.thrift.protocol.TField NET_PRICE_AFTER_CASH_BACK_FIELD_DESC = new org.apache.thrift.protocol.TField("netPriceAfterCashBack", org.apache.thrift.protocol.TType.DOUBLE, (short)17);
46
  private static final org.apache.thrift.protocol.TField SHOW_NET_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("showNetPrice", org.apache.thrift.protocol.TType.I64, (short)18);
46
  private static final org.apache.thrift.protocol.TField SHOW_NET_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("showNetPrice", org.apache.thrift.protocol.TType.I64, (short)18);
47
  private static final org.apache.thrift.protocol.TField CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("category_id", org.apache.thrift.protocol.TType.I64, (short)19);
47
  private static final org.apache.thrift.protocol.TField CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("category_id", org.apache.thrift.protocol.TType.I64, (short)19);
48
  private static final org.apache.thrift.protocol.TField SUB_CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("subCategoryId", org.apache.thrift.protocol.TType.I64, (short)20);
48
  private static final org.apache.thrift.protocol.TField SUB_CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("subCategoryId", org.apache.thrift.protocol.TType.I64, (short)20);
-
 
49
  private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.STRING, (short)21);
49
 
50
 
50
  private long _id; // required
51
  private long _id; // required
51
  private double available_price; // required
52
  private double available_price; // required
52
  private String marketPlaceUrl; // required
53
  private String marketPlaceUrl; // required
53
  private long in_stock; // required
54
  private long in_stock; // required
Line 65... Line 66...
65
  private long packQuantity; // required
66
  private long packQuantity; // required
66
  private double netPriceAfterCashBack; // required
67
  private double netPriceAfterCashBack; // required
67
  private long showNetPrice; // required
68
  private long showNetPrice; // required
68
  private long category_id; // required
69
  private long category_id; // required
69
  private long subCategoryId; // required
70
  private long subCategoryId; // required
-
 
71
  private String identifier; // required
70
 
72
 
71
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
73
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
72
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
74
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
73
    _ID((short)1, "_id"),
75
    _ID((short)1, "_id"),
74
    AVAILABLE_PRICE((short)2, "available_price"),
76
    AVAILABLE_PRICE((short)2, "available_price"),
Line 87... Line 89...
87
    CHEAPEST_BULK_PRICE((short)15, "cheapestBulkPrice"),
89
    CHEAPEST_BULK_PRICE((short)15, "cheapestBulkPrice"),
88
    PACK_QUANTITY((short)16, "packQuantity"),
90
    PACK_QUANTITY((short)16, "packQuantity"),
89
    NET_PRICE_AFTER_CASH_BACK((short)17, "netPriceAfterCashBack"),
91
    NET_PRICE_AFTER_CASH_BACK((short)17, "netPriceAfterCashBack"),
90
    SHOW_NET_PRICE((short)18, "showNetPrice"),
92
    SHOW_NET_PRICE((short)18, "showNetPrice"),
91
    CATEGORY_ID((short)19, "category_id"),
93
    CATEGORY_ID((short)19, "category_id"),
92
    SUB_CATEGORY_ID((short)20, "subCategoryId");
94
    SUB_CATEGORY_ID((short)20, "subCategoryId"),
-
 
95
    IDENTIFIER((short)21, "identifier");
93
 
96
 
94
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
97
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
95
 
98
 
96
    static {
99
    static {
97
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
100
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 142... Line 145...
142
          return SHOW_NET_PRICE;
145
          return SHOW_NET_PRICE;
143
        case 19: // CATEGORY_ID
146
        case 19: // CATEGORY_ID
144
          return CATEGORY_ID;
147
          return CATEGORY_ID;
145
        case 20: // SUB_CATEGORY_ID
148
        case 20: // SUB_CATEGORY_ID
146
          return SUB_CATEGORY_ID;
149
          return SUB_CATEGORY_ID;
-
 
150
        case 21: // IDENTIFIER
-
 
151
          return IDENTIFIER;
147
        default:
152
        default:
148
          return null;
153
          return null;
149
      }
154
      }
150
    }
155
    }
151
 
156
 
Line 241... Line 246...
241
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
246
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
242
    tmpMap.put(_Fields.CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("category_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
247
    tmpMap.put(_Fields.CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("category_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
243
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
248
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
244
    tmpMap.put(_Fields.SUB_CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("subCategoryId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
249
    tmpMap.put(_Fields.SUB_CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("subCategoryId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
245
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
250
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
251
    tmpMap.put(_Fields.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
252
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
246
    metaDataMap = Collections.unmodifiableMap(tmpMap);
253
    metaDataMap = Collections.unmodifiableMap(tmpMap);
247
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LivePricing.class, metaDataMap);
254
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LivePricing.class, metaDataMap);
248
  }
255
  }
249
 
256
 
250
  public LivePricing() {
257
  public LivePricing() {
Line 268... Line 275...
268
    double cheapestBulkPrice,
275
    double cheapestBulkPrice,
269
    long packQuantity,
276
    long packQuantity,
270
    double netPriceAfterCashBack,
277
    double netPriceAfterCashBack,
271
    long showNetPrice,
278
    long showNetPrice,
272
    long category_id,
279
    long category_id,
273
    long subCategoryId)
280
    long subCategoryId,
-
 
281
    String identifier)
274
  {
282
  {
275
    this();
283
    this();
276
    this._id = _id;
284
    this._id = _id;
277
    set_idIsSet(true);
285
    set_idIsSet(true);
278
    this.available_price = available_price;
286
    this.available_price = available_price;
Line 305... Line 313...
305
    setShowNetPriceIsSet(true);
313
    setShowNetPriceIsSet(true);
306
    this.category_id = category_id;
314
    this.category_id = category_id;
307
    setCategory_idIsSet(true);
315
    setCategory_idIsSet(true);
308
    this.subCategoryId = subCategoryId;
316
    this.subCategoryId = subCategoryId;
309
    setSubCategoryIdIsSet(true);
317
    setSubCategoryIdIsSet(true);
-
 
318
    this.identifier = identifier;
310
  }
319
  }
311
 
320
 
312
  /**
321
  /**
313
   * Performs a deep copy on <i>other</i>.
322
   * Performs a deep copy on <i>other</i>.
314
   */
323
   */
Line 345... Line 354...
345
    this.packQuantity = other.packQuantity;
354
    this.packQuantity = other.packQuantity;
346
    this.netPriceAfterCashBack = other.netPriceAfterCashBack;
355
    this.netPriceAfterCashBack = other.netPriceAfterCashBack;
347
    this.showNetPrice = other.showNetPrice;
356
    this.showNetPrice = other.showNetPrice;
348
    this.category_id = other.category_id;
357
    this.category_id = other.category_id;
349
    this.subCategoryId = other.subCategoryId;
358
    this.subCategoryId = other.subCategoryId;
-
 
359
    if (other.isSetIdentifier()) {
-
 
360
      this.identifier = other.identifier;
-
 
361
    }
350
  }
362
  }
351
 
363
 
352
  public LivePricing deepCopy() {
364
  public LivePricing deepCopy() {
353
    return new LivePricing(this);
365
    return new LivePricing(this);
354
  }
366
  }
Line 387... Line 399...
387
    this.showNetPrice = 0;
399
    this.showNetPrice = 0;
388
    setCategory_idIsSet(false);
400
    setCategory_idIsSet(false);
389
    this.category_id = 0;
401
    this.category_id = 0;
390
    setSubCategoryIdIsSet(false);
402
    setSubCategoryIdIsSet(false);
391
    this.subCategoryId = 0;
403
    this.subCategoryId = 0;
-
 
404
    this.identifier = null;
392
  }
405
  }
393
 
406
 
394
  public long get_id() {
407
  public long get_id() {
395
    return this._id;
408
    return this._id;
396
  }
409
  }
Line 835... Line 848...
835
 
848
 
836
  public void setSubCategoryIdIsSet(boolean value) {
849
  public void setSubCategoryIdIsSet(boolean value) {
837
    __isset_bit_vector.set(__SUBCATEGORYID_ISSET_ID, value);
850
    __isset_bit_vector.set(__SUBCATEGORYID_ISSET_ID, value);
838
  }
851
  }
839
 
852
 
-
 
853
  public String getIdentifier() {
-
 
854
    return this.identifier;
-
 
855
  }
-
 
856
 
-
 
857
  public void setIdentifier(String identifier) {
-
 
858
    this.identifier = identifier;
-
 
859
  }
-
 
860
 
-
 
861
  public void unsetIdentifier() {
-
 
862
    this.identifier = null;
-
 
863
  }
-
 
864
 
-
 
865
  /** Returns true if field identifier is set (has been assigned a value) and false otherwise */
-
 
866
  public boolean isSetIdentifier() {
-
 
867
    return this.identifier != null;
-
 
868
  }
-
 
869
 
-
 
870
  public void setIdentifierIsSet(boolean value) {
-
 
871
    if (!value) {
-
 
872
      this.identifier = null;
-
 
873
    }
-
 
874
  }
-
 
875
 
840
  public void setFieldValue(_Fields field, Object value) {
876
  public void setFieldValue(_Fields field, Object value) {
841
    switch (field) {
877
    switch (field) {
842
    case _ID:
878
    case _ID:
843
      if (value == null) {
879
      if (value == null) {
844
        unset_id();
880
        unset_id();
Line 997... Line 1033...
997
      } else {
1033
      } else {
998
        setSubCategoryId((Long)value);
1034
        setSubCategoryId((Long)value);
999
      }
1035
      }
1000
      break;
1036
      break;
1001
 
1037
 
-
 
1038
    case IDENTIFIER:
-
 
1039
      if (value == null) {
-
 
1040
        unsetIdentifier();
-
 
1041
      } else {
-
 
1042
        setIdentifier((String)value);
-
 
1043
      }
-
 
1044
      break;
-
 
1045
 
1002
    }
1046
    }
1003
  }
1047
  }
1004
 
1048
 
1005
  public Object getFieldValue(_Fields field) {
1049
  public Object getFieldValue(_Fields field) {
1006
    switch (field) {
1050
    switch (field) {
Line 1062... Line 1106...
1062
      return Long.valueOf(getCategory_id());
1106
      return Long.valueOf(getCategory_id());
1063
 
1107
 
1064
    case SUB_CATEGORY_ID:
1108
    case SUB_CATEGORY_ID:
1065
      return Long.valueOf(getSubCategoryId());
1109
      return Long.valueOf(getSubCategoryId());
1066
 
1110
 
-
 
1111
    case IDENTIFIER:
-
 
1112
      return getIdentifier();
-
 
1113
 
1067
    }
1114
    }
1068
    throw new IllegalStateException();
1115
    throw new IllegalStateException();
1069
  }
1116
  }
1070
 
1117
 
1071
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1118
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1113... Line 1160...
1113
      return isSetShowNetPrice();
1160
      return isSetShowNetPrice();
1114
    case CATEGORY_ID:
1161
    case CATEGORY_ID:
1115
      return isSetCategory_id();
1162
      return isSetCategory_id();
1116
    case SUB_CATEGORY_ID:
1163
    case SUB_CATEGORY_ID:
1117
      return isSetSubCategoryId();
1164
      return isSetSubCategoryId();
-
 
1165
    case IDENTIFIER:
-
 
1166
      return isSetIdentifier();
1118
    }
1167
    }
1119
    throw new IllegalStateException();
1168
    throw new IllegalStateException();
1120
  }
1169
  }
1121
 
1170
 
1122
  @Override
1171
  @Override
Line 1310... Line 1359...
1310
        return false;
1359
        return false;
1311
      if (this.subCategoryId != that.subCategoryId)
1360
      if (this.subCategoryId != that.subCategoryId)
1312
        return false;
1361
        return false;
1313
    }
1362
    }
1314
 
1363
 
-
 
1364
    boolean this_present_identifier = true && this.isSetIdentifier();
-
 
1365
    boolean that_present_identifier = true && that.isSetIdentifier();
-
 
1366
    if (this_present_identifier || that_present_identifier) {
-
 
1367
      if (!(this_present_identifier && that_present_identifier))
-
 
1368
        return false;
-
 
1369
      if (!this.identifier.equals(that.identifier))
-
 
1370
        return false;
-
 
1371
    }
-
 
1372
 
1315
    return true;
1373
    return true;
1316
  }
1374
  }
1317
 
1375
 
1318
  @Override
1376
  @Override
1319
  public int hashCode() {
1377
  public int hashCode() {
Line 1526... Line 1584...
1526
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subCategoryId, typedOther.subCategoryId);
1584
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subCategoryId, typedOther.subCategoryId);
1527
      if (lastComparison != 0) {
1585
      if (lastComparison != 0) {
1528
        return lastComparison;
1586
        return lastComparison;
1529
      }
1587
      }
1530
    }
1588
    }
-
 
1589
    lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(typedOther.isSetIdentifier());
-
 
1590
    if (lastComparison != 0) {
-
 
1591
      return lastComparison;
-
 
1592
    }
-
 
1593
    if (isSetIdentifier()) {
-
 
1594
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.identifier, typedOther.identifier);
-
 
1595
      if (lastComparison != 0) {
-
 
1596
        return lastComparison;
-
 
1597
      }
-
 
1598
    }
1531
    return 0;
1599
    return 0;
1532
  }
1600
  }
1533
 
1601
 
1534
  public _Fields fieldForId(int fieldId) {
1602
  public _Fields fieldForId(int fieldId) {
1535
    return _Fields.findByThriftId(fieldId);
1603
    return _Fields.findByThriftId(fieldId);
Line 1697... Line 1765...
1697
            setSubCategoryIdIsSet(true);
1765
            setSubCategoryIdIsSet(true);
1698
          } else { 
1766
          } else { 
1699
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1767
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1700
          }
1768
          }
1701
          break;
1769
          break;
-
 
1770
        case 21: // IDENTIFIER
-
 
1771
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1772
            this.identifier = iprot.readString();
-
 
1773
          } else { 
-
 
1774
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1775
          }
-
 
1776
          break;
1702
        default:
1777
        default:
1703
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1778
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1704
      }
1779
      }
1705
      iprot.readFieldEnd();
1780
      iprot.readFieldEnd();
1706
    }
1781
    }
Line 1782... Line 1857...
1782
    oprot.writeI64(this.category_id);
1857
    oprot.writeI64(this.category_id);
1783
    oprot.writeFieldEnd();
1858
    oprot.writeFieldEnd();
1784
    oprot.writeFieldBegin(SUB_CATEGORY_ID_FIELD_DESC);
1859
    oprot.writeFieldBegin(SUB_CATEGORY_ID_FIELD_DESC);
1785
    oprot.writeI64(this.subCategoryId);
1860
    oprot.writeI64(this.subCategoryId);
1786
    oprot.writeFieldEnd();
1861
    oprot.writeFieldEnd();
-
 
1862
    if (this.identifier != null) {
-
 
1863
      oprot.writeFieldBegin(IDENTIFIER_FIELD_DESC);
-
 
1864
      oprot.writeString(this.identifier);
-
 
1865
      oprot.writeFieldEnd();
-
 
1866
    }
1787
    oprot.writeFieldStop();
1867
    oprot.writeFieldStop();
1788
    oprot.writeStructEnd();
1868
    oprot.writeStructEnd();
1789
  }
1869
  }
1790
 
1870
 
1791
  @Override
1871
  @Override
Line 1894... Line 1974...
1894
    first = false;
1974
    first = false;
1895
    if (!first) sb.append(", ");
1975
    if (!first) sb.append(", ");
1896
    sb.append("subCategoryId:");
1976
    sb.append("subCategoryId:");
1897
    sb.append(this.subCategoryId);
1977
    sb.append(this.subCategoryId);
1898
    first = false;
1978
    first = false;
-
 
1979
    if (!first) sb.append(", ");
-
 
1980
    sb.append("identifier:");
-
 
1981
    if (this.identifier == null) {
-
 
1982
      sb.append("null");
-
 
1983
    } else {
-
 
1984
      sb.append(this.identifier);
-
 
1985
    }
-
 
1986
    first = false;
1899
    sb.append(")");
1987
    sb.append(")");
1900
    return sb.toString();
1988
    return sb.toString();
1901
  }
1989
  }
1902
 
1990
 
1903
  public void validate() throws org.apache.thrift.TException {
1991
  public void validate() throws org.apache.thrift.TException {