Subversion Repositories SmartDukaan

Rev

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

Rev 1350 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.catalog;
6
package in.shop2020.model.v1.catalog;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
public class VendorItemPricing implements TBase<VendorItemPricing._Fields>, java.io.Serializable, Cloneable, Comparable<VendorItemPricing> {
23
public class VendorItemPricing implements org.apache.thrift.TBase<VendorItemPricing, VendorItemPricing._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("VendorItemPricing");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VendorItemPricing");
28
 
25
 
29
  private static final TField VENDOR_ID_FIELD_DESC = new TField("vendorId", 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);
30
  private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", 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);
31
  private static final TField TRANSFER_PRICE_FIELD_DESC = new TField("transferPrice", 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);
32
  private static final TField MOP_FIELD_DESC = new TField("mop", 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);
33
  private static final TField DEALER_PRICE_FIELD_DESC = new TField("dealerPrice", 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);
34
 
31
 
35
  private long vendorId;
32
  private long vendorId; // required
36
  private long itemId;
33
  private long itemId; // required
37
  private double transferPrice;
34
  private double transferPrice; // required
38
  private double mop;
35
  private double mop; // required
39
  private double dealerPrice;
36
  private double dealerPrice; // required
40
 
37
 
41
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
38
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
42
  public enum _Fields implements TFieldIdEnum {
39
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
43
    VENDOR_ID((short)1, "vendorId"),
40
    VENDOR_ID((short)1, "vendorId"),
44
    ITEM_ID((short)2, "itemId"),
41
    ITEM_ID((short)2, "itemId"),
45
    TRANSFER_PRICE((short)3, "transferPrice"),
42
    TRANSFER_PRICE((short)3, "transferPrice"),
46
    MOP((short)4, "mop"),
43
    MOP((short)4, "mop"),
47
    DEALER_PRICE((short)5, "dealerPrice");
44
    DEALER_PRICE((short)5, "dealerPrice");
48
 
45
 
49
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
50
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
51
 
47
 
52
    static {
48
    static {
53
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
54
        byId.put((int)field._thriftId, field);
-
 
55
        byName.put(field.getFieldName(), field);
50
        byName.put(field.getFieldName(), field);
56
      }
51
      }
57
    }
52
    }
58
 
53
 
59
    /**
54
    /**
60
     * Find the _Fields constant that matches fieldId, or null if its not found.
55
     * Find the _Fields constant that matches fieldId, or null if its not found.
61
     */
56
     */
62
    public static _Fields findByThriftId(int fieldId) {
57
    public static _Fields findByThriftId(int fieldId) {
63
      return byId.get(fieldId);
58
      switch(fieldId) {
-
 
59
        case 1: // VENDOR_ID
-
 
60
          return VENDOR_ID;
-
 
61
        case 2: // ITEM_ID
-
 
62
          return ITEM_ID;
-
 
63
        case 3: // TRANSFER_PRICE
-
 
64
          return TRANSFER_PRICE;
-
 
65
        case 4: // MOP
-
 
66
          return MOP;
-
 
67
        case 5: // DEALER_PRICE
-
 
68
          return DEALER_PRICE;
-
 
69
        default:
-
 
70
          return null;
-
 
71
      }
64
    }
72
    }
65
 
73
 
66
    /**
74
    /**
67
     * Find the _Fields constant that matches fieldId, throwing an exception
75
     * Find the _Fields constant that matches fieldId, throwing an exception
68
     * if it is not found.
76
     * if it is not found.
Line 103... Line 111...
103
  private static final int __TRANSFERPRICE_ISSET_ID = 2;
111
  private static final int __TRANSFERPRICE_ISSET_ID = 2;
104
  private static final int __MOP_ISSET_ID = 3;
112
  private static final int __MOP_ISSET_ID = 3;
105
  private static final int __DEALERPRICE_ISSET_ID = 4;
113
  private static final int __DEALERPRICE_ISSET_ID = 4;
106
  private BitSet __isset_bit_vector = new BitSet(5);
114
  private BitSet __isset_bit_vector = new BitSet(5);
107
 
115
 
108
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
116
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
109
    put(_Fields.VENDOR_ID, new FieldMetaData("vendorId", TFieldRequirementType.DEFAULT, 
-
 
110
        new FieldValueMetaData(TType.I64)));
-
 
111
    put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
-
 
112
        new FieldValueMetaData(TType.I64)));
-
 
113
    put(_Fields.TRANSFER_PRICE, new FieldMetaData("transferPrice", TFieldRequirementType.DEFAULT, 
-
 
114
        new FieldValueMetaData(TType.DOUBLE)));
-
 
115
    put(_Fields.MOP, new FieldMetaData("mop", TFieldRequirementType.DEFAULT, 
-
 
116
        new FieldValueMetaData(TType.DOUBLE)));
-
 
117
    put(_Fields.DEALER_PRICE, new FieldMetaData("dealerPrice", TFieldRequirementType.DEFAULT, 
-
 
118
        new FieldValueMetaData(TType.DOUBLE)));
-
 
119
  }});
-
 
120
 
-
 
121
  static {
117
  static {
-
 
118
    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, 
-
 
120
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
121
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
122
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
123
    tmpMap.put(_Fields.TRANSFER_PRICE, new org.apache.thrift.meta_data.FieldMetaData("transferPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
124
        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, 
-
 
126
        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, 
-
 
128
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
129
    metaDataMap = Collections.unmodifiableMap(tmpMap);
122
    FieldMetaData.addStructMetaDataMap(VendorItemPricing.class, metaDataMap);
130
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(VendorItemPricing.class, metaDataMap);
123
  }
131
  }
124
 
132
 
125
  public VendorItemPricing() {
133
  public VendorItemPricing() {
126
  }
134
  }
127
 
135
 
Line 160... Line 168...
160
 
168
 
161
  public VendorItemPricing deepCopy() {
169
  public VendorItemPricing deepCopy() {
162
    return new VendorItemPricing(this);
170
    return new VendorItemPricing(this);
163
  }
171
  }
164
 
172
 
165
  @Deprecated
173
  @Override
166
  public VendorItemPricing clone() {
174
  public void clear() {
167
    return new VendorItemPricing(this);
175
    setVendorIdIsSet(false);
-
 
176
    this.vendorId = 0;
-
 
177
    setItemIdIsSet(false);
-
 
178
    this.itemId = 0;
-
 
179
    setTransferPriceIsSet(false);
-
 
180
    this.transferPrice = 0.0;
-
 
181
    setMopIsSet(false);
-
 
182
    this.mop = 0.0;
-
 
183
    setDealerPriceIsSet(false);
-
 
184
    this.dealerPrice = 0.0;
168
  }
185
  }
169
 
186
 
170
  public long getVendorId() {
187
  public long getVendorId() {
171
    return this.vendorId;
188
    return this.vendorId;
172
  }
189
  }
173
 
190
 
174
  public VendorItemPricing setVendorId(long vendorId) {
191
  public void setVendorId(long vendorId) {
175
    this.vendorId = vendorId;
192
    this.vendorId = vendorId;
176
    setVendorIdIsSet(true);
193
    setVendorIdIsSet(true);
177
    return this;
-
 
178
  }
194
  }
179
 
195
 
180
  public void unsetVendorId() {
196
  public void unsetVendorId() {
181
    __isset_bit_vector.clear(__VENDORID_ISSET_ID);
197
    __isset_bit_vector.clear(__VENDORID_ISSET_ID);
182
  }
198
  }
183
 
199
 
184
  /** Returns true if field vendorId is set (has been asigned a value) and false otherwise */
200
  /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
185
  public boolean isSetVendorId() {
201
  public boolean isSetVendorId() {
186
    return __isset_bit_vector.get(__VENDORID_ISSET_ID);
202
    return __isset_bit_vector.get(__VENDORID_ISSET_ID);
187
  }
203
  }
188
 
204
 
189
  public void setVendorIdIsSet(boolean value) {
205
  public void setVendorIdIsSet(boolean value) {
Line 192... Line 208...
192
 
208
 
193
  public long getItemId() {
209
  public long getItemId() {
194
    return this.itemId;
210
    return this.itemId;
195
  }
211
  }
196
 
212
 
197
  public VendorItemPricing setItemId(long itemId) {
213
  public void setItemId(long itemId) {
198
    this.itemId = itemId;
214
    this.itemId = itemId;
199
    setItemIdIsSet(true);
215
    setItemIdIsSet(true);
200
    return this;
-
 
201
  }
216
  }
202
 
217
 
203
  public void unsetItemId() {
218
  public void unsetItemId() {
204
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
219
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
205
  }
220
  }
206
 
221
 
207
  /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
222
  /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
208
  public boolean isSetItemId() {
223
  public boolean isSetItemId() {
209
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
224
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
210
  }
225
  }
211
 
226
 
212
  public void setItemIdIsSet(boolean value) {
227
  public void setItemIdIsSet(boolean value) {
Line 215... Line 230...
215
 
230
 
216
  public double getTransferPrice() {
231
  public double getTransferPrice() {
217
    return this.transferPrice;
232
    return this.transferPrice;
218
  }
233
  }
219
 
234
 
220
  public VendorItemPricing setTransferPrice(double transferPrice) {
235
  public void setTransferPrice(double transferPrice) {
221
    this.transferPrice = transferPrice;
236
    this.transferPrice = transferPrice;
222
    setTransferPriceIsSet(true);
237
    setTransferPriceIsSet(true);
223
    return this;
-
 
224
  }
238
  }
225
 
239
 
226
  public void unsetTransferPrice() {
240
  public void unsetTransferPrice() {
227
    __isset_bit_vector.clear(__TRANSFERPRICE_ISSET_ID);
241
    __isset_bit_vector.clear(__TRANSFERPRICE_ISSET_ID);
228
  }
242
  }
229
 
243
 
230
  /** Returns true if field transferPrice is set (has been asigned a value) and false otherwise */
244
  /** Returns true if field transferPrice is set (has been assigned a value) and false otherwise */
231
  public boolean isSetTransferPrice() {
245
  public boolean isSetTransferPrice() {
232
    return __isset_bit_vector.get(__TRANSFERPRICE_ISSET_ID);
246
    return __isset_bit_vector.get(__TRANSFERPRICE_ISSET_ID);
233
  }
247
  }
234
 
248
 
235
  public void setTransferPriceIsSet(boolean value) {
249
  public void setTransferPriceIsSet(boolean value) {
Line 238... Line 252...
238
 
252
 
239
  public double getMop() {
253
  public double getMop() {
240
    return this.mop;
254
    return this.mop;
241
  }
255
  }
242
 
256
 
243
  public VendorItemPricing setMop(double mop) {
257
  public void setMop(double mop) {
244
    this.mop = mop;
258
    this.mop = mop;
245
    setMopIsSet(true);
259
    setMopIsSet(true);
246
    return this;
-
 
247
  }
260
  }
248
 
261
 
249
  public void unsetMop() {
262
  public void unsetMop() {
250
    __isset_bit_vector.clear(__MOP_ISSET_ID);
263
    __isset_bit_vector.clear(__MOP_ISSET_ID);
251
  }
264
  }
252
 
265
 
253
  /** Returns true if field mop is set (has been asigned a value) and false otherwise */
266
  /** Returns true if field mop is set (has been assigned a value) and false otherwise */
254
  public boolean isSetMop() {
267
  public boolean isSetMop() {
255
    return __isset_bit_vector.get(__MOP_ISSET_ID);
268
    return __isset_bit_vector.get(__MOP_ISSET_ID);
256
  }
269
  }
257
 
270
 
258
  public void setMopIsSet(boolean value) {
271
  public void setMopIsSet(boolean value) {
Line 261... Line 274...
261
 
274
 
262
  public double getDealerPrice() {
275
  public double getDealerPrice() {
263
    return this.dealerPrice;
276
    return this.dealerPrice;
264
  }
277
  }
265
 
278
 
266
  public VendorItemPricing setDealerPrice(double dealerPrice) {
279
  public void setDealerPrice(double dealerPrice) {
267
    this.dealerPrice = dealerPrice;
280
    this.dealerPrice = dealerPrice;
268
    setDealerPriceIsSet(true);
281
    setDealerPriceIsSet(true);
269
    return this;
-
 
270
  }
282
  }
271
 
283
 
272
  public void unsetDealerPrice() {
284
  public void unsetDealerPrice() {
273
    __isset_bit_vector.clear(__DEALERPRICE_ISSET_ID);
285
    __isset_bit_vector.clear(__DEALERPRICE_ISSET_ID);
274
  }
286
  }
275
 
287
 
276
  /** Returns true if field dealerPrice is set (has been asigned a value) and false otherwise */
288
  /** Returns true if field dealerPrice is set (has been assigned a value) and false otherwise */
277
  public boolean isSetDealerPrice() {
289
  public boolean isSetDealerPrice() {
278
    return __isset_bit_vector.get(__DEALERPRICE_ISSET_ID);
290
    return __isset_bit_vector.get(__DEALERPRICE_ISSET_ID);
279
  }
291
  }
280
 
292
 
281
  public void setDealerPriceIsSet(boolean value) {
293
  public void setDealerPriceIsSet(boolean value) {
Line 325... Line 337...
325
      break;
337
      break;
326
 
338
 
327
    }
339
    }
328
  }
340
  }
329
 
341
 
330
  public void setFieldValue(int fieldID, Object value) {
-
 
331
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
332
  }
-
 
333
 
-
 
334
  public Object getFieldValue(_Fields field) {
342
  public Object getFieldValue(_Fields field) {
335
    switch (field) {
343
    switch (field) {
336
    case VENDOR_ID:
344
    case VENDOR_ID:
337
      return new Long(getVendorId());
345
      return Long.valueOf(getVendorId());
338
 
346
 
339
    case ITEM_ID:
347
    case ITEM_ID:
340
      return new Long(getItemId());
348
      return Long.valueOf(getItemId());
341
 
349
 
342
    case TRANSFER_PRICE:
350
    case TRANSFER_PRICE:
343
      return new Double(getTransferPrice());
351
      return Double.valueOf(getTransferPrice());
344
 
352
 
345
    case MOP:
353
    case MOP:
346
      return new Double(getMop());
354
      return Double.valueOf(getMop());
347
 
355
 
348
    case DEALER_PRICE:
356
    case DEALER_PRICE:
349
      return new Double(getDealerPrice());
357
      return Double.valueOf(getDealerPrice());
350
 
358
 
351
    }
359
    }
352
    throw new IllegalStateException();
360
    throw new IllegalStateException();
353
  }
361
  }
354
 
362
 
355
  public Object getFieldValue(int fieldId) {
-
 
356
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
357
  }
-
 
358
 
-
 
359
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
363
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
360
  public boolean isSet(_Fields field) {
364
  public boolean isSet(_Fields field) {
-
 
365
    if (field == null) {
-
 
366
      throw new IllegalArgumentException();
-
 
367
    }
-
 
368
 
361
    switch (field) {
369
    switch (field) {
362
    case VENDOR_ID:
370
    case VENDOR_ID:
363
      return isSetVendorId();
371
      return isSetVendorId();
364
    case ITEM_ID:
372
    case ITEM_ID:
365
      return isSetItemId();
373
      return isSetItemId();
Line 371... Line 379...
371
      return isSetDealerPrice();
379
      return isSetDealerPrice();
372
    }
380
    }
373
    throw new IllegalStateException();
381
    throw new IllegalStateException();
374
  }
382
  }
375
 
383
 
376
  public boolean isSet(int fieldID) {
-
 
377
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
378
  }
-
 
379
 
-
 
380
  @Override
384
  @Override
381
  public boolean equals(Object that) {
385
  public boolean equals(Object that) {
382
    if (that == null)
386
    if (that == null)
383
      return false;
387
      return false;
384
    if (that instanceof VendorItemPricing)
388
    if (that instanceof VendorItemPricing)
Line 449... Line 453...
449
    }
453
    }
450
 
454
 
451
    int lastComparison = 0;
455
    int lastComparison = 0;
452
    VendorItemPricing typedOther = (VendorItemPricing)other;
456
    VendorItemPricing typedOther = (VendorItemPricing)other;
453
 
457
 
454
    lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(isSetVendorId());
458
    lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
455
    if (lastComparison != 0) {
459
    if (lastComparison != 0) {
456
      return lastComparison;
460
      return lastComparison;
457
    }
461
    }
-
 
462
    if (isSetVendorId()) {
458
    lastComparison = TBaseHelper.compareTo(vendorId, typedOther.vendorId);
463
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
459
    if (lastComparison != 0) {
464
      if (lastComparison != 0) {
460
      return lastComparison;
465
        return lastComparison;
-
 
466
      }
461
    }
467
    }
462
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
468
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
463
    if (lastComparison != 0) {
469
    if (lastComparison != 0) {
464
      return lastComparison;
470
      return lastComparison;
465
    }
471
    }
-
 
472
    if (isSetItemId()) {
466
    lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
473
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
467
    if (lastComparison != 0) {
474
      if (lastComparison != 0) {
468
      return lastComparison;
475
        return lastComparison;
-
 
476
      }
469
    }
477
    }
470
    lastComparison = Boolean.valueOf(isSetTransferPrice()).compareTo(isSetTransferPrice());
478
    lastComparison = Boolean.valueOf(isSetTransferPrice()).compareTo(typedOther.isSetTransferPrice());
471
    if (lastComparison != 0) {
479
    if (lastComparison != 0) {
472
      return lastComparison;
480
      return lastComparison;
473
    }
481
    }
-
 
482
    if (isSetTransferPrice()) {
474
    lastComparison = TBaseHelper.compareTo(transferPrice, typedOther.transferPrice);
483
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferPrice, typedOther.transferPrice);
475
    if (lastComparison != 0) {
484
      if (lastComparison != 0) {
476
      return lastComparison;
485
        return lastComparison;
-
 
486
      }
477
    }
487
    }
478
    lastComparison = Boolean.valueOf(isSetMop()).compareTo(isSetMop());
488
    lastComparison = Boolean.valueOf(isSetMop()).compareTo(typedOther.isSetMop());
479
    if (lastComparison != 0) {
489
    if (lastComparison != 0) {
480
      return lastComparison;
490
      return lastComparison;
481
    }
491
    }
-
 
492
    if (isSetMop()) {
482
    lastComparison = TBaseHelper.compareTo(mop, typedOther.mop);
493
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mop, typedOther.mop);
483
    if (lastComparison != 0) {
494
      if (lastComparison != 0) {
484
      return lastComparison;
495
        return lastComparison;
-
 
496
      }
485
    }
497
    }
486
    lastComparison = Boolean.valueOf(isSetDealerPrice()).compareTo(isSetDealerPrice());
498
    lastComparison = Boolean.valueOf(isSetDealerPrice()).compareTo(typedOther.isSetDealerPrice());
487
    if (lastComparison != 0) {
499
    if (lastComparison != 0) {
488
      return lastComparison;
500
      return lastComparison;
489
    }
501
    }
-
 
502
    if (isSetDealerPrice()) {
490
    lastComparison = TBaseHelper.compareTo(dealerPrice, typedOther.dealerPrice);
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealerPrice, typedOther.dealerPrice);
491
    if (lastComparison != 0) {
504
      if (lastComparison != 0) {
492
      return lastComparison;
505
        return lastComparison;
-
 
506
      }
493
    }
507
    }
494
    return 0;
508
    return 0;
495
  }
509
  }
496
 
510
 
-
 
511
  public _Fields fieldForId(int fieldId) {
-
 
512
    return _Fields.findByThriftId(fieldId);
-
 
513
  }
-
 
514
 
497
  public void read(TProtocol iprot) throws TException {
515
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
498
    TField field;
516
    org.apache.thrift.protocol.TField field;
499
    iprot.readStructBegin();
517
    iprot.readStructBegin();
500
    while (true)
518
    while (true)
501
    {
519
    {
502
      field = iprot.readFieldBegin();
520
      field = iprot.readFieldBegin();
503
      if (field.type == TType.STOP) { 
521
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
504
        break;
522
        break;
505
      }
523
      }
506
      _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
507
      if (fieldId == null) {
-
 
508
        TProtocolUtil.skip(iprot, field.type);
-
 
509
      } else {
-
 
510
        switch (fieldId) {
524
      switch (field.id) {
511
          case VENDOR_ID:
525
        case 1: // VENDOR_ID
512
            if (field.type == TType.I64) {
526
          if (field.type == org.apache.thrift.protocol.TType.I64) {
513
              this.vendorId = iprot.readI64();
527
            this.vendorId = iprot.readI64();
514
              setVendorIdIsSet(true);
528
            setVendorIdIsSet(true);
515
            } else { 
529
          } else { 
516
              TProtocolUtil.skip(iprot, field.type);
530
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
517
            }
531
          }
518
            break;
532
          break;
519
          case ITEM_ID:
533
        case 2: // ITEM_ID
520
            if (field.type == TType.I64) {
534
          if (field.type == org.apache.thrift.protocol.TType.I64) {
521
              this.itemId = iprot.readI64();
535
            this.itemId = iprot.readI64();
522
              setItemIdIsSet(true);
536
            setItemIdIsSet(true);
523
            } else { 
537
          } else { 
524
              TProtocolUtil.skip(iprot, field.type);
538
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
525
            }
539
          }
526
            break;
540
          break;
527
          case TRANSFER_PRICE:
541
        case 3: // TRANSFER_PRICE
528
            if (field.type == TType.DOUBLE) {
542
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
529
              this.transferPrice = iprot.readDouble();
543
            this.transferPrice = iprot.readDouble();
530
              setTransferPriceIsSet(true);
544
            setTransferPriceIsSet(true);
531
            } else { 
545
          } else { 
532
              TProtocolUtil.skip(iprot, field.type);
546
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
533
            }
547
          }
534
            break;
548
          break;
535
          case MOP:
549
        case 4: // MOP
536
            if (field.type == TType.DOUBLE) {
550
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
537
              this.mop = iprot.readDouble();
551
            this.mop = iprot.readDouble();
538
              setMopIsSet(true);
552
            setMopIsSet(true);
539
            } else { 
553
          } else { 
540
              TProtocolUtil.skip(iprot, field.type);
554
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
541
            }
555
          }
542
            break;
556
          break;
543
          case DEALER_PRICE:
557
        case 5: // DEALER_PRICE
544
            if (field.type == TType.DOUBLE) {
558
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
545
              this.dealerPrice = iprot.readDouble();
559
            this.dealerPrice = iprot.readDouble();
546
              setDealerPriceIsSet(true);
560
            setDealerPriceIsSet(true);
547
            } else { 
561
          } else { 
548
              TProtocolUtil.skip(iprot, field.type);
562
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
549
            }
563
          }
550
            break;
564
          break;
551
        }
565
        default:
552
        iprot.readFieldEnd();
566
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
553
      }
567
      }
-
 
568
      iprot.readFieldEnd();
554
    }
569
    }
555
    iprot.readStructEnd();
570
    iprot.readStructEnd();
556
    validate();
571
    validate();
557
  }
572
  }
558
 
573
 
559
  public void write(TProtocol oprot) throws TException {
574
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
560
    validate();
575
    validate();
561
 
576
 
562
    oprot.writeStructBegin(STRUCT_DESC);
577
    oprot.writeStructBegin(STRUCT_DESC);
563
    oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
578
    oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
564
    oprot.writeI64(this.vendorId);
579
    oprot.writeI64(this.vendorId);
Line 605... Line 620...
605
    first = false;
620
    first = false;
606
    sb.append(")");
621
    sb.append(")");
607
    return sb.toString();
622
    return sb.toString();
608
  }
623
  }
609
 
624
 
610
  public void validate() throws TException {
625
  public void validate() throws org.apache.thrift.TException {
611
    // check for required fields
626
    // check for required fields
612
  }
627
  }
613
 
628
 
-
 
629
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
630
    try {
-
 
631
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
632
    } catch (org.apache.thrift.TException te) {
-
 
633
      throw new java.io.IOException(te);
-
 
634
    }
-
 
635
  }
-
 
636
 
-
 
637
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
638
    try {
-
 
639
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
640
      __isset_bit_vector = new BitSet(1);
-
 
641
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
642
    } catch (org.apache.thrift.TException te) {
-
 
643
      throw new java.io.IOException(te);
-
 
644
    }
-
 
645
  }
-
 
646
 
614
}
647
}
615
 
648