Subversion Repositories SmartDukaan

Rev

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

Rev 11173 Rev 12617
Line 38... Line 38...
38
  private static final org.apache.thrift.protocol.TField MIN_FBA_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("minFbaPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)13);
38
  private static final org.apache.thrift.protocol.TField MIN_FBA_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("minFbaPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)13);
39
  private static final org.apache.thrift.protocol.TField MIN_MFN_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("minMfnPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)14);
39
  private static final org.apache.thrift.protocol.TField MIN_MFN_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("minMfnPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)14);
40
  private static final org.apache.thrift.protocol.TField OUR_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("ourPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)15);
40
  private static final org.apache.thrift.protocol.TField OUR_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("ourPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)15);
41
  private static final org.apache.thrift.protocol.TField SALE_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("salePriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)16);
41
  private static final org.apache.thrift.protocol.TField SALE_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("salePriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)16);
42
  private static final org.apache.thrift.protocol.TField FC_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("fcLocation", org.apache.thrift.protocol.TType.I32, (short)17);
42
  private static final org.apache.thrift.protocol.TField FC_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("fcLocation", org.apache.thrift.protocol.TType.I32, (short)17);
-
 
43
  private static final org.apache.thrift.protocol.TField ASIN_FIELD_DESC = new org.apache.thrift.protocol.TField("asin", org.apache.thrift.protocol.TType.STRING, (short)18);
43
 
44
 
44
  private long dateOfSale; // required
45
  private long dateOfSale; // required
45
  private long item_id; // required
46
  private long item_id; // required
46
  private int totalOrderCount; // required
47
  private int totalOrderCount; // required
47
  private long amazonFbaInventory; // required
48
  private long amazonFbaInventory; // required
Line 56... Line 57...
56
  private long minFbaPriceSnapshotDate; // required
57
  private long minFbaPriceSnapshotDate; // required
57
  private long minMfnPriceSnapshotDate; // required
58
  private long minMfnPriceSnapshotDate; // required
58
  private long ourPriceSnapshotDate; // required
59
  private long ourPriceSnapshotDate; // required
59
  private long salePriceSnapshotDate; // required
60
  private long salePriceSnapshotDate; // required
60
  private AmazonFCWarehouseLocation fcLocation; // required
61
  private AmazonFCWarehouseLocation fcLocation; // required
-
 
62
  private String asin; // required
61
 
63
 
62
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
64
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
63
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
65
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
64
    DATE_OF_SALE((short)1, "dateOfSale"),
66
    DATE_OF_SALE((short)1, "dateOfSale"),
65
    ITEM_ID((short)2, "item_id"),
67
    ITEM_ID((short)2, "item_id"),
Line 79... Line 81...
79
    SALE_PRICE_SNAPSHOT_DATE((short)16, "salePriceSnapshotDate"),
81
    SALE_PRICE_SNAPSHOT_DATE((short)16, "salePriceSnapshotDate"),
80
    /**
82
    /**
81
     * 
83
     * 
82
     * @see AmazonFCWarehouseLocation
84
     * @see AmazonFCWarehouseLocation
83
     */
85
     */
84
    FC_LOCATION((short)17, "fcLocation");
86
    FC_LOCATION((short)17, "fcLocation"),
-
 
87
    ASIN((short)18, "asin");
85
 
88
 
86
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
89
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
87
 
90
 
88
    static {
91
    static {
89
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
92
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 128... Line 131...
128
          return OUR_PRICE_SNAPSHOT_DATE;
131
          return OUR_PRICE_SNAPSHOT_DATE;
129
        case 16: // SALE_PRICE_SNAPSHOT_DATE
132
        case 16: // SALE_PRICE_SNAPSHOT_DATE
130
          return SALE_PRICE_SNAPSHOT_DATE;
133
          return SALE_PRICE_SNAPSHOT_DATE;
131
        case 17: // FC_LOCATION
134
        case 17: // FC_LOCATION
132
          return FC_LOCATION;
135
          return FC_LOCATION;
-
 
136
        case 18: // ASIN
-
 
137
          return ASIN;
133
        default:
138
        default:
134
          return null;
139
          return null;
135
      }
140
      }
136
    }
141
    }
137
 
142
 
Line 223... Line 228...
223
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
228
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
224
    tmpMap.put(_Fields.SALE_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("salePriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
229
    tmpMap.put(_Fields.SALE_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("salePriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
225
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
230
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
226
    tmpMap.put(_Fields.FC_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("fcLocation", org.apache.thrift.TFieldRequirementType.DEFAULT, 
231
    tmpMap.put(_Fields.FC_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("fcLocation", org.apache.thrift.TFieldRequirementType.DEFAULT, 
227
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AmazonFCWarehouseLocation.class)));
232
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AmazonFCWarehouseLocation.class)));
-
 
233
    tmpMap.put(_Fields.ASIN, new org.apache.thrift.meta_data.FieldMetaData("asin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
234
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
228
    metaDataMap = Collections.unmodifiableMap(tmpMap);
235
    metaDataMap = Collections.unmodifiableMap(tmpMap);
229
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AmazonFbaSalesSnapshot.class, metaDataMap);
236
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AmazonFbaSalesSnapshot.class, metaDataMap);
230
  }
237
  }
231
 
238
 
232
  public AmazonFbaSalesSnapshot() {
239
  public AmazonFbaSalesSnapshot() {
Line 247... Line 254...
247
    double ourPrice,
254
    double ourPrice,
248
    long minFbaPriceSnapshotDate,
255
    long minFbaPriceSnapshotDate,
249
    long minMfnPriceSnapshotDate,
256
    long minMfnPriceSnapshotDate,
250
    long ourPriceSnapshotDate,
257
    long ourPriceSnapshotDate,
251
    long salePriceSnapshotDate,
258
    long salePriceSnapshotDate,
252
    AmazonFCWarehouseLocation fcLocation)
259
    AmazonFCWarehouseLocation fcLocation,
-
 
260
    String asin)
253
  {
261
  {
254
    this();
262
    this();
255
    this.dateOfSale = dateOfSale;
263
    this.dateOfSale = dateOfSale;
256
    setDateOfSaleIsSet(true);
264
    setDateOfSaleIsSet(true);
257
    this.item_id = item_id;
265
    this.item_id = item_id;
Line 283... Line 291...
283
    this.ourPriceSnapshotDate = ourPriceSnapshotDate;
291
    this.ourPriceSnapshotDate = ourPriceSnapshotDate;
284
    setOurPriceSnapshotDateIsSet(true);
292
    setOurPriceSnapshotDateIsSet(true);
285
    this.salePriceSnapshotDate = salePriceSnapshotDate;
293
    this.salePriceSnapshotDate = salePriceSnapshotDate;
286
    setSalePriceSnapshotDateIsSet(true);
294
    setSalePriceSnapshotDateIsSet(true);
287
    this.fcLocation = fcLocation;
295
    this.fcLocation = fcLocation;
-
 
296
    this.asin = asin;
288
  }
297
  }
289
 
298
 
290
  /**
299
  /**
291
   * Performs a deep copy on <i>other</i>.
300
   * Performs a deep copy on <i>other</i>.
292
   */
301
   */
Line 310... Line 319...
310
    this.ourPriceSnapshotDate = other.ourPriceSnapshotDate;
319
    this.ourPriceSnapshotDate = other.ourPriceSnapshotDate;
311
    this.salePriceSnapshotDate = other.salePriceSnapshotDate;
320
    this.salePriceSnapshotDate = other.salePriceSnapshotDate;
312
    if (other.isSetFcLocation()) {
321
    if (other.isSetFcLocation()) {
313
      this.fcLocation = other.fcLocation;
322
      this.fcLocation = other.fcLocation;
314
    }
323
    }
-
 
324
    if (other.isSetAsin()) {
-
 
325
      this.asin = other.asin;
-
 
326
    }
315
  }
327
  }
316
 
328
 
317
  public AmazonFbaSalesSnapshot deepCopy() {
329
  public AmazonFbaSalesSnapshot deepCopy() {
318
    return new AmazonFbaSalesSnapshot(this);
330
    return new AmazonFbaSalesSnapshot(this);
319
  }
331
  }
Line 351... Line 363...
351
    setOurPriceSnapshotDateIsSet(false);
363
    setOurPriceSnapshotDateIsSet(false);
352
    this.ourPriceSnapshotDate = 0;
364
    this.ourPriceSnapshotDate = 0;
353
    setSalePriceSnapshotDateIsSet(false);
365
    setSalePriceSnapshotDateIsSet(false);
354
    this.salePriceSnapshotDate = 0;
366
    this.salePriceSnapshotDate = 0;
355
    this.fcLocation = null;
367
    this.fcLocation = null;
-
 
368
    this.asin = null;
356
  }
369
  }
357
 
370
 
358
  public long getDateOfSale() {
371
  public long getDateOfSale() {
359
    return this.dateOfSale;
372
    return this.dateOfSale;
360
  }
373
  }
Line 736... Line 749...
736
    if (!value) {
749
    if (!value) {
737
      this.fcLocation = null;
750
      this.fcLocation = null;
738
    }
751
    }
739
  }
752
  }
740
 
753
 
-
 
754
  public String getAsin() {
-
 
755
    return this.asin;
-
 
756
  }
-
 
757
 
-
 
758
  public void setAsin(String asin) {
-
 
759
    this.asin = asin;
-
 
760
  }
-
 
761
 
-
 
762
  public void unsetAsin() {
-
 
763
    this.asin = null;
-
 
764
  }
-
 
765
 
-
 
766
  /** Returns true if field asin is set (has been assigned a value) and false otherwise */
-
 
767
  public boolean isSetAsin() {
-
 
768
    return this.asin != null;
-
 
769
  }
-
 
770
 
-
 
771
  public void setAsinIsSet(boolean value) {
-
 
772
    if (!value) {
-
 
773
      this.asin = null;
-
 
774
    }
-
 
775
  }
-
 
776
 
741
  public void setFieldValue(_Fields field, Object value) {
777
  public void setFieldValue(_Fields field, Object value) {
742
    switch (field) {
778
    switch (field) {
743
    case DATE_OF_SALE:
779
    case DATE_OF_SALE:
744
      if (value == null) {
780
      if (value == null) {
745
        unsetDateOfSale();
781
        unsetDateOfSale();
Line 874... Line 910...
874
      } else {
910
      } else {
875
        setFcLocation((AmazonFCWarehouseLocation)value);
911
        setFcLocation((AmazonFCWarehouseLocation)value);
876
      }
912
      }
877
      break;
913
      break;
878
 
914
 
-
 
915
    case ASIN:
-
 
916
      if (value == null) {
-
 
917
        unsetAsin();
-
 
918
      } else {
-
 
919
        setAsin((String)value);
-
 
920
      }
-
 
921
      break;
-
 
922
 
879
    }
923
    }
880
  }
924
  }
881
 
925
 
882
  public Object getFieldValue(_Fields field) {
926
  public Object getFieldValue(_Fields field) {
883
    switch (field) {
927
    switch (field) {
Line 930... Line 974...
930
      return Long.valueOf(getSalePriceSnapshotDate());
974
      return Long.valueOf(getSalePriceSnapshotDate());
931
 
975
 
932
    case FC_LOCATION:
976
    case FC_LOCATION:
933
      return getFcLocation();
977
      return getFcLocation();
934
 
978
 
-
 
979
    case ASIN:
-
 
980
      return getAsin();
-
 
981
 
935
    }
982
    }
936
    throw new IllegalStateException();
983
    throw new IllegalStateException();
937
  }
984
  }
938
 
985
 
939
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
986
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 975... Line 1022...
975
      return isSetOurPriceSnapshotDate();
1022
      return isSetOurPriceSnapshotDate();
976
    case SALE_PRICE_SNAPSHOT_DATE:
1023
    case SALE_PRICE_SNAPSHOT_DATE:
977
      return isSetSalePriceSnapshotDate();
1024
      return isSetSalePriceSnapshotDate();
978
    case FC_LOCATION:
1025
    case FC_LOCATION:
979
      return isSetFcLocation();
1026
      return isSetFcLocation();
-
 
1027
    case ASIN:
-
 
1028
      return isSetAsin();
980
    }
1029
    }
981
    throw new IllegalStateException();
1030
    throw new IllegalStateException();
982
  }
1031
  }
983
 
1032
 
984
  @Override
1033
  @Override
Line 1145... Line 1194...
1145
        return false;
1194
        return false;
1146
      if (!this.fcLocation.equals(that.fcLocation))
1195
      if (!this.fcLocation.equals(that.fcLocation))
1147
        return false;
1196
        return false;
1148
    }
1197
    }
1149
 
1198
 
-
 
1199
    boolean this_present_asin = true && this.isSetAsin();
-
 
1200
    boolean that_present_asin = true && that.isSetAsin();
-
 
1201
    if (this_present_asin || that_present_asin) {
-
 
1202
      if (!(this_present_asin && that_present_asin))
-
 
1203
        return false;
-
 
1204
      if (!this.asin.equals(that.asin))
-
 
1205
        return false;
-
 
1206
    }
-
 
1207
 
1150
    return true;
1208
    return true;
1151
  }
1209
  }
1152
 
1210
 
1153
  @Override
1211
  @Override
1154
  public int hashCode() {
1212
  public int hashCode() {
Line 1331... Line 1389...
1331
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fcLocation, typedOther.fcLocation);
1389
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fcLocation, typedOther.fcLocation);
1332
      if (lastComparison != 0) {
1390
      if (lastComparison != 0) {
1333
        return lastComparison;
1391
        return lastComparison;
1334
      }
1392
      }
1335
    }
1393
    }
-
 
1394
    lastComparison = Boolean.valueOf(isSetAsin()).compareTo(typedOther.isSetAsin());
-
 
1395
    if (lastComparison != 0) {
-
 
1396
      return lastComparison;
-
 
1397
    }
-
 
1398
    if (isSetAsin()) {
-
 
1399
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asin, typedOther.asin);
-
 
1400
      if (lastComparison != 0) {
-
 
1401
        return lastComparison;
-
 
1402
      }
-
 
1403
    }
1336
    return 0;
1404
    return 0;
1337
  }
1405
  }
1338
 
1406
 
1339
  public _Fields fieldForId(int fieldId) {
1407
  public _Fields fieldForId(int fieldId) {
1340
    return _Fields.findByThriftId(fieldId);
1408
    return _Fields.findByThriftId(fieldId);
Line 1483... Line 1551...
1483
            this.fcLocation = AmazonFCWarehouseLocation.findByValue(iprot.readI32());
1551
            this.fcLocation = AmazonFCWarehouseLocation.findByValue(iprot.readI32());
1484
          } else { 
1552
          } else { 
1485
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1553
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1486
          }
1554
          }
1487
          break;
1555
          break;
-
 
1556
        case 18: // ASIN
-
 
1557
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1558
            this.asin = iprot.readString();
-
 
1559
          } else { 
-
 
1560
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1561
          }
-
 
1562
          break;
1488
        default:
1563
        default:
1489
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1564
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1490
      }
1565
      }
1491
      iprot.readFieldEnd();
1566
      iprot.readFieldEnd();
1492
    }
1567
    }
Line 1549... Line 1624...
1549
    if (this.fcLocation != null) {
1624
    if (this.fcLocation != null) {
1550
      oprot.writeFieldBegin(FC_LOCATION_FIELD_DESC);
1625
      oprot.writeFieldBegin(FC_LOCATION_FIELD_DESC);
1551
      oprot.writeI32(this.fcLocation.getValue());
1626
      oprot.writeI32(this.fcLocation.getValue());
1552
      oprot.writeFieldEnd();
1627
      oprot.writeFieldEnd();
1553
    }
1628
    }
-
 
1629
    if (this.asin != null) {
-
 
1630
      oprot.writeFieldBegin(ASIN_FIELD_DESC);
-
 
1631
      oprot.writeString(this.asin);
-
 
1632
      oprot.writeFieldEnd();
-
 
1633
    }
1554
    oprot.writeFieldStop();
1634
    oprot.writeFieldStop();
1555
    oprot.writeStructEnd();
1635
    oprot.writeStructEnd();
1556
  }
1636
  }
1557
 
1637
 
1558
  @Override
1638
  @Override
Line 1629... Line 1709...
1629
      sb.append("null");
1709
      sb.append("null");
1630
    } else {
1710
    } else {
1631
      sb.append(this.fcLocation);
1711
      sb.append(this.fcLocation);
1632
    }
1712
    }
1633
    first = false;
1713
    first = false;
-
 
1714
    if (!first) sb.append(", ");
-
 
1715
    sb.append("asin:");
-
 
1716
    if (this.asin == null) {
-
 
1717
      sb.append("null");
-
 
1718
    } else {
-
 
1719
      sb.append(this.asin);
-
 
1720
    }
-
 
1721
    first = false;
1634
    sb.append(")");
1722
    sb.append(")");
1635
    return sb.toString();
1723
    return sb.toString();
1636
  }
1724
  }
1637
 
1725
 
1638
  public void validate() throws org.apache.thrift.TException {
1726
  public void validate() throws org.apache.thrift.TException {