Subversion Repositories SmartDukaan

Rev

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

Rev 1860 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.user;
6
package in.shop2020.model.v1.user;
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 Affiliate implements TBase<Affiliate._Fields>, java.io.Serializable, Cloneable, Comparable<Affiliate> {
23
public class Affiliate implements org.apache.thrift.TBase<Affiliate, Affiliate._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("Affiliate");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Affiliate");
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 NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2);
27
  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)2);
31
  private static final TField URL_FIELD_DESC = new TField("url", TType.STRING, (short)3);
28
  private static final org.apache.thrift.protocol.TField URL_FIELD_DESC = new org.apache.thrift.protocol.TField("url", org.apache.thrift.protocol.TType.STRING, (short)3);
32
  private static final TField MASTER_AFFILIATE_ID_FIELD_DESC = new TField("masterAffiliateId", TType.I64, (short)4);
29
  private static final org.apache.thrift.protocol.TField MASTER_AFFILIATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("masterAffiliateId", org.apache.thrift.protocol.TType.I64, (short)4);
33
  private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)5);
30
  private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)5);
34
 
31
 
35
  private long id;
32
  private long id; // required
36
  private String name;
33
  private String name; // required
37
  private String url;
34
  private String url; // required
38
  private long masterAffiliateId;
35
  private long masterAffiliateId; // required
39
  private long addedOn;
36
  private long addedOn; // 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
    NAME((short)2, "name"),
41
    NAME((short)2, "name"),
45
    URL((short)3, "url"),
42
    URL((short)3, "url"),
46
    MASTER_AFFILIATE_ID((short)4, "masterAffiliateId"),
43
    MASTER_AFFILIATE_ID((short)4, "masterAffiliateId"),
47
    ADDED_ON((short)5, "addedOn");
44
    ADDED_ON((short)5, "addedOn");
48
 
45
 
49
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
50
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
51
 
47
 
52
    static {
48
    static {
53
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
54
        byId.put((int)field._thriftId, field);
-
 
55
        byName.put(field.getFieldName(), field);
50
        byName.put(field.getFieldName(), field);
56
      }
51
      }
57
    }
52
    }
58
 
53
 
59
    /**
54
    /**
60
     * Find the _Fields constant that matches fieldId, or null if its not found.
55
     * Find the _Fields constant that matches fieldId, or null if its not found.
61
     */
56
     */
62
    public static _Fields findByThriftId(int fieldId) {
57
    public static _Fields findByThriftId(int fieldId) {
63
      return byId.get(fieldId);
58
      switch(fieldId) {
-
 
59
        case 1: // ID
-
 
60
          return ID;
-
 
61
        case 2: // NAME
-
 
62
          return NAME;
-
 
63
        case 3: // URL
-
 
64
          return URL;
-
 
65
        case 4: // MASTER_AFFILIATE_ID
-
 
66
          return MASTER_AFFILIATE_ID;
-
 
67
        case 5: // ADDED_ON
-
 
68
          return ADDED_ON;
-
 
69
        default:
-
 
70
          return null;
-
 
71
      }
64
    }
72
    }
65
 
73
 
66
    /**
74
    /**
67
     * Find the _Fields constant that matches fieldId, throwing an exception
75
     * Find the _Fields constant that matches fieldId, throwing an exception
68
     * if it is not found.
76
     * if it is not found.
Line 101... Line 109...
101
  private static final int __ID_ISSET_ID = 0;
109
  private static final int __ID_ISSET_ID = 0;
102
  private static final int __MASTERAFFILIATEID_ISSET_ID = 1;
110
  private static final int __MASTERAFFILIATEID_ISSET_ID = 1;
103
  private static final int __ADDEDON_ISSET_ID = 2;
111
  private static final int __ADDEDON_ISSET_ID = 2;
104
  private BitSet __isset_bit_vector = new BitSet(3);
112
  private BitSet __isset_bit_vector = new BitSet(3);
105
 
113
 
106
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
114
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
107
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
-
 
108
        new FieldValueMetaData(TType.I64)));
-
 
109
    put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, 
-
 
110
        new FieldValueMetaData(TType.STRING)));
-
 
111
    put(_Fields.URL, new FieldMetaData("url", TFieldRequirementType.DEFAULT, 
-
 
112
        new FieldValueMetaData(TType.STRING)));
-
 
113
    put(_Fields.MASTER_AFFILIATE_ID, new FieldMetaData("masterAffiliateId", TFieldRequirementType.DEFAULT, 
-
 
114
        new FieldValueMetaData(TType.I64)));
-
 
115
    put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT, 
-
 
116
        new FieldValueMetaData(TType.I64)));
-
 
117
  }});
-
 
118
 
-
 
119
  static {
115
  static {
-
 
116
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
117
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
118
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
119
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
120
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
121
    tmpMap.put(_Fields.URL, new org.apache.thrift.meta_data.FieldMetaData("url", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
122
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
123
    tmpMap.put(_Fields.MASTER_AFFILIATE_ID, new org.apache.thrift.meta_data.FieldMetaData("masterAffiliateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
124
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
125
    tmpMap.put(_Fields.ADDED_ON, new org.apache.thrift.meta_data.FieldMetaData("addedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
126
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
127
    metaDataMap = Collections.unmodifiableMap(tmpMap);
120
    FieldMetaData.addStructMetaDataMap(Affiliate.class, metaDataMap);
128
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Affiliate.class, metaDataMap);
121
  }
129
  }
122
 
130
 
123
  public Affiliate() {
131
  public Affiliate() {
124
  }
132
  }
125
 
133
 
Line 160... Line 168...
160
 
168
 
161
  public Affiliate deepCopy() {
169
  public Affiliate deepCopy() {
162
    return new Affiliate(this);
170
    return new Affiliate(this);
163
  }
171
  }
164
 
172
 
165
  @Deprecated
173
  @Override
166
  public Affiliate clone() {
174
  public void clear() {
-
 
175
    setIdIsSet(false);
-
 
176
    this.id = 0;
-
 
177
    this.name = null;
-
 
178
    this.url = null;
-
 
179
    setMasterAffiliateIdIsSet(false);
167
    return new Affiliate(this);
180
    this.masterAffiliateId = 0;
-
 
181
    setAddedOnIsSet(false);
-
 
182
    this.addedOn = 0;
168
  }
183
  }
169
 
184
 
170
  public long getId() {
185
  public long getId() {
171
    return this.id;
186
    return this.id;
172
  }
187
  }
173
 
188
 
174
  public Affiliate setId(long id) {
189
  public void setId(long id) {
175
    this.id = id;
190
    this.id = id;
176
    setIdIsSet(true);
191
    setIdIsSet(true);
177
    return this;
-
 
178
  }
192
  }
179
 
193
 
180
  public void unsetId() {
194
  public void unsetId() {
181
    __isset_bit_vector.clear(__ID_ISSET_ID);
195
    __isset_bit_vector.clear(__ID_ISSET_ID);
182
  }
196
  }
183
 
197
 
184
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
198
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
185
  public boolean isSetId() {
199
  public boolean isSetId() {
186
    return __isset_bit_vector.get(__ID_ISSET_ID);
200
    return __isset_bit_vector.get(__ID_ISSET_ID);
187
  }
201
  }
188
 
202
 
189
  public void setIdIsSet(boolean value) {
203
  public void setIdIsSet(boolean value) {
Line 192... Line 206...
192
 
206
 
193
  public String getName() {
207
  public String getName() {
194
    return this.name;
208
    return this.name;
195
  }
209
  }
196
 
210
 
197
  public Affiliate setName(String name) {
211
  public void setName(String name) {
198
    this.name = name;
212
    this.name = name;
199
    return this;
-
 
200
  }
213
  }
201
 
214
 
202
  public void unsetName() {
215
  public void unsetName() {
203
    this.name = null;
216
    this.name = null;
204
  }
217
  }
205
 
218
 
206
  /** Returns true if field name is set (has been asigned a value) and false otherwise */
219
  /** Returns true if field name is set (has been assigned a value) and false otherwise */
207
  public boolean isSetName() {
220
  public boolean isSetName() {
208
    return this.name != null;
221
    return this.name != null;
209
  }
222
  }
210
 
223
 
211
  public void setNameIsSet(boolean value) {
224
  public void setNameIsSet(boolean value) {
Line 216... Line 229...
216
 
229
 
217
  public String getUrl() {
230
  public String getUrl() {
218
    return this.url;
231
    return this.url;
219
  }
232
  }
220
 
233
 
221
  public Affiliate setUrl(String url) {
234
  public void setUrl(String url) {
222
    this.url = url;
235
    this.url = url;
223
    return this;
-
 
224
  }
236
  }
225
 
237
 
226
  public void unsetUrl() {
238
  public void unsetUrl() {
227
    this.url = null;
239
    this.url = null;
228
  }
240
  }
229
 
241
 
230
  /** Returns true if field url is set (has been asigned a value) and false otherwise */
242
  /** Returns true if field url is set (has been assigned a value) and false otherwise */
231
  public boolean isSetUrl() {
243
  public boolean isSetUrl() {
232
    return this.url != null;
244
    return this.url != null;
233
  }
245
  }
234
 
246
 
235
  public void setUrlIsSet(boolean value) {
247
  public void setUrlIsSet(boolean value) {
Line 240... Line 252...
240
 
252
 
241
  public long getMasterAffiliateId() {
253
  public long getMasterAffiliateId() {
242
    return this.masterAffiliateId;
254
    return this.masterAffiliateId;
243
  }
255
  }
244
 
256
 
245
  public Affiliate setMasterAffiliateId(long masterAffiliateId) {
257
  public void setMasterAffiliateId(long masterAffiliateId) {
246
    this.masterAffiliateId = masterAffiliateId;
258
    this.masterAffiliateId = masterAffiliateId;
247
    setMasterAffiliateIdIsSet(true);
259
    setMasterAffiliateIdIsSet(true);
248
    return this;
-
 
249
  }
260
  }
250
 
261
 
251
  public void unsetMasterAffiliateId() {
262
  public void unsetMasterAffiliateId() {
252
    __isset_bit_vector.clear(__MASTERAFFILIATEID_ISSET_ID);
263
    __isset_bit_vector.clear(__MASTERAFFILIATEID_ISSET_ID);
253
  }
264
  }
254
 
265
 
255
  /** Returns true if field masterAffiliateId is set (has been asigned a value) and false otherwise */
266
  /** Returns true if field masterAffiliateId is set (has been assigned a value) and false otherwise */
256
  public boolean isSetMasterAffiliateId() {
267
  public boolean isSetMasterAffiliateId() {
257
    return __isset_bit_vector.get(__MASTERAFFILIATEID_ISSET_ID);
268
    return __isset_bit_vector.get(__MASTERAFFILIATEID_ISSET_ID);
258
  }
269
  }
259
 
270
 
260
  public void setMasterAffiliateIdIsSet(boolean value) {
271
  public void setMasterAffiliateIdIsSet(boolean value) {
Line 263... Line 274...
263
 
274
 
264
  public long getAddedOn() {
275
  public long getAddedOn() {
265
    return this.addedOn;
276
    return this.addedOn;
266
  }
277
  }
267
 
278
 
268
  public Affiliate setAddedOn(long addedOn) {
279
  public void setAddedOn(long addedOn) {
269
    this.addedOn = addedOn;
280
    this.addedOn = addedOn;
270
    setAddedOnIsSet(true);
281
    setAddedOnIsSet(true);
271
    return this;
-
 
272
  }
282
  }
273
 
283
 
274
  public void unsetAddedOn() {
284
  public void unsetAddedOn() {
275
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
285
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
276
  }
286
  }
277
 
287
 
278
  /** Returns true if field addedOn is set (has been asigned a value) and false otherwise */
288
  /** Returns true if field addedOn is set (has been assigned a value) and false otherwise */
279
  public boolean isSetAddedOn() {
289
  public boolean isSetAddedOn() {
280
    return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
290
    return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
281
  }
291
  }
282
 
292
 
283
  public void setAddedOnIsSet(boolean value) {
293
  public void setAddedOnIsSet(boolean value) {
Line 327... Line 337...
327
      break;
337
      break;
328
 
338
 
329
    }
339
    }
330
  }
340
  }
331
 
341
 
332
  public void setFieldValue(int fieldID, Object value) {
-
 
333
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
334
  }
-
 
335
 
-
 
336
  public Object getFieldValue(_Fields field) {
342
  public Object getFieldValue(_Fields field) {
337
    switch (field) {
343
    switch (field) {
338
    case ID:
344
    case ID:
339
      return new Long(getId());
345
      return Long.valueOf(getId());
340
 
346
 
341
    case NAME:
347
    case NAME:
342
      return getName();
348
      return getName();
343
 
349
 
344
    case URL:
350
    case URL:
345
      return getUrl();
351
      return getUrl();
346
 
352
 
347
    case MASTER_AFFILIATE_ID:
353
    case MASTER_AFFILIATE_ID:
348
      return new Long(getMasterAffiliateId());
354
      return Long.valueOf(getMasterAffiliateId());
349
 
355
 
350
    case ADDED_ON:
356
    case ADDED_ON:
351
      return new Long(getAddedOn());
357
      return Long.valueOf(getAddedOn());
352
 
358
 
353
    }
359
    }
354
    throw new IllegalStateException();
360
    throw new IllegalStateException();
355
  }
361
  }
356
 
362
 
357
  public Object getFieldValue(int fieldId) {
-
 
358
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
359
  }
-
 
360
 
-
 
361
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
363
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
362
  public boolean isSet(_Fields field) {
364
  public boolean isSet(_Fields field) {
-
 
365
    if (field == null) {
-
 
366
      throw new IllegalArgumentException();
-
 
367
    }
-
 
368
 
363
    switch (field) {
369
    switch (field) {
364
    case ID:
370
    case ID:
365
      return isSetId();
371
      return isSetId();
366
    case NAME:
372
    case NAME:
367
      return isSetName();
373
      return isSetName();
Line 373... Line 379...
373
      return isSetAddedOn();
379
      return isSetAddedOn();
374
    }
380
    }
375
    throw new IllegalStateException();
381
    throw new IllegalStateException();
376
  }
382
  }
377
 
383
 
378
  public boolean isSet(int fieldID) {
-
 
379
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
380
  }
-
 
381
 
-
 
382
  @Override
384
  @Override
383
  public boolean equals(Object that) {
385
  public boolean equals(Object that) {
384
    if (that == null)
386
    if (that == null)
385
      return false;
387
      return false;
386
    if (that instanceof Affiliate)
388
    if (that instanceof Affiliate)
Line 451... Line 453...
451
    }
453
    }
452
 
454
 
453
    int lastComparison = 0;
455
    int lastComparison = 0;
454
    Affiliate typedOther = (Affiliate)other;
456
    Affiliate typedOther = (Affiliate)other;
455
 
457
 
456
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
458
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
457
    if (lastComparison != 0) {
459
    if (lastComparison != 0) {
458
      return lastComparison;
460
      return lastComparison;
459
    }
461
    }
-
 
462
    if (isSetId()) {
460
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
463
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
461
    if (lastComparison != 0) {
464
      if (lastComparison != 0) {
462
      return lastComparison;
465
        return lastComparison;
-
 
466
      }
463
    }
467
    }
464
    lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
468
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
465
    if (lastComparison != 0) {
469
    if (lastComparison != 0) {
466
      return lastComparison;
470
      return lastComparison;
467
    }
471
    }
-
 
472
    if (isSetName()) {
468
    lastComparison = TBaseHelper.compareTo(name, typedOther.name);
473
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
469
    if (lastComparison != 0) {
474
      if (lastComparison != 0) {
470
      return lastComparison;
475
        return lastComparison;
-
 
476
      }
471
    }
477
    }
472
    lastComparison = Boolean.valueOf(isSetUrl()).compareTo(isSetUrl());
478
    lastComparison = Boolean.valueOf(isSetUrl()).compareTo(typedOther.isSetUrl());
473
    if (lastComparison != 0) {
479
    if (lastComparison != 0) {
474
      return lastComparison;
480
      return lastComparison;
475
    }
481
    }
-
 
482
    if (isSetUrl()) {
476
    lastComparison = TBaseHelper.compareTo(url, typedOther.url);
483
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.url, typedOther.url);
477
    if (lastComparison != 0) {
484
      if (lastComparison != 0) {
478
      return lastComparison;
485
        return lastComparison;
-
 
486
      }
479
    }
487
    }
480
    lastComparison = Boolean.valueOf(isSetMasterAffiliateId()).compareTo(isSetMasterAffiliateId());
488
    lastComparison = Boolean.valueOf(isSetMasterAffiliateId()).compareTo(typedOther.isSetMasterAffiliateId());
481
    if (lastComparison != 0) {
489
    if (lastComparison != 0) {
482
      return lastComparison;
490
      return lastComparison;
483
    }
491
    }
-
 
492
    if (isSetMasterAffiliateId()) {
484
    lastComparison = TBaseHelper.compareTo(masterAffiliateId, typedOther.masterAffiliateId);
493
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.masterAffiliateId, typedOther.masterAffiliateId);
485
    if (lastComparison != 0) {
494
      if (lastComparison != 0) {
486
      return lastComparison;
495
        return lastComparison;
-
 
496
      }
487
    }
497
    }
488
    lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(isSetAddedOn());
498
    lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(typedOther.isSetAddedOn());
489
    if (lastComparison != 0) {
499
    if (lastComparison != 0) {
490
      return lastComparison;
500
      return lastComparison;
491
    }
501
    }
-
 
502
    if (isSetAddedOn()) {
492
    lastComparison = TBaseHelper.compareTo(addedOn, typedOther.addedOn);
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedOn, typedOther.addedOn);
493
    if (lastComparison != 0) {
504
      if (lastComparison != 0) {
494
      return lastComparison;
505
        return lastComparison;
-
 
506
      }
495
    }
507
    }
496
    return 0;
508
    return 0;
497
  }
509
  }
498
 
510
 
-
 
511
  public _Fields fieldForId(int fieldId) {
-
 
512
    return _Fields.findByThriftId(fieldId);
-
 
513
  }
-
 
514
 
499
  public void read(TProtocol iprot) throws TException {
515
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
500
    TField field;
516
    org.apache.thrift.protocol.TField field;
501
    iprot.readStructBegin();
517
    iprot.readStructBegin();
502
    while (true)
518
    while (true)
503
    {
519
    {
504
      field = iprot.readFieldBegin();
520
      field = iprot.readFieldBegin();
505
      if (field.type == TType.STOP) { 
521
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
506
        break;
522
        break;
507
      }
523
      }
508
      _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
509
      if (fieldId == null) {
-
 
510
        TProtocolUtil.skip(iprot, field.type);
-
 
511
      } else {
-
 
512
        switch (fieldId) {
524
      switch (field.id) {
513
          case ID:
525
        case 1: // ID
514
            if (field.type == TType.I64) {
526
          if (field.type == org.apache.thrift.protocol.TType.I64) {
515
              this.id = iprot.readI64();
527
            this.id = iprot.readI64();
516
              setIdIsSet(true);
528
            setIdIsSet(true);
517
            } else { 
529
          } else { 
518
              TProtocolUtil.skip(iprot, field.type);
530
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
519
            }
531
          }
520
            break;
532
          break;
521
          case NAME:
533
        case 2: // NAME
522
            if (field.type == TType.STRING) {
534
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
523
              this.name = iprot.readString();
535
            this.name = iprot.readString();
524
            } else { 
536
          } else { 
525
              TProtocolUtil.skip(iprot, field.type);
537
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
526
            }
538
          }
527
            break;
539
          break;
528
          case URL:
540
        case 3: // URL
529
            if (field.type == TType.STRING) {
541
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
530
              this.url = iprot.readString();
542
            this.url = iprot.readString();
531
            } else { 
543
          } else { 
532
              TProtocolUtil.skip(iprot, field.type);
544
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
533
            }
545
          }
534
            break;
546
          break;
535
          case MASTER_AFFILIATE_ID:
547
        case 4: // MASTER_AFFILIATE_ID
536
            if (field.type == TType.I64) {
548
          if (field.type == org.apache.thrift.protocol.TType.I64) {
537
              this.masterAffiliateId = iprot.readI64();
549
            this.masterAffiliateId = iprot.readI64();
538
              setMasterAffiliateIdIsSet(true);
550
            setMasterAffiliateIdIsSet(true);
539
            } else { 
551
          } else { 
540
              TProtocolUtil.skip(iprot, field.type);
552
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
541
            }
553
          }
542
            break;
554
          break;
543
          case ADDED_ON:
555
        case 5: // ADDED_ON
544
            if (field.type == TType.I64) {
556
          if (field.type == org.apache.thrift.protocol.TType.I64) {
545
              this.addedOn = iprot.readI64();
557
            this.addedOn = iprot.readI64();
546
              setAddedOnIsSet(true);
558
            setAddedOnIsSet(true);
547
            } else { 
559
          } else { 
548
              TProtocolUtil.skip(iprot, field.type);
560
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
549
            }
561
          }
550
            break;
562
          break;
551
        }
563
        default:
552
        iprot.readFieldEnd();
564
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
553
      }
565
      }
-
 
566
      iprot.readFieldEnd();
554
    }
567
    }
555
    iprot.readStructEnd();
568
    iprot.readStructEnd();
556
    validate();
569
    validate();
557
  }
570
  }
558
 
571
 
559
  public void write(TProtocol oprot) throws TException {
572
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
560
    validate();
573
    validate();
561
 
574
 
562
    oprot.writeStructBegin(STRUCT_DESC);
575
    oprot.writeStructBegin(STRUCT_DESC);
563
    oprot.writeFieldBegin(ID_FIELD_DESC);
576
    oprot.writeFieldBegin(ID_FIELD_DESC);
564
    oprot.writeI64(this.id);
577
    oprot.writeI64(this.id);
Line 617... Line 630...
617
    first = false;
630
    first = false;
618
    sb.append(")");
631
    sb.append(")");
619
    return sb.toString();
632
    return sb.toString();
620
  }
633
  }
621
 
634
 
622
  public void validate() throws TException {
635
  public void validate() throws org.apache.thrift.TException {
623
    // check for required fields
636
    // check for required fields
624
  }
637
  }
625
 
638
 
-
 
639
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
640
    try {
-
 
641
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
642
    } catch (org.apache.thrift.TException te) {
-
 
643
      throw new java.io.IOException(te);
-
 
644
    }
-
 
645
  }
-
 
646
 
-
 
647
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
648
    try {
-
 
649
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
650
      __isset_bit_vector = new BitSet(1);
-
 
651
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
652
    } catch (org.apache.thrift.TException te) {
-
 
653
      throw new java.io.IOException(te);
-
 
654
    }
-
 
655
  }
-
 
656
 
626
}
657
}
627
 
658