Subversion Repositories SmartDukaan

Rev

Rev 3430 | Rev 6389 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
68 ashish 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
68 ashish 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
3430 rajveer 18
import java.nio.ByteBuffer;
68 ashish 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
3430 rajveer 23
public class Transaction implements org.apache.thrift.TBase<Transaction, Transaction._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Transaction");
68 ashish 25
 
3430 rajveer 26
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("orders", org.apache.thrift.protocol.TType.LIST, (short)2);
28
  private static final org.apache.thrift.protocol.TField CREATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("createdOn", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField TRANSACTION_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionStatus", org.apache.thrift.protocol.TType.I32, (short)4);
30
  private static final org.apache.thrift.protocol.TField STATUS_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("statusDescription", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField SHOPPING_CARTID_FIELD_DESC = new org.apache.thrift.protocol.TField("shoppingCartid", org.apache.thrift.protocol.TType.I64, (short)6);
32
  private static final org.apache.thrift.protocol.TField CUSTOMER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("customer_id", org.apache.thrift.protocol.TType.I64, (short)7);
33
  private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("coupon_code", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField SESSION_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionSource", org.apache.thrift.protocol.TType.STRING, (short)9);
35
  private static final org.apache.thrift.protocol.TField SESSION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionStartTime", org.apache.thrift.protocol.TType.I64, (short)10);
3858 vikas 36
  private static final org.apache.thrift.protocol.TField FIRST_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSource", org.apache.thrift.protocol.TType.STRING, (short)11);
37
  private static final org.apache.thrift.protocol.TField FIRST_SOURCE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSourceTime", org.apache.thrift.protocol.TType.I64, (short)12);
68 ashish 38
 
3430 rajveer 39
  private long id; // required
40
  private List<Order> orders; // required
41
  private long createdOn; // required
42
  private TransactionStatus transactionStatus; // required
43
  private String statusDescription; // required
44
  private long shoppingCartid; // required
45
  private long customer_id; // required
46
  private String coupon_code; // required
47
  private String sessionSource; // required
48
  private long sessionStartTime; // required
3858 vikas 49
  private String firstSource; // required
50
  private long firstSourceTime; // required
68 ashish 51
 
52
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 53
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
68 ashish 54
    ID((short)1, "id"),
483 rajveer 55
    ORDERS((short)2, "orders"),
684 chandransh 56
    CREATED_ON((short)3, "createdOn"),
68 ashish 57
    /**
58
     * 
59
     * @see TransactionStatus
60
     */
684 chandransh 61
    TRANSACTION_STATUS((short)4, "transactionStatus"),
62
    STATUS_DESCRIPTION((short)5, "statusDescription"),
63
    SHOPPING_CARTID((short)6, "shoppingCartid"),
2219 varun.gupt 64
    CUSTOMER_ID((short)7, "customer_id"),
2816 vikas 65
    COUPON_CODE((short)8, "coupon_code"),
66
    SESSION_SOURCE((short)9, "sessionSource"),
3858 vikas 67
    SESSION_START_TIME((short)10, "sessionStartTime"),
68
    FIRST_SOURCE((short)11, "firstSource"),
69
    FIRST_SOURCE_TIME((short)12, "firstSourceTime");
68 ashish 70
 
71
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
72
 
73
    static {
74
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
75
        byName.put(field.getFieldName(), field);
76
      }
77
    }
78
 
79
    /**
80
     * Find the _Fields constant that matches fieldId, or null if its not found.
81
     */
82
    public static _Fields findByThriftId(int fieldId) {
3430 rajveer 83
      switch(fieldId) {
84
        case 1: // ID
85
          return ID;
86
        case 2: // ORDERS
87
          return ORDERS;
88
        case 3: // CREATED_ON
89
          return CREATED_ON;
90
        case 4: // TRANSACTION_STATUS
91
          return TRANSACTION_STATUS;
92
        case 5: // STATUS_DESCRIPTION
93
          return STATUS_DESCRIPTION;
94
        case 6: // SHOPPING_CARTID
95
          return SHOPPING_CARTID;
96
        case 7: // CUSTOMER_ID
97
          return CUSTOMER_ID;
98
        case 8: // COUPON_CODE
99
          return COUPON_CODE;
100
        case 9: // SESSION_SOURCE
101
          return SESSION_SOURCE;
102
        case 10: // SESSION_START_TIME
103
          return SESSION_START_TIME;
3858 vikas 104
        case 11: // FIRST_SOURCE
105
          return FIRST_SOURCE;
106
        case 12: // FIRST_SOURCE_TIME
107
          return FIRST_SOURCE_TIME;
3430 rajveer 108
        default:
109
          return null;
110
      }
68 ashish 111
    }
112
 
113
    /**
114
     * Find the _Fields constant that matches fieldId, throwing an exception
115
     * if it is not found.
116
     */
117
    public static _Fields findByThriftIdOrThrow(int fieldId) {
118
      _Fields fields = findByThriftId(fieldId);
119
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
120
      return fields;
121
    }
122
 
123
    /**
124
     * Find the _Fields constant that matches name, or null if its not found.
125
     */
126
    public static _Fields findByName(String name) {
127
      return byName.get(name);
128
    }
129
 
130
    private final short _thriftId;
131
    private final String _fieldName;
132
 
133
    _Fields(short thriftId, String fieldName) {
134
      _thriftId = thriftId;
135
      _fieldName = fieldName;
136
    }
137
 
138
    public short getThriftFieldId() {
139
      return _thriftId;
140
    }
141
 
142
    public String getFieldName() {
143
      return _fieldName;
144
    }
145
  }
146
 
147
  // isset id assignments
148
  private static final int __ID_ISSET_ID = 0;
149
  private static final int __CREATEDON_ISSET_ID = 1;
483 rajveer 150
  private static final int __SHOPPINGCARTID_ISSET_ID = 2;
68 ashish 151
  private static final int __CUSTOMER_ID_ISSET_ID = 3;
2816 vikas 152
  private static final int __SESSIONSTARTTIME_ISSET_ID = 4;
3858 vikas 153
  private static final int __FIRSTSOURCETIME_ISSET_ID = 5;
154
  private BitSet __isset_bit_vector = new BitSet(6);
68 ashish 155
 
3430 rajveer 156
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
68 ashish 157
  static {
3430 rajveer 158
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
159
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
160
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
161
    tmpMap.put(_Fields.ORDERS, new org.apache.thrift.meta_data.FieldMetaData("orders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
162
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
163
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Order.class))));
164
    tmpMap.put(_Fields.CREATED_ON, new org.apache.thrift.meta_data.FieldMetaData("createdOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
165
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
166
    tmpMap.put(_Fields.TRANSACTION_STATUS, new org.apache.thrift.meta_data.FieldMetaData("transactionStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
167
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TransactionStatus.class)));
168
    tmpMap.put(_Fields.STATUS_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("statusDescription", org.apache.thrift.TFieldRequirementType.DEFAULT, 
169
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
170
    tmpMap.put(_Fields.SHOPPING_CARTID, new org.apache.thrift.meta_data.FieldMetaData("shoppingCartid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
171
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
172
    tmpMap.put(_Fields.CUSTOMER_ID, new org.apache.thrift.meta_data.FieldMetaData("customer_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
173
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
174
    tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("coupon_code", org.apache.thrift.TFieldRequirementType.DEFAULT, 
175
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
176
    tmpMap.put(_Fields.SESSION_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("sessionSource", org.apache.thrift.TFieldRequirementType.DEFAULT, 
177
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
178
    tmpMap.put(_Fields.SESSION_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("sessionStartTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
179
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3858 vikas 180
    tmpMap.put(_Fields.FIRST_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("firstSource", org.apache.thrift.TFieldRequirementType.DEFAULT, 
181
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
182
    tmpMap.put(_Fields.FIRST_SOURCE_TIME, new org.apache.thrift.meta_data.FieldMetaData("firstSourceTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 184
    metaDataMap = Collections.unmodifiableMap(tmpMap);
185
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Transaction.class, metaDataMap);
68 ashish 186
  }
187
 
188
  public Transaction() {
189
  }
190
 
191
  public Transaction(
192
    long id,
483 rajveer 193
    List<Order> orders,
68 ashish 194
    long createdOn,
195
    TransactionStatus transactionStatus,
196
    String statusDescription,
358 ashish 197
    long shoppingCartid,
2219 varun.gupt 198
    long customer_id,
2816 vikas 199
    String coupon_code,
200
    String sessionSource,
3858 vikas 201
    long sessionStartTime,
202
    String firstSource,
203
    long firstSourceTime)
68 ashish 204
  {
205
    this();
206
    this.id = id;
207
    setIdIsSet(true);
483 rajveer 208
    this.orders = orders;
68 ashish 209
    this.createdOn = createdOn;
210
    setCreatedOnIsSet(true);
211
    this.transactionStatus = transactionStatus;
212
    this.statusDescription = statusDescription;
483 rajveer 213
    this.shoppingCartid = shoppingCartid;
214
    setShoppingCartidIsSet(true);
68 ashish 215
    this.customer_id = customer_id;
216
    setCustomer_idIsSet(true);
2219 varun.gupt 217
    this.coupon_code = coupon_code;
2816 vikas 218
    this.sessionSource = sessionSource;
219
    this.sessionStartTime = sessionStartTime;
220
    setSessionStartTimeIsSet(true);
3858 vikas 221
    this.firstSource = firstSource;
222
    this.firstSourceTime = firstSourceTime;
223
    setFirstSourceTimeIsSet(true);
68 ashish 224
  }
225
 
226
  /**
227
   * Performs a deep copy on <i>other</i>.
228
   */
229
  public Transaction(Transaction other) {
230
    __isset_bit_vector.clear();
231
    __isset_bit_vector.or(other.__isset_bit_vector);
232
    this.id = other.id;
483 rajveer 233
    if (other.isSetOrders()) {
234
      List<Order> __this__orders = new ArrayList<Order>();
235
      for (Order other_element : other.orders) {
236
        __this__orders.add(new Order(other_element));
237
      }
238
      this.orders = __this__orders;
68 ashish 239
    }
240
    this.createdOn = other.createdOn;
241
    if (other.isSetTransactionStatus()) {
242
      this.transactionStatus = other.transactionStatus;
243
    }
244
    if (other.isSetStatusDescription()) {
245
      this.statusDescription = other.statusDescription;
246
    }
483 rajveer 247
    this.shoppingCartid = other.shoppingCartid;
68 ashish 248
    this.customer_id = other.customer_id;
2219 varun.gupt 249
    if (other.isSetCoupon_code()) {
250
      this.coupon_code = other.coupon_code;
251
    }
2816 vikas 252
    if (other.isSetSessionSource()) {
253
      this.sessionSource = other.sessionSource;
254
    }
255
    this.sessionStartTime = other.sessionStartTime;
3858 vikas 256
    if (other.isSetFirstSource()) {
257
      this.firstSource = other.firstSource;
258
    }
259
    this.firstSourceTime = other.firstSourceTime;
68 ashish 260
  }
261
 
262
  public Transaction deepCopy() {
263
    return new Transaction(this);
264
  }
265
 
3430 rajveer 266
  @Override
267
  public void clear() {
268
    setIdIsSet(false);
269
    this.id = 0;
270
    this.orders = null;
271
    setCreatedOnIsSet(false);
272
    this.createdOn = 0;
273
    this.transactionStatus = null;
274
    this.statusDescription = null;
275
    setShoppingCartidIsSet(false);
276
    this.shoppingCartid = 0;
277
    setCustomer_idIsSet(false);
278
    this.customer_id = 0;
279
    this.coupon_code = null;
280
    this.sessionSource = null;
281
    setSessionStartTimeIsSet(false);
282
    this.sessionStartTime = 0;
3858 vikas 283
    this.firstSource = null;
284
    setFirstSourceTimeIsSet(false);
285
    this.firstSourceTime = 0;
68 ashish 286
  }
287
 
288
  public long getId() {
289
    return this.id;
290
  }
291
 
3430 rajveer 292
  public void setId(long id) {
68 ashish 293
    this.id = id;
294
    setIdIsSet(true);
295
  }
296
 
297
  public void unsetId() {
298
    __isset_bit_vector.clear(__ID_ISSET_ID);
299
  }
300
 
3430 rajveer 301
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
68 ashish 302
  public boolean isSetId() {
303
    return __isset_bit_vector.get(__ID_ISSET_ID);
304
  }
305
 
306
  public void setIdIsSet(boolean value) {
307
    __isset_bit_vector.set(__ID_ISSET_ID, value);
308
  }
309
 
483 rajveer 310
  public int getOrdersSize() {
311
    return (this.orders == null) ? 0 : this.orders.size();
68 ashish 312
  }
313
 
483 rajveer 314
  public java.util.Iterator<Order> getOrdersIterator() {
315
    return (this.orders == null) ? null : this.orders.iterator();
68 ashish 316
  }
317
 
483 rajveer 318
  public void addToOrders(Order elem) {
319
    if (this.orders == null) {
320
      this.orders = new ArrayList<Order>();
68 ashish 321
    }
483 rajveer 322
    this.orders.add(elem);
68 ashish 323
  }
324
 
483 rajveer 325
  public List<Order> getOrders() {
326
    return this.orders;
68 ashish 327
  }
328
 
3430 rajveer 329
  public void setOrders(List<Order> orders) {
483 rajveer 330
    this.orders = orders;
68 ashish 331
  }
332
 
483 rajveer 333
  public void unsetOrders() {
334
    this.orders = null;
68 ashish 335
  }
336
 
3430 rajveer 337
  /** Returns true if field orders is set (has been assigned a value) and false otherwise */
483 rajveer 338
  public boolean isSetOrders() {
339
    return this.orders != null;
68 ashish 340
  }
341
 
483 rajveer 342
  public void setOrdersIsSet(boolean value) {
68 ashish 343
    if (!value) {
483 rajveer 344
      this.orders = null;
68 ashish 345
    }
346
  }
347
 
348
  public long getCreatedOn() {
349
    return this.createdOn;
350
  }
351
 
3430 rajveer 352
  public void setCreatedOn(long createdOn) {
68 ashish 353
    this.createdOn = createdOn;
354
    setCreatedOnIsSet(true);
355
  }
356
 
357
  public void unsetCreatedOn() {
358
    __isset_bit_vector.clear(__CREATEDON_ISSET_ID);
359
  }
360
 
3430 rajveer 361
  /** Returns true if field createdOn is set (has been assigned a value) and false otherwise */
68 ashish 362
  public boolean isSetCreatedOn() {
363
    return __isset_bit_vector.get(__CREATEDON_ISSET_ID);
364
  }
365
 
366
  public void setCreatedOnIsSet(boolean value) {
367
    __isset_bit_vector.set(__CREATEDON_ISSET_ID, value);
368
  }
369
 
370
  /**
371
   * 
372
   * @see TransactionStatus
373
   */
374
  public TransactionStatus getTransactionStatus() {
375
    return this.transactionStatus;
376
  }
377
 
378
  /**
379
   * 
380
   * @see TransactionStatus
381
   */
3430 rajveer 382
  public void setTransactionStatus(TransactionStatus transactionStatus) {
68 ashish 383
    this.transactionStatus = transactionStatus;
384
  }
385
 
386
  public void unsetTransactionStatus() {
387
    this.transactionStatus = null;
388
  }
389
 
3430 rajveer 390
  /** Returns true if field transactionStatus is set (has been assigned a value) and false otherwise */
68 ashish 391
  public boolean isSetTransactionStatus() {
392
    return this.transactionStatus != null;
393
  }
394
 
395
  public void setTransactionStatusIsSet(boolean value) {
396
    if (!value) {
397
      this.transactionStatus = null;
398
    }
399
  }
400
 
401
  public String getStatusDescription() {
402
    return this.statusDescription;
403
  }
404
 
3430 rajveer 405
  public void setStatusDescription(String statusDescription) {
68 ashish 406
    this.statusDescription = statusDescription;
407
  }
408
 
409
  public void unsetStatusDescription() {
410
    this.statusDescription = null;
411
  }
412
 
3430 rajveer 413
  /** Returns true if field statusDescription is set (has been assigned a value) and false otherwise */
68 ashish 414
  public boolean isSetStatusDescription() {
415
    return this.statusDescription != null;
416
  }
417
 
418
  public void setStatusDescriptionIsSet(boolean value) {
419
    if (!value) {
420
      this.statusDescription = null;
421
    }
422
  }
423
 
132 ashish 424
  public long getShoppingCartid() {
425
    return this.shoppingCartid;
426
  }
427
 
3430 rajveer 428
  public void setShoppingCartid(long shoppingCartid) {
132 ashish 429
    this.shoppingCartid = shoppingCartid;
430
    setShoppingCartidIsSet(true);
431
  }
432
 
433
  public void unsetShoppingCartid() {
434
    __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
435
  }
436
 
3430 rajveer 437
  /** Returns true if field shoppingCartid is set (has been assigned a value) and false otherwise */
132 ashish 438
  public boolean isSetShoppingCartid() {
439
    return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
440
  }
441
 
442
  public void setShoppingCartidIsSet(boolean value) {
443
    __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
444
  }
445
 
483 rajveer 446
  public long getCustomer_id() {
447
    return this.customer_id;
358 ashish 448
  }
449
 
3430 rajveer 450
  public void setCustomer_id(long customer_id) {
483 rajveer 451
    this.customer_id = customer_id;
452
    setCustomer_idIsSet(true);
358 ashish 453
  }
454
 
483 rajveer 455
  public void unsetCustomer_id() {
456
    __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
358 ashish 457
  }
458
 
3430 rajveer 459
  /** Returns true if field customer_id is set (has been assigned a value) and false otherwise */
483 rajveer 460
  public boolean isSetCustomer_id() {
461
    return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
358 ashish 462
  }
463
 
483 rajveer 464
  public void setCustomer_idIsSet(boolean value) {
465
    __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
358 ashish 466
  }
467
 
2219 varun.gupt 468
  public String getCoupon_code() {
469
    return this.coupon_code;
470
  }
471
 
3430 rajveer 472
  public void setCoupon_code(String coupon_code) {
2219 varun.gupt 473
    this.coupon_code = coupon_code;
474
  }
475
 
476
  public void unsetCoupon_code() {
477
    this.coupon_code = null;
478
  }
479
 
3430 rajveer 480
  /** Returns true if field coupon_code is set (has been assigned a value) and false otherwise */
2219 varun.gupt 481
  public boolean isSetCoupon_code() {
482
    return this.coupon_code != null;
483
  }
484
 
485
  public void setCoupon_codeIsSet(boolean value) {
486
    if (!value) {
487
      this.coupon_code = null;
488
    }
489
  }
490
 
2816 vikas 491
  public String getSessionSource() {
492
    return this.sessionSource;
493
  }
494
 
3430 rajveer 495
  public void setSessionSource(String sessionSource) {
2816 vikas 496
    this.sessionSource = sessionSource;
497
  }
498
 
499
  public void unsetSessionSource() {
500
    this.sessionSource = null;
501
  }
502
 
3430 rajveer 503
  /** Returns true if field sessionSource is set (has been assigned a value) and false otherwise */
2816 vikas 504
  public boolean isSetSessionSource() {
505
    return this.sessionSource != null;
506
  }
507
 
508
  public void setSessionSourceIsSet(boolean value) {
509
    if (!value) {
510
      this.sessionSource = null;
511
    }
512
  }
513
 
514
  public long getSessionStartTime() {
515
    return this.sessionStartTime;
516
  }
517
 
3430 rajveer 518
  public void setSessionStartTime(long sessionStartTime) {
2816 vikas 519
    this.sessionStartTime = sessionStartTime;
520
    setSessionStartTimeIsSet(true);
521
  }
522
 
523
  public void unsetSessionStartTime() {
524
    __isset_bit_vector.clear(__SESSIONSTARTTIME_ISSET_ID);
525
  }
526
 
3430 rajveer 527
  /** Returns true if field sessionStartTime is set (has been assigned a value) and false otherwise */
2816 vikas 528
  public boolean isSetSessionStartTime() {
529
    return __isset_bit_vector.get(__SESSIONSTARTTIME_ISSET_ID);
530
  }
531
 
532
  public void setSessionStartTimeIsSet(boolean value) {
533
    __isset_bit_vector.set(__SESSIONSTARTTIME_ISSET_ID, value);
534
  }
535
 
3858 vikas 536
  public String getFirstSource() {
537
    return this.firstSource;
538
  }
539
 
540
  public void setFirstSource(String firstSource) {
541
    this.firstSource = firstSource;
542
  }
543
 
544
  public void unsetFirstSource() {
545
    this.firstSource = null;
546
  }
547
 
548
  /** Returns true if field firstSource is set (has been assigned a value) and false otherwise */
549
  public boolean isSetFirstSource() {
550
    return this.firstSource != null;
551
  }
552
 
553
  public void setFirstSourceIsSet(boolean value) {
554
    if (!value) {
555
      this.firstSource = null;
556
    }
557
  }
558
 
559
  public long getFirstSourceTime() {
560
    return this.firstSourceTime;
561
  }
562
 
563
  public void setFirstSourceTime(long firstSourceTime) {
564
    this.firstSourceTime = firstSourceTime;
565
    setFirstSourceTimeIsSet(true);
566
  }
567
 
568
  public void unsetFirstSourceTime() {
569
    __isset_bit_vector.clear(__FIRSTSOURCETIME_ISSET_ID);
570
  }
571
 
572
  /** Returns true if field firstSourceTime is set (has been assigned a value) and false otherwise */
573
  public boolean isSetFirstSourceTime() {
574
    return __isset_bit_vector.get(__FIRSTSOURCETIME_ISSET_ID);
575
  }
576
 
577
  public void setFirstSourceTimeIsSet(boolean value) {
578
    __isset_bit_vector.set(__FIRSTSOURCETIME_ISSET_ID, value);
579
  }
580
 
68 ashish 581
  public void setFieldValue(_Fields field, Object value) {
582
    switch (field) {
583
    case ID:
584
      if (value == null) {
585
        unsetId();
586
      } else {
587
        setId((Long)value);
588
      }
589
      break;
590
 
483 rajveer 591
    case ORDERS:
68 ashish 592
      if (value == null) {
483 rajveer 593
        unsetOrders();
68 ashish 594
      } else {
483 rajveer 595
        setOrders((List<Order>)value);
68 ashish 596
      }
597
      break;
598
 
599
    case CREATED_ON:
600
      if (value == null) {
601
        unsetCreatedOn();
602
      } else {
603
        setCreatedOn((Long)value);
604
      }
605
      break;
606
 
607
    case TRANSACTION_STATUS:
608
      if (value == null) {
609
        unsetTransactionStatus();
610
      } else {
611
        setTransactionStatus((TransactionStatus)value);
612
      }
613
      break;
614
 
615
    case STATUS_DESCRIPTION:
616
      if (value == null) {
617
        unsetStatusDescription();
618
      } else {
619
        setStatusDescription((String)value);
620
      }
621
      break;
622
 
132 ashish 623
    case SHOPPING_CARTID:
624
      if (value == null) {
625
        unsetShoppingCartid();
626
      } else {
627
        setShoppingCartid((Long)value);
628
      }
629
      break;
630
 
483 rajveer 631
    case CUSTOMER_ID:
358 ashish 632
      if (value == null) {
483 rajveer 633
        unsetCustomer_id();
358 ashish 634
      } else {
483 rajveer 635
        setCustomer_id((Long)value);
358 ashish 636
      }
637
      break;
638
 
2219 varun.gupt 639
    case COUPON_CODE:
640
      if (value == null) {
641
        unsetCoupon_code();
642
      } else {
643
        setCoupon_code((String)value);
644
      }
645
      break;
646
 
2816 vikas 647
    case SESSION_SOURCE:
648
      if (value == null) {
649
        unsetSessionSource();
650
      } else {
651
        setSessionSource((String)value);
652
      }
653
      break;
654
 
655
    case SESSION_START_TIME:
656
      if (value == null) {
657
        unsetSessionStartTime();
658
      } else {
659
        setSessionStartTime((Long)value);
660
      }
661
      break;
662
 
3858 vikas 663
    case FIRST_SOURCE:
664
      if (value == null) {
665
        unsetFirstSource();
666
      } else {
667
        setFirstSource((String)value);
668
      }
669
      break;
670
 
671
    case FIRST_SOURCE_TIME:
672
      if (value == null) {
673
        unsetFirstSourceTime();
674
      } else {
675
        setFirstSourceTime((Long)value);
676
      }
677
      break;
678
 
68 ashish 679
    }
680
  }
681
 
682
  public Object getFieldValue(_Fields field) {
683
    switch (field) {
684
    case ID:
3430 rajveer 685
      return Long.valueOf(getId());
68 ashish 686
 
483 rajveer 687
    case ORDERS:
688
      return getOrders();
68 ashish 689
 
690
    case CREATED_ON:
3430 rajveer 691
      return Long.valueOf(getCreatedOn());
68 ashish 692
 
693
    case TRANSACTION_STATUS:
694
      return getTransactionStatus();
695
 
696
    case STATUS_DESCRIPTION:
697
      return getStatusDescription();
698
 
132 ashish 699
    case SHOPPING_CARTID:
3430 rajveer 700
      return Long.valueOf(getShoppingCartid());
132 ashish 701
 
483 rajveer 702
    case CUSTOMER_ID:
3430 rajveer 703
      return Long.valueOf(getCustomer_id());
358 ashish 704
 
2219 varun.gupt 705
    case COUPON_CODE:
706
      return getCoupon_code();
707
 
2816 vikas 708
    case SESSION_SOURCE:
709
      return getSessionSource();
710
 
711
    case SESSION_START_TIME:
3430 rajveer 712
      return Long.valueOf(getSessionStartTime());
2816 vikas 713
 
3858 vikas 714
    case FIRST_SOURCE:
715
      return getFirstSource();
716
 
717
    case FIRST_SOURCE_TIME:
718
      return Long.valueOf(getFirstSourceTime());
719
 
68 ashish 720
    }
721
    throw new IllegalStateException();
722
  }
723
 
3430 rajveer 724
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
725
  public boolean isSet(_Fields field) {
726
    if (field == null) {
727
      throw new IllegalArgumentException();
728
    }
68 ashish 729
 
730
    switch (field) {
731
    case ID:
732
      return isSetId();
483 rajveer 733
    case ORDERS:
734
      return isSetOrders();
68 ashish 735
    case CREATED_ON:
736
      return isSetCreatedOn();
737
    case TRANSACTION_STATUS:
738
      return isSetTransactionStatus();
739
    case STATUS_DESCRIPTION:
740
      return isSetStatusDescription();
483 rajveer 741
    case SHOPPING_CARTID:
742
      return isSetShoppingCartid();
68 ashish 743
    case CUSTOMER_ID:
744
      return isSetCustomer_id();
2219 varun.gupt 745
    case COUPON_CODE:
746
      return isSetCoupon_code();
2816 vikas 747
    case SESSION_SOURCE:
748
      return isSetSessionSource();
749
    case SESSION_START_TIME:
750
      return isSetSessionStartTime();
3858 vikas 751
    case FIRST_SOURCE:
752
      return isSetFirstSource();
753
    case FIRST_SOURCE_TIME:
754
      return isSetFirstSourceTime();
68 ashish 755
    }
756
    throw new IllegalStateException();
757
  }
758
 
759
  @Override
760
  public boolean equals(Object that) {
761
    if (that == null)
762
      return false;
763
    if (that instanceof Transaction)
764
      return this.equals((Transaction)that);
765
    return false;
766
  }
767
 
768
  public boolean equals(Transaction that) {
769
    if (that == null)
770
      return false;
771
 
772
    boolean this_present_id = true;
773
    boolean that_present_id = true;
774
    if (this_present_id || that_present_id) {
775
      if (!(this_present_id && that_present_id))
776
        return false;
777
      if (this.id != that.id)
778
        return false;
779
    }
780
 
483 rajveer 781
    boolean this_present_orders = true && this.isSetOrders();
782
    boolean that_present_orders = true && that.isSetOrders();
783
    if (this_present_orders || that_present_orders) {
784
      if (!(this_present_orders && that_present_orders))
68 ashish 785
        return false;
483 rajveer 786
      if (!this.orders.equals(that.orders))
68 ashish 787
        return false;
788
    }
789
 
790
    boolean this_present_createdOn = true;
791
    boolean that_present_createdOn = true;
792
    if (this_present_createdOn || that_present_createdOn) {
793
      if (!(this_present_createdOn && that_present_createdOn))
794
        return false;
795
      if (this.createdOn != that.createdOn)
796
        return false;
797
    }
798
 
799
    boolean this_present_transactionStatus = true && this.isSetTransactionStatus();
800
    boolean that_present_transactionStatus = true && that.isSetTransactionStatus();
801
    if (this_present_transactionStatus || that_present_transactionStatus) {
802
      if (!(this_present_transactionStatus && that_present_transactionStatus))
803
        return false;
804
      if (!this.transactionStatus.equals(that.transactionStatus))
805
        return false;
806
    }
807
 
808
    boolean this_present_statusDescription = true && this.isSetStatusDescription();
809
    boolean that_present_statusDescription = true && that.isSetStatusDescription();
810
    if (this_present_statusDescription || that_present_statusDescription) {
811
      if (!(this_present_statusDescription && that_present_statusDescription))
812
        return false;
813
      if (!this.statusDescription.equals(that.statusDescription))
814
        return false;
815
    }
816
 
132 ashish 817
    boolean this_present_shoppingCartid = true;
818
    boolean that_present_shoppingCartid = true;
819
    if (this_present_shoppingCartid || that_present_shoppingCartid) {
820
      if (!(this_present_shoppingCartid && that_present_shoppingCartid))
821
        return false;
822
      if (this.shoppingCartid != that.shoppingCartid)
823
        return false;
824
    }
825
 
483 rajveer 826
    boolean this_present_customer_id = true;
827
    boolean that_present_customer_id = true;
828
    if (this_present_customer_id || that_present_customer_id) {
829
      if (!(this_present_customer_id && that_present_customer_id))
358 ashish 830
        return false;
483 rajveer 831
      if (this.customer_id != that.customer_id)
358 ashish 832
        return false;
833
    }
834
 
2219 varun.gupt 835
    boolean this_present_coupon_code = true && this.isSetCoupon_code();
836
    boolean that_present_coupon_code = true && that.isSetCoupon_code();
837
    if (this_present_coupon_code || that_present_coupon_code) {
838
      if (!(this_present_coupon_code && that_present_coupon_code))
839
        return false;
840
      if (!this.coupon_code.equals(that.coupon_code))
841
        return false;
842
    }
843
 
2816 vikas 844
    boolean this_present_sessionSource = true && this.isSetSessionSource();
845
    boolean that_present_sessionSource = true && that.isSetSessionSource();
846
    if (this_present_sessionSource || that_present_sessionSource) {
847
      if (!(this_present_sessionSource && that_present_sessionSource))
848
        return false;
849
      if (!this.sessionSource.equals(that.sessionSource))
850
        return false;
851
    }
852
 
853
    boolean this_present_sessionStartTime = true;
854
    boolean that_present_sessionStartTime = true;
855
    if (this_present_sessionStartTime || that_present_sessionStartTime) {
856
      if (!(this_present_sessionStartTime && that_present_sessionStartTime))
857
        return false;
858
      if (this.sessionStartTime != that.sessionStartTime)
859
        return false;
860
    }
861
 
3858 vikas 862
    boolean this_present_firstSource = true && this.isSetFirstSource();
863
    boolean that_present_firstSource = true && that.isSetFirstSource();
864
    if (this_present_firstSource || that_present_firstSource) {
865
      if (!(this_present_firstSource && that_present_firstSource))
866
        return false;
867
      if (!this.firstSource.equals(that.firstSource))
868
        return false;
869
    }
870
 
871
    boolean this_present_firstSourceTime = true;
872
    boolean that_present_firstSourceTime = true;
873
    if (this_present_firstSourceTime || that_present_firstSourceTime) {
874
      if (!(this_present_firstSourceTime && that_present_firstSourceTime))
875
        return false;
876
      if (this.firstSourceTime != that.firstSourceTime)
877
        return false;
878
    }
879
 
68 ashish 880
    return true;
881
  }
882
 
883
  @Override
884
  public int hashCode() {
885
    return 0;
886
  }
887
 
684 chandransh 888
  public int compareTo(Transaction other) {
889
    if (!getClass().equals(other.getClass())) {
890
      return getClass().getName().compareTo(other.getClass().getName());
891
    }
892
 
893
    int lastComparison = 0;
894
    Transaction typedOther = (Transaction)other;
895
 
3430 rajveer 896
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
684 chandransh 897
    if (lastComparison != 0) {
898
      return lastComparison;
899
    }
3430 rajveer 900
    if (isSetId()) {
901
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
902
      if (lastComparison != 0) {
903
        return lastComparison;
904
      }
684 chandransh 905
    }
3430 rajveer 906
    lastComparison = Boolean.valueOf(isSetOrders()).compareTo(typedOther.isSetOrders());
684 chandransh 907
    if (lastComparison != 0) {
908
      return lastComparison;
909
    }
3430 rajveer 910
    if (isSetOrders()) {
911
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orders, typedOther.orders);
912
      if (lastComparison != 0) {
913
        return lastComparison;
914
      }
684 chandransh 915
    }
3430 rajveer 916
    lastComparison = Boolean.valueOf(isSetCreatedOn()).compareTo(typedOther.isSetCreatedOn());
684 chandransh 917
    if (lastComparison != 0) {
918
      return lastComparison;
919
    }
3430 rajveer 920
    if (isSetCreatedOn()) {
921
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdOn, typedOther.createdOn);
922
      if (lastComparison != 0) {
923
        return lastComparison;
924
      }
684 chandransh 925
    }
3430 rajveer 926
    lastComparison = Boolean.valueOf(isSetTransactionStatus()).compareTo(typedOther.isSetTransactionStatus());
684 chandransh 927
    if (lastComparison != 0) {
928
      return lastComparison;
929
    }
3430 rajveer 930
    if (isSetTransactionStatus()) {
931
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionStatus, typedOther.transactionStatus);
932
      if (lastComparison != 0) {
933
        return lastComparison;
934
      }
684 chandransh 935
    }
3430 rajveer 936
    lastComparison = Boolean.valueOf(isSetStatusDescription()).compareTo(typedOther.isSetStatusDescription());
684 chandransh 937
    if (lastComparison != 0) {
938
      return lastComparison;
939
    }
3430 rajveer 940
    if (isSetStatusDescription()) {
941
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusDescription, typedOther.statusDescription);
942
      if (lastComparison != 0) {
943
        return lastComparison;
944
      }
684 chandransh 945
    }
3430 rajveer 946
    lastComparison = Boolean.valueOf(isSetShoppingCartid()).compareTo(typedOther.isSetShoppingCartid());
684 chandransh 947
    if (lastComparison != 0) {
948
      return lastComparison;
949
    }
3430 rajveer 950
    if (isSetShoppingCartid()) {
951
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shoppingCartid, typedOther.shoppingCartid);
952
      if (lastComparison != 0) {
953
        return lastComparison;
954
      }
684 chandransh 955
    }
3430 rajveer 956
    lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(typedOther.isSetCustomer_id());
684 chandransh 957
    if (lastComparison != 0) {
958
      return lastComparison;
959
    }
3430 rajveer 960
    if (isSetCustomer_id()) {
961
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.customer_id, typedOther.customer_id);
962
      if (lastComparison != 0) {
963
        return lastComparison;
964
      }
684 chandransh 965
    }
3430 rajveer 966
    lastComparison = Boolean.valueOf(isSetCoupon_code()).compareTo(typedOther.isSetCoupon_code());
2219 varun.gupt 967
    if (lastComparison != 0) {
968
      return lastComparison;
969
    }
3430 rajveer 970
    if (isSetCoupon_code()) {
971
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.coupon_code, typedOther.coupon_code);
972
      if (lastComparison != 0) {
973
        return lastComparison;
974
      }
2219 varun.gupt 975
    }
3430 rajveer 976
    lastComparison = Boolean.valueOf(isSetSessionSource()).compareTo(typedOther.isSetSessionSource());
2816 vikas 977
    if (lastComparison != 0) {
978
      return lastComparison;
979
    }
3430 rajveer 980
    if (isSetSessionSource()) {
981
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionSource, typedOther.sessionSource);
982
      if (lastComparison != 0) {
983
        return lastComparison;
984
      }
2816 vikas 985
    }
3430 rajveer 986
    lastComparison = Boolean.valueOf(isSetSessionStartTime()).compareTo(typedOther.isSetSessionStartTime());
2816 vikas 987
    if (lastComparison != 0) {
988
      return lastComparison;
989
    }
3430 rajveer 990
    if (isSetSessionStartTime()) {
991
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionStartTime, typedOther.sessionStartTime);
992
      if (lastComparison != 0) {
993
        return lastComparison;
994
      }
2816 vikas 995
    }
3858 vikas 996
    lastComparison = Boolean.valueOf(isSetFirstSource()).compareTo(typedOther.isSetFirstSource());
997
    if (lastComparison != 0) {
998
      return lastComparison;
999
    }
1000
    if (isSetFirstSource()) {
1001
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstSource, typedOther.firstSource);
1002
      if (lastComparison != 0) {
1003
        return lastComparison;
1004
      }
1005
    }
1006
    lastComparison = Boolean.valueOf(isSetFirstSourceTime()).compareTo(typedOther.isSetFirstSourceTime());
1007
    if (lastComparison != 0) {
1008
      return lastComparison;
1009
    }
1010
    if (isSetFirstSourceTime()) {
1011
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstSourceTime, typedOther.firstSourceTime);
1012
      if (lastComparison != 0) {
1013
        return lastComparison;
1014
      }
1015
    }
684 chandransh 1016
    return 0;
1017
  }
1018
 
3430 rajveer 1019
  public _Fields fieldForId(int fieldId) {
1020
    return _Fields.findByThriftId(fieldId);
1021
  }
1022
 
1023
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1024
    org.apache.thrift.protocol.TField field;
68 ashish 1025
    iprot.readStructBegin();
1026
    while (true)
1027
    {
1028
      field = iprot.readFieldBegin();
3430 rajveer 1029
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
68 ashish 1030
        break;
1031
      }
3430 rajveer 1032
      switch (field.id) {
1033
        case 1: // ID
1034
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1035
            this.id = iprot.readI64();
1036
            setIdIsSet(true);
1037
          } else { 
1038
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1039
          }
1040
          break;
1041
        case 2: // ORDERS
1042
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
1043
            {
1044
              org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
1045
              this.orders = new ArrayList<Order>(_list4.size);
1046
              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
483 rajveer 1047
              {
3430 rajveer 1048
                Order _elem6; // required
1049
                _elem6 = new Order();
1050
                _elem6.read(iprot);
1051
                this.orders.add(_elem6);
483 rajveer 1052
              }
3430 rajveer 1053
              iprot.readListEnd();
68 ashish 1054
            }
3430 rajveer 1055
          } else { 
1056
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1057
          }
1058
          break;
1059
        case 3: // CREATED_ON
1060
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1061
            this.createdOn = iprot.readI64();
1062
            setCreatedOnIsSet(true);
1063
          } else { 
1064
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1065
          }
1066
          break;
1067
        case 4: // TRANSACTION_STATUS
1068
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1069
            this.transactionStatus = TransactionStatus.findByValue(iprot.readI32());
1070
          } else { 
1071
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1072
          }
1073
          break;
1074
        case 5: // STATUS_DESCRIPTION
1075
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1076
            this.statusDescription = iprot.readString();
1077
          } else { 
1078
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1079
          }
1080
          break;
1081
        case 6: // SHOPPING_CARTID
1082
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1083
            this.shoppingCartid = iprot.readI64();
1084
            setShoppingCartidIsSet(true);
1085
          } else { 
1086
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1087
          }
1088
          break;
1089
        case 7: // CUSTOMER_ID
1090
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1091
            this.customer_id = iprot.readI64();
1092
            setCustomer_idIsSet(true);
1093
          } else { 
1094
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1095
          }
1096
          break;
1097
        case 8: // COUPON_CODE
1098
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1099
            this.coupon_code = iprot.readString();
1100
          } else { 
1101
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1102
          }
1103
          break;
1104
        case 9: // SESSION_SOURCE
1105
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1106
            this.sessionSource = iprot.readString();
1107
          } else { 
1108
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1109
          }
1110
          break;
1111
        case 10: // SESSION_START_TIME
1112
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1113
            this.sessionStartTime = iprot.readI64();
1114
            setSessionStartTimeIsSet(true);
1115
          } else { 
1116
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1117
          }
1118
          break;
3858 vikas 1119
        case 11: // FIRST_SOURCE
1120
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1121
            this.firstSource = iprot.readString();
1122
          } else { 
1123
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1124
          }
1125
          break;
1126
        case 12: // FIRST_SOURCE_TIME
1127
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1128
            this.firstSourceTime = iprot.readI64();
1129
            setFirstSourceTimeIsSet(true);
1130
          } else { 
1131
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1132
          }
1133
          break;
3430 rajveer 1134
        default:
1135
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
68 ashish 1136
      }
3430 rajveer 1137
      iprot.readFieldEnd();
68 ashish 1138
    }
1139
    iprot.readStructEnd();
1140
    validate();
1141
  }
1142
 
3430 rajveer 1143
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
68 ashish 1144
    validate();
1145
 
1146
    oprot.writeStructBegin(STRUCT_DESC);
1147
    oprot.writeFieldBegin(ID_FIELD_DESC);
1148
    oprot.writeI64(this.id);
1149
    oprot.writeFieldEnd();
483 rajveer 1150
    if (this.orders != null) {
1151
      oprot.writeFieldBegin(ORDERS_FIELD_DESC);
1152
      {
3430 rajveer 1153
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.orders.size()));
684 chandransh 1154
        for (Order _iter7 : this.orders)
483 rajveer 1155
        {
684 chandransh 1156
          _iter7.write(oprot);
483 rajveer 1157
        }
1158
        oprot.writeListEnd();
1159
      }
68 ashish 1160
      oprot.writeFieldEnd();
1161
    }
1162
    oprot.writeFieldBegin(CREATED_ON_FIELD_DESC);
1163
    oprot.writeI64(this.createdOn);
1164
    oprot.writeFieldEnd();
1165
    if (this.transactionStatus != null) {
1166
      oprot.writeFieldBegin(TRANSACTION_STATUS_FIELD_DESC);
1167
      oprot.writeI32(this.transactionStatus.getValue());
1168
      oprot.writeFieldEnd();
1169
    }
1170
    if (this.statusDescription != null) {
1171
      oprot.writeFieldBegin(STATUS_DESCRIPTION_FIELD_DESC);
1172
      oprot.writeString(this.statusDescription);
1173
      oprot.writeFieldEnd();
1174
    }
132 ashish 1175
    oprot.writeFieldBegin(SHOPPING_CARTID_FIELD_DESC);
1176
    oprot.writeI64(this.shoppingCartid);
1177
    oprot.writeFieldEnd();
483 rajveer 1178
    oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
1179
    oprot.writeI64(this.customer_id);
358 ashish 1180
    oprot.writeFieldEnd();
2219 varun.gupt 1181
    if (this.coupon_code != null) {
1182
      oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
1183
      oprot.writeString(this.coupon_code);
1184
      oprot.writeFieldEnd();
1185
    }
2816 vikas 1186
    if (this.sessionSource != null) {
1187
      oprot.writeFieldBegin(SESSION_SOURCE_FIELD_DESC);
1188
      oprot.writeString(this.sessionSource);
1189
      oprot.writeFieldEnd();
1190
    }
1191
    oprot.writeFieldBegin(SESSION_START_TIME_FIELD_DESC);
1192
    oprot.writeI64(this.sessionStartTime);
1193
    oprot.writeFieldEnd();
3858 vikas 1194
    if (this.firstSource != null) {
1195
      oprot.writeFieldBegin(FIRST_SOURCE_FIELD_DESC);
1196
      oprot.writeString(this.firstSource);
1197
      oprot.writeFieldEnd();
1198
    }
1199
    oprot.writeFieldBegin(FIRST_SOURCE_TIME_FIELD_DESC);
1200
    oprot.writeI64(this.firstSourceTime);
1201
    oprot.writeFieldEnd();
68 ashish 1202
    oprot.writeFieldStop();
1203
    oprot.writeStructEnd();
1204
  }
1205
 
1206
  @Override
1207
  public String toString() {
1208
    StringBuilder sb = new StringBuilder("Transaction(");
1209
    boolean first = true;
1210
 
1211
    sb.append("id:");
1212
    sb.append(this.id);
1213
    first = false;
1214
    if (!first) sb.append(", ");
483 rajveer 1215
    sb.append("orders:");
1216
    if (this.orders == null) {
68 ashish 1217
      sb.append("null");
1218
    } else {
483 rajveer 1219
      sb.append(this.orders);
68 ashish 1220
    }
1221
    first = false;
1222
    if (!first) sb.append(", ");
1223
    sb.append("createdOn:");
1224
    sb.append(this.createdOn);
1225
    first = false;
1226
    if (!first) sb.append(", ");
1227
    sb.append("transactionStatus:");
1228
    if (this.transactionStatus == null) {
1229
      sb.append("null");
1230
    } else {
1231
      sb.append(this.transactionStatus);
1232
    }
1233
    first = false;
1234
    if (!first) sb.append(", ");
1235
    sb.append("statusDescription:");
1236
    if (this.statusDescription == null) {
1237
      sb.append("null");
1238
    } else {
1239
      sb.append(this.statusDescription);
1240
    }
1241
    first = false;
1242
    if (!first) sb.append(", ");
132 ashish 1243
    sb.append("shoppingCartid:");
1244
    sb.append(this.shoppingCartid);
1245
    first = false;
358 ashish 1246
    if (!first) sb.append(", ");
483 rajveer 1247
    sb.append("customer_id:");
1248
    sb.append(this.customer_id);
358 ashish 1249
    first = false;
2219 varun.gupt 1250
    if (!first) sb.append(", ");
1251
    sb.append("coupon_code:");
1252
    if (this.coupon_code == null) {
1253
      sb.append("null");
1254
    } else {
1255
      sb.append(this.coupon_code);
1256
    }
1257
    first = false;
2816 vikas 1258
    if (!first) sb.append(", ");
1259
    sb.append("sessionSource:");
1260
    if (this.sessionSource == null) {
1261
      sb.append("null");
1262
    } else {
1263
      sb.append(this.sessionSource);
1264
    }
1265
    first = false;
1266
    if (!first) sb.append(", ");
1267
    sb.append("sessionStartTime:");
1268
    sb.append(this.sessionStartTime);
1269
    first = false;
3858 vikas 1270
    if (!first) sb.append(", ");
1271
    sb.append("firstSource:");
1272
    if (this.firstSource == null) {
1273
      sb.append("null");
1274
    } else {
1275
      sb.append(this.firstSource);
1276
    }
1277
    first = false;
1278
    if (!first) sb.append(", ");
1279
    sb.append("firstSourceTime:");
1280
    sb.append(this.firstSourceTime);
1281
    first = false;
68 ashish 1282
    sb.append(")");
1283
    return sb.toString();
1284
  }
1285
 
3430 rajveer 1286
  public void validate() throws org.apache.thrift.TException {
68 ashish 1287
    // check for required fields
1288
  }
1289
 
3430 rajveer 1290
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1291
    try {
1292
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1293
    } catch (org.apache.thrift.TException te) {
1294
      throw new java.io.IOException(te);
1295
    }
1296
  }
1297
 
1298
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1299
    try {
1300
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1301
      __isset_bit_vector = new BitSet(1);
1302
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1303
    } catch (org.apache.thrift.TException te) {
1304
      throw new java.io.IOException(te);
1305
    }
1306
  }
1307
 
68 ashish 1308
}
1309