Subversion Repositories SmartDukaan

Rev

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

Rev 9404 Rev 9456
Line 33... Line 33...
33
  private static final org.apache.thrift.protocol.TField COMMISSION_FIELD_DESC = new org.apache.thrift.protocol.TField("commission", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
33
  private static final org.apache.thrift.protocol.TField COMMISSION_FIELD_DESC = new org.apache.thrift.protocol.TField("commission", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
34
  private static final org.apache.thrift.protocol.TField SERVICE_TAX_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceTax", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
34
  private static final org.apache.thrift.protocol.TField SERVICE_TAX_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceTax", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
35
  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)10);
35
  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)10);
36
  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)11);
36
  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)11);
37
  private static final org.apache.thrift.protocol.TField MAX_NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("maxNlc", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
37
  private static final org.apache.thrift.protocol.TField MAX_NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("maxNlc", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
-
 
38
  private static final org.apache.thrift.protocol.TField SKU_AT_SNAPDEAL_FIELD_DESC = new org.apache.thrift.protocol.TField("skuAtSnapdeal", org.apache.thrift.protocol.TType.STRING, (short)13);
38
 
39
 
39
  private long item_id; // required
40
  private long item_id; // required
40
  private long warehouseId; // required
41
  private long warehouseId; // required
41
  private double exceptionPrice; // required
42
  private double exceptionPrice; // required
42
  private boolean isListedOnSnapdeal; // required
43
  private boolean isListedOnSnapdeal; // required
Line 46... Line 47...
46
  private double commission; // required
47
  private double commission; // required
47
  private double serviceTax; // required
48
  private double serviceTax; // required
48
  private boolean suppressPriceFeed; // required
49
  private boolean suppressPriceFeed; // required
49
  private boolean suppressInventoryFeed; // required
50
  private boolean suppressInventoryFeed; // required
50
  private double maxNlc; // required
51
  private double maxNlc; // required
-
 
52
  private String skuAtSnapdeal; // required
51
 
53
 
52
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
54
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
53
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
55
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
54
    ITEM_ID((short)1, "item_id"),
56
    ITEM_ID((short)1, "item_id"),
55
    WAREHOUSE_ID((short)2, "warehouseId"),
57
    WAREHOUSE_ID((short)2, "warehouseId"),
Line 60... Line 62...
60
    COURIER_COST((short)7, "courierCost"),
62
    COURIER_COST((short)7, "courierCost"),
61
    COMMISSION((short)8, "commission"),
63
    COMMISSION((short)8, "commission"),
62
    SERVICE_TAX((short)9, "serviceTax"),
64
    SERVICE_TAX((short)9, "serviceTax"),
63
    SUPPRESS_PRICE_FEED((short)10, "suppressPriceFeed"),
65
    SUPPRESS_PRICE_FEED((short)10, "suppressPriceFeed"),
64
    SUPPRESS_INVENTORY_FEED((short)11, "suppressInventoryFeed"),
66
    SUPPRESS_INVENTORY_FEED((short)11, "suppressInventoryFeed"),
65
    MAX_NLC((short)12, "maxNlc");
67
    MAX_NLC((short)12, "maxNlc"),
-
 
68
    SKU_AT_SNAPDEAL((short)13, "skuAtSnapdeal");
66
 
69
 
67
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
70
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
68
 
71
 
69
    static {
72
    static {
70
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
73
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 99... Line 102...
99
          return SUPPRESS_PRICE_FEED;
102
          return SUPPRESS_PRICE_FEED;
100
        case 11: // SUPPRESS_INVENTORY_FEED
103
        case 11: // SUPPRESS_INVENTORY_FEED
101
          return SUPPRESS_INVENTORY_FEED;
104
          return SUPPRESS_INVENTORY_FEED;
102
        case 12: // MAX_NLC
105
        case 12: // MAX_NLC
103
          return MAX_NLC;
106
          return MAX_NLC;
-
 
107
        case 13: // SKU_AT_SNAPDEAL
-
 
108
          return SKU_AT_SNAPDEAL;
104
        default:
109
        default:
105
          return null;
110
          return null;
106
      }
111
      }
107
    }
112
    }
108
 
113
 
Line 180... Line 185...
180
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
181
    tmpMap.put(_Fields.SUPPRESS_INVENTORY_FEED, new org.apache.thrift.meta_data.FieldMetaData("suppressInventoryFeed", org.apache.thrift.TFieldRequirementType.DEFAULT, 
186
    tmpMap.put(_Fields.SUPPRESS_INVENTORY_FEED, new org.apache.thrift.meta_data.FieldMetaData("suppressInventoryFeed", org.apache.thrift.TFieldRequirementType.DEFAULT, 
182
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
187
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
183
    tmpMap.put(_Fields.MAX_NLC, new org.apache.thrift.meta_data.FieldMetaData("maxNlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
188
    tmpMap.put(_Fields.MAX_NLC, new org.apache.thrift.meta_data.FieldMetaData("maxNlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
184
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
190
    tmpMap.put(_Fields.SKU_AT_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("skuAtSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
191
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
185
    metaDataMap = Collections.unmodifiableMap(tmpMap);
192
    metaDataMap = Collections.unmodifiableMap(tmpMap);
186
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItem.class, metaDataMap);
193
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItem.class, metaDataMap);
187
  }
194
  }
188
 
195
 
189
  public SnapdealItem() {
196
  public SnapdealItem() {
Line 199... Line 206...
199
    double courierCost,
206
    double courierCost,
200
    double commission,
207
    double commission,
201
    double serviceTax,
208
    double serviceTax,
202
    boolean suppressPriceFeed,
209
    boolean suppressPriceFeed,
203
    boolean suppressInventoryFeed,
210
    boolean suppressInventoryFeed,
204
    double maxNlc)
211
    double maxNlc,
-
 
212
    String skuAtSnapdeal)
205
  {
213
  {
206
    this();
214
    this();
207
    this.item_id = item_id;
215
    this.item_id = item_id;
208
    setItem_idIsSet(true);
216
    setItem_idIsSet(true);
209
    this.warehouseId = warehouseId;
217
    this.warehouseId = warehouseId;
Line 226... Line 234...
226
    setSuppressPriceFeedIsSet(true);
234
    setSuppressPriceFeedIsSet(true);
227
    this.suppressInventoryFeed = suppressInventoryFeed;
235
    this.suppressInventoryFeed = suppressInventoryFeed;
228
    setSuppressInventoryFeedIsSet(true);
236
    setSuppressInventoryFeedIsSet(true);
229
    this.maxNlc = maxNlc;
237
    this.maxNlc = maxNlc;
230
    setMaxNlcIsSet(true);
238
    setMaxNlcIsSet(true);
-
 
239
    this.skuAtSnapdeal = skuAtSnapdeal;
231
  }
240
  }
232
 
241
 
233
  /**
242
  /**
234
   * Performs a deep copy on <i>other</i>.
243
   * Performs a deep copy on <i>other</i>.
235
   */
244
   */
Line 246... Line 255...
246
    this.commission = other.commission;
255
    this.commission = other.commission;
247
    this.serviceTax = other.serviceTax;
256
    this.serviceTax = other.serviceTax;
248
    this.suppressPriceFeed = other.suppressPriceFeed;
257
    this.suppressPriceFeed = other.suppressPriceFeed;
249
    this.suppressInventoryFeed = other.suppressInventoryFeed;
258
    this.suppressInventoryFeed = other.suppressInventoryFeed;
250
    this.maxNlc = other.maxNlc;
259
    this.maxNlc = other.maxNlc;
-
 
260
    if (other.isSetSkuAtSnapdeal()) {
-
 
261
      this.skuAtSnapdeal = other.skuAtSnapdeal;
-
 
262
    }
251
  }
263
  }
252
 
264
 
253
  public SnapdealItem deepCopy() {
265
  public SnapdealItem deepCopy() {
254
    return new SnapdealItem(this);
266
    return new SnapdealItem(this);
255
  }
267
  }
Line 278... Line 290...
278
    this.suppressPriceFeed = false;
290
    this.suppressPriceFeed = false;
279
    setSuppressInventoryFeedIsSet(false);
291
    setSuppressInventoryFeedIsSet(false);
280
    this.suppressInventoryFeed = false;
292
    this.suppressInventoryFeed = false;
281
    setMaxNlcIsSet(false);
293
    setMaxNlcIsSet(false);
282
    this.maxNlc = 0.0;
294
    this.maxNlc = 0.0;
-
 
295
    this.skuAtSnapdeal = null;
283
  }
296
  }
284
 
297
 
285
  public long getItem_id() {
298
  public long getItem_id() {
286
    return this.item_id;
299
    return this.item_id;
287
  }
300
  }
Line 544... Line 557...
544
 
557
 
545
  public void setMaxNlcIsSet(boolean value) {
558
  public void setMaxNlcIsSet(boolean value) {
546
    __isset_bit_vector.set(__MAXNLC_ISSET_ID, value);
559
    __isset_bit_vector.set(__MAXNLC_ISSET_ID, value);
547
  }
560
  }
548
 
561
 
-
 
562
  public String getSkuAtSnapdeal() {
-
 
563
    return this.skuAtSnapdeal;
-
 
564
  }
-
 
565
 
-
 
566
  public void setSkuAtSnapdeal(String skuAtSnapdeal) {
-
 
567
    this.skuAtSnapdeal = skuAtSnapdeal;
-
 
568
  }
-
 
569
 
-
 
570
  public void unsetSkuAtSnapdeal() {
-
 
571
    this.skuAtSnapdeal = null;
-
 
572
  }
-
 
573
 
-
 
574
  /** Returns true if field skuAtSnapdeal is set (has been assigned a value) and false otherwise */
-
 
575
  public boolean isSetSkuAtSnapdeal() {
-
 
576
    return this.skuAtSnapdeal != null;
-
 
577
  }
-
 
578
 
-
 
579
  public void setSkuAtSnapdealIsSet(boolean value) {
-
 
580
    if (!value) {
-
 
581
      this.skuAtSnapdeal = null;
-
 
582
    }
-
 
583
  }
-
 
584
 
549
  public void setFieldValue(_Fields field, Object value) {
585
  public void setFieldValue(_Fields field, Object value) {
550
    switch (field) {
586
    switch (field) {
551
    case ITEM_ID:
587
    case ITEM_ID:
552
      if (value == null) {
588
      if (value == null) {
553
        unsetItem_id();
589
        unsetItem_id();
Line 642... Line 678...
642
      } else {
678
      } else {
643
        setMaxNlc((Double)value);
679
        setMaxNlc((Double)value);
644
      }
680
      }
645
      break;
681
      break;
646
 
682
 
-
 
683
    case SKU_AT_SNAPDEAL:
-
 
684
      if (value == null) {
-
 
685
        unsetSkuAtSnapdeal();
-
 
686
      } else {
-
 
687
        setSkuAtSnapdeal((String)value);
-
 
688
      }
-
 
689
      break;
-
 
690
 
647
    }
691
    }
648
  }
692
  }
649
 
693
 
650
  public Object getFieldValue(_Fields field) {
694
  public Object getFieldValue(_Fields field) {
651
    switch (field) {
695
    switch (field) {
Line 683... Line 727...
683
      return Boolean.valueOf(isSuppressInventoryFeed());
727
      return Boolean.valueOf(isSuppressInventoryFeed());
684
 
728
 
685
    case MAX_NLC:
729
    case MAX_NLC:
686
      return Double.valueOf(getMaxNlc());
730
      return Double.valueOf(getMaxNlc());
687
 
731
 
-
 
732
    case SKU_AT_SNAPDEAL:
-
 
733
      return getSkuAtSnapdeal();
-
 
734
 
688
    }
735
    }
689
    throw new IllegalStateException();
736
    throw new IllegalStateException();
690
  }
737
  }
691
 
738
 
692
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
739
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 718... Line 765...
718
      return isSetSuppressPriceFeed();
765
      return isSetSuppressPriceFeed();
719
    case SUPPRESS_INVENTORY_FEED:
766
    case SUPPRESS_INVENTORY_FEED:
720
      return isSetSuppressInventoryFeed();
767
      return isSetSuppressInventoryFeed();
721
    case MAX_NLC:
768
    case MAX_NLC:
722
      return isSetMaxNlc();
769
      return isSetMaxNlc();
-
 
770
    case SKU_AT_SNAPDEAL:
-
 
771
      return isSetSkuAtSnapdeal();
723
    }
772
    }
724
    throw new IllegalStateException();
773
    throw new IllegalStateException();
725
  }
774
  }
726
 
775
 
727
  @Override
776
  @Override
Line 843... Line 892...
843
        return false;
892
        return false;
844
      if (this.maxNlc != that.maxNlc)
893
      if (this.maxNlc != that.maxNlc)
845
        return false;
894
        return false;
846
    }
895
    }
847
 
896
 
-
 
897
    boolean this_present_skuAtSnapdeal = true && this.isSetSkuAtSnapdeal();
-
 
898
    boolean that_present_skuAtSnapdeal = true && that.isSetSkuAtSnapdeal();
-
 
899
    if (this_present_skuAtSnapdeal || that_present_skuAtSnapdeal) {
-
 
900
      if (!(this_present_skuAtSnapdeal && that_present_skuAtSnapdeal))
-
 
901
        return false;
-
 
902
      if (!this.skuAtSnapdeal.equals(that.skuAtSnapdeal))
-
 
903
        return false;
-
 
904
    }
-
 
905
 
848
    return true;
906
    return true;
849
  }
907
  }
850
 
908
 
851
  @Override
909
  @Override
852
  public int hashCode() {
910
  public int hashCode() {
Line 979... Line 1037...
979
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxNlc, typedOther.maxNlc);
1037
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxNlc, typedOther.maxNlc);
980
      if (lastComparison != 0) {
1038
      if (lastComparison != 0) {
981
        return lastComparison;
1039
        return lastComparison;
982
      }
1040
      }
983
    }
1041
    }
-
 
1042
    lastComparison = Boolean.valueOf(isSetSkuAtSnapdeal()).compareTo(typedOther.isSetSkuAtSnapdeal());
-
 
1043
    if (lastComparison != 0) {
-
 
1044
      return lastComparison;
-
 
1045
    }
-
 
1046
    if (isSetSkuAtSnapdeal()) {
-
 
1047
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skuAtSnapdeal, typedOther.skuAtSnapdeal);
-
 
1048
      if (lastComparison != 0) {
-
 
1049
        return lastComparison;
-
 
1050
      }
-
 
1051
    }
984
    return 0;
1052
    return 0;
985
  }
1053
  }
986
 
1054
 
987
  public _Fields fieldForId(int fieldId) {
1055
  public _Fields fieldForId(int fieldId) {
988
    return _Fields.findByThriftId(fieldId);
1056
    return _Fields.findByThriftId(fieldId);
Line 1092... Line 1160...
1092
            setMaxNlcIsSet(true);
1160
            setMaxNlcIsSet(true);
1093
          } else { 
1161
          } else { 
1094
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1162
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1095
          }
1163
          }
1096
          break;
1164
          break;
-
 
1165
        case 13: // SKU_AT_SNAPDEAL
-
 
1166
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1167
            this.skuAtSnapdeal = iprot.readString();
-
 
1168
          } else { 
-
 
1169
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1170
          }
-
 
1171
          break;
1097
        default:
1172
        default:
1098
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1173
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1099
      }
1174
      }
1100
      iprot.readFieldEnd();
1175
      iprot.readFieldEnd();
1101
    }
1176
    }
Line 1141... Line 1216...
1141
    oprot.writeBool(this.suppressInventoryFeed);
1216
    oprot.writeBool(this.suppressInventoryFeed);
1142
    oprot.writeFieldEnd();
1217
    oprot.writeFieldEnd();
1143
    oprot.writeFieldBegin(MAX_NLC_FIELD_DESC);
1218
    oprot.writeFieldBegin(MAX_NLC_FIELD_DESC);
1144
    oprot.writeDouble(this.maxNlc);
1219
    oprot.writeDouble(this.maxNlc);
1145
    oprot.writeFieldEnd();
1220
    oprot.writeFieldEnd();
-
 
1221
    if (this.skuAtSnapdeal != null) {
-
 
1222
      oprot.writeFieldBegin(SKU_AT_SNAPDEAL_FIELD_DESC);
-
 
1223
      oprot.writeString(this.skuAtSnapdeal);
-
 
1224
      oprot.writeFieldEnd();
-
 
1225
    }
1146
    oprot.writeFieldStop();
1226
    oprot.writeFieldStop();
1147
    oprot.writeStructEnd();
1227
    oprot.writeStructEnd();
1148
  }
1228
  }
1149
 
1229
 
1150
  @Override
1230
  @Override
Line 1197... Line 1277...
1197
    first = false;
1277
    first = false;
1198
    if (!first) sb.append(", ");
1278
    if (!first) sb.append(", ");
1199
    sb.append("maxNlc:");
1279
    sb.append("maxNlc:");
1200
    sb.append(this.maxNlc);
1280
    sb.append(this.maxNlc);
1201
    first = false;
1281
    first = false;
-
 
1282
    if (!first) sb.append(", ");
-
 
1283
    sb.append("skuAtSnapdeal:");
-
 
1284
    if (this.skuAtSnapdeal == null) {
-
 
1285
      sb.append("null");
-
 
1286
    } else {
-
 
1287
      sb.append(this.skuAtSnapdeal);
-
 
1288
    }
-
 
1289
    first = false;
1202
    sb.append(")");
1290
    sb.append(")");
1203
    return sb.toString();
1291
    return sb.toString();
1204
  }
1292
  }
1205
 
1293
 
1206
  public void validate() throws org.apache.thrift.TException {
1294
  public void validate() throws org.apache.thrift.TException {