Subversion Repositories SmartDukaan

Rev

Rev 1969 | Rev 4431 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1969 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.catalog;
6
package in.shop2020.model.v1.catalog;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
public class Category implements TBase<Category._Fields>, java.io.Serializable, Cloneable, Comparable<Category> {
23
public class Category implements org.apache.thrift.TBase<Category, Category._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("Category");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Category");
28
 
25
 
29
  private static final TField ID_FIELD_DESC = new TField("id", 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);
30
  private static final TField LABEL_FIELD_DESC = new TField("label", TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.STRING, (short)2);
31
  private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
28
  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3);
32
  private static final TField PARENT_CATEGORY_ID_FIELD_DESC = new TField("parent_category_id", TType.I64, (short)4);
29
  private static final org.apache.thrift.protocol.TField PARENT_CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_category_id", org.apache.thrift.protocol.TType.I64, (short)4);
33
  private static final TField CHILDREN_CATEGORY_IDS_FIELD_DESC = new TField("children_category_ids", TType.LIST, (short)5);
30
  private static final org.apache.thrift.protocol.TField CHILDREN_CATEGORY_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("children_category_ids", org.apache.thrift.protocol.TType.LIST, (short)5);
34
 
31
 
35
  private long id;
32
  private long id; // required
36
  private String label;
33
  private String label; // required
37
  private String description;
34
  private String description; // required
38
  private long parent_category_id;
35
  private long parent_category_id; // required
39
  private List<Long> children_category_ids;
36
  private List<Long> children_category_ids; // required
40
 
37
 
41
  /** 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. */
42
  public enum _Fields implements TFieldIdEnum {
39
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
43
    ID((short)1, "id"),
40
    ID((short)1, "id"),
44
    LABEL((short)2, "label"),
41
    LABEL((short)2, "label"),
45
    DESCRIPTION((short)3, "description"),
42
    DESCRIPTION((short)3, "description"),
46
    PARENT_CATEGORY_ID((short)4, "parent_category_id"),
43
    PARENT_CATEGORY_ID((short)4, "parent_category_id"),
47
    /**
44
    /**
48
     * This field should not be used.
45
     * This field should not be used.
49
     */
46
     */
50
    CHILDREN_CATEGORY_IDS((short)5, "children_category_ids");
47
    CHILDREN_CATEGORY_IDS((short)5, "children_category_ids");
51
 
48
 
52
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
53
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
54
 
50
 
55
    static {
51
    static {
56
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
57
        byId.put((int)field._thriftId, field);
-
 
58
        byName.put(field.getFieldName(), field);
53
        byName.put(field.getFieldName(), field);
59
      }
54
      }
60
    }
55
    }
61
 
56
 
62
    /**
57
    /**
63
     * Find the _Fields constant that matches fieldId, or null if its not found.
58
     * Find the _Fields constant that matches fieldId, or null if its not found.
64
     */
59
     */
65
    public static _Fields findByThriftId(int fieldId) {
60
    public static _Fields findByThriftId(int fieldId) {
66
      return byId.get(fieldId);
61
      switch(fieldId) {
-
 
62
        case 1: // ID
-
 
63
          return ID;
-
 
64
        case 2: // LABEL
-
 
65
          return LABEL;
-
 
66
        case 3: // DESCRIPTION
-
 
67
          return DESCRIPTION;
-
 
68
        case 4: // PARENT_CATEGORY_ID
-
 
69
          return PARENT_CATEGORY_ID;
-
 
70
        case 5: // CHILDREN_CATEGORY_IDS
-
 
71
          return CHILDREN_CATEGORY_IDS;
-
 
72
        default:
-
 
73
          return null;
-
 
74
      }
67
    }
75
    }
68
 
76
 
69
    /**
77
    /**
70
     * Find the _Fields constant that matches fieldId, throwing an exception
78
     * Find the _Fields constant that matches fieldId, throwing an exception
71
     * if it is not found.
79
     * if it is not found.
Line 103... Line 111...
103
  // isset id assignments
111
  // isset id assignments
104
  private static final int __ID_ISSET_ID = 0;
112
  private static final int __ID_ISSET_ID = 0;
105
  private static final int __PARENT_CATEGORY_ID_ISSET_ID = 1;
113
  private static final int __PARENT_CATEGORY_ID_ISSET_ID = 1;
106
  private BitSet __isset_bit_vector = new BitSet(2);
114
  private BitSet __isset_bit_vector = new BitSet(2);
107
 
115
 
108
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
116
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
109
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
-
 
110
        new FieldValueMetaData(TType.I64)));
-
 
111
    put(_Fields.LABEL, new FieldMetaData("label", TFieldRequirementType.DEFAULT, 
-
 
112
        new FieldValueMetaData(TType.STRING)));
-
 
113
    put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
-
 
114
        new FieldValueMetaData(TType.STRING)));
-
 
115
    put(_Fields.PARENT_CATEGORY_ID, new FieldMetaData("parent_category_id", TFieldRequirementType.DEFAULT, 
-
 
116
        new FieldValueMetaData(TType.I64)));
-
 
117
    put(_Fields.CHILDREN_CATEGORY_IDS, new FieldMetaData("children_category_ids", TFieldRequirementType.DEFAULT, 
-
 
118
        new ListMetaData(TType.LIST, 
-
 
119
            new FieldValueMetaData(TType.I64))));
-
 
120
  }});
-
 
121
 
-
 
122
  static {
117
  static {
-
 
118
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
119
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
120
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
121
    tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
122
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
123
    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
124
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
125
    tmpMap.put(_Fields.PARENT_CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("parent_category_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
126
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
127
    tmpMap.put(_Fields.CHILDREN_CATEGORY_IDS, new org.apache.thrift.meta_data.FieldMetaData("children_category_ids", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
128
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
129
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
-
 
130
    metaDataMap = Collections.unmodifiableMap(tmpMap);
123
    FieldMetaData.addStructMetaDataMap(Category.class, metaDataMap);
131
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Category.class, metaDataMap);
124
  }
132
  }
125
 
133
 
126
  public Category() {
134
  public Category() {
127
  }
135
  }
128
 
136
 
Line 168... Line 176...
168
 
176
 
169
  public Category deepCopy() {
177
  public Category deepCopy() {
170
    return new Category(this);
178
    return new Category(this);
171
  }
179
  }
172
 
180
 
173
  @Deprecated
181
  @Override
174
  public Category clone() {
182
  public void clear() {
-
 
183
    setIdIsSet(false);
-
 
184
    this.id = 0;
-
 
185
    this.label = null;
-
 
186
    this.description = null;
-
 
187
    setParent_category_idIsSet(false);
175
    return new Category(this);
188
    this.parent_category_id = 0;
-
 
189
    this.children_category_ids = null;
176
  }
190
  }
177
 
191
 
178
  public long getId() {
192
  public long getId() {
179
    return this.id;
193
    return this.id;
180
  }
194
  }
181
 
195
 
182
  public Category setId(long id) {
196
  public void setId(long id) {
183
    this.id = id;
197
    this.id = id;
184
    setIdIsSet(true);
198
    setIdIsSet(true);
185
    return this;
-
 
186
  }
199
  }
187
 
200
 
188
  public void unsetId() {
201
  public void unsetId() {
189
    __isset_bit_vector.clear(__ID_ISSET_ID);
202
    __isset_bit_vector.clear(__ID_ISSET_ID);
190
  }
203
  }
191
 
204
 
192
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
205
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
193
  public boolean isSetId() {
206
  public boolean isSetId() {
194
    return __isset_bit_vector.get(__ID_ISSET_ID);
207
    return __isset_bit_vector.get(__ID_ISSET_ID);
195
  }
208
  }
196
 
209
 
197
  public void setIdIsSet(boolean value) {
210
  public void setIdIsSet(boolean value) {
Line 200... Line 213...
200
 
213
 
201
  public String getLabel() {
214
  public String getLabel() {
202
    return this.label;
215
    return this.label;
203
  }
216
  }
204
 
217
 
205
  public Category setLabel(String label) {
218
  public void setLabel(String label) {
206
    this.label = label;
219
    this.label = label;
207
    return this;
-
 
208
  }
220
  }
209
 
221
 
210
  public void unsetLabel() {
222
  public void unsetLabel() {
211
    this.label = null;
223
    this.label = null;
212
  }
224
  }
213
 
225
 
214
  /** Returns true if field label is set (has been asigned a value) and false otherwise */
226
  /** Returns true if field label is set (has been assigned a value) and false otherwise */
215
  public boolean isSetLabel() {
227
  public boolean isSetLabel() {
216
    return this.label != null;
228
    return this.label != null;
217
  }
229
  }
218
 
230
 
219
  public void setLabelIsSet(boolean value) {
231
  public void setLabelIsSet(boolean value) {
Line 224... Line 236...
224
 
236
 
225
  public String getDescription() {
237
  public String getDescription() {
226
    return this.description;
238
    return this.description;
227
  }
239
  }
228
 
240
 
229
  public Category setDescription(String description) {
241
  public void setDescription(String description) {
230
    this.description = description;
242
    this.description = description;
231
    return this;
-
 
232
  }
243
  }
233
 
244
 
234
  public void unsetDescription() {
245
  public void unsetDescription() {
235
    this.description = null;
246
    this.description = null;
236
  }
247
  }
237
 
248
 
238
  /** Returns true if field description is set (has been asigned a value) and false otherwise */
249
  /** Returns true if field description is set (has been assigned a value) and false otherwise */
239
  public boolean isSetDescription() {
250
  public boolean isSetDescription() {
240
    return this.description != null;
251
    return this.description != null;
241
  }
252
  }
242
 
253
 
243
  public void setDescriptionIsSet(boolean value) {
254
  public void setDescriptionIsSet(boolean value) {
Line 248... Line 259...
248
 
259
 
249
  public long getParent_category_id() {
260
  public long getParent_category_id() {
250
    return this.parent_category_id;
261
    return this.parent_category_id;
251
  }
262
  }
252
 
263
 
253
  public Category setParent_category_id(long parent_category_id) {
264
  public void setParent_category_id(long parent_category_id) {
254
    this.parent_category_id = parent_category_id;
265
    this.parent_category_id = parent_category_id;
255
    setParent_category_idIsSet(true);
266
    setParent_category_idIsSet(true);
256
    return this;
-
 
257
  }
267
  }
258
 
268
 
259
  public void unsetParent_category_id() {
269
  public void unsetParent_category_id() {
260
    __isset_bit_vector.clear(__PARENT_CATEGORY_ID_ISSET_ID);
270
    __isset_bit_vector.clear(__PARENT_CATEGORY_ID_ISSET_ID);
261
  }
271
  }
262
 
272
 
263
  /** Returns true if field parent_category_id is set (has been asigned a value) and false otherwise */
273
  /** Returns true if field parent_category_id is set (has been assigned a value) and false otherwise */
264
  public boolean isSetParent_category_id() {
274
  public boolean isSetParent_category_id() {
265
    return __isset_bit_vector.get(__PARENT_CATEGORY_ID_ISSET_ID);
275
    return __isset_bit_vector.get(__PARENT_CATEGORY_ID_ISSET_ID);
266
  }
276
  }
267
 
277
 
268
  public void setParent_category_idIsSet(boolean value) {
278
  public void setParent_category_idIsSet(boolean value) {
Line 292... Line 302...
292
  }
302
  }
293
 
303
 
294
  /**
304
  /**
295
   * This field should not be used.
305
   * This field should not be used.
296
   */
306
   */
297
  public Category setChildren_category_ids(List<Long> children_category_ids) {
307
  public void setChildren_category_ids(List<Long> children_category_ids) {
298
    this.children_category_ids = children_category_ids;
308
    this.children_category_ids = children_category_ids;
299
    return this;
-
 
300
  }
309
  }
301
 
310
 
302
  public void unsetChildren_category_ids() {
311
  public void unsetChildren_category_ids() {
303
    this.children_category_ids = null;
312
    this.children_category_ids = null;
304
  }
313
  }
305
 
314
 
306
  /** Returns true if field children_category_ids is set (has been asigned a value) and false otherwise */
315
  /** Returns true if field children_category_ids is set (has been assigned a value) and false otherwise */
307
  public boolean isSetChildren_category_ids() {
316
  public boolean isSetChildren_category_ids() {
308
    return this.children_category_ids != null;
317
    return this.children_category_ids != null;
309
  }
318
  }
310
 
319
 
311
  public void setChildren_category_idsIsSet(boolean value) {
320
  public void setChildren_category_idsIsSet(boolean value) {
Line 357... Line 366...
357
      break;
366
      break;
358
 
367
 
359
    }
368
    }
360
  }
369
  }
361
 
370
 
362
  public void setFieldValue(int fieldID, Object value) {
-
 
363
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
364
  }
-
 
365
 
-
 
366
  public Object getFieldValue(_Fields field) {
371
  public Object getFieldValue(_Fields field) {
367
    switch (field) {
372
    switch (field) {
368
    case ID:
373
    case ID:
369
      return new Long(getId());
374
      return Long.valueOf(getId());
370
 
375
 
371
    case LABEL:
376
    case LABEL:
372
      return getLabel();
377
      return getLabel();
373
 
378
 
374
    case DESCRIPTION:
379
    case DESCRIPTION:
375
      return getDescription();
380
      return getDescription();
376
 
381
 
377
    case PARENT_CATEGORY_ID:
382
    case PARENT_CATEGORY_ID:
378
      return new Long(getParent_category_id());
383
      return Long.valueOf(getParent_category_id());
379
 
384
 
380
    case CHILDREN_CATEGORY_IDS:
385
    case CHILDREN_CATEGORY_IDS:
381
      return getChildren_category_ids();
386
      return getChildren_category_ids();
382
 
387
 
383
    }
388
    }
384
    throw new IllegalStateException();
389
    throw new IllegalStateException();
385
  }
390
  }
386
 
391
 
387
  public Object getFieldValue(int fieldId) {
-
 
388
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
389
  }
-
 
390
 
-
 
391
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
392
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
392
  public boolean isSet(_Fields field) {
393
  public boolean isSet(_Fields field) {
-
 
394
    if (field == null) {
-
 
395
      throw new IllegalArgumentException();
-
 
396
    }
-
 
397
 
393
    switch (field) {
398
    switch (field) {
394
    case ID:
399
    case ID:
395
      return isSetId();
400
      return isSetId();
396
    case LABEL:
401
    case LABEL:
397
      return isSetLabel();
402
      return isSetLabel();
Line 403... Line 408...
403
      return isSetChildren_category_ids();
408
      return isSetChildren_category_ids();
404
    }
409
    }
405
    throw new IllegalStateException();
410
    throw new IllegalStateException();
406
  }
411
  }
407
 
412
 
408
  public boolean isSet(int fieldID) {
-
 
409
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
410
  }
-
 
411
 
-
 
412
  @Override
413
  @Override
413
  public boolean equals(Object that) {
414
  public boolean equals(Object that) {
414
    if (that == null)
415
    if (that == null)
415
      return false;
416
      return false;
416
    if (that instanceof Category)
417
    if (that instanceof Category)
Line 481... Line 482...
481
    }
482
    }
482
 
483
 
483
    int lastComparison = 0;
484
    int lastComparison = 0;
484
    Category typedOther = (Category)other;
485
    Category typedOther = (Category)other;
485
 
486
 
486
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
487
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
487
    if (lastComparison != 0) {
488
    if (lastComparison != 0) {
488
      return lastComparison;
489
      return lastComparison;
489
    }
490
    }
-
 
491
    if (isSetId()) {
490
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
492
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
491
    if (lastComparison != 0) {
493
      if (lastComparison != 0) {
492
      return lastComparison;
494
        return lastComparison;
-
 
495
      }
493
    }
496
    }
494
    lastComparison = Boolean.valueOf(isSetLabel()).compareTo(isSetLabel());
497
    lastComparison = Boolean.valueOf(isSetLabel()).compareTo(typedOther.isSetLabel());
495
    if (lastComparison != 0) {
498
    if (lastComparison != 0) {
496
      return lastComparison;
499
      return lastComparison;
497
    }
500
    }
-
 
501
    if (isSetLabel()) {
498
    lastComparison = TBaseHelper.compareTo(label, typedOther.label);
502
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, typedOther.label);
499
    if (lastComparison != 0) {
503
      if (lastComparison != 0) {
500
      return lastComparison;
504
        return lastComparison;
-
 
505
      }
501
    }
506
    }
502
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
507
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
503
    if (lastComparison != 0) {
508
    if (lastComparison != 0) {
504
      return lastComparison;
509
      return lastComparison;
505
    }
510
    }
-
 
511
    if (isSetDescription()) {
506
    lastComparison = TBaseHelper.compareTo(description, typedOther.description);
512
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
507
    if (lastComparison != 0) {
513
      if (lastComparison != 0) {
508
      return lastComparison;
514
        return lastComparison;
-
 
515
      }
509
    }
516
    }
510
    lastComparison = Boolean.valueOf(isSetParent_category_id()).compareTo(isSetParent_category_id());
517
    lastComparison = Boolean.valueOf(isSetParent_category_id()).compareTo(typedOther.isSetParent_category_id());
511
    if (lastComparison != 0) {
518
    if (lastComparison != 0) {
512
      return lastComparison;
519
      return lastComparison;
513
    }
520
    }
-
 
521
    if (isSetParent_category_id()) {
514
    lastComparison = TBaseHelper.compareTo(parent_category_id, typedOther.parent_category_id);
522
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_category_id, typedOther.parent_category_id);
515
    if (lastComparison != 0) {
523
      if (lastComparison != 0) {
516
      return lastComparison;
524
        return lastComparison;
-
 
525
      }
517
    }
526
    }
518
    lastComparison = Boolean.valueOf(isSetChildren_category_ids()).compareTo(isSetChildren_category_ids());
527
    lastComparison = Boolean.valueOf(isSetChildren_category_ids()).compareTo(typedOther.isSetChildren_category_ids());
519
    if (lastComparison != 0) {
528
    if (lastComparison != 0) {
520
      return lastComparison;
529
      return lastComparison;
521
    }
530
    }
-
 
531
    if (isSetChildren_category_ids()) {
522
    lastComparison = TBaseHelper.compareTo(children_category_ids, typedOther.children_category_ids);
532
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.children_category_ids, typedOther.children_category_ids);
523
    if (lastComparison != 0) {
533
      if (lastComparison != 0) {
524
      return lastComparison;
534
        return lastComparison;
-
 
535
      }
525
    }
536
    }
526
    return 0;
537
    return 0;
527
  }
538
  }
528
 
539
 
-
 
540
  public _Fields fieldForId(int fieldId) {
-
 
541
    return _Fields.findByThriftId(fieldId);
-
 
542
  }
-
 
543
 
529
  public void read(TProtocol iprot) throws TException {
544
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
530
    TField field;
545
    org.apache.thrift.protocol.TField field;
531
    iprot.readStructBegin();
546
    iprot.readStructBegin();
532
    while (true)
547
    while (true)
533
    {
548
    {
534
      field = iprot.readFieldBegin();
549
      field = iprot.readFieldBegin();
535
      if (field.type == TType.STOP) { 
550
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
536
        break;
551
        break;
537
      }
552
      }
538
      _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
539
      if (fieldId == null) {
-
 
540
        TProtocolUtil.skip(iprot, field.type);
-
 
541
      } else {
-
 
542
        switch (fieldId) {
553
      switch (field.id) {
543
          case ID:
554
        case 1: // ID
544
            if (field.type == TType.I64) {
555
          if (field.type == org.apache.thrift.protocol.TType.I64) {
545
              this.id = iprot.readI64();
556
            this.id = iprot.readI64();
546
              setIdIsSet(true);
557
            setIdIsSet(true);
547
            } else { 
558
          } else { 
548
              TProtocolUtil.skip(iprot, field.type);
559
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
549
            }
560
          }
550
            break;
561
          break;
551
          case LABEL:
562
        case 2: // LABEL
552
            if (field.type == TType.STRING) {
563
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
553
              this.label = iprot.readString();
564
            this.label = iprot.readString();
554
            } else { 
565
          } else { 
555
              TProtocolUtil.skip(iprot, field.type);
566
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
556
            }
567
          }
557
            break;
568
          break;
558
          case DESCRIPTION:
569
        case 3: // DESCRIPTION
559
            if (field.type == TType.STRING) {
570
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
560
              this.description = iprot.readString();
571
            this.description = iprot.readString();
561
            } else { 
572
          } else { 
562
              TProtocolUtil.skip(iprot, field.type);
573
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
563
            }
574
          }
564
            break;
575
          break;
565
          case PARENT_CATEGORY_ID:
576
        case 4: // PARENT_CATEGORY_ID
566
            if (field.type == TType.I64) {
577
          if (field.type == org.apache.thrift.protocol.TType.I64) {
567
              this.parent_category_id = iprot.readI64();
578
            this.parent_category_id = iprot.readI64();
568
              setParent_category_idIsSet(true);
579
            setParent_category_idIsSet(true);
569
            } else { 
580
          } else { 
570
              TProtocolUtil.skip(iprot, field.type);
581
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
571
            }
582
          }
572
            break;
583
          break;
573
          case CHILDREN_CATEGORY_IDS:
584
        case 5: // CHILDREN_CATEGORY_IDS
574
            if (field.type == TType.LIST) {
585
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
586
            {
-
 
587
              org.apache.thrift.protocol.TList _list10 = iprot.readListBegin();
-
 
588
              this.children_category_ids = new ArrayList<Long>(_list10.size);
-
 
589
              for (int _i11 = 0; _i11 < _list10.size; ++_i11)
575
              {
590
              {
576
                TList _list10 = iprot.readListBegin();
-
 
577
                this.children_category_ids = new ArrayList<Long>(_list10.size);
-
 
578
                for (int _i11 = 0; _i11 < _list10.size; ++_i11)
-
 
579
                {
-
 
580
                  long _elem12;
591
                long _elem12; // required
581
                  _elem12 = iprot.readI64();
592
                _elem12 = iprot.readI64();
582
                  this.children_category_ids.add(_elem12);
593
                this.children_category_ids.add(_elem12);
583
                }
-
 
584
                iprot.readListEnd();
-
 
585
              }
594
              }
586
            } else { 
595
              iprot.readListEnd();
587
              TProtocolUtil.skip(iprot, field.type);
-
 
588
            }
596
            }
589
            break;
597
          } else { 
-
 
598
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
590
        }
599
          }
591
        iprot.readFieldEnd();
600
          break;
-
 
601
        default:
-
 
602
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
592
      }
603
      }
-
 
604
      iprot.readFieldEnd();
593
    }
605
    }
594
    iprot.readStructEnd();
606
    iprot.readStructEnd();
595
    validate();
607
    validate();
596
  }
608
  }
597
 
609
 
598
  public void write(TProtocol oprot) throws TException {
610
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
599
    validate();
611
    validate();
600
 
612
 
601
    oprot.writeStructBegin(STRUCT_DESC);
613
    oprot.writeStructBegin(STRUCT_DESC);
602
    oprot.writeFieldBegin(ID_FIELD_DESC);
614
    oprot.writeFieldBegin(ID_FIELD_DESC);
603
    oprot.writeI64(this.id);
615
    oprot.writeI64(this.id);
Line 616... Line 628...
616
    oprot.writeI64(this.parent_category_id);
628
    oprot.writeI64(this.parent_category_id);
617
    oprot.writeFieldEnd();
629
    oprot.writeFieldEnd();
618
    if (this.children_category_ids != null) {
630
    if (this.children_category_ids != null) {
619
      oprot.writeFieldBegin(CHILDREN_CATEGORY_IDS_FIELD_DESC);
631
      oprot.writeFieldBegin(CHILDREN_CATEGORY_IDS_FIELD_DESC);
620
      {
632
      {
621
        oprot.writeListBegin(new TList(TType.I64, this.children_category_ids.size()));
633
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.children_category_ids.size()));
622
        for (long _iter13 : this.children_category_ids)
634
        for (long _iter13 : this.children_category_ids)
623
        {
635
        {
624
          oprot.writeI64(_iter13);
636
          oprot.writeI64(_iter13);
625
        }
637
        }
626
        oprot.writeListEnd();
638
        oprot.writeListEnd();
Line 669... Line 681...
669
    first = false;
681
    first = false;
670
    sb.append(")");
682
    sb.append(")");
671
    return sb.toString();
683
    return sb.toString();
672
  }
684
  }
673
 
685
 
674
  public void validate() throws TException {
686
  public void validate() throws org.apache.thrift.TException {
675
    // check for required fields
687
    // check for required fields
676
  }
688
  }
677
 
689
 
-
 
690
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
691
    try {
-
 
692
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
693
    } catch (org.apache.thrift.TException te) {
-
 
694
      throw new java.io.IOException(te);
-
 
695
    }
-
 
696
  }
-
 
697
 
-
 
698
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
699
    try {
-
 
700
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
701
      __isset_bit_vector = new BitSet(1);
-
 
702
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
703
    } catch (org.apache.thrift.TException te) {
-
 
704
      throw new java.io.IOException(te);
-
 
705
    }
-
 
706
  }
-
 
707
 
678
}
708
}
679
 
709