Subversion Repositories SmartDukaan

Rev

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

Rev 11905 Rev 12169
Line 28... Line 28...
28
  private static final org.apache.thrift.protocol.TField SAHOLIC_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("saholicPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
28
  private static final org.apache.thrift.protocol.TField SAHOLIC_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("saholicPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
29
  private static final org.apache.thrift.protocol.TField SD_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("sdPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
29
  private static final org.apache.thrift.protocol.TField SD_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("sdPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
30
  private static final org.apache.thrift.protocol.TField FK_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("fkPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
30
  private static final org.apache.thrift.protocol.TField FK_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("fkPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
31
  private static final org.apache.thrift.protocol.TField AMAZON_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
31
  private static final org.apache.thrift.protocol.TField AMAZON_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
32
  private static final org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("productName", org.apache.thrift.protocol.TType.STRING, (short)7);
32
  private static final org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("productName", org.apache.thrift.protocol.TType.STRING, (short)7);
-
 
33
  private static final org.apache.thrift.protocol.TField LAST_PROCESSED_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("lastProcessedTimestamp", org.apache.thrift.protocol.TType.I64, (short)8);
33
 
34
 
34
  private long item_id; // required
35
  private long item_id; // required
35
  private double dealPrice; // required
36
  private double dealPrice; // required
36
  private double saholicPrice; // required
37
  private double saholicPrice; // required
37
  private double sdPrice; // required
38
  private double sdPrice; // required
38
  private double fkPrice; // required
39
  private double fkPrice; // required
39
  private double amazonPrice; // required
40
  private double amazonPrice; // required
40
  private String productName; // required
41
  private String productName; // required
-
 
42
  private long lastProcessedTimestamp; // required
41
 
43
 
42
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
44
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
43
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
45
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
44
    ITEM_ID((short)1, "item_id"),
46
    ITEM_ID((short)1, "item_id"),
45
    DEAL_PRICE((short)2, "dealPrice"),
47
    DEAL_PRICE((short)2, "dealPrice"),
46
    SAHOLIC_PRICE((short)3, "saholicPrice"),
48
    SAHOLIC_PRICE((short)3, "saholicPrice"),
47
    SD_PRICE((short)4, "sdPrice"),
49
    SD_PRICE((short)4, "sdPrice"),
48
    FK_PRICE((short)5, "fkPrice"),
50
    FK_PRICE((short)5, "fkPrice"),
49
    AMAZON_PRICE((short)6, "amazonPrice"),
51
    AMAZON_PRICE((short)6, "amazonPrice"),
50
    PRODUCT_NAME((short)7, "productName");
52
    PRODUCT_NAME((short)7, "productName"),
-
 
53
    LAST_PROCESSED_TIMESTAMP((short)8, "lastProcessedTimestamp");
51
 
54
 
52
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
55
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
53
 
56
 
54
    static {
57
    static {
55
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
58
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 74... Line 77...
74
          return FK_PRICE;
77
          return FK_PRICE;
75
        case 6: // AMAZON_PRICE
78
        case 6: // AMAZON_PRICE
76
          return AMAZON_PRICE;
79
          return AMAZON_PRICE;
77
        case 7: // PRODUCT_NAME
80
        case 7: // PRODUCT_NAME
78
          return PRODUCT_NAME;
81
          return PRODUCT_NAME;
-
 
82
        case 8: // LAST_PROCESSED_TIMESTAMP
-
 
83
          return LAST_PROCESSED_TIMESTAMP;
79
        default:
84
        default:
80
          return null;
85
          return null;
81
      }
86
      }
82
    }
87
    }
83
 
88
 
Line 120... Line 125...
120
  private static final int __DEALPRICE_ISSET_ID = 1;
125
  private static final int __DEALPRICE_ISSET_ID = 1;
121
  private static final int __SAHOLICPRICE_ISSET_ID = 2;
126
  private static final int __SAHOLICPRICE_ISSET_ID = 2;
122
  private static final int __SDPRICE_ISSET_ID = 3;
127
  private static final int __SDPRICE_ISSET_ID = 3;
123
  private static final int __FKPRICE_ISSET_ID = 4;
128
  private static final int __FKPRICE_ISSET_ID = 4;
124
  private static final int __AMAZONPRICE_ISSET_ID = 5;
129
  private static final int __AMAZONPRICE_ISSET_ID = 5;
-
 
130
  private static final int __LASTPROCESSEDTIMESTAMP_ISSET_ID = 6;
125
  private BitSet __isset_bit_vector = new BitSet(6);
131
  private BitSet __isset_bit_vector = new BitSet(7);
126
 
132
 
127
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
133
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
128
  static {
134
  static {
129
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
135
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
130
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
136
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 139... Line 145...
139
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
145
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
140
    tmpMap.put(_Fields.AMAZON_PRICE, new org.apache.thrift.meta_data.FieldMetaData("amazonPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
146
    tmpMap.put(_Fields.AMAZON_PRICE, new org.apache.thrift.meta_data.FieldMetaData("amazonPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
147
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
142
    tmpMap.put(_Fields.PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("productName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
148
    tmpMap.put(_Fields.PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("productName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
149
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
150
    tmpMap.put(_Fields.LAST_PROCESSED_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("lastProcessedTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
151
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
144
    metaDataMap = Collections.unmodifiableMap(tmpMap);
152
    metaDataMap = Collections.unmodifiableMap(tmpMap);
145
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PdPriceComp.class, metaDataMap);
153
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PdPriceComp.class, metaDataMap);
146
  }
154
  }
147
 
155
 
148
  public PdPriceComp() {
156
  public PdPriceComp() {
Line 153... Line 161...
153
    double dealPrice,
161
    double dealPrice,
154
    double saholicPrice,
162
    double saholicPrice,
155
    double sdPrice,
163
    double sdPrice,
156
    double fkPrice,
164
    double fkPrice,
157
    double amazonPrice,
165
    double amazonPrice,
158
    String productName)
166
    String productName,
-
 
167
    long lastProcessedTimestamp)
159
  {
168
  {
160
    this();
169
    this();
161
    this.item_id = item_id;
170
    this.item_id = item_id;
162
    setItem_idIsSet(true);
171
    setItem_idIsSet(true);
163
    this.dealPrice = dealPrice;
172
    this.dealPrice = dealPrice;
Line 169... Line 178...
169
    this.fkPrice = fkPrice;
178
    this.fkPrice = fkPrice;
170
    setFkPriceIsSet(true);
179
    setFkPriceIsSet(true);
171
    this.amazonPrice = amazonPrice;
180
    this.amazonPrice = amazonPrice;
172
    setAmazonPriceIsSet(true);
181
    setAmazonPriceIsSet(true);
173
    this.productName = productName;
182
    this.productName = productName;
-
 
183
    this.lastProcessedTimestamp = lastProcessedTimestamp;
-
 
184
    setLastProcessedTimestampIsSet(true);
174
  }
185
  }
175
 
186
 
176
  /**
187
  /**
177
   * Performs a deep copy on <i>other</i>.
188
   * Performs a deep copy on <i>other</i>.
178
   */
189
   */
Line 186... Line 197...
186
    this.fkPrice = other.fkPrice;
197
    this.fkPrice = other.fkPrice;
187
    this.amazonPrice = other.amazonPrice;
198
    this.amazonPrice = other.amazonPrice;
188
    if (other.isSetProductName()) {
199
    if (other.isSetProductName()) {
189
      this.productName = other.productName;
200
      this.productName = other.productName;
190
    }
201
    }
-
 
202
    this.lastProcessedTimestamp = other.lastProcessedTimestamp;
191
  }
203
  }
192
 
204
 
193
  public PdPriceComp deepCopy() {
205
  public PdPriceComp deepCopy() {
194
    return new PdPriceComp(this);
206
    return new PdPriceComp(this);
195
  }
207
  }
Line 207... Line 219...
207
    setFkPriceIsSet(false);
219
    setFkPriceIsSet(false);
208
    this.fkPrice = 0.0;
220
    this.fkPrice = 0.0;
209
    setAmazonPriceIsSet(false);
221
    setAmazonPriceIsSet(false);
210
    this.amazonPrice = 0.0;
222
    this.amazonPrice = 0.0;
211
    this.productName = null;
223
    this.productName = null;
-
 
224
    setLastProcessedTimestampIsSet(false);
-
 
225
    this.lastProcessedTimestamp = 0;
212
  }
226
  }
213
 
227
 
214
  public long getItem_id() {
228
  public long getItem_id() {
215
    return this.item_id;
229
    return this.item_id;
216
  }
230
  }
Line 364... Line 378...
364
    if (!value) {
378
    if (!value) {
365
      this.productName = null;
379
      this.productName = null;
366
    }
380
    }
367
  }
381
  }
368
 
382
 
-
 
383
  public long getLastProcessedTimestamp() {
-
 
384
    return this.lastProcessedTimestamp;
-
 
385
  }
-
 
386
 
-
 
387
  public void setLastProcessedTimestamp(long lastProcessedTimestamp) {
-
 
388
    this.lastProcessedTimestamp = lastProcessedTimestamp;
-
 
389
    setLastProcessedTimestampIsSet(true);
-
 
390
  }
-
 
391
 
-
 
392
  public void unsetLastProcessedTimestamp() {
-
 
393
    __isset_bit_vector.clear(__LASTPROCESSEDTIMESTAMP_ISSET_ID);
-
 
394
  }
-
 
395
 
-
 
396
  /** Returns true if field lastProcessedTimestamp is set (has been assigned a value) and false otherwise */
-
 
397
  public boolean isSetLastProcessedTimestamp() {
-
 
398
    return __isset_bit_vector.get(__LASTPROCESSEDTIMESTAMP_ISSET_ID);
-
 
399
  }
-
 
400
 
-
 
401
  public void setLastProcessedTimestampIsSet(boolean value) {
-
 
402
    __isset_bit_vector.set(__LASTPROCESSEDTIMESTAMP_ISSET_ID, value);
-
 
403
  }
-
 
404
 
369
  public void setFieldValue(_Fields field, Object value) {
405
  public void setFieldValue(_Fields field, Object value) {
370
    switch (field) {
406
    switch (field) {
371
    case ITEM_ID:
407
    case ITEM_ID:
372
      if (value == null) {
408
      if (value == null) {
373
        unsetItem_id();
409
        unsetItem_id();
Line 422... Line 458...
422
      } else {
458
      } else {
423
        setProductName((String)value);
459
        setProductName((String)value);
424
      }
460
      }
425
      break;
461
      break;
426
 
462
 
-
 
463
    case LAST_PROCESSED_TIMESTAMP:
-
 
464
      if (value == null) {
-
 
465
        unsetLastProcessedTimestamp();
-
 
466
      } else {
-
 
467
        setLastProcessedTimestamp((Long)value);
-
 
468
      }
-
 
469
      break;
-
 
470
 
427
    }
471
    }
428
  }
472
  }
429
 
473
 
430
  public Object getFieldValue(_Fields field) {
474
  public Object getFieldValue(_Fields field) {
431
    switch (field) {
475
    switch (field) {
Line 448... Line 492...
448
      return Double.valueOf(getAmazonPrice());
492
      return Double.valueOf(getAmazonPrice());
449
 
493
 
450
    case PRODUCT_NAME:
494
    case PRODUCT_NAME:
451
      return getProductName();
495
      return getProductName();
452
 
496
 
-
 
497
    case LAST_PROCESSED_TIMESTAMP:
-
 
498
      return Long.valueOf(getLastProcessedTimestamp());
-
 
499
 
453
    }
500
    }
454
    throw new IllegalStateException();
501
    throw new IllegalStateException();
455
  }
502
  }
456
 
503
 
457
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
504
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 473... Line 520...
473
      return isSetFkPrice();
520
      return isSetFkPrice();
474
    case AMAZON_PRICE:
521
    case AMAZON_PRICE:
475
      return isSetAmazonPrice();
522
      return isSetAmazonPrice();
476
    case PRODUCT_NAME:
523
    case PRODUCT_NAME:
477
      return isSetProductName();
524
      return isSetProductName();
-
 
525
    case LAST_PROCESSED_TIMESTAMP:
-
 
526
      return isSetLastProcessedTimestamp();
478
    }
527
    }
479
    throw new IllegalStateException();
528
    throw new IllegalStateException();
480
  }
529
  }
481
 
530
 
482
  @Override
531
  @Override
Line 553... Line 602...
553
        return false;
602
        return false;
554
      if (!this.productName.equals(that.productName))
603
      if (!this.productName.equals(that.productName))
555
        return false;
604
        return false;
556
    }
605
    }
557
 
606
 
-
 
607
    boolean this_present_lastProcessedTimestamp = true;
-
 
608
    boolean that_present_lastProcessedTimestamp = true;
-
 
609
    if (this_present_lastProcessedTimestamp || that_present_lastProcessedTimestamp) {
-
 
610
      if (!(this_present_lastProcessedTimestamp && that_present_lastProcessedTimestamp))
-
 
611
        return false;
-
 
612
      if (this.lastProcessedTimestamp != that.lastProcessedTimestamp)
-
 
613
        return false;
-
 
614
    }
-
 
615
 
558
    return true;
616
    return true;
559
  }
617
  }
560
 
618
 
561
  @Override
619
  @Override
562
  public int hashCode() {
620
  public int hashCode() {
Line 639... Line 697...
639
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productName, typedOther.productName);
697
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productName, typedOther.productName);
640
      if (lastComparison != 0) {
698
      if (lastComparison != 0) {
641
        return lastComparison;
699
        return lastComparison;
642
      }
700
      }
643
    }
701
    }
-
 
702
    lastComparison = Boolean.valueOf(isSetLastProcessedTimestamp()).compareTo(typedOther.isSetLastProcessedTimestamp());
-
 
703
    if (lastComparison != 0) {
-
 
704
      return lastComparison;
-
 
705
    }
-
 
706
    if (isSetLastProcessedTimestamp()) {
-
 
707
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastProcessedTimestamp, typedOther.lastProcessedTimestamp);
-
 
708
      if (lastComparison != 0) {
-
 
709
        return lastComparison;
-
 
710
      }
-
 
711
    }
644
    return 0;
712
    return 0;
645
  }
713
  }
646
 
714
 
647
  public _Fields fieldForId(int fieldId) {
715
  public _Fields fieldForId(int fieldId) {
648
    return _Fields.findByThriftId(fieldId);
716
    return _Fields.findByThriftId(fieldId);
Line 711... Line 779...
711
            this.productName = iprot.readString();
779
            this.productName = iprot.readString();
712
          } else { 
780
          } else { 
713
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
781
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
714
          }
782
          }
715
          break;
783
          break;
-
 
784
        case 8: // LAST_PROCESSED_TIMESTAMP
-
 
785
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
786
            this.lastProcessedTimestamp = iprot.readI64();
-
 
787
            setLastProcessedTimestampIsSet(true);
-
 
788
          } else { 
-
 
789
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
790
          }
-
 
791
          break;
716
        default:
792
        default:
717
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
793
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
718
      }
794
      }
719
      iprot.readFieldEnd();
795
      iprot.readFieldEnd();
720
    }
796
    }
Line 747... Line 823...
747
    if (this.productName != null) {
823
    if (this.productName != null) {
748
      oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
824
      oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
749
      oprot.writeString(this.productName);
825
      oprot.writeString(this.productName);
750
      oprot.writeFieldEnd();
826
      oprot.writeFieldEnd();
751
    }
827
    }
-
 
828
    oprot.writeFieldBegin(LAST_PROCESSED_TIMESTAMP_FIELD_DESC);
-
 
829
    oprot.writeI64(this.lastProcessedTimestamp);
-
 
830
    oprot.writeFieldEnd();
752
    oprot.writeFieldStop();
831
    oprot.writeFieldStop();
753
    oprot.writeStructEnd();
832
    oprot.writeStructEnd();
754
  }
833
  }
755
 
834
 
756
  @Override
835
  @Override
Line 787... Line 866...
787
      sb.append("null");
866
      sb.append("null");
788
    } else {
867
    } else {
789
      sb.append(this.productName);
868
      sb.append(this.productName);
790
    }
869
    }
791
    first = false;
870
    first = false;
-
 
871
    if (!first) sb.append(", ");
-
 
872
    sb.append("lastProcessedTimestamp:");
-
 
873
    sb.append(this.lastProcessedTimestamp);
-
 
874
    first = false;
792
    sb.append(")");
875
    sb.append(")");
793
    return sb.toString();
876
    return sb.toString();
794
  }
877
  }
795
 
878
 
796
  public void validate() throws org.apache.thrift.TException {
879
  public void validate() throws org.apache.thrift.TException {