Subversion Repositories SmartDukaan

Rev

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

Rev 132 Rev 358
Line 35... Line 35...
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
  private static final TField SHOPPING_CARTID_FIELD_DESC = new TField("shoppingCartid", TType.I64, (short)11);
-
 
40
  private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)12);
40
 
41
 
41
  private long id;
42
  private long id;
42
  private OrderInfo orderInfo;
43
  private OrderInfo orderInfo;
43
  private ShipmentInfo shipmentInfo;
44
  private ShipmentInfo shipmentInfo;
44
  private BillingInfo billingInfo;
45
  private BillingInfo billingInfo;
Line 47... Line 48...
47
  private long expectedDeliveryTime;
48
  private long expectedDeliveryTime;
48
  private TransactionStatus transactionStatus;
49
  private TransactionStatus transactionStatus;
49
  private String statusDescription;
50
  private String statusDescription;
50
  private long customer_id;
51
  private long customer_id;
51
  private long shoppingCartid;
52
  private long shoppingCartid;
-
 
53
  private long warehouse_id;
52
 
54
 
53
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
55
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
54
  public enum _Fields implements TFieldIdEnum {
56
  public enum _Fields implements TFieldIdEnum {
55
    ID((short)1, "id"),
57
    ID((short)1, "id"),
56
    ORDER_INFO((short)2, "orderInfo"),
58
    ORDER_INFO((short)2, "orderInfo"),
Line 64... Line 66...
64
     * @see TransactionStatus
66
     * @see TransactionStatus
65
     */
67
     */
66
    TRANSACTION_STATUS((short)8, "transactionStatus"),
68
    TRANSACTION_STATUS((short)8, "transactionStatus"),
67
    STATUS_DESCRIPTION((short)9, "statusDescription"),
69
    STATUS_DESCRIPTION((short)9, "statusDescription"),
68
    CUSTOMER_ID((short)10, "customer_id"),
70
    CUSTOMER_ID((short)10, "customer_id"),
69
    SHOPPING_CARTID((short)11, "shoppingCartid");
71
    SHOPPING_CARTID((short)11, "shoppingCartid"),
-
 
72
    WAREHOUSE_ID((short)12, "warehouse_id");
70
 
73
 
71
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
74
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
72
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
75
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
73
 
76
 
74
    static {
77
    static {
Line 123... Line 126...
123
  private static final int __ID_ISSET_ID = 0;
126
  private static final int __ID_ISSET_ID = 0;
124
  private static final int __CREATEDON_ISSET_ID = 1;
127
  private static final int __CREATEDON_ISSET_ID = 1;
125
  private static final int __EXPECTEDDELIVERYTIME_ISSET_ID = 2;
128
  private static final int __EXPECTEDDELIVERYTIME_ISSET_ID = 2;
126
  private static final int __CUSTOMER_ID_ISSET_ID = 3;
129
  private static final int __CUSTOMER_ID_ISSET_ID = 3;
127
  private static final int __SHOPPINGCARTID_ISSET_ID = 4;
130
  private static final int __SHOPPINGCARTID_ISSET_ID = 4;
-
 
131
  private static final int __WAREHOUSE_ID_ISSET_ID = 5;
128
  private BitSet __isset_bit_vector = new BitSet(5);
132
  private BitSet __isset_bit_vector = new BitSet(6);
129
 
133
 
130
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
134
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
131
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
135
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
132
        new FieldValueMetaData(TType.I64)));
136
        new FieldValueMetaData(TType.I64)));
133
    put(_Fields.ORDER_INFO, new FieldMetaData("orderInfo", TFieldRequirementType.DEFAULT, 
137
    put(_Fields.ORDER_INFO, new FieldMetaData("orderInfo", TFieldRequirementType.DEFAULT, 
Line 148... Line 152...
148
        new FieldValueMetaData(TType.STRING)));
152
        new FieldValueMetaData(TType.STRING)));
149
    put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
153
    put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
150
        new FieldValueMetaData(TType.I64)));
154
        new FieldValueMetaData(TType.I64)));
151
    put(_Fields.SHOPPING_CARTID, new FieldMetaData("shoppingCartid", TFieldRequirementType.DEFAULT, 
155
    put(_Fields.SHOPPING_CARTID, new FieldMetaData("shoppingCartid", TFieldRequirementType.DEFAULT, 
152
        new FieldValueMetaData(TType.I64)));
156
        new FieldValueMetaData(TType.I64)));
-
 
157
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
-
 
158
        new FieldValueMetaData(TType.I64)));
153
  }});
159
  }});
154
 
160
 
155
  static {
161
  static {
156
    FieldMetaData.addStructMetaDataMap(Transaction.class, metaDataMap);
162
    FieldMetaData.addStructMetaDataMap(Transaction.class, metaDataMap);
157
  }
163
  }
Line 168... Line 174...
168
    long createdOn,
174
    long createdOn,
169
    long expectedDeliveryTime,
175
    long expectedDeliveryTime,
170
    TransactionStatus transactionStatus,
176
    TransactionStatus transactionStatus,
171
    String statusDescription,
177
    String statusDescription,
172
    long customer_id,
178
    long customer_id,
173
    long shoppingCartid)
179
    long shoppingCartid,
-
 
180
    long warehouse_id)
174
  {
181
  {
175
    this();
182
    this();
176
    this.id = id;
183
    this.id = id;
177
    setIdIsSet(true);
184
    setIdIsSet(true);
178
    this.orderInfo = orderInfo;
185
    this.orderInfo = orderInfo;
Line 187... Line 194...
187
    this.statusDescription = statusDescription;
194
    this.statusDescription = statusDescription;
188
    this.customer_id = customer_id;
195
    this.customer_id = customer_id;
189
    setCustomer_idIsSet(true);
196
    setCustomer_idIsSet(true);
190
    this.shoppingCartid = shoppingCartid;
197
    this.shoppingCartid = shoppingCartid;
191
    setShoppingCartidIsSet(true);
198
    setShoppingCartidIsSet(true);
-
 
199
    this.warehouse_id = warehouse_id;
-
 
200
    setWarehouse_idIsSet(true);
192
  }
201
  }
193
 
202
 
194
  /**
203
  /**
195
   * Performs a deep copy on <i>other</i>.
204
   * Performs a deep copy on <i>other</i>.
196
   */
205
   */
Line 218... Line 227...
218
    if (other.isSetStatusDescription()) {
227
    if (other.isSetStatusDescription()) {
219
      this.statusDescription = other.statusDescription;
228
      this.statusDescription = other.statusDescription;
220
    }
229
    }
221
    this.customer_id = other.customer_id;
230
    this.customer_id = other.customer_id;
222
    this.shoppingCartid = other.shoppingCartid;
231
    this.shoppingCartid = other.shoppingCartid;
-
 
232
    this.warehouse_id = other.warehouse_id;
223
  }
233
  }
224
 
234
 
225
  public Transaction deepCopy() {
235
  public Transaction deepCopy() {
226
    return new Transaction(this);
236
    return new Transaction(this);
227
  }
237
  }
Line 496... Line 506...
496
 
506
 
497
  public void setShoppingCartidIsSet(boolean value) {
507
  public void setShoppingCartidIsSet(boolean value) {
498
    __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
508
    __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
499
  }
509
  }
500
 
510
 
-
 
511
  public long getWarehouse_id() {
-
 
512
    return this.warehouse_id;
-
 
513
  }
-
 
514
 
-
 
515
  public Transaction setWarehouse_id(long warehouse_id) {
-
 
516
    this.warehouse_id = warehouse_id;
-
 
517
    setWarehouse_idIsSet(true);
-
 
518
    return this;
-
 
519
  }
-
 
520
 
-
 
521
  public void unsetWarehouse_id() {
-
 
522
    __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
-
 
523
  }
-
 
524
 
-
 
525
  /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
-
 
526
  public boolean isSetWarehouse_id() {
-
 
527
    return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
-
 
528
  }
-
 
529
 
-
 
530
  public void setWarehouse_idIsSet(boolean value) {
-
 
531
    __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
-
 
532
  }
-
 
533
 
501
  public void setFieldValue(_Fields field, Object value) {
534
  public void setFieldValue(_Fields field, Object value) {
502
    switch (field) {
535
    switch (field) {
503
    case ID:
536
    case ID:
504
      if (value == null) {
537
      if (value == null) {
505
        unsetId();
538
        unsetId();
Line 586... Line 619...
586
      } else {
619
      } else {
587
        setShoppingCartid((Long)value);
620
        setShoppingCartid((Long)value);
588
      }
621
      }
589
      break;
622
      break;
590
 
623
 
-
 
624
    case WAREHOUSE_ID:
-
 
625
      if (value == null) {
-
 
626
        unsetWarehouse_id();
-
 
627
      } else {
-
 
628
        setWarehouse_id((Long)value);
-
 
629
      }
-
 
630
      break;
-
 
631
 
591
    }
632
    }
592
  }
633
  }
593
 
634
 
594
  public void setFieldValue(int fieldID, Object value) {
635
  public void setFieldValue(int fieldID, Object value) {
595
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
636
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 628... Line 669...
628
      return new Long(getCustomer_id());
669
      return new Long(getCustomer_id());
629
 
670
 
630
    case SHOPPING_CARTID:
671
    case SHOPPING_CARTID:
631
      return new Long(getShoppingCartid());
672
      return new Long(getShoppingCartid());
632
 
673
 
-
 
674
    case WAREHOUSE_ID:
-
 
675
      return new Long(getWarehouse_id());
-
 
676
 
633
    }
677
    }
634
    throw new IllegalStateException();
678
    throw new IllegalStateException();
635
  }
679
  }
636
 
680
 
637
  public Object getFieldValue(int fieldId) {
681
  public Object getFieldValue(int fieldId) {
Line 661... Line 705...
661
      return isSetStatusDescription();
705
      return isSetStatusDescription();
662
    case CUSTOMER_ID:
706
    case CUSTOMER_ID:
663
      return isSetCustomer_id();
707
      return isSetCustomer_id();
664
    case SHOPPING_CARTID:
708
    case SHOPPING_CARTID:
665
      return isSetShoppingCartid();
709
      return isSetShoppingCartid();
-
 
710
    case WAREHOUSE_ID:
-
 
711
      return isSetWarehouse_id();
666
    }
712
    }
667
    throw new IllegalStateException();
713
    throw new IllegalStateException();
668
  }
714
  }
669
 
715
 
670
  public boolean isSet(int fieldID) {
716
  public boolean isSet(int fieldID) {
Line 781... Line 827...
781
        return false;
827
        return false;
782
      if (this.shoppingCartid != that.shoppingCartid)
828
      if (this.shoppingCartid != that.shoppingCartid)
783
        return false;
829
        return false;
784
    }
830
    }
785
 
831
 
-
 
832
    boolean this_present_warehouse_id = true;
-
 
833
    boolean that_present_warehouse_id = true;
-
 
834
    if (this_present_warehouse_id || that_present_warehouse_id) {
-
 
835
      if (!(this_present_warehouse_id && that_present_warehouse_id))
-
 
836
        return false;
-
 
837
      if (this.warehouse_id != that.warehouse_id)
-
 
838
        return false;
-
 
839
    }
-
 
840
 
786
    return true;
841
    return true;
787
  }
842
  }
788
 
843
 
789
  @Override
844
  @Override
790
  public int hashCode() {
845
  public int hashCode() {
Line 889... Line 944...
889
              setShoppingCartidIsSet(true);
944
              setShoppingCartidIsSet(true);
890
            } else { 
945
            } else { 
891
              TProtocolUtil.skip(iprot, field.type);
946
              TProtocolUtil.skip(iprot, field.type);
892
            }
947
            }
893
            break;
948
            break;
-
 
949
          case WAREHOUSE_ID:
-
 
950
            if (field.type == TType.I64) {
-
 
951
              this.warehouse_id = iprot.readI64();
-
 
952
              setWarehouse_idIsSet(true);
-
 
953
            } else { 
-
 
954
              TProtocolUtil.skip(iprot, field.type);
-
 
955
            }
-
 
956
            break;
894
        }
957
        }
895
        iprot.readFieldEnd();
958
        iprot.readFieldEnd();
896
      }
959
      }
897
    }
960
    }
898
    iprot.readStructEnd();
961
    iprot.readStructEnd();
Line 946... Line 1009...
946
    oprot.writeI64(this.customer_id);
1009
    oprot.writeI64(this.customer_id);
947
    oprot.writeFieldEnd();
1010
    oprot.writeFieldEnd();
948
    oprot.writeFieldBegin(SHOPPING_CARTID_FIELD_DESC);
1011
    oprot.writeFieldBegin(SHOPPING_CARTID_FIELD_DESC);
949
    oprot.writeI64(this.shoppingCartid);
1012
    oprot.writeI64(this.shoppingCartid);
950
    oprot.writeFieldEnd();
1013
    oprot.writeFieldEnd();
-
 
1014
    oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
-
 
1015
    oprot.writeI64(this.warehouse_id);
-
 
1016
    oprot.writeFieldEnd();
951
    oprot.writeFieldStop();
1017
    oprot.writeFieldStop();
952
    oprot.writeStructEnd();
1018
    oprot.writeStructEnd();
953
  }
1019
  }
954
 
1020
 
955
  @Override
1021
  @Override
Line 1030... Line 1096...
1030
    first = false;
1096
    first = false;
1031
    if (!first) sb.append(", ");
1097
    if (!first) sb.append(", ");
1032
    sb.append("shoppingCartid:");
1098
    sb.append("shoppingCartid:");
1033
    sb.append(this.shoppingCartid);
1099
    sb.append(this.shoppingCartid);
1034
    first = false;
1100
    first = false;
-
 
1101
    if (!first) sb.append(", ");
-
 
1102
    sb.append("warehouse_id:");
-
 
1103
    sb.append(this.warehouse_id);
-
 
1104
    first = false;
1035
    sb.append(")");
1105
    sb.append(")");
1036
    return sb.toString();
1106
    return sb.toString();
1037
  }
1107
  }
1038
 
1108
 
1039
  public void validate() throws TException {
1109
  public void validate() throws TException {