Subversion Repositories SmartDukaan

Rev

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

Rev 68 Rev 132
Line 34... Line 34...
34
  private static final TField CREATED_ON_FIELD_DESC = new TField("createdOn", TType.I64, (short)6);
34
  private static final TField CREATED_ON_FIELD_DESC = new TField("createdOn", TType.I64, (short)6);
35
  private static final TField EXPECTED_DELIVERY_TIME_FIELD_DESC = new TField("expectedDeliveryTime", TType.I64, (short)7);
35
  private static final TField EXPECTED_DELIVERY_TIME_FIELD_DESC = new TField("expectedDeliveryTime", TType.I64, (short)7);
36
  private static final TField TRANSACTION_STATUS_FIELD_DESC = new TField("transactionStatus", TType.I32, (short)8);
36
  private static final TField TRANSACTION_STATUS_FIELD_DESC = new TField("transactionStatus", TType.I32, (short)8);
37
  private static final TField STATUS_DESCRIPTION_FIELD_DESC = new TField("statusDescription", TType.STRING, (short)9);
37
  private static final TField STATUS_DESCRIPTION_FIELD_DESC = new TField("statusDescription", TType.STRING, (short)9);
38
  private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)10);
38
  private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)10);
-
 
39
  private static final TField SHOPPING_CARTID_FIELD_DESC = new TField("shoppingCartid", TType.I64, (short)11);
39
 
40
 
40
  private long id;
41
  private long id;
41
  private OrderInfo orderInfo;
42
  private OrderInfo orderInfo;
42
  private ShipmentInfo shipmentInfo;
43
  private ShipmentInfo shipmentInfo;
43
  private BillingInfo billingInfo;
44
  private BillingInfo billingInfo;
Line 45... Line 46...
45
  private long createdOn;
46
  private long createdOn;
46
  private long expectedDeliveryTime;
47
  private long expectedDeliveryTime;
47
  private TransactionStatus transactionStatus;
48
  private TransactionStatus transactionStatus;
48
  private String statusDescription;
49
  private String statusDescription;
49
  private long customer_id;
50
  private long customer_id;
-
 
51
  private long shoppingCartid;
50
 
52
 
51
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
53
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
52
  public enum _Fields implements TFieldIdEnum {
54
  public enum _Fields implements TFieldIdEnum {
53
    ID((short)1, "id"),
55
    ID((short)1, "id"),
54
    ORDER_INFO((short)2, "orderInfo"),
56
    ORDER_INFO((short)2, "orderInfo"),
Line 61... Line 63...
61
     * 
63
     * 
62
     * @see TransactionStatus
64
     * @see TransactionStatus
63
     */
65
     */
64
    TRANSACTION_STATUS((short)8, "transactionStatus"),
66
    TRANSACTION_STATUS((short)8, "transactionStatus"),
65
    STATUS_DESCRIPTION((short)9, "statusDescription"),
67
    STATUS_DESCRIPTION((short)9, "statusDescription"),
66
    CUSTOMER_ID((short)10, "customer_id");
68
    CUSTOMER_ID((short)10, "customer_id"),
-
 
69
    SHOPPING_CARTID((short)11, "shoppingCartid");
67
 
70
 
68
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
71
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
69
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
72
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
70
 
73
 
71
    static {
74
    static {
Line 119... Line 122...
119
  // isset id assignments
122
  // isset id assignments
120
  private static final int __ID_ISSET_ID = 0;
123
  private static final int __ID_ISSET_ID = 0;
121
  private static final int __CREATEDON_ISSET_ID = 1;
124
  private static final int __CREATEDON_ISSET_ID = 1;
122
  private static final int __EXPECTEDDELIVERYTIME_ISSET_ID = 2;
125
  private static final int __EXPECTEDDELIVERYTIME_ISSET_ID = 2;
123
  private static final int __CUSTOMER_ID_ISSET_ID = 3;
126
  private static final int __CUSTOMER_ID_ISSET_ID = 3;
-
 
127
  private static final int __SHOPPINGCARTID_ISSET_ID = 4;
124
  private BitSet __isset_bit_vector = new BitSet(4);
128
  private BitSet __isset_bit_vector = new BitSet(5);
125
 
129
 
126
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
130
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
127
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
131
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
128
        new FieldValueMetaData(TType.I64)));
132
        new FieldValueMetaData(TType.I64)));
129
    put(_Fields.ORDER_INFO, new FieldMetaData("orderInfo", TFieldRequirementType.DEFAULT, 
133
    put(_Fields.ORDER_INFO, new FieldMetaData("orderInfo", TFieldRequirementType.DEFAULT, 
Line 142... Line 146...
142
        new EnumMetaData(TType.ENUM, TransactionStatus.class)));
146
        new EnumMetaData(TType.ENUM, TransactionStatus.class)));
143
    put(_Fields.STATUS_DESCRIPTION, new FieldMetaData("statusDescription", TFieldRequirementType.DEFAULT, 
147
    put(_Fields.STATUS_DESCRIPTION, new FieldMetaData("statusDescription", TFieldRequirementType.DEFAULT, 
144
        new FieldValueMetaData(TType.STRING)));
148
        new FieldValueMetaData(TType.STRING)));
145
    put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
149
    put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
146
        new FieldValueMetaData(TType.I64)));
150
        new FieldValueMetaData(TType.I64)));
-
 
151
    put(_Fields.SHOPPING_CARTID, new FieldMetaData("shoppingCartid", TFieldRequirementType.DEFAULT, 
-
 
152
        new FieldValueMetaData(TType.I64)));
147
  }});
153
  }});
148
 
154
 
149
  static {
155
  static {
150
    FieldMetaData.addStructMetaDataMap(Transaction.class, metaDataMap);
156
    FieldMetaData.addStructMetaDataMap(Transaction.class, metaDataMap);
151
  }
157
  }
Line 161... Line 167...
161
    PaymentInfo paymentInfo,
167
    PaymentInfo paymentInfo,
162
    long createdOn,
168
    long createdOn,
163
    long expectedDeliveryTime,
169
    long expectedDeliveryTime,
164
    TransactionStatus transactionStatus,
170
    TransactionStatus transactionStatus,
165
    String statusDescription,
171
    String statusDescription,
166
    long customer_id)
172
    long customer_id,
-
 
173
    long shoppingCartid)
167
  {
174
  {
168
    this();
175
    this();
169
    this.id = id;
176
    this.id = id;
170
    setIdIsSet(true);
177
    setIdIsSet(true);
171
    this.orderInfo = orderInfo;
178
    this.orderInfo = orderInfo;
Line 178... Line 185...
178
    setExpectedDeliveryTimeIsSet(true);
185
    setExpectedDeliveryTimeIsSet(true);
179
    this.transactionStatus = transactionStatus;
186
    this.transactionStatus = transactionStatus;
180
    this.statusDescription = statusDescription;
187
    this.statusDescription = statusDescription;
181
    this.customer_id = customer_id;
188
    this.customer_id = customer_id;
182
    setCustomer_idIsSet(true);
189
    setCustomer_idIsSet(true);
-
 
190
    this.shoppingCartid = shoppingCartid;
-
 
191
    setShoppingCartidIsSet(true);
183
  }
192
  }
184
 
193
 
185
  /**
194
  /**
186
   * Performs a deep copy on <i>other</i>.
195
   * Performs a deep copy on <i>other</i>.
187
   */
196
   */
Line 208... Line 217...
208
    }
217
    }
209
    if (other.isSetStatusDescription()) {
218
    if (other.isSetStatusDescription()) {
210
      this.statusDescription = other.statusDescription;
219
      this.statusDescription = other.statusDescription;
211
    }
220
    }
212
    this.customer_id = other.customer_id;
221
    this.customer_id = other.customer_id;
-
 
222
    this.shoppingCartid = other.shoppingCartid;
213
  }
223
  }
214
 
224
 
215
  public Transaction deepCopy() {
225
  public Transaction deepCopy() {
216
    return new Transaction(this);
226
    return new Transaction(this);
217
  }
227
  }
Line 463... Line 473...
463
 
473
 
464
  public void setCustomer_idIsSet(boolean value) {
474
  public void setCustomer_idIsSet(boolean value) {
465
    __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
475
    __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
466
  }
476
  }
467
 
477
 
-
 
478
  public long getShoppingCartid() {
-
 
479
    return this.shoppingCartid;
-
 
480
  }
-
 
481
 
-
 
482
  public Transaction setShoppingCartid(long shoppingCartid) {
-
 
483
    this.shoppingCartid = shoppingCartid;
-
 
484
    setShoppingCartidIsSet(true);
-
 
485
    return this;
-
 
486
  }
-
 
487
 
-
 
488
  public void unsetShoppingCartid() {
-
 
489
    __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
-
 
490
  }
-
 
491
 
-
 
492
  /** Returns true if field shoppingCartid is set (has been asigned a value) and false otherwise */
-
 
493
  public boolean isSetShoppingCartid() {
-
 
494
    return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
-
 
495
  }
-
 
496
 
-
 
497
  public void setShoppingCartidIsSet(boolean value) {
-
 
498
    __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
-
 
499
  }
-
 
500
 
468
  public void setFieldValue(_Fields field, Object value) {
501
  public void setFieldValue(_Fields field, Object value) {
469
    switch (field) {
502
    switch (field) {
470
    case ID:
503
    case ID:
471
      if (value == null) {
504
      if (value == null) {
472
        unsetId();
505
        unsetId();
Line 545... Line 578...
545
      } else {
578
      } else {
546
        setCustomer_id((Long)value);
579
        setCustomer_id((Long)value);
547
      }
580
      }
548
      break;
581
      break;
549
 
582
 
-
 
583
    case SHOPPING_CARTID:
-
 
584
      if (value == null) {
-
 
585
        unsetShoppingCartid();
-
 
586
      } else {
-
 
587
        setShoppingCartid((Long)value);
-
 
588
      }
-
 
589
      break;
-
 
590
 
550
    }
591
    }
551
  }
592
  }
552
 
593
 
553
  public void setFieldValue(int fieldID, Object value) {
594
  public void setFieldValue(int fieldID, Object value) {
554
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
595
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 584... Line 625...
584
      return getStatusDescription();
625
      return getStatusDescription();
585
 
626
 
586
    case CUSTOMER_ID:
627
    case CUSTOMER_ID:
587
      return new Long(getCustomer_id());
628
      return new Long(getCustomer_id());
588
 
629
 
-
 
630
    case SHOPPING_CARTID:
-
 
631
      return new Long(getShoppingCartid());
-
 
632
 
589
    }
633
    }
590
    throw new IllegalStateException();
634
    throw new IllegalStateException();
591
  }
635
  }
592
 
636
 
593
  public Object getFieldValue(int fieldId) {
637
  public Object getFieldValue(int fieldId) {
Line 615... Line 659...
615
      return isSetTransactionStatus();
659
      return isSetTransactionStatus();
616
    case STATUS_DESCRIPTION:
660
    case STATUS_DESCRIPTION:
617
      return isSetStatusDescription();
661
      return isSetStatusDescription();
618
    case CUSTOMER_ID:
662
    case CUSTOMER_ID:
619
      return isSetCustomer_id();
663
      return isSetCustomer_id();
-
 
664
    case SHOPPING_CARTID:
-
 
665
      return isSetShoppingCartid();
620
    }
666
    }
621
    throw new IllegalStateException();
667
    throw new IllegalStateException();
622
  }
668
  }
623
 
669
 
624
  public boolean isSet(int fieldID) {
670
  public boolean isSet(int fieldID) {
Line 726... Line 772...
726
        return false;
772
        return false;
727
      if (this.customer_id != that.customer_id)
773
      if (this.customer_id != that.customer_id)
728
        return false;
774
        return false;
729
    }
775
    }
730
 
776
 
-
 
777
    boolean this_present_shoppingCartid = true;
-
 
778
    boolean that_present_shoppingCartid = true;
-
 
779
    if (this_present_shoppingCartid || that_present_shoppingCartid) {
-
 
780
      if (!(this_present_shoppingCartid && that_present_shoppingCartid))
-
 
781
        return false;
-
 
782
      if (this.shoppingCartid != that.shoppingCartid)
-
 
783
        return false;
-
 
784
    }
-
 
785
 
731
    return true;
786
    return true;
732
  }
787
  }
733
 
788
 
734
  @Override
789
  @Override
735
  public int hashCode() {
790
  public int hashCode() {
Line 826... Line 881...
826
              setCustomer_idIsSet(true);
881
              setCustomer_idIsSet(true);
827
            } else { 
882
            } else { 
828
              TProtocolUtil.skip(iprot, field.type);
883
              TProtocolUtil.skip(iprot, field.type);
829
            }
884
            }
830
            break;
885
            break;
-
 
886
          case SHOPPING_CARTID:
-
 
887
            if (field.type == TType.I64) {
-
 
888
              this.shoppingCartid = iprot.readI64();
-
 
889
              setShoppingCartidIsSet(true);
-
 
890
            } else { 
-
 
891
              TProtocolUtil.skip(iprot, field.type);
-
 
892
            }
-
 
893
            break;
831
        }
894
        }
832
        iprot.readFieldEnd();
895
        iprot.readFieldEnd();
833
      }
896
      }
834
    }
897
    }
835
    iprot.readStructEnd();
898
    iprot.readStructEnd();
Line 880... Line 943...
880
      oprot.writeFieldEnd();
943
      oprot.writeFieldEnd();
881
    }
944
    }
882
    oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
945
    oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
883
    oprot.writeI64(this.customer_id);
946
    oprot.writeI64(this.customer_id);
884
    oprot.writeFieldEnd();
947
    oprot.writeFieldEnd();
-
 
948
    oprot.writeFieldBegin(SHOPPING_CARTID_FIELD_DESC);
-
 
949
    oprot.writeI64(this.shoppingCartid);
-
 
950
    oprot.writeFieldEnd();
885
    oprot.writeFieldStop();
951
    oprot.writeFieldStop();
886
    oprot.writeStructEnd();
952
    oprot.writeStructEnd();
887
  }
953
  }
888
 
954
 
889
  @Override
955
  @Override
Line 960... Line 1026...
960
    first = false;
1026
    first = false;
961
    if (!first) sb.append(", ");
1027
    if (!first) sb.append(", ");
962
    sb.append("customer_id:");
1028
    sb.append("customer_id:");
963
    sb.append(this.customer_id);
1029
    sb.append(this.customer_id);
964
    first = false;
1030
    first = false;
-
 
1031
    if (!first) sb.append(", ");
-
 
1032
    sb.append("shoppingCartid:");
-
 
1033
    sb.append(this.shoppingCartid);
-
 
1034
    first = false;
965
    sb.append(")");
1035
    sb.append(")");
966
    return sb.toString();
1036
    return sb.toString();
967
  }
1037
  }
968
 
1038
 
969
  public void validate() throws TException {
1039
  public void validate() throws TException {