Subversion Repositories SmartDukaan

Rev

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

Rev 5945 Rev 6752
Line 26... Line 26...
26
  private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);
27
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField TRANSFER_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("transferPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
28
  private static final org.apache.thrift.protocol.TField TRANSFER_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("transferPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
29
  private static final org.apache.thrift.protocol.TField MOP_FIELD_DESC = new org.apache.thrift.protocol.TField("mop", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
29
  private static final org.apache.thrift.protocol.TField MOP_FIELD_DESC = new org.apache.thrift.protocol.TField("mop", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
30
  private static final org.apache.thrift.protocol.TField DEALER_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("dealerPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
30
  private static final org.apache.thrift.protocol.TField DEALER_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("dealerPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
-
 
31
  private static final org.apache.thrift.protocol.TField NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("nlc", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
31
 
32
 
32
  private long vendorId; // required
33
  private long vendorId; // required
33
  private long itemId; // required
34
  private long itemId; // required
34
  private double transferPrice; // required
35
  private double transferPrice; // required
35
  private double mop; // required
36
  private double mop; // required
36
  private double dealerPrice; // required
37
  private double dealerPrice; // required
-
 
38
  private double nlc; // required
37
 
39
 
38
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
40
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
39
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
40
    VENDOR_ID((short)1, "vendorId"),
42
    VENDOR_ID((short)1, "vendorId"),
41
    ITEM_ID((short)2, "itemId"),
43
    ITEM_ID((short)2, "itemId"),
42
    TRANSFER_PRICE((short)3, "transferPrice"),
44
    TRANSFER_PRICE((short)3, "transferPrice"),
43
    MOP((short)4, "mop"),
45
    MOP((short)4, "mop"),
44
    DEALER_PRICE((short)5, "dealerPrice");
46
    DEALER_PRICE((short)5, "dealerPrice"),
-
 
47
    NLC((short)6, "nlc");
45
 
48
 
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
47
 
50
 
48
    static {
51
    static {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 64... Line 67...
64
          return TRANSFER_PRICE;
67
          return TRANSFER_PRICE;
65
        case 4: // MOP
68
        case 4: // MOP
66
          return MOP;
69
          return MOP;
67
        case 5: // DEALER_PRICE
70
        case 5: // DEALER_PRICE
68
          return DEALER_PRICE;
71
          return DEALER_PRICE;
-
 
72
        case 6: // NLC
-
 
73
          return NLC;
69
        default:
74
        default:
70
          return null;
75
          return null;
71
      }
76
      }
72
    }
77
    }
73
 
78
 
Line 109... Line 114...
109
  private static final int __VENDORID_ISSET_ID = 0;
114
  private static final int __VENDORID_ISSET_ID = 0;
110
  private static final int __ITEMID_ISSET_ID = 1;
115
  private static final int __ITEMID_ISSET_ID = 1;
111
  private static final int __TRANSFERPRICE_ISSET_ID = 2;
116
  private static final int __TRANSFERPRICE_ISSET_ID = 2;
112
  private static final int __MOP_ISSET_ID = 3;
117
  private static final int __MOP_ISSET_ID = 3;
113
  private static final int __DEALERPRICE_ISSET_ID = 4;
118
  private static final int __DEALERPRICE_ISSET_ID = 4;
-
 
119
  private static final int __NLC_ISSET_ID = 5;
114
  private BitSet __isset_bit_vector = new BitSet(5);
120
  private BitSet __isset_bit_vector = new BitSet(6);
115
 
121
 
116
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
122
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
117
  static {
123
  static {
118
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
124
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
119
    tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
125
    tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 124... Line 130...
124
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
130
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
125
    tmpMap.put(_Fields.MOP, new org.apache.thrift.meta_data.FieldMetaData("mop", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
    tmpMap.put(_Fields.MOP, new org.apache.thrift.meta_data.FieldMetaData("mop", org.apache.thrift.TFieldRequirementType.DEFAULT, 
126
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
132
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
127
    tmpMap.put(_Fields.DEALER_PRICE, new org.apache.thrift.meta_data.FieldMetaData("dealerPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
133
    tmpMap.put(_Fields.DEALER_PRICE, new org.apache.thrift.meta_data.FieldMetaData("dealerPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
128
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
134
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
135
    tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
136
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
129
    metaDataMap = Collections.unmodifiableMap(tmpMap);
137
    metaDataMap = Collections.unmodifiableMap(tmpMap);
130
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(VendorItemPricing.class, metaDataMap);
138
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(VendorItemPricing.class, metaDataMap);
131
  }
139
  }
132
 
140
 
133
  public VendorItemPricing() {
141
  public VendorItemPricing() {
Line 136... Line 144...
136
  public VendorItemPricing(
144
  public VendorItemPricing(
137
    long vendorId,
145
    long vendorId,
138
    long itemId,
146
    long itemId,
139
    double transferPrice,
147
    double transferPrice,
140
    double mop,
148
    double mop,
141
    double dealerPrice)
149
    double dealerPrice,
-
 
150
    double nlc)
142
  {
151
  {
143
    this();
152
    this();
144
    this.vendorId = vendorId;
153
    this.vendorId = vendorId;
145
    setVendorIdIsSet(true);
154
    setVendorIdIsSet(true);
146
    this.itemId = itemId;
155
    this.itemId = itemId;
Line 149... Line 158...
149
    setTransferPriceIsSet(true);
158
    setTransferPriceIsSet(true);
150
    this.mop = mop;
159
    this.mop = mop;
151
    setMopIsSet(true);
160
    setMopIsSet(true);
152
    this.dealerPrice = dealerPrice;
161
    this.dealerPrice = dealerPrice;
153
    setDealerPriceIsSet(true);
162
    setDealerPriceIsSet(true);
-
 
163
    this.nlc = nlc;
-
 
164
    setNlcIsSet(true);
154
  }
165
  }
155
 
166
 
156
  /**
167
  /**
157
   * Performs a deep copy on <i>other</i>.
168
   * Performs a deep copy on <i>other</i>.
158
   */
169
   */
Line 162... Line 173...
162
    this.vendorId = other.vendorId;
173
    this.vendorId = other.vendorId;
163
    this.itemId = other.itemId;
174
    this.itemId = other.itemId;
164
    this.transferPrice = other.transferPrice;
175
    this.transferPrice = other.transferPrice;
165
    this.mop = other.mop;
176
    this.mop = other.mop;
166
    this.dealerPrice = other.dealerPrice;
177
    this.dealerPrice = other.dealerPrice;
-
 
178
    this.nlc = other.nlc;
167
  }
179
  }
168
 
180
 
169
  public VendorItemPricing deepCopy() {
181
  public VendorItemPricing deepCopy() {
170
    return new VendorItemPricing(this);
182
    return new VendorItemPricing(this);
171
  }
183
  }
Line 180... Line 192...
180
    this.transferPrice = 0.0;
192
    this.transferPrice = 0.0;
181
    setMopIsSet(false);
193
    setMopIsSet(false);
182
    this.mop = 0.0;
194
    this.mop = 0.0;
183
    setDealerPriceIsSet(false);
195
    setDealerPriceIsSet(false);
184
    this.dealerPrice = 0.0;
196
    this.dealerPrice = 0.0;
-
 
197
    setNlcIsSet(false);
-
 
198
    this.nlc = 0.0;
185
  }
199
  }
186
 
200
 
187
  public long getVendorId() {
201
  public long getVendorId() {
188
    return this.vendorId;
202
    return this.vendorId;
189
  }
203
  }
Line 292... Line 306...
292
 
306
 
293
  public void setDealerPriceIsSet(boolean value) {
307
  public void setDealerPriceIsSet(boolean value) {
294
    __isset_bit_vector.set(__DEALERPRICE_ISSET_ID, value);
308
    __isset_bit_vector.set(__DEALERPRICE_ISSET_ID, value);
295
  }
309
  }
296
 
310
 
-
 
311
  public double getNlc() {
-
 
312
    return this.nlc;
-
 
313
  }
-
 
314
 
-
 
315
  public void setNlc(double nlc) {
-
 
316
    this.nlc = nlc;
-
 
317
    setNlcIsSet(true);
-
 
318
  }
-
 
319
 
-
 
320
  public void unsetNlc() {
-
 
321
    __isset_bit_vector.clear(__NLC_ISSET_ID);
-
 
322
  }
-
 
323
 
-
 
324
  /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
-
 
325
  public boolean isSetNlc() {
-
 
326
    return __isset_bit_vector.get(__NLC_ISSET_ID);
-
 
327
  }
-
 
328
 
-
 
329
  public void setNlcIsSet(boolean value) {
-
 
330
    __isset_bit_vector.set(__NLC_ISSET_ID, value);
-
 
331
  }
-
 
332
 
297
  public void setFieldValue(_Fields field, Object value) {
333
  public void setFieldValue(_Fields field, Object value) {
298
    switch (field) {
334
    switch (field) {
299
    case VENDOR_ID:
335
    case VENDOR_ID:
300
      if (value == null) {
336
      if (value == null) {
301
        unsetVendorId();
337
        unsetVendorId();
Line 334... Line 370...
334
      } else {
370
      } else {
335
        setDealerPrice((Double)value);
371
        setDealerPrice((Double)value);
336
      }
372
      }
337
      break;
373
      break;
338
 
374
 
-
 
375
    case NLC:
-
 
376
      if (value == null) {
-
 
377
        unsetNlc();
-
 
378
      } else {
-
 
379
        setNlc((Double)value);
-
 
380
      }
-
 
381
      break;
-
 
382
 
339
    }
383
    }
340
  }
384
  }
341
 
385
 
342
  public Object getFieldValue(_Fields field) {
386
  public Object getFieldValue(_Fields field) {
343
    switch (field) {
387
    switch (field) {
Line 354... Line 398...
354
      return Double.valueOf(getMop());
398
      return Double.valueOf(getMop());
355
 
399
 
356
    case DEALER_PRICE:
400
    case DEALER_PRICE:
357
      return Double.valueOf(getDealerPrice());
401
      return Double.valueOf(getDealerPrice());
358
 
402
 
-
 
403
    case NLC:
-
 
404
      return Double.valueOf(getNlc());
-
 
405
 
359
    }
406
    }
360
    throw new IllegalStateException();
407
    throw new IllegalStateException();
361
  }
408
  }
362
 
409
 
363
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
410
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 375... Line 422...
375
      return isSetTransferPrice();
422
      return isSetTransferPrice();
376
    case MOP:
423
    case MOP:
377
      return isSetMop();
424
      return isSetMop();
378
    case DEALER_PRICE:
425
    case DEALER_PRICE:
379
      return isSetDealerPrice();
426
      return isSetDealerPrice();
-
 
427
    case NLC:
-
 
428
      return isSetNlc();
380
    }
429
    }
381
    throw new IllegalStateException();
430
    throw new IllegalStateException();
382
  }
431
  }
383
 
432
 
384
  @Override
433
  @Override
Line 437... Line 486...
437
        return false;
486
        return false;
438
      if (this.dealerPrice != that.dealerPrice)
487
      if (this.dealerPrice != that.dealerPrice)
439
        return false;
488
        return false;
440
    }
489
    }
441
 
490
 
-
 
491
    boolean this_present_nlc = true;
-
 
492
    boolean that_present_nlc = true;
-
 
493
    if (this_present_nlc || that_present_nlc) {
-
 
494
      if (!(this_present_nlc && that_present_nlc))
-
 
495
        return false;
-
 
496
      if (this.nlc != that.nlc)
-
 
497
        return false;
-
 
498
    }
-
 
499
 
442
    return true;
500
    return true;
443
  }
501
  }
444
 
502
 
445
  @Override
503
  @Override
446
  public int hashCode() {
504
  public int hashCode() {
Line 503... Line 561...
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealerPrice, typedOther.dealerPrice);
561
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealerPrice, typedOther.dealerPrice);
504
      if (lastComparison != 0) {
562
      if (lastComparison != 0) {
505
        return lastComparison;
563
        return lastComparison;
506
      }
564
      }
507
    }
565
    }
-
 
566
    lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
-
 
567
    if (lastComparison != 0) {
-
 
568
      return lastComparison;
-
 
569
    }
-
 
570
    if (isSetNlc()) {
-
 
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
-
 
572
      if (lastComparison != 0) {
-
 
573
        return lastComparison;
-
 
574
      }
-
 
575
    }
508
    return 0;
576
    return 0;
509
  }
577
  }
510
 
578
 
511
  public _Fields fieldForId(int fieldId) {
579
  public _Fields fieldForId(int fieldId) {
512
    return _Fields.findByThriftId(fieldId);
580
    return _Fields.findByThriftId(fieldId);
Line 560... Line 628...
560
            setDealerPriceIsSet(true);
628
            setDealerPriceIsSet(true);
561
          } else { 
629
          } else { 
562
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
630
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
563
          }
631
          }
564
          break;
632
          break;
-
 
633
        case 6: // NLC
-
 
634
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
635
            this.nlc = iprot.readDouble();
-
 
636
            setNlcIsSet(true);
-
 
637
          } else { 
-
 
638
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
639
          }
-
 
640
          break;
565
        default:
641
        default:
566
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
642
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
567
      }
643
      }
568
      iprot.readFieldEnd();
644
      iprot.readFieldEnd();
569
    }
645
    }
Line 588... Line 664...
588
    oprot.writeDouble(this.mop);
664
    oprot.writeDouble(this.mop);
589
    oprot.writeFieldEnd();
665
    oprot.writeFieldEnd();
590
    oprot.writeFieldBegin(DEALER_PRICE_FIELD_DESC);
666
    oprot.writeFieldBegin(DEALER_PRICE_FIELD_DESC);
591
    oprot.writeDouble(this.dealerPrice);
667
    oprot.writeDouble(this.dealerPrice);
592
    oprot.writeFieldEnd();
668
    oprot.writeFieldEnd();
-
 
669
    oprot.writeFieldBegin(NLC_FIELD_DESC);
-
 
670
    oprot.writeDouble(this.nlc);
-
 
671
    oprot.writeFieldEnd();
593
    oprot.writeFieldStop();
672
    oprot.writeFieldStop();
594
    oprot.writeStructEnd();
673
    oprot.writeStructEnd();
595
  }
674
  }
596
 
675
 
597
  @Override
676
  @Override
Line 616... Line 695...
616
    first = false;
695
    first = false;
617
    if (!first) sb.append(", ");
696
    if (!first) sb.append(", ");
618
    sb.append("dealerPrice:");
697
    sb.append("dealerPrice:");
619
    sb.append(this.dealerPrice);
698
    sb.append(this.dealerPrice);
620
    first = false;
699
    first = false;
-
 
700
    if (!first) sb.append(", ");
-
 
701
    sb.append("nlc:");
-
 
702
    sb.append(this.nlc);
-
 
703
    first = false;
621
    sb.append(")");
704
    sb.append(")");
622
    return sb.toString();
705
    return sb.toString();
623
  }
706
  }
624
 
707
 
625
  public void validate() throws org.apache.thrift.TException {
708
  public void validate() throws org.apache.thrift.TException {