Subversion Repositories SmartDukaan

Rev

Rev 7169 | Go to most recent revision | Details | Last modification | View Log | RSS feed

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