Subversion Repositories SmartDukaan

Rev

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

Rev 8488 Rev 9456
Line 27... Line 27...
27
  private static final org.apache.thrift.protocol.TField REFERENCE_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("referenceCode", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField REFERENCE_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("referenceCode", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField SUB_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("subOrderId", org.apache.thrift.protocol.TType.I64, (short)3);
28
  private static final org.apache.thrift.protocol.TField SUB_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("subOrderId", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField LISTING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("listingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
29
  private static final org.apache.thrift.protocol.TField LISTING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("listingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
30
  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)5);
30
  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)5);
31
  private static final org.apache.thrift.protocol.TField SNAPDEAL_TXN_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("snapdealTxnDate", org.apache.thrift.protocol.TType.I64, (short)6);
31
  private static final org.apache.thrift.protocol.TField SNAPDEAL_TXN_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("snapdealTxnDate", org.apache.thrift.protocol.TType.I64, (short)6);
-
 
32
  private static final org.apache.thrift.protocol.TField MAX_NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("maxNlc", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
32
 
33
 
33
  private long orderId; // required
34
  private long orderId; // required
34
  private String referenceCode; // required
35
  private String referenceCode; // required
35
  private long subOrderId; // required
36
  private long subOrderId; // required
36
  private double listingPrice; // required
37
  private double listingPrice; // required
37
  private String productName; // required
38
  private String productName; // required
38
  private long snapdealTxnDate; // required
39
  private long snapdealTxnDate; // required
-
 
40
  private double maxNlc; // required
39
 
41
 
40
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
42
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
43
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
42
    ORDER_ID((short)1, "orderId"),
44
    ORDER_ID((short)1, "orderId"),
43
    REFERENCE_CODE((short)2, "referenceCode"),
45
    REFERENCE_CODE((short)2, "referenceCode"),
44
    SUB_ORDER_ID((short)3, "subOrderId"),
46
    SUB_ORDER_ID((short)3, "subOrderId"),
45
    LISTING_PRICE((short)4, "listingPrice"),
47
    LISTING_PRICE((short)4, "listingPrice"),
46
    PRODUCT_NAME((short)5, "productName"),
48
    PRODUCT_NAME((short)5, "productName"),
47
    SNAPDEAL_TXN_DATE((short)6, "snapdealTxnDate");
49
    SNAPDEAL_TXN_DATE((short)6, "snapdealTxnDate"),
-
 
50
    MAX_NLC((short)7, "maxNlc");
48
 
51
 
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
52
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50
 
53
 
51
    static {
54
    static {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
55
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 69... Line 72...
69
          return LISTING_PRICE;
72
          return LISTING_PRICE;
70
        case 5: // PRODUCT_NAME
73
        case 5: // PRODUCT_NAME
71
          return PRODUCT_NAME;
74
          return PRODUCT_NAME;
72
        case 6: // SNAPDEAL_TXN_DATE
75
        case 6: // SNAPDEAL_TXN_DATE
73
          return SNAPDEAL_TXN_DATE;
76
          return SNAPDEAL_TXN_DATE;
-
 
77
        case 7: // MAX_NLC
-
 
78
          return MAX_NLC;
74
        default:
79
        default:
75
          return null;
80
          return null;
76
      }
81
      }
77
    }
82
    }
78
 
83
 
Line 113... Line 118...
113
  // isset id assignments
118
  // isset id assignments
114
  private static final int __ORDERID_ISSET_ID = 0;
119
  private static final int __ORDERID_ISSET_ID = 0;
115
  private static final int __SUBORDERID_ISSET_ID = 1;
120
  private static final int __SUBORDERID_ISSET_ID = 1;
116
  private static final int __LISTINGPRICE_ISSET_ID = 2;
121
  private static final int __LISTINGPRICE_ISSET_ID = 2;
117
  private static final int __SNAPDEALTXNDATE_ISSET_ID = 3;
122
  private static final int __SNAPDEALTXNDATE_ISSET_ID = 3;
-
 
123
  private static final int __MAXNLC_ISSET_ID = 4;
118
  private BitSet __isset_bit_vector = new BitSet(4);
124
  private BitSet __isset_bit_vector = new BitSet(5);
119
 
125
 
120
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
126
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
121
  static {
127
  static {
122
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
128
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
123
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
129
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 130... Line 136...
130
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
136
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
131
    tmpMap.put(_Fields.PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("productName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
137
    tmpMap.put(_Fields.PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("productName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
132
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
138
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
133
    tmpMap.put(_Fields.SNAPDEAL_TXN_DATE, new org.apache.thrift.meta_data.FieldMetaData("snapdealTxnDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
139
    tmpMap.put(_Fields.SNAPDEAL_TXN_DATE, new org.apache.thrift.meta_data.FieldMetaData("snapdealTxnDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
134
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
140
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
141
    tmpMap.put(_Fields.MAX_NLC, new org.apache.thrift.meta_data.FieldMetaData("maxNlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
142
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
135
    metaDataMap = Collections.unmodifiableMap(tmpMap);
143
    metaDataMap = Collections.unmodifiableMap(tmpMap);
136
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealOrder.class, metaDataMap);
144
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealOrder.class, metaDataMap);
137
  }
145
  }
138
 
146
 
139
  public SnapdealOrder() {
147
  public SnapdealOrder() {
Line 143... Line 151...
143
    long orderId,
151
    long orderId,
144
    String referenceCode,
152
    String referenceCode,
145
    long subOrderId,
153
    long subOrderId,
146
    double listingPrice,
154
    double listingPrice,
147
    String productName,
155
    String productName,
148
    long snapdealTxnDate)
156
    long snapdealTxnDate,
-
 
157
    double maxNlc)
149
  {
158
  {
150
    this();
159
    this();
151
    this.orderId = orderId;
160
    this.orderId = orderId;
152
    setOrderIdIsSet(true);
161
    setOrderIdIsSet(true);
153
    this.referenceCode = referenceCode;
162
    this.referenceCode = referenceCode;
Line 156... Line 165...
156
    this.listingPrice = listingPrice;
165
    this.listingPrice = listingPrice;
157
    setListingPriceIsSet(true);
166
    setListingPriceIsSet(true);
158
    this.productName = productName;
167
    this.productName = productName;
159
    this.snapdealTxnDate = snapdealTxnDate;
168
    this.snapdealTxnDate = snapdealTxnDate;
160
    setSnapdealTxnDateIsSet(true);
169
    setSnapdealTxnDateIsSet(true);
-
 
170
    this.maxNlc = maxNlc;
-
 
171
    setMaxNlcIsSet(true);
161
  }
172
  }
162
 
173
 
163
  /**
174
  /**
164
   * Performs a deep copy on <i>other</i>.
175
   * Performs a deep copy on <i>other</i>.
165
   */
176
   */
Line 174... Line 185...
174
    this.listingPrice = other.listingPrice;
185
    this.listingPrice = other.listingPrice;
175
    if (other.isSetProductName()) {
186
    if (other.isSetProductName()) {
176
      this.productName = other.productName;
187
      this.productName = other.productName;
177
    }
188
    }
178
    this.snapdealTxnDate = other.snapdealTxnDate;
189
    this.snapdealTxnDate = other.snapdealTxnDate;
-
 
190
    this.maxNlc = other.maxNlc;
179
  }
191
  }
180
 
192
 
181
  public SnapdealOrder deepCopy() {
193
  public SnapdealOrder deepCopy() {
182
    return new SnapdealOrder(this);
194
    return new SnapdealOrder(this);
183
  }
195
  }
Line 192... Line 204...
192
    setListingPriceIsSet(false);
204
    setListingPriceIsSet(false);
193
    this.listingPrice = 0.0;
205
    this.listingPrice = 0.0;
194
    this.productName = null;
206
    this.productName = null;
195
    setSnapdealTxnDateIsSet(false);
207
    setSnapdealTxnDateIsSet(false);
196
    this.snapdealTxnDate = 0;
208
    this.snapdealTxnDate = 0;
-
 
209
    setMaxNlcIsSet(false);
-
 
210
    this.maxNlc = 0.0;
197
  }
211
  }
198
 
212
 
199
  public long getOrderId() {
213
  public long getOrderId() {
200
    return this.orderId;
214
    return this.orderId;
201
  }
215
  }
Line 328... Line 342...
328
 
342
 
329
  public void setSnapdealTxnDateIsSet(boolean value) {
343
  public void setSnapdealTxnDateIsSet(boolean value) {
330
    __isset_bit_vector.set(__SNAPDEALTXNDATE_ISSET_ID, value);
344
    __isset_bit_vector.set(__SNAPDEALTXNDATE_ISSET_ID, value);
331
  }
345
  }
332
 
346
 
-
 
347
  public double getMaxNlc() {
-
 
348
    return this.maxNlc;
-
 
349
  }
-
 
350
 
-
 
351
  public void setMaxNlc(double maxNlc) {
-
 
352
    this.maxNlc = maxNlc;
-
 
353
    setMaxNlcIsSet(true);
-
 
354
  }
-
 
355
 
-
 
356
  public void unsetMaxNlc() {
-
 
357
    __isset_bit_vector.clear(__MAXNLC_ISSET_ID);
-
 
358
  }
-
 
359
 
-
 
360
  /** Returns true if field maxNlc is set (has been assigned a value) and false otherwise */
-
 
361
  public boolean isSetMaxNlc() {
-
 
362
    return __isset_bit_vector.get(__MAXNLC_ISSET_ID);
-
 
363
  }
-
 
364
 
-
 
365
  public void setMaxNlcIsSet(boolean value) {
-
 
366
    __isset_bit_vector.set(__MAXNLC_ISSET_ID, value);
-
 
367
  }
-
 
368
 
333
  public void setFieldValue(_Fields field, Object value) {
369
  public void setFieldValue(_Fields field, Object value) {
334
    switch (field) {
370
    switch (field) {
335
    case ORDER_ID:
371
    case ORDER_ID:
336
      if (value == null) {
372
      if (value == null) {
337
        unsetOrderId();
373
        unsetOrderId();
Line 378... Line 414...
378
      } else {
414
      } else {
379
        setSnapdealTxnDate((Long)value);
415
        setSnapdealTxnDate((Long)value);
380
      }
416
      }
381
      break;
417
      break;
382
 
418
 
-
 
419
    case MAX_NLC:
-
 
420
      if (value == null) {
-
 
421
        unsetMaxNlc();
-
 
422
      } else {
-
 
423
        setMaxNlc((Double)value);
-
 
424
      }
-
 
425
      break;
-
 
426
 
383
    }
427
    }
384
  }
428
  }
385
 
429
 
386
  public Object getFieldValue(_Fields field) {
430
  public Object getFieldValue(_Fields field) {
387
    switch (field) {
431
    switch (field) {
Line 401... Line 445...
401
      return getProductName();
445
      return getProductName();
402
 
446
 
403
    case SNAPDEAL_TXN_DATE:
447
    case SNAPDEAL_TXN_DATE:
404
      return Long.valueOf(getSnapdealTxnDate());
448
      return Long.valueOf(getSnapdealTxnDate());
405
 
449
 
-
 
450
    case MAX_NLC:
-
 
451
      return Double.valueOf(getMaxNlc());
-
 
452
 
406
    }
453
    }
407
    throw new IllegalStateException();
454
    throw new IllegalStateException();
408
  }
455
  }
409
 
456
 
410
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
457
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 424... Line 471...
424
      return isSetListingPrice();
471
      return isSetListingPrice();
425
    case PRODUCT_NAME:
472
    case PRODUCT_NAME:
426
      return isSetProductName();
473
      return isSetProductName();
427
    case SNAPDEAL_TXN_DATE:
474
    case SNAPDEAL_TXN_DATE:
428
      return isSetSnapdealTxnDate();
475
      return isSetSnapdealTxnDate();
-
 
476
    case MAX_NLC:
-
 
477
      return isSetMaxNlc();
429
    }
478
    }
430
    throw new IllegalStateException();
479
    throw new IllegalStateException();
431
  }
480
  }
432
 
481
 
433
  @Override
482
  @Override
Line 495... Line 544...
495
        return false;
544
        return false;
496
      if (this.snapdealTxnDate != that.snapdealTxnDate)
545
      if (this.snapdealTxnDate != that.snapdealTxnDate)
497
        return false;
546
        return false;
498
    }
547
    }
499
 
548
 
-
 
549
    boolean this_present_maxNlc = true;
-
 
550
    boolean that_present_maxNlc = true;
-
 
551
    if (this_present_maxNlc || that_present_maxNlc) {
-
 
552
      if (!(this_present_maxNlc && that_present_maxNlc))
-
 
553
        return false;
-
 
554
      if (this.maxNlc != that.maxNlc)
-
 
555
        return false;
-
 
556
    }
-
 
557
 
500
    return true;
558
    return true;
501
  }
559
  }
502
 
560
 
503
  @Override
561
  @Override
504
  public int hashCode() {
562
  public int hashCode() {
Line 571... Line 629...
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.snapdealTxnDate, typedOther.snapdealTxnDate);
629
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.snapdealTxnDate, typedOther.snapdealTxnDate);
572
      if (lastComparison != 0) {
630
      if (lastComparison != 0) {
573
        return lastComparison;
631
        return lastComparison;
574
      }
632
      }
575
    }
633
    }
-
 
634
    lastComparison = Boolean.valueOf(isSetMaxNlc()).compareTo(typedOther.isSetMaxNlc());
-
 
635
    if (lastComparison != 0) {
-
 
636
      return lastComparison;
-
 
637
    }
-
 
638
    if (isSetMaxNlc()) {
-
 
639
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxNlc, typedOther.maxNlc);
-
 
640
      if (lastComparison != 0) {
-
 
641
        return lastComparison;
-
 
642
      }
-
 
643
    }
576
    return 0;
644
    return 0;
577
  }
645
  }
578
 
646
 
579
  public _Fields fieldForId(int fieldId) {
647
  public _Fields fieldForId(int fieldId) {
580
    return _Fields.findByThriftId(fieldId);
648
    return _Fields.findByThriftId(fieldId);
Line 634... Line 702...
634
            setSnapdealTxnDateIsSet(true);
702
            setSnapdealTxnDateIsSet(true);
635
          } else { 
703
          } else { 
636
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
704
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
637
          }
705
          }
638
          break;
706
          break;
-
 
707
        case 7: // MAX_NLC
-
 
708
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
709
            this.maxNlc = iprot.readDouble();
-
 
710
            setMaxNlcIsSet(true);
-
 
711
          } else { 
-
 
712
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
713
          }
-
 
714
          break;
639
        default:
715
        default:
640
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
716
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
641
      }
717
      }
642
      iprot.readFieldEnd();
718
      iprot.readFieldEnd();
643
    }
719
    }
Line 669... Line 745...
669
      oprot.writeFieldEnd();
745
      oprot.writeFieldEnd();
670
    }
746
    }
671
    oprot.writeFieldBegin(SNAPDEAL_TXN_DATE_FIELD_DESC);
747
    oprot.writeFieldBegin(SNAPDEAL_TXN_DATE_FIELD_DESC);
672
    oprot.writeI64(this.snapdealTxnDate);
748
    oprot.writeI64(this.snapdealTxnDate);
673
    oprot.writeFieldEnd();
749
    oprot.writeFieldEnd();
-
 
750
    oprot.writeFieldBegin(MAX_NLC_FIELD_DESC);
-
 
751
    oprot.writeDouble(this.maxNlc);
-
 
752
    oprot.writeFieldEnd();
674
    oprot.writeFieldStop();
753
    oprot.writeFieldStop();
675
    oprot.writeStructEnd();
754
    oprot.writeStructEnd();
676
  }
755
  }
677
 
756
 
678
  @Override
757
  @Override
Line 709... Line 788...
709
    first = false;
788
    first = false;
710
    if (!first) sb.append(", ");
789
    if (!first) sb.append(", ");
711
    sb.append("snapdealTxnDate:");
790
    sb.append("snapdealTxnDate:");
712
    sb.append(this.snapdealTxnDate);
791
    sb.append(this.snapdealTxnDate);
713
    first = false;
792
    first = false;
-
 
793
    if (!first) sb.append(", ");
-
 
794
    sb.append("maxNlc:");
-
 
795
    sb.append(this.maxNlc);
-
 
796
    first = false;
714
    sb.append(")");
797
    sb.append(")");
715
    return sb.toString();
798
    return sb.toString();
716
  }
799
  }
717
 
800
 
718
  public void validate() throws org.apache.thrift.TException {
801
  public void validate() throws org.apache.thrift.TException {