Subversion Repositories SmartDukaan

Rev

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

Rev 9568 Rev 9724
Line 35... Line 35...
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
  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);
39
  private static final org.apache.thrift.protocol.TField SUPC_FIELD_DESC = new org.apache.thrift.protocol.TField("supc", org.apache.thrift.protocol.TType.STRING, (short)14);
39
  private static final org.apache.thrift.protocol.TField SUPC_FIELD_DESC = new org.apache.thrift.protocol.TField("supc", org.apache.thrift.protocol.TType.STRING, (short)14);
-
 
40
  private static final org.apache.thrift.protocol.TField SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingTime", org.apache.thrift.protocol.TType.STRING, (short)15);
40
 
41
 
41
  private long item_id; // required
42
  private long item_id; // required
42
  private long warehouseId; // required
43
  private long warehouseId; // required
43
  private double exceptionPrice; // required
44
  private double exceptionPrice; // required
44
  private boolean isListedOnSnapdeal; // required
45
  private boolean isListedOnSnapdeal; // required
Line 50... Line 51...
50
  private boolean suppressPriceFeed; // required
51
  private boolean suppressPriceFeed; // required
51
  private boolean suppressInventoryFeed; // required
52
  private boolean suppressInventoryFeed; // required
52
  private double maxNlc; // required
53
  private double maxNlc; // required
53
  private String skuAtSnapdeal; // required
54
  private String skuAtSnapdeal; // required
54
  private String supc; // required
55
  private String supc; // required
-
 
56
  private String shippingTime; // required
55
 
57
 
56
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
58
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
57
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
59
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
58
    ITEM_ID((short)1, "item_id"),
60
    ITEM_ID((short)1, "item_id"),
59
    WAREHOUSE_ID((short)2, "warehouseId"),
61
    WAREHOUSE_ID((short)2, "warehouseId"),
Line 66... Line 68...
66
    SERVICE_TAX((short)9, "serviceTax"),
68
    SERVICE_TAX((short)9, "serviceTax"),
67
    SUPPRESS_PRICE_FEED((short)10, "suppressPriceFeed"),
69
    SUPPRESS_PRICE_FEED((short)10, "suppressPriceFeed"),
68
    SUPPRESS_INVENTORY_FEED((short)11, "suppressInventoryFeed"),
70
    SUPPRESS_INVENTORY_FEED((short)11, "suppressInventoryFeed"),
69
    MAX_NLC((short)12, "maxNlc"),
71
    MAX_NLC((short)12, "maxNlc"),
70
    SKU_AT_SNAPDEAL((short)13, "skuAtSnapdeal"),
72
    SKU_AT_SNAPDEAL((short)13, "skuAtSnapdeal"),
71
    SUPC((short)14, "supc");
73
    SUPC((short)14, "supc"),
-
 
74
    SHIPPING_TIME((short)15, "shippingTime");
72
 
75
 
73
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
76
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
74
 
77
 
75
    static {
78
    static {
76
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
79
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 109... Line 112...
109
          return MAX_NLC;
112
          return MAX_NLC;
110
        case 13: // SKU_AT_SNAPDEAL
113
        case 13: // SKU_AT_SNAPDEAL
111
          return SKU_AT_SNAPDEAL;
114
          return SKU_AT_SNAPDEAL;
112
        case 14: // SUPC
115
        case 14: // SUPC
113
          return SUPC;
116
          return SUPC;
-
 
117
        case 15: // SHIPPING_TIME
-
 
118
          return SHIPPING_TIME;
114
        default:
119
        default:
115
          return null;
120
          return null;
116
      }
121
      }
117
    }
122
    }
118
 
123
 
Line 194... Line 199...
194
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
199
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
195
    tmpMap.put(_Fields.SKU_AT_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("skuAtSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
200
    tmpMap.put(_Fields.SKU_AT_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("skuAtSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
196
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
201
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
197
    tmpMap.put(_Fields.SUPC, new org.apache.thrift.meta_data.FieldMetaData("supc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
202
    tmpMap.put(_Fields.SUPC, new org.apache.thrift.meta_data.FieldMetaData("supc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
198
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
203
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
204
    tmpMap.put(_Fields.SHIPPING_TIME, new org.apache.thrift.meta_data.FieldMetaData("shippingTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
205
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
199
    metaDataMap = Collections.unmodifiableMap(tmpMap);
206
    metaDataMap = Collections.unmodifiableMap(tmpMap);
200
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItem.class, metaDataMap);
207
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItem.class, metaDataMap);
201
  }
208
  }
202
 
209
 
203
  public SnapdealItem() {
210
  public SnapdealItem() {
Line 215... Line 222...
215
    double serviceTax,
222
    double serviceTax,
216
    boolean suppressPriceFeed,
223
    boolean suppressPriceFeed,
217
    boolean suppressInventoryFeed,
224
    boolean suppressInventoryFeed,
218
    double maxNlc,
225
    double maxNlc,
219
    String skuAtSnapdeal,
226
    String skuAtSnapdeal,
220
    String supc)
227
    String supc,
-
 
228
    String shippingTime)
221
  {
229
  {
222
    this();
230
    this();
223
    this.item_id = item_id;
231
    this.item_id = item_id;
224
    setItem_idIsSet(true);
232
    setItem_idIsSet(true);
225
    this.warehouseId = warehouseId;
233
    this.warehouseId = warehouseId;
Line 244... Line 252...
244
    setSuppressInventoryFeedIsSet(true);
252
    setSuppressInventoryFeedIsSet(true);
245
    this.maxNlc = maxNlc;
253
    this.maxNlc = maxNlc;
246
    setMaxNlcIsSet(true);
254
    setMaxNlcIsSet(true);
247
    this.skuAtSnapdeal = skuAtSnapdeal;
255
    this.skuAtSnapdeal = skuAtSnapdeal;
248
    this.supc = supc;
256
    this.supc = supc;
-
 
257
    this.shippingTime = shippingTime;
249
  }
258
  }
250
 
259
 
251
  /**
260
  /**
252
   * Performs a deep copy on <i>other</i>.
261
   * Performs a deep copy on <i>other</i>.
253
   */
262
   */
Line 270... Line 279...
270
      this.skuAtSnapdeal = other.skuAtSnapdeal;
279
      this.skuAtSnapdeal = other.skuAtSnapdeal;
271
    }
280
    }
272
    if (other.isSetSupc()) {
281
    if (other.isSetSupc()) {
273
      this.supc = other.supc;
282
      this.supc = other.supc;
274
    }
283
    }
-
 
284
    if (other.isSetShippingTime()) {
-
 
285
      this.shippingTime = other.shippingTime;
-
 
286
    }
275
  }
287
  }
276
 
288
 
277
  public SnapdealItem deepCopy() {
289
  public SnapdealItem deepCopy() {
278
    return new SnapdealItem(this);
290
    return new SnapdealItem(this);
279
  }
291
  }
Line 304... Line 316...
304
    this.suppressInventoryFeed = false;
316
    this.suppressInventoryFeed = false;
305
    setMaxNlcIsSet(false);
317
    setMaxNlcIsSet(false);
306
    this.maxNlc = 0.0;
318
    this.maxNlc = 0.0;
307
    this.skuAtSnapdeal = null;
319
    this.skuAtSnapdeal = null;
308
    this.supc = null;
320
    this.supc = null;
-
 
321
    this.shippingTime = null;
309
  }
322
  }
310
 
323
 
311
  public long getItem_id() {
324
  public long getItem_id() {
312
    return this.item_id;
325
    return this.item_id;
313
  }
326
  }
Line 616... Line 629...
616
    if (!value) {
629
    if (!value) {
617
      this.supc = null;
630
      this.supc = null;
618
    }
631
    }
619
  }
632
  }
620
 
633
 
-
 
634
  public String getShippingTime() {
-
 
635
    return this.shippingTime;
-
 
636
  }
-
 
637
 
-
 
638
  public void setShippingTime(String shippingTime) {
-
 
639
    this.shippingTime = shippingTime;
-
 
640
  }
-
 
641
 
-
 
642
  public void unsetShippingTime() {
-
 
643
    this.shippingTime = null;
-
 
644
  }
-
 
645
 
-
 
646
  /** Returns true if field shippingTime is set (has been assigned a value) and false otherwise */
-
 
647
  public boolean isSetShippingTime() {
-
 
648
    return this.shippingTime != null;
-
 
649
  }
-
 
650
 
-
 
651
  public void setShippingTimeIsSet(boolean value) {
-
 
652
    if (!value) {
-
 
653
      this.shippingTime = null;
-
 
654
    }
-
 
655
  }
-
 
656
 
621
  public void setFieldValue(_Fields field, Object value) {
657
  public void setFieldValue(_Fields field, Object value) {
622
    switch (field) {
658
    switch (field) {
623
    case ITEM_ID:
659
    case ITEM_ID:
624
      if (value == null) {
660
      if (value == null) {
625
        unsetItem_id();
661
        unsetItem_id();
Line 730... Line 766...
730
      } else {
766
      } else {
731
        setSupc((String)value);
767
        setSupc((String)value);
732
      }
768
      }
733
      break;
769
      break;
734
 
770
 
-
 
771
    case SHIPPING_TIME:
-
 
772
      if (value == null) {
-
 
773
        unsetShippingTime();
-
 
774
      } else {
-
 
775
        setShippingTime((String)value);
-
 
776
      }
-
 
777
      break;
-
 
778
 
735
    }
779
    }
736
  }
780
  }
737
 
781
 
738
  public Object getFieldValue(_Fields field) {
782
  public Object getFieldValue(_Fields field) {
739
    switch (field) {
783
    switch (field) {
Line 777... Line 821...
777
      return getSkuAtSnapdeal();
821
      return getSkuAtSnapdeal();
778
 
822
 
779
    case SUPC:
823
    case SUPC:
780
      return getSupc();
824
      return getSupc();
781
 
825
 
-
 
826
    case SHIPPING_TIME:
-
 
827
      return getShippingTime();
-
 
828
 
782
    }
829
    }
783
    throw new IllegalStateException();
830
    throw new IllegalStateException();
784
  }
831
  }
785
 
832
 
786
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
833
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 816... Line 863...
816
      return isSetMaxNlc();
863
      return isSetMaxNlc();
817
    case SKU_AT_SNAPDEAL:
864
    case SKU_AT_SNAPDEAL:
818
      return isSetSkuAtSnapdeal();
865
      return isSetSkuAtSnapdeal();
819
    case SUPC:
866
    case SUPC:
820
      return isSetSupc();
867
      return isSetSupc();
-
 
868
    case SHIPPING_TIME:
-
 
869
      return isSetShippingTime();
821
    }
870
    }
822
    throw new IllegalStateException();
871
    throw new IllegalStateException();
823
  }
872
  }
824
 
873
 
825
  @Override
874
  @Override
Line 959... Line 1008...
959
        return false;
1008
        return false;
960
      if (!this.supc.equals(that.supc))
1009
      if (!this.supc.equals(that.supc))
961
        return false;
1010
        return false;
962
    }
1011
    }
963
 
1012
 
-
 
1013
    boolean this_present_shippingTime = true && this.isSetShippingTime();
-
 
1014
    boolean that_present_shippingTime = true && that.isSetShippingTime();
-
 
1015
    if (this_present_shippingTime || that_present_shippingTime) {
-
 
1016
      if (!(this_present_shippingTime && that_present_shippingTime))
-
 
1017
        return false;
-
 
1018
      if (!this.shippingTime.equals(that.shippingTime))
-
 
1019
        return false;
-
 
1020
    }
-
 
1021
 
964
    return true;
1022
    return true;
965
  }
1023
  }
966
 
1024
 
967
  @Override
1025
  @Override
968
  public int hashCode() {
1026
  public int hashCode() {
Line 1115... Line 1173...
1115
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supc, typedOther.supc);
1173
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supc, typedOther.supc);
1116
      if (lastComparison != 0) {
1174
      if (lastComparison != 0) {
1117
        return lastComparison;
1175
        return lastComparison;
1118
      }
1176
      }
1119
    }
1177
    }
-
 
1178
    lastComparison = Boolean.valueOf(isSetShippingTime()).compareTo(typedOther.isSetShippingTime());
-
 
1179
    if (lastComparison != 0) {
-
 
1180
      return lastComparison;
-
 
1181
    }
-
 
1182
    if (isSetShippingTime()) {
-
 
1183
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingTime, typedOther.shippingTime);
-
 
1184
      if (lastComparison != 0) {
-
 
1185
        return lastComparison;
-
 
1186
      }
-
 
1187
    }
1120
    return 0;
1188
    return 0;
1121
  }
1189
  }
1122
 
1190
 
1123
  public _Fields fieldForId(int fieldId) {
1191
  public _Fields fieldForId(int fieldId) {
1124
    return _Fields.findByThriftId(fieldId);
1192
    return _Fields.findByThriftId(fieldId);
Line 1242... Line 1310...
1242
            this.supc = iprot.readString();
1310
            this.supc = iprot.readString();
1243
          } else { 
1311
          } else { 
1244
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1312
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1245
          }
1313
          }
1246
          break;
1314
          break;
-
 
1315
        case 15: // SHIPPING_TIME
-
 
1316
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1317
            this.shippingTime = iprot.readString();
-
 
1318
          } else { 
-
 
1319
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1320
          }
-
 
1321
          break;
1247
        default:
1322
        default:
1248
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1323
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1249
      }
1324
      }
1250
      iprot.readFieldEnd();
1325
      iprot.readFieldEnd();
1251
    }
1326
    }
Line 1301... Line 1376...
1301
    if (this.supc != null) {
1376
    if (this.supc != null) {
1302
      oprot.writeFieldBegin(SUPC_FIELD_DESC);
1377
      oprot.writeFieldBegin(SUPC_FIELD_DESC);
1303
      oprot.writeString(this.supc);
1378
      oprot.writeString(this.supc);
1304
      oprot.writeFieldEnd();
1379
      oprot.writeFieldEnd();
1305
    }
1380
    }
-
 
1381
    if (this.shippingTime != null) {
-
 
1382
      oprot.writeFieldBegin(SHIPPING_TIME_FIELD_DESC);
-
 
1383
      oprot.writeString(this.shippingTime);
-
 
1384
      oprot.writeFieldEnd();
-
 
1385
    }
1306
    oprot.writeFieldStop();
1386
    oprot.writeFieldStop();
1307
    oprot.writeStructEnd();
1387
    oprot.writeStructEnd();
1308
  }
1388
  }
1309
 
1389
 
1310
  @Override
1390
  @Override
Line 1373... Line 1453...
1373
      sb.append("null");
1453
      sb.append("null");
1374
    } else {
1454
    } else {
1375
      sb.append(this.supc);
1455
      sb.append(this.supc);
1376
    }
1456
    }
1377
    first = false;
1457
    first = false;
-
 
1458
    if (!first) sb.append(", ");
-
 
1459
    sb.append("shippingTime:");
-
 
1460
    if (this.shippingTime == null) {
-
 
1461
      sb.append("null");
-
 
1462
    } else {
-
 
1463
      sb.append(this.shippingTime);
-
 
1464
    }
-
 
1465
    first = false;
1378
    sb.append(")");
1466
    sb.append(")");
1379
    return sb.toString();
1467
    return sb.toString();
1380
  }
1468
  }
1381
 
1469
 
1382
  public void validate() throws org.apache.thrift.TException {
1470
  public void validate() throws org.apache.thrift.TException {