Subversion Repositories SmartDukaan

Rev

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

Rev 10097 Rev 12133
Line 34... Line 34...
34
  private static final org.apache.thrift.protocol.TField SUPPRESS_PRICE_FEED_FIELD_DESC = new org.apache.thrift.protocol.TField("suppressPriceFeed", org.apache.thrift.protocol.TType.BOOL, (short)9);
34
  private static final org.apache.thrift.protocol.TField SUPPRESS_PRICE_FEED_FIELD_DESC = new org.apache.thrift.protocol.TField("suppressPriceFeed", org.apache.thrift.protocol.TType.BOOL, (short)9);
35
  private static final org.apache.thrift.protocol.TField SUPPRESS_INVENTORY_FEED_FIELD_DESC = new org.apache.thrift.protocol.TField("suppressInventoryFeed", org.apache.thrift.protocol.TType.BOOL, (short)10);
35
  private static final org.apache.thrift.protocol.TField SUPPRESS_INVENTORY_FEED_FIELD_DESC = new org.apache.thrift.protocol.TField("suppressInventoryFeed", org.apache.thrift.protocol.TType.BOOL, (short)10);
36
  private static final org.apache.thrift.protocol.TField UPDATED_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedBy", org.apache.thrift.protocol.TType.STRING, (short)11);
36
  private static final org.apache.thrift.protocol.TField UPDATED_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedBy", org.apache.thrift.protocol.TType.STRING, (short)11);
37
  private static final org.apache.thrift.protocol.TField FLIPKART_SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("flipkartSerialNumber", org.apache.thrift.protocol.TType.STRING, (short)12);
37
  private static final org.apache.thrift.protocol.TField FLIPKART_SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("flipkartSerialNumber", org.apache.thrift.protocol.TType.STRING, (short)12);
38
  private static final org.apache.thrift.protocol.TField MARKETPLACE_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("marketplaceItems", org.apache.thrift.protocol.TType.STRUCT, (short)13);
38
  private static final org.apache.thrift.protocol.TField MARKETPLACE_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("marketplaceItems", org.apache.thrift.protocol.TType.STRUCT, (short)13);
-
 
39
  private static final org.apache.thrift.protocol.TField ITEM_FIELD_DESC = new org.apache.thrift.protocol.TField("item", org.apache.thrift.protocol.TType.STRUCT, (short)14);
39
 
40
 
40
  private long item_id; // required
41
  private long item_id; // required
41
  private double exceptionPrice; // required
42
  private double exceptionPrice; // required
42
  private long warehouseId; // required
43
  private long warehouseId; // required
43
  private double commissionValue; // required
44
  private double commissionValue; // required
Line 48... Line 49...
48
  private boolean suppressPriceFeed; // required
49
  private boolean suppressPriceFeed; // required
49
  private boolean suppressInventoryFeed; // required
50
  private boolean suppressInventoryFeed; // required
50
  private String updatedBy; // required
51
  private String updatedBy; // required
51
  private String flipkartSerialNumber; // required
52
  private String flipkartSerialNumber; // required
52
  private MarketplaceItems marketplaceItems; // required
53
  private MarketplaceItems marketplaceItems; // required
-
 
54
  private Item item; // required
53
 
55
 
54
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
56
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
55
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
57
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
56
    ITEM_ID((short)1, "item_id"),
58
    ITEM_ID((short)1, "item_id"),
57
    EXCEPTION_PRICE((short)2, "exceptionPrice"),
59
    EXCEPTION_PRICE((short)2, "exceptionPrice"),
Line 63... Line 65...
63
    IS_LISTED_ON_FLIPKART((short)8, "isListedOnFlipkart"),
65
    IS_LISTED_ON_FLIPKART((short)8, "isListedOnFlipkart"),
64
    SUPPRESS_PRICE_FEED((short)9, "suppressPriceFeed"),
66
    SUPPRESS_PRICE_FEED((short)9, "suppressPriceFeed"),
65
    SUPPRESS_INVENTORY_FEED((short)10, "suppressInventoryFeed"),
67
    SUPPRESS_INVENTORY_FEED((short)10, "suppressInventoryFeed"),
66
    UPDATED_BY((short)11, "updatedBy"),
68
    UPDATED_BY((short)11, "updatedBy"),
67
    FLIPKART_SERIAL_NUMBER((short)12, "flipkartSerialNumber"),
69
    FLIPKART_SERIAL_NUMBER((short)12, "flipkartSerialNumber"),
68
    MARKETPLACE_ITEMS((short)13, "marketplaceItems");
70
    MARKETPLACE_ITEMS((short)13, "marketplaceItems"),
-
 
71
    ITEM((short)14, "item");
69
 
72
 
70
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
73
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
71
 
74
 
72
    static {
75
    static {
73
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
76
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 104... Line 107...
104
          return UPDATED_BY;
107
          return UPDATED_BY;
105
        case 12: // FLIPKART_SERIAL_NUMBER
108
        case 12: // FLIPKART_SERIAL_NUMBER
106
          return FLIPKART_SERIAL_NUMBER;
109
          return FLIPKART_SERIAL_NUMBER;
107
        case 13: // MARKETPLACE_ITEMS
110
        case 13: // MARKETPLACE_ITEMS
108
          return MARKETPLACE_ITEMS;
111
          return MARKETPLACE_ITEMS;
-
 
112
        case 14: // ITEM
-
 
113
          return ITEM;
109
        default:
114
        default:
110
          return null;
115
          return null;
111
      }
116
      }
112
    }
117
    }
113
 
118
 
Line 184... Line 189...
184
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
185
    tmpMap.put(_Fields.FLIPKART_SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("flipkartSerialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
190
    tmpMap.put(_Fields.FLIPKART_SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("flipkartSerialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
186
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
191
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
187
    tmpMap.put(_Fields.MARKETPLACE_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("marketplaceItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
192
    tmpMap.put(_Fields.MARKETPLACE_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("marketplaceItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
188
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MarketplaceItems.class)));
193
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MarketplaceItems.class)));
-
 
194
    tmpMap.put(_Fields.ITEM, new org.apache.thrift.meta_data.FieldMetaData("item", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
195
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Item.class)));
189
    metaDataMap = Collections.unmodifiableMap(tmpMap);
196
    metaDataMap = Collections.unmodifiableMap(tmpMap);
190
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FlipkartItem.class, metaDataMap);
197
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FlipkartItem.class, metaDataMap);
191
  }
198
  }
192
 
199
 
193
  public FlipkartItem() {
200
  public FlipkartItem() {
Line 204... Line 211...
204
    boolean isListedOnFlipkart,
211
    boolean isListedOnFlipkart,
205
    boolean suppressPriceFeed,
212
    boolean suppressPriceFeed,
206
    boolean suppressInventoryFeed,
213
    boolean suppressInventoryFeed,
207
    String updatedBy,
214
    String updatedBy,
208
    String flipkartSerialNumber,
215
    String flipkartSerialNumber,
209
    MarketplaceItems marketplaceItems)
216
    MarketplaceItems marketplaceItems,
-
 
217
    Item item)
210
  {
218
  {
211
    this();
219
    this();
212
    this.item_id = item_id;
220
    this.item_id = item_id;
213
    setItem_idIsSet(true);
221
    setItem_idIsSet(true);
214
    this.exceptionPrice = exceptionPrice;
222
    this.exceptionPrice = exceptionPrice;
Line 229... Line 237...
229
    this.suppressInventoryFeed = suppressInventoryFeed;
237
    this.suppressInventoryFeed = suppressInventoryFeed;
230
    setSuppressInventoryFeedIsSet(true);
238
    setSuppressInventoryFeedIsSet(true);
231
    this.updatedBy = updatedBy;
239
    this.updatedBy = updatedBy;
232
    this.flipkartSerialNumber = flipkartSerialNumber;
240
    this.flipkartSerialNumber = flipkartSerialNumber;
233
    this.marketplaceItems = marketplaceItems;
241
    this.marketplaceItems = marketplaceItems;
-
 
242
    this.item = item;
234
  }
243
  }
235
 
244
 
236
  /**
245
  /**
237
   * Performs a deep copy on <i>other</i>.
246
   * Performs a deep copy on <i>other</i>.
238
   */
247
   */
Line 258... Line 267...
258
      this.flipkartSerialNumber = other.flipkartSerialNumber;
267
      this.flipkartSerialNumber = other.flipkartSerialNumber;
259
    }
268
    }
260
    if (other.isSetMarketplaceItems()) {
269
    if (other.isSetMarketplaceItems()) {
261
      this.marketplaceItems = new MarketplaceItems(other.marketplaceItems);
270
      this.marketplaceItems = new MarketplaceItems(other.marketplaceItems);
262
    }
271
    }
-
 
272
    if (other.isSetItem()) {
-
 
273
      this.item = new Item(other.item);
-
 
274
    }
263
  }
275
  }
264
 
276
 
265
  public FlipkartItem deepCopy() {
277
  public FlipkartItem deepCopy() {
266
    return new FlipkartItem(this);
278
    return new FlipkartItem(this);
267
  }
279
  }
Line 288... Line 300...
288
    setSuppressInventoryFeedIsSet(false);
300
    setSuppressInventoryFeedIsSet(false);
289
    this.suppressInventoryFeed = false;
301
    this.suppressInventoryFeed = false;
290
    this.updatedBy = null;
302
    this.updatedBy = null;
291
    this.flipkartSerialNumber = null;
303
    this.flipkartSerialNumber = null;
292
    this.marketplaceItems = null;
304
    this.marketplaceItems = null;
-
 
305
    this.item = null;
293
  }
306
  }
294
 
307
 
295
  public long getItem_id() {
308
  public long getItem_id() {
296
    return this.item_id;
309
    return this.item_id;
297
  }
310
  }
Line 580... Line 593...
580
    if (!value) {
593
    if (!value) {
581
      this.marketplaceItems = null;
594
      this.marketplaceItems = null;
582
    }
595
    }
583
  }
596
  }
584
 
597
 
-
 
598
  public Item getItem() {
-
 
599
    return this.item;
-
 
600
  }
-
 
601
 
-
 
602
  public void setItem(Item item) {
-
 
603
    this.item = item;
-
 
604
  }
-
 
605
 
-
 
606
  public void unsetItem() {
-
 
607
    this.item = null;
-
 
608
  }
-
 
609
 
-
 
610
  /** Returns true if field item is set (has been assigned a value) and false otherwise */
-
 
611
  public boolean isSetItem() {
-
 
612
    return this.item != null;
-
 
613
  }
-
 
614
 
-
 
615
  public void setItemIsSet(boolean value) {
-
 
616
    if (!value) {
-
 
617
      this.item = null;
-
 
618
    }
-
 
619
  }
-
 
620
 
585
  public void setFieldValue(_Fields field, Object value) {
621
  public void setFieldValue(_Fields field, Object value) {
586
    switch (field) {
622
    switch (field) {
587
    case ITEM_ID:
623
    case ITEM_ID:
588
      if (value == null) {
624
      if (value == null) {
589
        unsetItem_id();
625
        unsetItem_id();
Line 686... Line 722...
686
      } else {
722
      } else {
687
        setMarketplaceItems((MarketplaceItems)value);
723
        setMarketplaceItems((MarketplaceItems)value);
688
      }
724
      }
689
      break;
725
      break;
690
 
726
 
-
 
727
    case ITEM:
-
 
728
      if (value == null) {
-
 
729
        unsetItem();
-
 
730
      } else {
-
 
731
        setItem((Item)value);
-
 
732
      }
-
 
733
      break;
-
 
734
 
691
    }
735
    }
692
  }
736
  }
693
 
737
 
694
  public Object getFieldValue(_Fields field) {
738
  public Object getFieldValue(_Fields field) {
695
    switch (field) {
739
    switch (field) {
Line 730... Line 774...
730
      return getFlipkartSerialNumber();
774
      return getFlipkartSerialNumber();
731
 
775
 
732
    case MARKETPLACE_ITEMS:
776
    case MARKETPLACE_ITEMS:
733
      return getMarketplaceItems();
777
      return getMarketplaceItems();
734
 
778
 
-
 
779
    case ITEM:
-
 
780
      return getItem();
-
 
781
 
735
    }
782
    }
736
    throw new IllegalStateException();
783
    throw new IllegalStateException();
737
  }
784
  }
738
 
785
 
739
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
786
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 767... Line 814...
767
      return isSetUpdatedBy();
814
      return isSetUpdatedBy();
768
    case FLIPKART_SERIAL_NUMBER:
815
    case FLIPKART_SERIAL_NUMBER:
769
      return isSetFlipkartSerialNumber();
816
      return isSetFlipkartSerialNumber();
770
    case MARKETPLACE_ITEMS:
817
    case MARKETPLACE_ITEMS:
771
      return isSetMarketplaceItems();
818
      return isSetMarketplaceItems();
-
 
819
    case ITEM:
-
 
820
      return isSetItem();
772
    }
821
    }
773
    throw new IllegalStateException();
822
    throw new IllegalStateException();
774
  }
823
  }
775
 
824
 
776
  @Override
825
  @Override
Line 901... Line 950...
901
        return false;
950
        return false;
902
      if (!this.marketplaceItems.equals(that.marketplaceItems))
951
      if (!this.marketplaceItems.equals(that.marketplaceItems))
903
        return false;
952
        return false;
904
    }
953
    }
905
 
954
 
-
 
955
    boolean this_present_item = true && this.isSetItem();
-
 
956
    boolean that_present_item = true && that.isSetItem();
-
 
957
    if (this_present_item || that_present_item) {
-
 
958
      if (!(this_present_item && that_present_item))
-
 
959
        return false;
-
 
960
      if (!this.item.equals(that.item))
-
 
961
        return false;
-
 
962
    }
-
 
963
 
906
    return true;
964
    return true;
907
  }
965
  }
908
 
966
 
909
  @Override
967
  @Override
910
  public int hashCode() {
968
  public int hashCode() {
Line 1047... Line 1105...
1047
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.marketplaceItems, typedOther.marketplaceItems);
1105
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.marketplaceItems, typedOther.marketplaceItems);
1048
      if (lastComparison != 0) {
1106
      if (lastComparison != 0) {
1049
        return lastComparison;
1107
        return lastComparison;
1050
      }
1108
      }
1051
    }
1109
    }
-
 
1110
    lastComparison = Boolean.valueOf(isSetItem()).compareTo(typedOther.isSetItem());
-
 
1111
    if (lastComparison != 0) {
-
 
1112
      return lastComparison;
-
 
1113
    }
-
 
1114
    if (isSetItem()) {
-
 
1115
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item, typedOther.item);
-
 
1116
      if (lastComparison != 0) {
-
 
1117
        return lastComparison;
-
 
1118
      }
-
 
1119
    }
1052
    return 0;
1120
    return 0;
1053
  }
1121
  }
1054
 
1122
 
1055
  public _Fields fieldForId(int fieldId) {
1123
  public _Fields fieldForId(int fieldId) {
1056
    return _Fields.findByThriftId(fieldId);
1124
    return _Fields.findByThriftId(fieldId);
Line 1165... Line 1233...
1165
            this.marketplaceItems.read(iprot);
1233
            this.marketplaceItems.read(iprot);
1166
          } else { 
1234
          } else { 
1167
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1235
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1168
          }
1236
          }
1169
          break;
1237
          break;
-
 
1238
        case 14: // ITEM
-
 
1239
          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
1240
            this.item = new Item();
-
 
1241
            this.item.read(iprot);
-
 
1242
          } else { 
-
 
1243
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1244
          }
-
 
1245
          break;
1170
        default:
1246
        default:
1171
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1247
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1172
      }
1248
      }
1173
      iprot.readFieldEnd();
1249
      iprot.readFieldEnd();
1174
    }
1250
    }
Line 1225... Line 1301...
1225
    if (this.marketplaceItems != null) {
1301
    if (this.marketplaceItems != null) {
1226
      oprot.writeFieldBegin(MARKETPLACE_ITEMS_FIELD_DESC);
1302
      oprot.writeFieldBegin(MARKETPLACE_ITEMS_FIELD_DESC);
1227
      this.marketplaceItems.write(oprot);
1303
      this.marketplaceItems.write(oprot);
1228
      oprot.writeFieldEnd();
1304
      oprot.writeFieldEnd();
1229
    }
1305
    }
-
 
1306
    if (this.item != null) {
-
 
1307
      oprot.writeFieldBegin(ITEM_FIELD_DESC);
-
 
1308
      this.item.write(oprot);
-
 
1309
      oprot.writeFieldEnd();
-
 
1310
    }
1230
    oprot.writeFieldStop();
1311
    oprot.writeFieldStop();
1231
    oprot.writeStructEnd();
1312
    oprot.writeStructEnd();
1232
  }
1313
  }
1233
 
1314
 
1234
  @Override
1315
  @Override
Line 1301... Line 1382...
1301
      sb.append("null");
1382
      sb.append("null");
1302
    } else {
1383
    } else {
1303
      sb.append(this.marketplaceItems);
1384
      sb.append(this.marketplaceItems);
1304
    }
1385
    }
1305
    first = false;
1386
    first = false;
-
 
1387
    if (!first) sb.append(", ");
-
 
1388
    sb.append("item:");
-
 
1389
    if (this.item == null) {
-
 
1390
      sb.append("null");
-
 
1391
    } else {
-
 
1392
      sb.append(this.item);
-
 
1393
    }
-
 
1394
    first = false;
1306
    sb.append(")");
1395
    sb.append(")");
1307
    return sb.toString();
1396
    return sb.toString();
1308
  }
1397
  }
1309
 
1398
 
1310
  public void validate() throws org.apache.thrift.TException {
1399
  public void validate() throws org.apache.thrift.TException {