Subversion Repositories SmartDukaan

Rev

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

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