Subversion Repositories SmartDukaan

Rev

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

Rev 19247 Rev 19589
Line 37... Line 37...
37
  private static final org.apache.thrift.protocol.TField MRP_FIELD_DESC = new org.apache.thrift.protocol.TField("mrp", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
37
  private static final org.apache.thrift.protocol.TField MRP_FIELD_DESC = new org.apache.thrift.protocol.TField("mrp", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
38
  private static final org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("product_name", org.apache.thrift.protocol.TType.STRING, (short)13);
38
  private static final org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("product_name", org.apache.thrift.protocol.TType.STRING, (short)13);
39
  private static final org.apache.thrift.protocol.TField SOURCE_PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("source_product_name", org.apache.thrift.protocol.TType.STRING, (short)14);
39
  private static final org.apache.thrift.protocol.TField SOURCE_PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("source_product_name", org.apache.thrift.protocol.TType.STRING, (short)14);
40
  private static final org.apache.thrift.protocol.TField BRAND_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("brand_id", org.apache.thrift.protocol.TType.I64, (short)15);
40
  private static final org.apache.thrift.protocol.TField BRAND_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("brand_id", org.apache.thrift.protocol.TType.I64, (short)15);
41
  private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)16);
41
  private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)16);
-
 
42
  private static final org.apache.thrift.protocol.TField INTERNAL_RANK_FIELD_DESC = new org.apache.thrift.protocol.TField("internalRank", org.apache.thrift.protocol.TType.I64, (short)17);
42
 
43
 
43
  private long item_id; // required
44
  private long item_id; // required
44
  private boolean showMrpFlag; // required
45
  private boolean showMrpFlag; // required
45
  private String tagline; // required
46
  private String tagline; // required
46
  private String offer; // required
47
  private String offer; // required
Line 54... Line 55...
54
  private double mrp; // required
55
  private double mrp; // required
55
  private String product_name; // required
56
  private String product_name; // required
56
  private String source_product_name; // required
57
  private String source_product_name; // required
57
  private long brand_id; // required
58
  private long brand_id; // required
58
  private long quantity; // required
59
  private long quantity; // required
-
 
60
  private long internalRank; // required
59
 
61
 
60
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
62
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
61
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
63
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
62
    ITEM_ID((short)1, "item_id"),
64
    ITEM_ID((short)1, "item_id"),
63
    SHOW_MRP_FLAG((short)2, "showMrpFlag"),
65
    SHOW_MRP_FLAG((short)2, "showMrpFlag"),
Line 72... Line 74...
72
    MODEL_NAME((short)11, "model_name"),
74
    MODEL_NAME((short)11, "model_name"),
73
    MRP((short)12, "mrp"),
75
    MRP((short)12, "mrp"),
74
    PRODUCT_NAME((short)13, "product_name"),
76
    PRODUCT_NAME((short)13, "product_name"),
75
    SOURCE_PRODUCT_NAME((short)14, "source_product_name"),
77
    SOURCE_PRODUCT_NAME((short)14, "source_product_name"),
76
    BRAND_ID((short)15, "brand_id"),
78
    BRAND_ID((short)15, "brand_id"),
77
    QUANTITY((short)16, "quantity");
79
    QUANTITY((short)16, "quantity"),
-
 
80
    INTERNAL_RANK((short)17, "internalRank");
78
 
81
 
79
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
82
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
80
 
83
 
81
    static {
84
    static {
82
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
85
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 119... Line 122...
119
          return SOURCE_PRODUCT_NAME;
122
          return SOURCE_PRODUCT_NAME;
120
        case 15: // BRAND_ID
123
        case 15: // BRAND_ID
121
          return BRAND_ID;
124
          return BRAND_ID;
122
        case 16: // QUANTITY
125
        case 16: // QUANTITY
123
          return QUANTITY;
126
          return QUANTITY;
-
 
127
        case 17: // INTERNAL_RANK
-
 
128
          return INTERNAL_RANK;
124
        default:
129
        default:
125
          return null;
130
          return null;
126
      }
131
      }
127
    }
132
    }
128
 
133
 
Line 168... Line 173...
168
  private static final int __SUBCATEGORYID_ISSET_ID = 4;
173
  private static final int __SUBCATEGORYID_ISSET_ID = 4;
169
  private static final int __AVAILABLE_PRICE_ISSET_ID = 5;
174
  private static final int __AVAILABLE_PRICE_ISSET_ID = 5;
170
  private static final int __MRP_ISSET_ID = 6;
175
  private static final int __MRP_ISSET_ID = 6;
171
  private static final int __BRAND_ID_ISSET_ID = 7;
176
  private static final int __BRAND_ID_ISSET_ID = 7;
172
  private static final int __QUANTITY_ISSET_ID = 8;
177
  private static final int __QUANTITY_ISSET_ID = 8;
-
 
178
  private static final int __INTERNALRANK_ISSET_ID = 9;
173
  private BitSet __isset_bit_vector = new BitSet(9);
179
  private BitSet __isset_bit_vector = new BitSet(10);
174
 
180
 
175
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
181
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
176
  static {
182
  static {
177
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
183
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
178
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
184
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 205... Line 211...
205
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
211
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
206
    tmpMap.put(_Fields.BRAND_ID, new org.apache.thrift.meta_data.FieldMetaData("brand_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
212
    tmpMap.put(_Fields.BRAND_ID, new org.apache.thrift.meta_data.FieldMetaData("brand_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
207
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
213
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
208
    tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
214
    tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
209
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
215
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
216
    tmpMap.put(_Fields.INTERNAL_RANK, new org.apache.thrift.meta_data.FieldMetaData("internalRank", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
217
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
210
    metaDataMap = Collections.unmodifiableMap(tmpMap);
218
    metaDataMap = Collections.unmodifiableMap(tmpMap);
211
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BulkItems.class, metaDataMap);
219
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BulkItems.class, metaDataMap);
212
  }
220
  }
213
 
221
 
214
  public BulkItems() {
222
  public BulkItems() {
Line 228... Line 236...
228
    String model_name,
236
    String model_name,
229
    double mrp,
237
    double mrp,
230
    String product_name,
238
    String product_name,
231
    String source_product_name,
239
    String source_product_name,
232
    long brand_id,
240
    long brand_id,
233
    long quantity)
241
    long quantity,
-
 
242
    long internalRank)
234
  {
243
  {
235
    this();
244
    this();
236
    this.item_id = item_id;
245
    this.item_id = item_id;
237
    setItem_idIsSet(true);
246
    setItem_idIsSet(true);
238
    this.showMrpFlag = showMrpFlag;
247
    this.showMrpFlag = showMrpFlag;
Line 256... Line 265...
256
    this.source_product_name = source_product_name;
265
    this.source_product_name = source_product_name;
257
    this.brand_id = brand_id;
266
    this.brand_id = brand_id;
258
    setBrand_idIsSet(true);
267
    setBrand_idIsSet(true);
259
    this.quantity = quantity;
268
    this.quantity = quantity;
260
    setQuantityIsSet(true);
269
    setQuantityIsSet(true);
-
 
270
    this.internalRank = internalRank;
-
 
271
    setInternalRankIsSet(true);
261
  }
272
  }
262
 
273
 
263
  /**
274
  /**
264
   * Performs a deep copy on <i>other</i>.
275
   * Performs a deep copy on <i>other</i>.
265
   */
276
   */
Line 294... Line 305...
294
    if (other.isSetSource_product_name()) {
305
    if (other.isSetSource_product_name()) {
295
      this.source_product_name = other.source_product_name;
306
      this.source_product_name = other.source_product_name;
296
    }
307
    }
297
    this.brand_id = other.brand_id;
308
    this.brand_id = other.brand_id;
298
    this.quantity = other.quantity;
309
    this.quantity = other.quantity;
-
 
310
    this.internalRank = other.internalRank;
299
  }
311
  }
300
 
312
 
301
  public BulkItems deepCopy() {
313
  public BulkItems deepCopy() {
302
    return new BulkItems(this);
314
    return new BulkItems(this);
303
  }
315
  }
Line 327... Line 339...
327
    this.source_product_name = null;
339
    this.source_product_name = null;
328
    setBrand_idIsSet(false);
340
    setBrand_idIsSet(false);
329
    this.brand_id = 0;
341
    this.brand_id = 0;
330
    setQuantityIsSet(false);
342
    setQuantityIsSet(false);
331
    this.quantity = 0;
343
    this.quantity = 0;
-
 
344
    setInternalRankIsSet(false);
-
 
345
    this.internalRank = 0;
332
  }
346
  }
333
 
347
 
334
  public long getItem_id() {
348
  public long getItem_id() {
335
    return this.item_id;
349
    return this.item_id;
336
  }
350
  }
Line 688... Line 702...
688
 
702
 
689
  public void setQuantityIsSet(boolean value) {
703
  public void setQuantityIsSet(boolean value) {
690
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
704
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
691
  }
705
  }
692
 
706
 
-
 
707
  public long getInternalRank() {
-
 
708
    return this.internalRank;
-
 
709
  }
-
 
710
 
-
 
711
  public void setInternalRank(long internalRank) {
-
 
712
    this.internalRank = internalRank;
-
 
713
    setInternalRankIsSet(true);
-
 
714
  }
-
 
715
 
-
 
716
  public void unsetInternalRank() {
-
 
717
    __isset_bit_vector.clear(__INTERNALRANK_ISSET_ID);
-
 
718
  }
-
 
719
 
-
 
720
  /** Returns true if field internalRank is set (has been assigned a value) and false otherwise */
-
 
721
  public boolean isSetInternalRank() {
-
 
722
    return __isset_bit_vector.get(__INTERNALRANK_ISSET_ID);
-
 
723
  }
-
 
724
 
-
 
725
  public void setInternalRankIsSet(boolean value) {
-
 
726
    __isset_bit_vector.set(__INTERNALRANK_ISSET_ID, value);
-
 
727
  }
-
 
728
 
693
  public void setFieldValue(_Fields field, Object value) {
729
  public void setFieldValue(_Fields field, Object value) {
694
    switch (field) {
730
    switch (field) {
695
    case ITEM_ID:
731
    case ITEM_ID:
696
      if (value == null) {
732
      if (value == null) {
697
        unsetItem_id();
733
        unsetItem_id();
Line 818... Line 854...
818
      } else {
854
      } else {
819
        setQuantity((Long)value);
855
        setQuantity((Long)value);
820
      }
856
      }
821
      break;
857
      break;
822
 
858
 
-
 
859
    case INTERNAL_RANK:
-
 
860
      if (value == null) {
-
 
861
        unsetInternalRank();
-
 
862
      } else {
-
 
863
        setInternalRank((Long)value);
-
 
864
      }
-
 
865
      break;
-
 
866
 
823
    }
867
    }
824
  }
868
  }
825
 
869
 
826
  public Object getFieldValue(_Fields field) {
870
  public Object getFieldValue(_Fields field) {
827
    switch (field) {
871
    switch (field) {
Line 871... Line 915...
871
      return Long.valueOf(getBrand_id());
915
      return Long.valueOf(getBrand_id());
872
 
916
 
873
    case QUANTITY:
917
    case QUANTITY:
874
      return Long.valueOf(getQuantity());
918
      return Long.valueOf(getQuantity());
875
 
919
 
-
 
920
    case INTERNAL_RANK:
-
 
921
      return Long.valueOf(getInternalRank());
-
 
922
 
876
    }
923
    }
877
    throw new IllegalStateException();
924
    throw new IllegalStateException();
878
  }
925
  }
879
 
926
 
880
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
927
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 914... Line 961...
914
      return isSetSource_product_name();
961
      return isSetSource_product_name();
915
    case BRAND_ID:
962
    case BRAND_ID:
916
      return isSetBrand_id();
963
      return isSetBrand_id();
917
    case QUANTITY:
964
    case QUANTITY:
918
      return isSetQuantity();
965
      return isSetQuantity();
-
 
966
    case INTERNAL_RANK:
-
 
967
      return isSetInternalRank();
919
    }
968
    }
920
    throw new IllegalStateException();
969
    throw new IllegalStateException();
921
  }
970
  }
922
 
971
 
923
  @Override
972
  @Override
Line 1075... Line 1124...
1075
        return false;
1124
        return false;
1076
      if (this.quantity != that.quantity)
1125
      if (this.quantity != that.quantity)
1077
        return false;
1126
        return false;
1078
    }
1127
    }
1079
 
1128
 
-
 
1129
    boolean this_present_internalRank = true;
-
 
1130
    boolean that_present_internalRank = true;
-
 
1131
    if (this_present_internalRank || that_present_internalRank) {
-
 
1132
      if (!(this_present_internalRank && that_present_internalRank))
-
 
1133
        return false;
-
 
1134
      if (this.internalRank != that.internalRank)
-
 
1135
        return false;
-
 
1136
    }
-
 
1137
 
1080
    return true;
1138
    return true;
1081
  }
1139
  }
1082
 
1140
 
1083
  @Override
1141
  @Override
1084
  public int hashCode() {
1142
  public int hashCode() {
Line 1251... Line 1309...
1251
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
1309
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
1252
      if (lastComparison != 0) {
1310
      if (lastComparison != 0) {
1253
        return lastComparison;
1311
        return lastComparison;
1254
      }
1312
      }
1255
    }
1313
    }
-
 
1314
    lastComparison = Boolean.valueOf(isSetInternalRank()).compareTo(typedOther.isSetInternalRank());
-
 
1315
    if (lastComparison != 0) {
-
 
1316
      return lastComparison;
-
 
1317
    }
-
 
1318
    if (isSetInternalRank()) {
-
 
1319
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.internalRank, typedOther.internalRank);
-
 
1320
      if (lastComparison != 0) {
-
 
1321
        return lastComparison;
-
 
1322
      }
-
 
1323
    }
1256
    return 0;
1324
    return 0;
1257
  }
1325
  }
1258
 
1326
 
1259
  public _Fields fieldForId(int fieldId) {
1327
  public _Fields fieldForId(int fieldId) {
1260
    return _Fields.findByThriftId(fieldId);
1328
    return _Fields.findByThriftId(fieldId);
Line 1389... Line 1457...
1389
            setQuantityIsSet(true);
1457
            setQuantityIsSet(true);
1390
          } else { 
1458
          } else { 
1391
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1459
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1392
          }
1460
          }
1393
          break;
1461
          break;
-
 
1462
        case 17: // INTERNAL_RANK
-
 
1463
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1464
            this.internalRank = iprot.readI64();
-
 
1465
            setInternalRankIsSet(true);
-
 
1466
          } else { 
-
 
1467
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1468
          }
-
 
1469
          break;
1394
        default:
1470
        default:
1395
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1471
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1396
      }
1472
      }
1397
      iprot.readFieldEnd();
1473
      iprot.readFieldEnd();
1398
    }
1474
    }
Line 1464... Line 1540...
1464
    oprot.writeI64(this.brand_id);
1540
    oprot.writeI64(this.brand_id);
1465
    oprot.writeFieldEnd();
1541
    oprot.writeFieldEnd();
1466
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
1542
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
1467
    oprot.writeI64(this.quantity);
1543
    oprot.writeI64(this.quantity);
1468
    oprot.writeFieldEnd();
1544
    oprot.writeFieldEnd();
-
 
1545
    oprot.writeFieldBegin(INTERNAL_RANK_FIELD_DESC);
-
 
1546
    oprot.writeI64(this.internalRank);
-
 
1547
    oprot.writeFieldEnd();
1469
    oprot.writeFieldStop();
1548
    oprot.writeFieldStop();
1470
    oprot.writeStructEnd();
1549
    oprot.writeStructEnd();
1471
  }
1550
  }
1472
 
1551
 
1473
  @Override
1552
  @Override
Line 1564... Line 1643...
1564
    first = false;
1643
    first = false;
1565
    if (!first) sb.append(", ");
1644
    if (!first) sb.append(", ");
1566
    sb.append("quantity:");
1645
    sb.append("quantity:");
1567
    sb.append(this.quantity);
1646
    sb.append(this.quantity);
1568
    first = false;
1647
    first = false;
-
 
1648
    if (!first) sb.append(", ");
-
 
1649
    sb.append("internalRank:");
-
 
1650
    sb.append(this.internalRank);
-
 
1651
    first = false;
1569
    sb.append(")");
1652
    sb.append(")");
1570
    return sb.toString();
1653
    return sb.toString();
1571
  }
1654
  }
1572
 
1655
 
1573
  public void validate() throws org.apache.thrift.TException {
1656
  public void validate() throws org.apache.thrift.TException {