Subversion Repositories SmartDukaan

Rev

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

Rev 21838 Rev 21844
Line 25... Line 25...
25
 
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);
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 STATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("stateName", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField STATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("stateName", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField VAT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatType", org.apache.thrift.protocol.TType.I32, (short)3);
28
  private static final org.apache.thrift.protocol.TField VAT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatType", org.apache.thrift.protocol.TType.I32, (short)3);
29
  private static final org.apache.thrift.protocol.TField STATE_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("stateCode", org.apache.thrift.protocol.TType.STRING, (short)4);
29
  private static final org.apache.thrift.protocol.TField STATE_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("stateCode", org.apache.thrift.protocol.TType.STRING, (short)4);
-
 
30
  private static final org.apache.thrift.protocol.TField SHORT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("shortName", org.apache.thrift.protocol.TType.STRING, (short)5);
30
 
31
 
31
  private long id; // required
32
  private long id; // required
32
  private String stateName; // required
33
  private String stateName; // required
33
  private VatType vatType; // required
34
  private VatType vatType; // required
34
  private String stateCode; // required
35
  private String stateCode; // required
-
 
36
  private String shortName; // required
35
 
37
 
36
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
38
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
39
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
38
    ID((short)1, "id"),
40
    ID((short)1, "id"),
39
    STATE_NAME((short)2, "stateName"),
41
    STATE_NAME((short)2, "stateName"),
40
    /**
42
    /**
41
     * 
43
     * 
42
     * @see VatType
44
     * @see VatType
43
     */
45
     */
44
    VAT_TYPE((short)3, "vatType"),
46
    VAT_TYPE((short)3, "vatType"),
45
    STATE_CODE((short)4, "stateCode");
47
    STATE_CODE((short)4, "stateCode"),
-
 
48
    SHORT_NAME((short)5, "shortName");
46
 
49
 
47
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
48
 
51
 
49
    static {
52
    static {
50
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
53
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 63... Line 66...
63
          return STATE_NAME;
66
          return STATE_NAME;
64
        case 3: // VAT_TYPE
67
        case 3: // VAT_TYPE
65
          return VAT_TYPE;
68
          return VAT_TYPE;
66
        case 4: // STATE_CODE
69
        case 4: // STATE_CODE
67
          return STATE_CODE;
70
          return STATE_CODE;
-
 
71
        case 5: // SHORT_NAME
-
 
72
          return SHORT_NAME;
68
        default:
73
        default:
69
          return null;
74
          return null;
70
      }
75
      }
71
    }
76
    }
72
 
77
 
Line 117... Line 122...
117
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
122
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
118
    tmpMap.put(_Fields.VAT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("vatType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
123
    tmpMap.put(_Fields.VAT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("vatType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
119
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, VatType.class)));
124
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, VatType.class)));
120
    tmpMap.put(_Fields.STATE_CODE, new org.apache.thrift.meta_data.FieldMetaData("stateCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
125
    tmpMap.put(_Fields.STATE_CODE, new org.apache.thrift.meta_data.FieldMetaData("stateCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
121
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
126
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
127
    tmpMap.put(_Fields.SHORT_NAME, new org.apache.thrift.meta_data.FieldMetaData("shortName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
128
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
122
    metaDataMap = Collections.unmodifiableMap(tmpMap);
129
    metaDataMap = Collections.unmodifiableMap(tmpMap);
123
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StateInfo.class, metaDataMap);
130
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StateInfo.class, metaDataMap);
124
  }
131
  }
125
 
132
 
126
  public StateInfo() {
133
  public StateInfo() {
Line 128... Line 135...
128
 
135
 
129
  public StateInfo(
136
  public StateInfo(
130
    long id,
137
    long id,
131
    String stateName,
138
    String stateName,
132
    VatType vatType,
139
    VatType vatType,
133
    String stateCode)
140
    String stateCode,
-
 
141
    String shortName)
134
  {
142
  {
135
    this();
143
    this();
136
    this.id = id;
144
    this.id = id;
137
    setIdIsSet(true);
145
    setIdIsSet(true);
138
    this.stateName = stateName;
146
    this.stateName = stateName;
139
    this.vatType = vatType;
147
    this.vatType = vatType;
140
    this.stateCode = stateCode;
148
    this.stateCode = stateCode;
-
 
149
    this.shortName = shortName;
141
  }
150
  }
142
 
151
 
143
  /**
152
  /**
144
   * Performs a deep copy on <i>other</i>.
153
   * Performs a deep copy on <i>other</i>.
145
   */
154
   */
Line 154... Line 163...
154
      this.vatType = other.vatType;
163
      this.vatType = other.vatType;
155
    }
164
    }
156
    if (other.isSetStateCode()) {
165
    if (other.isSetStateCode()) {
157
      this.stateCode = other.stateCode;
166
      this.stateCode = other.stateCode;
158
    }
167
    }
-
 
168
    if (other.isSetShortName()) {
-
 
169
      this.shortName = other.shortName;
-
 
170
    }
159
  }
171
  }
160
 
172
 
161
  public StateInfo deepCopy() {
173
  public StateInfo deepCopy() {
162
    return new StateInfo(this);
174
    return new StateInfo(this);
163
  }
175
  }
Line 167... Line 179...
167
    setIdIsSet(false);
179
    setIdIsSet(false);
168
    this.id = 0;
180
    this.id = 0;
169
    this.stateName = null;
181
    this.stateName = null;
170
    this.vatType = null;
182
    this.vatType = null;
171
    this.stateCode = null;
183
    this.stateCode = null;
-
 
184
    this.shortName = null;
172
  }
185
  }
173
 
186
 
174
  public long getId() {
187
  public long getId() {
175
    return this.id;
188
    return this.id;
176
  }
189
  }
Line 268... Line 281...
268
    if (!value) {
281
    if (!value) {
269
      this.stateCode = null;
282
      this.stateCode = null;
270
    }
283
    }
271
  }
284
  }
272
 
285
 
-
 
286
  public String getShortName() {
-
 
287
    return this.shortName;
-
 
288
  }
-
 
289
 
-
 
290
  public void setShortName(String shortName) {
-
 
291
    this.shortName = shortName;
-
 
292
  }
-
 
293
 
-
 
294
  public void unsetShortName() {
-
 
295
    this.shortName = null;
-
 
296
  }
-
 
297
 
-
 
298
  /** Returns true if field shortName is set (has been assigned a value) and false otherwise */
-
 
299
  public boolean isSetShortName() {
-
 
300
    return this.shortName != null;
-
 
301
  }
-
 
302
 
-
 
303
  public void setShortNameIsSet(boolean value) {
-
 
304
    if (!value) {
-
 
305
      this.shortName = null;
-
 
306
    }
-
 
307
  }
-
 
308
 
273
  public void setFieldValue(_Fields field, Object value) {
309
  public void setFieldValue(_Fields field, Object value) {
274
    switch (field) {
310
    switch (field) {
275
    case ID:
311
    case ID:
276
      if (value == null) {
312
      if (value == null) {
277
        unsetId();
313
        unsetId();
Line 302... Line 338...
302
      } else {
338
      } else {
303
        setStateCode((String)value);
339
        setStateCode((String)value);
304
      }
340
      }
305
      break;
341
      break;
306
 
342
 
-
 
343
    case SHORT_NAME:
-
 
344
      if (value == null) {
-
 
345
        unsetShortName();
-
 
346
      } else {
-
 
347
        setShortName((String)value);
-
 
348
      }
-
 
349
      break;
-
 
350
 
307
    }
351
    }
308
  }
352
  }
309
 
353
 
310
  public Object getFieldValue(_Fields field) {
354
  public Object getFieldValue(_Fields field) {
311
    switch (field) {
355
    switch (field) {
Line 319... Line 363...
319
      return getVatType();
363
      return getVatType();
320
 
364
 
321
    case STATE_CODE:
365
    case STATE_CODE:
322
      return getStateCode();
366
      return getStateCode();
323
 
367
 
-
 
368
    case SHORT_NAME:
-
 
369
      return getShortName();
-
 
370
 
324
    }
371
    }
325
    throw new IllegalStateException();
372
    throw new IllegalStateException();
326
  }
373
  }
327
 
374
 
328
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
375
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 338... Line 385...
338
      return isSetStateName();
385
      return isSetStateName();
339
    case VAT_TYPE:
386
    case VAT_TYPE:
340
      return isSetVatType();
387
      return isSetVatType();
341
    case STATE_CODE:
388
    case STATE_CODE:
342
      return isSetStateCode();
389
      return isSetStateCode();
-
 
390
    case SHORT_NAME:
-
 
391
      return isSetShortName();
343
    }
392
    }
344
    throw new IllegalStateException();
393
    throw new IllegalStateException();
345
  }
394
  }
346
 
395
 
347
  @Override
396
  @Override
Line 391... Line 440...
391
        return false;
440
        return false;
392
      if (!this.stateCode.equals(that.stateCode))
441
      if (!this.stateCode.equals(that.stateCode))
393
        return false;
442
        return false;
394
    }
443
    }
395
 
444
 
-
 
445
    boolean this_present_shortName = true && this.isSetShortName();
-
 
446
    boolean that_present_shortName = true && that.isSetShortName();
-
 
447
    if (this_present_shortName || that_present_shortName) {
-
 
448
      if (!(this_present_shortName && that_present_shortName))
-
 
449
        return false;
-
 
450
      if (!this.shortName.equals(that.shortName))
-
 
451
        return false;
-
 
452
    }
-
 
453
 
396
    return true;
454
    return true;
397
  }
455
  }
398
 
456
 
399
  @Override
457
  @Override
400
  public int hashCode() {
458
  public int hashCode() {
Line 447... Line 505...
447
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateCode, typedOther.stateCode);
505
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateCode, typedOther.stateCode);
448
      if (lastComparison != 0) {
506
      if (lastComparison != 0) {
449
        return lastComparison;
507
        return lastComparison;
450
      }
508
      }
451
    }
509
    }
-
 
510
    lastComparison = Boolean.valueOf(isSetShortName()).compareTo(typedOther.isSetShortName());
-
 
511
    if (lastComparison != 0) {
-
 
512
      return lastComparison;
-
 
513
    }
-
 
514
    if (isSetShortName()) {
-
 
515
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shortName, typedOther.shortName);
-
 
516
      if (lastComparison != 0) {
-
 
517
        return lastComparison;
-
 
518
      }
-
 
519
    }
452
    return 0;
520
    return 0;
453
  }
521
  }
454
 
522
 
455
  public _Fields fieldForId(int fieldId) {
523
  public _Fields fieldForId(int fieldId) {
456
    return _Fields.findByThriftId(fieldId);
524
    return _Fields.findByThriftId(fieldId);
Line 493... Line 561...
493
            this.stateCode = iprot.readString();
561
            this.stateCode = iprot.readString();
494
          } else { 
562
          } else { 
495
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
563
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
496
          }
564
          }
497
          break;
565
          break;
-
 
566
        case 5: // SHORT_NAME
-
 
567
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
568
            this.shortName = iprot.readString();
-
 
569
          } else { 
-
 
570
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
571
          }
-
 
572
          break;
498
        default:
573
        default:
499
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
574
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
500
      }
575
      }
501
      iprot.readFieldEnd();
576
      iprot.readFieldEnd();
502
    }
577
    }
Line 524... Line 599...
524
    if (this.stateCode != null) {
599
    if (this.stateCode != null) {
525
      oprot.writeFieldBegin(STATE_CODE_FIELD_DESC);
600
      oprot.writeFieldBegin(STATE_CODE_FIELD_DESC);
526
      oprot.writeString(this.stateCode);
601
      oprot.writeString(this.stateCode);
527
      oprot.writeFieldEnd();
602
      oprot.writeFieldEnd();
528
    }
603
    }
-
 
604
    if (this.shortName != null) {
-
 
605
      oprot.writeFieldBegin(SHORT_NAME_FIELD_DESC);
-
 
606
      oprot.writeString(this.shortName);
-
 
607
      oprot.writeFieldEnd();
-
 
608
    }
529
    oprot.writeFieldStop();
609
    oprot.writeFieldStop();
530
    oprot.writeStructEnd();
610
    oprot.writeStructEnd();
531
  }
611
  }
532
 
612
 
533
  @Override
613
  @Override
Line 560... Line 640...
560
      sb.append("null");
640
      sb.append("null");
561
    } else {
641
    } else {
562
      sb.append(this.stateCode);
642
      sb.append(this.stateCode);
563
    }
643
    }
564
    first = false;
644
    first = false;
-
 
645
    if (!first) sb.append(", ");
-
 
646
    sb.append("shortName:");
-
 
647
    if (this.shortName == null) {
-
 
648
      sb.append("null");
-
 
649
    } else {
-
 
650
      sb.append(this.shortName);
-
 
651
    }
-
 
652
    first = false;
565
    sb.append(")");
653
    sb.append(")");
566
    return sb.toString();
654
    return sb.toString();
567
  }
655
  }
568
 
656
 
569
  public void validate() throws org.apache.thrift.TException {
657
  public void validate() throws org.apache.thrift.TException {