Subversion Repositories SmartDukaan

Rev

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

Rev 1860 Rev 1998
Line 26... Line 26...
26
public class Tracker implements TBase<Tracker._Fields>, java.io.Serializable, Cloneable, Comparable<Tracker> {
26
public class Tracker implements TBase<Tracker._Fields>, java.io.Serializable, Cloneable, Comparable<Tracker> {
27
  private static final TStruct STRUCT_DESC = new TStruct("Tracker");
27
  private static final TStruct STRUCT_DESC = new TStruct("Tracker");
28
 
28
 
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
30
  private static final TField AFFILIATE_ID_FIELD_DESC = new TField("affiliateId", TType.I64, (short)2);
30
  private static final TField AFFILIATE_ID_FIELD_DESC = new TField("affiliateId", TType.I64, (short)2);
31
  private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)3);
-
 
32
 
31
 
33
  private long id;
32
  private long id;
34
  private long affiliateId;
33
  private long affiliateId;
35
  private long addedOn;
-
 
36
 
34
 
37
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
38
  public enum _Fields implements TFieldIdEnum {
36
  public enum _Fields implements TFieldIdEnum {
39
    ID((short)1, "id"),
37
    ID((short)1, "id"),
40
    AFFILIATE_ID((short)2, "affiliateId"),
38
    AFFILIATE_ID((short)2, "affiliateId");
41
    ADDED_ON((short)3, "addedOn");
-
 
42
 
39
 
43
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
40
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
44
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
41
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
45
 
42
 
46
    static {
43
    static {
Line 92... Line 89...
92
  }
89
  }
93
 
90
 
94
  // isset id assignments
91
  // isset id assignments
95
  private static final int __ID_ISSET_ID = 0;
92
  private static final int __ID_ISSET_ID = 0;
96
  private static final int __AFFILIATEID_ISSET_ID = 1;
93
  private static final int __AFFILIATEID_ISSET_ID = 1;
97
  private static final int __ADDEDON_ISSET_ID = 2;
-
 
98
  private BitSet __isset_bit_vector = new BitSet(3);
94
  private BitSet __isset_bit_vector = new BitSet(2);
99
 
95
 
100
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
96
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
101
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
97
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
102
        new FieldValueMetaData(TType.I64)));
98
        new FieldValueMetaData(TType.I64)));
103
    put(_Fields.AFFILIATE_ID, new FieldMetaData("affiliateId", TFieldRequirementType.DEFAULT, 
99
    put(_Fields.AFFILIATE_ID, new FieldMetaData("affiliateId", TFieldRequirementType.DEFAULT, 
104
        new FieldValueMetaData(TType.I64)));
100
        new FieldValueMetaData(TType.I64)));
105
    put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT, 
-
 
106
        new FieldValueMetaData(TType.I64)));
-
 
107
  }});
101
  }});
108
 
102
 
109
  static {
103
  static {
110
    FieldMetaData.addStructMetaDataMap(Tracker.class, metaDataMap);
104
    FieldMetaData.addStructMetaDataMap(Tracker.class, metaDataMap);
111
  }
105
  }
Line 113... Line 107...
113
  public Tracker() {
107
  public Tracker() {
114
  }
108
  }
115
 
109
 
116
  public Tracker(
110
  public Tracker(
117
    long id,
111
    long id,
118
    long affiliateId,
112
    long affiliateId)
119
    long addedOn)
-
 
120
  {
113
  {
121
    this();
114
    this();
122
    this.id = id;
115
    this.id = id;
123
    setIdIsSet(true);
116
    setIdIsSet(true);
124
    this.affiliateId = affiliateId;
117
    this.affiliateId = affiliateId;
125
    setAffiliateIdIsSet(true);
118
    setAffiliateIdIsSet(true);
126
    this.addedOn = addedOn;
-
 
127
    setAddedOnIsSet(true);
-
 
128
  }
119
  }
129
 
120
 
130
  /**
121
  /**
131
   * Performs a deep copy on <i>other</i>.
122
   * Performs a deep copy on <i>other</i>.
132
   */
123
   */
133
  public Tracker(Tracker other) {
124
  public Tracker(Tracker other) {
134
    __isset_bit_vector.clear();
125
    __isset_bit_vector.clear();
135
    __isset_bit_vector.or(other.__isset_bit_vector);
126
    __isset_bit_vector.or(other.__isset_bit_vector);
136
    this.id = other.id;
127
    this.id = other.id;
137
    this.affiliateId = other.affiliateId;
128
    this.affiliateId = other.affiliateId;
138
    this.addedOn = other.addedOn;
-
 
139
  }
129
  }
140
 
130
 
141
  public Tracker deepCopy() {
131
  public Tracker deepCopy() {
142
    return new Tracker(this);
132
    return new Tracker(this);
143
  }
133
  }
Line 191... Line 181...
191
 
181
 
192
  public void setAffiliateIdIsSet(boolean value) {
182
  public void setAffiliateIdIsSet(boolean value) {
193
    __isset_bit_vector.set(__AFFILIATEID_ISSET_ID, value);
183
    __isset_bit_vector.set(__AFFILIATEID_ISSET_ID, value);
194
  }
184
  }
195
 
185
 
196
  public long getAddedOn() {
-
 
197
    return this.addedOn;
-
 
198
  }
-
 
199
 
-
 
200
  public Tracker setAddedOn(long addedOn) {
-
 
201
    this.addedOn = addedOn;
-
 
202
    setAddedOnIsSet(true);
-
 
203
    return this;
-
 
204
  }
-
 
205
 
-
 
206
  public void unsetAddedOn() {
-
 
207
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
-
 
208
  }
-
 
209
 
-
 
210
  /** Returns true if field addedOn is set (has been asigned a value) and false otherwise */
-
 
211
  public boolean isSetAddedOn() {
-
 
212
    return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
-
 
213
  }
-
 
214
 
-
 
215
  public void setAddedOnIsSet(boolean value) {
-
 
216
    __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
-
 
217
  }
-
 
218
 
-
 
219
  public void setFieldValue(_Fields field, Object value) {
186
  public void setFieldValue(_Fields field, Object value) {
220
    switch (field) {
187
    switch (field) {
221
    case ID:
188
    case ID:
222
      if (value == null) {
189
      if (value == null) {
223
        unsetId();
190
        unsetId();
Line 232... Line 199...
232
      } else {
199
      } else {
233
        setAffiliateId((Long)value);
200
        setAffiliateId((Long)value);
234
      }
201
      }
235
      break;
202
      break;
236
 
203
 
237
    case ADDED_ON:
-
 
238
      if (value == null) {
-
 
239
        unsetAddedOn();
-
 
240
      } else {
-
 
241
        setAddedOn((Long)value);
-
 
242
      }
-
 
243
      break;
-
 
244
 
-
 
245
    }
204
    }
246
  }
205
  }
247
 
206
 
248
  public void setFieldValue(int fieldID, Object value) {
207
  public void setFieldValue(int fieldID, Object value) {
249
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
208
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 255... Line 214...
255
      return new Long(getId());
214
      return new Long(getId());
256
 
215
 
257
    case AFFILIATE_ID:
216
    case AFFILIATE_ID:
258
      return new Long(getAffiliateId());
217
      return new Long(getAffiliateId());
259
 
218
 
260
    case ADDED_ON:
-
 
261
      return new Long(getAddedOn());
-
 
262
 
-
 
263
    }
219
    }
264
    throw new IllegalStateException();
220
    throw new IllegalStateException();
265
  }
221
  }
266
 
222
 
267
  public Object getFieldValue(int fieldId) {
223
  public Object getFieldValue(int fieldId) {
Line 273... Line 229...
273
    switch (field) {
229
    switch (field) {
274
    case ID:
230
    case ID:
275
      return isSetId();
231
      return isSetId();
276
    case AFFILIATE_ID:
232
    case AFFILIATE_ID:
277
      return isSetAffiliateId();
233
      return isSetAffiliateId();
278
    case ADDED_ON:
-
 
279
      return isSetAddedOn();
-
 
280
    }
234
    }
281
    throw new IllegalStateException();
235
    throw new IllegalStateException();
282
  }
236
  }
283
 
237
 
284
  public boolean isSet(int fieldID) {
238
  public boolean isSet(int fieldID) {
Line 314... Line 268...
314
        return false;
268
        return false;
315
      if (this.affiliateId != that.affiliateId)
269
      if (this.affiliateId != that.affiliateId)
316
        return false;
270
        return false;
317
    }
271
    }
318
 
272
 
319
    boolean this_present_addedOn = true;
-
 
320
    boolean that_present_addedOn = true;
-
 
321
    if (this_present_addedOn || that_present_addedOn) {
-
 
322
      if (!(this_present_addedOn && that_present_addedOn))
-
 
323
        return false;
-
 
324
      if (this.addedOn != that.addedOn)
-
 
325
        return false;
-
 
326
    }
-
 
327
 
-
 
328
    return true;
273
    return true;
329
  }
274
  }
330
 
275
 
331
  @Override
276
  @Override
332
  public int hashCode() {
277
  public int hashCode() {
Line 355... Line 300...
355
    }
300
    }
356
    lastComparison = TBaseHelper.compareTo(affiliateId, typedOther.affiliateId);
301
    lastComparison = TBaseHelper.compareTo(affiliateId, typedOther.affiliateId);
357
    if (lastComparison != 0) {
302
    if (lastComparison != 0) {
358
      return lastComparison;
303
      return lastComparison;
359
    }
304
    }
360
    lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(isSetAddedOn());
-
 
361
    if (lastComparison != 0) {
-
 
362
      return lastComparison;
-
 
363
    }
-
 
364
    lastComparison = TBaseHelper.compareTo(addedOn, typedOther.addedOn);
-
 
365
    if (lastComparison != 0) {
-
 
366
      return lastComparison;
-
 
367
    }
-
 
368
    return 0;
305
    return 0;
369
  }
306
  }
370
 
307
 
371
  public void read(TProtocol iprot) throws TException {
308
  public void read(TProtocol iprot) throws TException {
372
    TField field;
309
    TField field;
Line 396... Line 333...
396
              setAffiliateIdIsSet(true);
333
              setAffiliateIdIsSet(true);
397
            } else { 
334
            } else { 
398
              TProtocolUtil.skip(iprot, field.type);
335
              TProtocolUtil.skip(iprot, field.type);
399
            }
336
            }
400
            break;
337
            break;
401
          case ADDED_ON:
-
 
402
            if (field.type == TType.I64) {
-
 
403
              this.addedOn = iprot.readI64();
-
 
404
              setAddedOnIsSet(true);
-
 
405
            } else { 
-
 
406
              TProtocolUtil.skip(iprot, field.type);
-
 
407
            }
-
 
408
            break;
-
 
409
        }
338
        }
410
        iprot.readFieldEnd();
339
        iprot.readFieldEnd();
411
      }
340
      }
412
    }
341
    }
413
    iprot.readStructEnd();
342
    iprot.readStructEnd();
Line 422... Line 351...
422
    oprot.writeI64(this.id);
351
    oprot.writeI64(this.id);
423
    oprot.writeFieldEnd();
352
    oprot.writeFieldEnd();
424
    oprot.writeFieldBegin(AFFILIATE_ID_FIELD_DESC);
353
    oprot.writeFieldBegin(AFFILIATE_ID_FIELD_DESC);
425
    oprot.writeI64(this.affiliateId);
354
    oprot.writeI64(this.affiliateId);
426
    oprot.writeFieldEnd();
355
    oprot.writeFieldEnd();
427
    oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
-
 
428
    oprot.writeI64(this.addedOn);
-
 
429
    oprot.writeFieldEnd();
-
 
430
    oprot.writeFieldStop();
356
    oprot.writeFieldStop();
431
    oprot.writeStructEnd();
357
    oprot.writeStructEnd();
432
  }
358
  }
433
 
359
 
434
  @Override
360
  @Override
Line 441... Line 367...
441
    first = false;
367
    first = false;
442
    if (!first) sb.append(", ");
368
    if (!first) sb.append(", ");
443
    sb.append("affiliateId:");
369
    sb.append("affiliateId:");
444
    sb.append(this.affiliateId);
370
    sb.append(this.affiliateId);
445
    first = false;
371
    first = false;
446
    if (!first) sb.append(", ");
-
 
447
    sb.append("addedOn:");
-
 
448
    sb.append(this.addedOn);
-
 
449
    first = false;
-
 
450
    sb.append(")");
372
    sb.append(")");
451
    return sb.toString();
373
    return sb.toString();
452
  }
374
  }
453
 
375
 
454
  public void validate() throws TException {
376
  public void validate() throws TException {