Subversion Repositories SmartDukaan

Rev

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

Rev 7322 Rev 7715
Line 27... Line 27...
27
  private static final org.apache.thrift.protocol.TField AMAZON_ORDER_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonOrderCode", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField AMAZON_ORDER_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonOrderCode", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField AMAZON_ORDER_ITEM_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonOrderItemCode", org.apache.thrift.protocol.TType.STRING, (short)3);
28
  private static final org.apache.thrift.protocol.TField AMAZON_ORDER_ITEM_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonOrderItemCode", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)4);
29
  private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)5);
30
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)5);
31
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (short)6);
31
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (short)6);
-
 
32
  private static final org.apache.thrift.protocol.TField PURCHASE_DATE_ON_AMAZON_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseDateOnAmazon", org.apache.thrift.protocol.TType.I64, (short)7);
32
 
33
 
33
  private long orderId; // required
34
  private long orderId; // required
34
  private String amazonOrderCode; // required
35
  private String amazonOrderCode; // required
35
  private String amazonOrderItemCode; // required
36
  private String amazonOrderItemCode; // required
36
  private long transactionId; // required
37
  private long transactionId; // required
37
  private long item_id; // required
38
  private long item_id; // required
38
  private String status; // required
39
  private String status; // required
-
 
40
  private long purchaseDateOnAmazon; // 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
    AMAZON_ORDER_CODE((short)2, "amazonOrderCode"),
45
    AMAZON_ORDER_CODE((short)2, "amazonOrderCode"),
44
    AMAZON_ORDER_ITEM_CODE((short)3, "amazonOrderItemCode"),
46
    AMAZON_ORDER_ITEM_CODE((short)3, "amazonOrderItemCode"),
45
    TRANSACTION_ID((short)4, "transactionId"),
47
    TRANSACTION_ID((short)4, "transactionId"),
46
    ITEM_ID((short)5, "item_id"),
48
    ITEM_ID((short)5, "item_id"),
47
    STATUS((short)6, "status");
49
    STATUS((short)6, "status"),
-
 
50
    PURCHASE_DATE_ON_AMAZON((short)7, "purchaseDateOnAmazon");
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 TRANSACTION_ID;
72
          return TRANSACTION_ID;
70
        case 5: // ITEM_ID
73
        case 5: // ITEM_ID
71
          return ITEM_ID;
74
          return ITEM_ID;
72
        case 6: // STATUS
75
        case 6: // STATUS
73
          return STATUS;
76
          return STATUS;
-
 
77
        case 7: // PURCHASE_DATE_ON_AMAZON
-
 
78
          return PURCHASE_DATE_ON_AMAZON;
74
        default:
79
        default:
75
          return null;
80
          return null;
76
      }
81
      }
77
    }
82
    }
78
 
83
 
Line 112... Line 117...
112
 
117
 
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 __TRANSACTIONID_ISSET_ID = 1;
120
  private static final int __TRANSACTIONID_ISSET_ID = 1;
116
  private static final int __ITEM_ID_ISSET_ID = 2;
121
  private static final int __ITEM_ID_ISSET_ID = 2;
-
 
122
  private static final int __PURCHASEDATEONAMAZON_ISSET_ID = 3;
117
  private BitSet __isset_bit_vector = new BitSet(3);
123
  private BitSet __isset_bit_vector = new BitSet(4);
118
 
124
 
119
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
125
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
120
  static {
126
  static {
121
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
127
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
122
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
128
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 129... Line 135...
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
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, 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
137
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
132
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
138
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
139
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
140
    tmpMap.put(_Fields.PURCHASE_DATE_ON_AMAZON, new org.apache.thrift.meta_data.FieldMetaData("purchaseDateOnAmazon", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
134
    metaDataMap = Collections.unmodifiableMap(tmpMap);
142
    metaDataMap = Collections.unmodifiableMap(tmpMap);
135
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AmazonOrder.class, metaDataMap);
143
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AmazonOrder.class, metaDataMap);
136
  }
144
  }
137
 
145
 
138
  public AmazonOrder() {
146
  public AmazonOrder() {
Line 142... Line 150...
142
    long orderId,
150
    long orderId,
143
    String amazonOrderCode,
151
    String amazonOrderCode,
144
    String amazonOrderItemCode,
152
    String amazonOrderItemCode,
145
    long transactionId,
153
    long transactionId,
146
    long item_id,
154
    long item_id,
147
    String status)
155
    String status,
-
 
156
    long purchaseDateOnAmazon)
148
  {
157
  {
149
    this();
158
    this();
150
    this.orderId = orderId;
159
    this.orderId = orderId;
151
    setOrderIdIsSet(true);
160
    setOrderIdIsSet(true);
152
    this.amazonOrderCode = amazonOrderCode;
161
    this.amazonOrderCode = amazonOrderCode;
Line 154... Line 163...
154
    this.transactionId = transactionId;
163
    this.transactionId = transactionId;
155
    setTransactionIdIsSet(true);
164
    setTransactionIdIsSet(true);
156
    this.item_id = item_id;
165
    this.item_id = item_id;
157
    setItem_idIsSet(true);
166
    setItem_idIsSet(true);
158
    this.status = status;
167
    this.status = status;
-
 
168
    this.purchaseDateOnAmazon = purchaseDateOnAmazon;
-
 
169
    setPurchaseDateOnAmazonIsSet(true);
159
  }
170
  }
160
 
171
 
161
  /**
172
  /**
162
   * Performs a deep copy on <i>other</i>.
173
   * Performs a deep copy on <i>other</i>.
163
   */
174
   */
Line 174... Line 185...
174
    this.transactionId = other.transactionId;
185
    this.transactionId = other.transactionId;
175
    this.item_id = other.item_id;
186
    this.item_id = other.item_id;
176
    if (other.isSetStatus()) {
187
    if (other.isSetStatus()) {
177
      this.status = other.status;
188
      this.status = other.status;
178
    }
189
    }
-
 
190
    this.purchaseDateOnAmazon = other.purchaseDateOnAmazon;
179
  }
191
  }
180
 
192
 
181
  public AmazonOrder deepCopy() {
193
  public AmazonOrder deepCopy() {
182
    return new AmazonOrder(this);
194
    return new AmazonOrder(this);
183
  }
195
  }
Line 191... Line 203...
191
    setTransactionIdIsSet(false);
203
    setTransactionIdIsSet(false);
192
    this.transactionId = 0;
204
    this.transactionId = 0;
193
    setItem_idIsSet(false);
205
    setItem_idIsSet(false);
194
    this.item_id = 0;
206
    this.item_id = 0;
195
    this.status = null;
207
    this.status = null;
-
 
208
    setPurchaseDateOnAmazonIsSet(false);
-
 
209
    this.purchaseDateOnAmazon = 0;
196
  }
210
  }
197
 
211
 
198
  public long getOrderId() {
212
  public long getOrderId() {
199
    return this.orderId;
213
    return this.orderId;
200
  }
214
  }
Line 328... Line 342...
328
    if (!value) {
342
    if (!value) {
329
      this.status = null;
343
      this.status = null;
330
    }
344
    }
331
  }
345
  }
332
 
346
 
-
 
347
  public long getPurchaseDateOnAmazon() {
-
 
348
    return this.purchaseDateOnAmazon;
-
 
349
  }
-
 
350
 
-
 
351
  public void setPurchaseDateOnAmazon(long purchaseDateOnAmazon) {
-
 
352
    this.purchaseDateOnAmazon = purchaseDateOnAmazon;
-
 
353
    setPurchaseDateOnAmazonIsSet(true);
-
 
354
  }
-
 
355
 
-
 
356
  public void unsetPurchaseDateOnAmazon() {
-
 
357
    __isset_bit_vector.clear(__PURCHASEDATEONAMAZON_ISSET_ID);
-
 
358
  }
-
 
359
 
-
 
360
  /** Returns true if field purchaseDateOnAmazon is set (has been assigned a value) and false otherwise */
-
 
361
  public boolean isSetPurchaseDateOnAmazon() {
-
 
362
    return __isset_bit_vector.get(__PURCHASEDATEONAMAZON_ISSET_ID);
-
 
363
  }
-
 
364
 
-
 
365
  public void setPurchaseDateOnAmazonIsSet(boolean value) {
-
 
366
    __isset_bit_vector.set(__PURCHASEDATEONAMAZON_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
        setStatus((String)value);
415
        setStatus((String)value);
380
      }
416
      }
381
      break;
417
      break;
382
 
418
 
-
 
419
    case PURCHASE_DATE_ON_AMAZON:
-
 
420
      if (value == null) {
-
 
421
        unsetPurchaseDateOnAmazon();
-
 
422
      } else {
-
 
423
        setPurchaseDateOnAmazon((Long)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 Long.valueOf(getItem_id());
445
      return Long.valueOf(getItem_id());
402
 
446
 
403
    case STATUS:
447
    case STATUS:
404
      return getStatus();
448
      return getStatus();
405
 
449
 
-
 
450
    case PURCHASE_DATE_ON_AMAZON:
-
 
451
      return Long.valueOf(getPurchaseDateOnAmazon());
-
 
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 isSetTransactionId();
471
      return isSetTransactionId();
425
    case ITEM_ID:
472
    case ITEM_ID:
426
      return isSetItem_id();
473
      return isSetItem_id();
427
    case STATUS:
474
    case STATUS:
428
      return isSetStatus();
475
      return isSetStatus();
-
 
476
    case PURCHASE_DATE_ON_AMAZON:
-
 
477
      return isSetPurchaseDateOnAmazon();
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.status.equals(that.status))
545
      if (!this.status.equals(that.status))
497
        return false;
546
        return false;
498
    }
547
    }
499
 
548
 
-
 
549
    boolean this_present_purchaseDateOnAmazon = true;
-
 
550
    boolean that_present_purchaseDateOnAmazon = true;
-
 
551
    if (this_present_purchaseDateOnAmazon || that_present_purchaseDateOnAmazon) {
-
 
552
      if (!(this_present_purchaseDateOnAmazon && that_present_purchaseDateOnAmazon))
-
 
553
        return false;
-
 
554
      if (this.purchaseDateOnAmazon != that.purchaseDateOnAmazon)
-
 
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.status, typedOther.status);
629
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
572
      if (lastComparison != 0) {
630
      if (lastComparison != 0) {
573
        return lastComparison;
631
        return lastComparison;
574
      }
632
      }
575
    }
633
    }
-
 
634
    lastComparison = Boolean.valueOf(isSetPurchaseDateOnAmazon()).compareTo(typedOther.isSetPurchaseDateOnAmazon());
-
 
635
    if (lastComparison != 0) {
-
 
636
      return lastComparison;
-
 
637
    }
-
 
638
    if (isSetPurchaseDateOnAmazon()) {
-
 
639
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseDateOnAmazon, typedOther.purchaseDateOnAmazon);
-
 
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 633... Line 701...
633
            this.status = iprot.readString();
701
            this.status = iprot.readString();
634
          } else { 
702
          } else { 
635
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
703
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
636
          }
704
          }
637
          break;
705
          break;
-
 
706
        case 7: // PURCHASE_DATE_ON_AMAZON
-
 
707
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
708
            this.purchaseDateOnAmazon = iprot.readI64();
-
 
709
            setPurchaseDateOnAmazonIsSet(true);
-
 
710
          } else { 
-
 
711
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
712
          }
-
 
713
          break;
638
        default:
714
        default:
639
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
715
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
640
      }
716
      }
641
      iprot.readFieldEnd();
717
      iprot.readFieldEnd();
642
    }
718
    }
Line 670... Line 746...
670
    if (this.status != null) {
746
    if (this.status != null) {
671
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
747
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
672
      oprot.writeString(this.status);
748
      oprot.writeString(this.status);
673
      oprot.writeFieldEnd();
749
      oprot.writeFieldEnd();
674
    }
750
    }
-
 
751
    oprot.writeFieldBegin(PURCHASE_DATE_ON_AMAZON_FIELD_DESC);
-
 
752
    oprot.writeI64(this.purchaseDateOnAmazon);
-
 
753
    oprot.writeFieldEnd();
675
    oprot.writeFieldStop();
754
    oprot.writeFieldStop();
676
    oprot.writeStructEnd();
755
    oprot.writeStructEnd();
677
  }
756
  }
678
 
757
 
679
  @Override
758
  @Override
Line 714... Line 793...
714
      sb.append("null");
793
      sb.append("null");
715
    } else {
794
    } else {
716
      sb.append(this.status);
795
      sb.append(this.status);
717
    }
796
    }
718
    first = false;
797
    first = false;
-
 
798
    if (!first) sb.append(", ");
-
 
799
    sb.append("purchaseDateOnAmazon:");
-
 
800
    sb.append(this.purchaseDateOnAmazon);
-
 
801
    first = false;
719
    sb.append(")");
802
    sb.append(")");
720
    return sb.toString();
803
    return sb.toString();
721
  }
804
  }
722
 
805
 
723
  public void validate() throws org.apache.thrift.TException {
806
  public void validate() throws org.apache.thrift.TException {