Subversion Repositories SmartDukaan

Rev

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

Rev 1847 Rev 1860
Line 25... Line 25...
25
 
25
 
26
public class TrackLog implements TBase<TrackLog._Fields>, java.io.Serializable, Cloneable, Comparable<TrackLog> {
26
public class TrackLog implements TBase<TrackLog._Fields>, java.io.Serializable, Cloneable, Comparable<TrackLog> {
27
  private static final TStruct STRUCT_DESC = new TStruct("TrackLog");
27
  private static final TStruct STRUCT_DESC = new TStruct("TrackLog");
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 ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)2);
30
  private static final TField TRACKER_ID_FIELD_DESC = new TField("trackerId", TType.I64, (short)2);
31
  private static final TField TRACKER_ID_FIELD_DESC = new TField("trackerId", TType.I64, (short)3);
31
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)3);
32
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)4);
32
  private static final TField EVENT_FIELD_DESC = new TField("event", TType.STRING, (short)4);
33
  private static final TField EVENT_FIELD_DESC = new TField("event", TType.STRING, (short)5);
33
  private static final TField URL_FIELD_DESC = new TField("url", TType.STRING, (short)5);
34
  private static final TField URL_FIELD_DESC = new TField("url", TType.STRING, (short)6);
34
  private static final TField DATA_FIELD_DESC = new TField("data", TType.STRING, (short)6);
35
  private static final TField DATA_FIELD_DESC = new TField("data", TType.STRING, (short)7);
35
 
36
 
36
  private long id;
37
  private long id;
-
 
38
  private long addedOn;
37
  private long trackerId;
39
  private long trackerId;
38
  private long userId;
40
  private long userId;
39
  private String event;
41
  private String event;
40
  private String url;
42
  private String url;
41
  private String data;
43
  private String data;
42
 
44
 
43
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
45
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
44
  public enum _Fields implements TFieldIdEnum {
46
  public enum _Fields implements TFieldIdEnum {
45
    ID((short)1, "id"),
47
    ID((short)1, "id"),
-
 
48
    ADDED_ON((short)2, "addedOn"),
46
    TRACKER_ID((short)2, "trackerId"),
49
    TRACKER_ID((short)3, "trackerId"),
47
    USER_ID((short)3, "userId"),
50
    USER_ID((short)4, "userId"),
48
    EVENT((short)4, "event"),
51
    EVENT((short)5, "event"),
49
    URL((short)5, "url"),
52
    URL((short)6, "url"),
50
    DATA((short)6, "data");
53
    DATA((short)7, "data");
51
 
54
 
52
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
55
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
53
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
56
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
54
 
57
 
55
    static {
58
    static {
Line 100... Line 103...
100
    }
103
    }
101
  }
104
  }
102
 
105
 
103
  // isset id assignments
106
  // isset id assignments
104
  private static final int __ID_ISSET_ID = 0;
107
  private static final int __ID_ISSET_ID = 0;
-
 
108
  private static final int __ADDEDON_ISSET_ID = 1;
105
  private static final int __TRACKERID_ISSET_ID = 1;
109
  private static final int __TRACKERID_ISSET_ID = 2;
106
  private static final int __USERID_ISSET_ID = 2;
110
  private static final int __USERID_ISSET_ID = 3;
107
  private BitSet __isset_bit_vector = new BitSet(3);
111
  private BitSet __isset_bit_vector = new BitSet(4);
108
 
112
 
109
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
113
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
110
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
114
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
111
        new FieldValueMetaData(TType.I64)));
115
        new FieldValueMetaData(TType.I64)));
-
 
116
    put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT, 
-
 
117
        new FieldValueMetaData(TType.I64)));
112
    put(_Fields.TRACKER_ID, new FieldMetaData("trackerId", TFieldRequirementType.DEFAULT, 
118
    put(_Fields.TRACKER_ID, new FieldMetaData("trackerId", TFieldRequirementType.DEFAULT, 
113
        new FieldValueMetaData(TType.I64)));
119
        new FieldValueMetaData(TType.I64)));
114
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
120
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
115
        new FieldValueMetaData(TType.I64)));
121
        new FieldValueMetaData(TType.I64)));
116
    put(_Fields.EVENT, new FieldMetaData("event", TFieldRequirementType.DEFAULT, 
122
    put(_Fields.EVENT, new FieldMetaData("event", TFieldRequirementType.DEFAULT, 
Line 128... Line 134...
128
  public TrackLog() {
134
  public TrackLog() {
129
  }
135
  }
130
 
136
 
131
  public TrackLog(
137
  public TrackLog(
132
    long id,
138
    long id,
-
 
139
    long addedOn,
133
    long trackerId,
140
    long trackerId,
134
    long userId,
141
    long userId,
135
    String event,
142
    String event,
136
    String url,
143
    String url,
137
    String data)
144
    String data)
138
  {
145
  {
139
    this();
146
    this();
140
    this.id = id;
147
    this.id = id;
141
    setIdIsSet(true);
148
    setIdIsSet(true);
-
 
149
    this.addedOn = addedOn;
-
 
150
    setAddedOnIsSet(true);
142
    this.trackerId = trackerId;
151
    this.trackerId = trackerId;
143
    setTrackerIdIsSet(true);
152
    setTrackerIdIsSet(true);
144
    this.userId = userId;
153
    this.userId = userId;
145
    setUserIdIsSet(true);
154
    setUserIdIsSet(true);
146
    this.event = event;
155
    this.event = event;
Line 153... Line 162...
153
   */
162
   */
154
  public TrackLog(TrackLog other) {
163
  public TrackLog(TrackLog other) {
155
    __isset_bit_vector.clear();
164
    __isset_bit_vector.clear();
156
    __isset_bit_vector.or(other.__isset_bit_vector);
165
    __isset_bit_vector.or(other.__isset_bit_vector);
157
    this.id = other.id;
166
    this.id = other.id;
-
 
167
    this.addedOn = other.addedOn;
158
    this.trackerId = other.trackerId;
168
    this.trackerId = other.trackerId;
159
    this.userId = other.userId;
169
    this.userId = other.userId;
160
    if (other.isSetEvent()) {
170
    if (other.isSetEvent()) {
161
      this.event = other.event;
171
      this.event = other.event;
162
    }
172
    }
Line 198... Line 208...
198
 
208
 
199
  public void setIdIsSet(boolean value) {
209
  public void setIdIsSet(boolean value) {
200
    __isset_bit_vector.set(__ID_ISSET_ID, value);
210
    __isset_bit_vector.set(__ID_ISSET_ID, value);
201
  }
211
  }
202
 
212
 
-
 
213
  public long getAddedOn() {
-
 
214
    return this.addedOn;
-
 
215
  }
-
 
216
 
-
 
217
  public TrackLog setAddedOn(long addedOn) {
-
 
218
    this.addedOn = addedOn;
-
 
219
    setAddedOnIsSet(true);
-
 
220
    return this;
-
 
221
  }
-
 
222
 
-
 
223
  public void unsetAddedOn() {
-
 
224
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
-
 
225
  }
-
 
226
 
-
 
227
  /** Returns true if field addedOn is set (has been asigned a value) and false otherwise */
-
 
228
  public boolean isSetAddedOn() {
-
 
229
    return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
-
 
230
  }
-
 
231
 
-
 
232
  public void setAddedOnIsSet(boolean value) {
-
 
233
    __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
-
 
234
  }
-
 
235
 
203
  public long getTrackerId() {
236
  public long getTrackerId() {
204
    return this.trackerId;
237
    return this.trackerId;
205
  }
238
  }
206
 
239
 
207
  public TrackLog setTrackerId(long trackerId) {
240
  public TrackLog setTrackerId(long trackerId) {
Line 326... Line 359...
326
      } else {
359
      } else {
327
        setId((Long)value);
360
        setId((Long)value);
328
      }
361
      }
329
      break;
362
      break;
330
 
363
 
-
 
364
    case ADDED_ON:
-
 
365
      if (value == null) {
-
 
366
        unsetAddedOn();
-
 
367
      } else {
-
 
368
        setAddedOn((Long)value);
-
 
369
      }
-
 
370
      break;
-
 
371
 
331
    case TRACKER_ID:
372
    case TRACKER_ID:
332
      if (value == null) {
373
      if (value == null) {
333
        unsetTrackerId();
374
        unsetTrackerId();
334
      } else {
375
      } else {
335
        setTrackerId((Long)value);
376
        setTrackerId((Long)value);
Line 378... Line 419...
378
  public Object getFieldValue(_Fields field) {
419
  public Object getFieldValue(_Fields field) {
379
    switch (field) {
420
    switch (field) {
380
    case ID:
421
    case ID:
381
      return new Long(getId());
422
      return new Long(getId());
382
 
423
 
-
 
424
    case ADDED_ON:
-
 
425
      return new Long(getAddedOn());
-
 
426
 
383
    case TRACKER_ID:
427
    case TRACKER_ID:
384
      return new Long(getTrackerId());
428
      return new Long(getTrackerId());
385
 
429
 
386
    case USER_ID:
430
    case USER_ID:
387
      return new Long(getUserId());
431
      return new Long(getUserId());
Line 406... Line 450...
406
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
450
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
407
  public boolean isSet(_Fields field) {
451
  public boolean isSet(_Fields field) {
408
    switch (field) {
452
    switch (field) {
409
    case ID:
453
    case ID:
410
      return isSetId();
454
      return isSetId();
-
 
455
    case ADDED_ON:
-
 
456
      return isSetAddedOn();
411
    case TRACKER_ID:
457
    case TRACKER_ID:
412
      return isSetTrackerId();
458
      return isSetTrackerId();
413
    case USER_ID:
459
    case USER_ID:
414
      return isSetUserId();
460
      return isSetUserId();
415
    case EVENT:
461
    case EVENT:
Line 446... Line 492...
446
        return false;
492
        return false;
447
      if (this.id != that.id)
493
      if (this.id != that.id)
448
        return false;
494
        return false;
449
    }
495
    }
450
 
496
 
-
 
497
    boolean this_present_addedOn = true;
-
 
498
    boolean that_present_addedOn = true;
-
 
499
    if (this_present_addedOn || that_present_addedOn) {
-
 
500
      if (!(this_present_addedOn && that_present_addedOn))
-
 
501
        return false;
-
 
502
      if (this.addedOn != that.addedOn)
-
 
503
        return false;
-
 
504
    }
-
 
505
 
451
    boolean this_present_trackerId = true;
506
    boolean this_present_trackerId = true;
452
    boolean that_present_trackerId = true;
507
    boolean that_present_trackerId = true;
453
    if (this_present_trackerId || that_present_trackerId) {
508
    if (this_present_trackerId || that_present_trackerId) {
454
      if (!(this_present_trackerId && that_present_trackerId))
509
      if (!(this_present_trackerId && that_present_trackerId))
455
        return false;
510
        return false;
Line 515... Line 570...
515
    }
570
    }
516
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
571
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
517
    if (lastComparison != 0) {
572
    if (lastComparison != 0) {
518
      return lastComparison;
573
      return lastComparison;
519
    }
574
    }
-
 
575
    lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(isSetAddedOn());
-
 
576
    if (lastComparison != 0) {
-
 
577
      return lastComparison;
-
 
578
    }
-
 
579
    lastComparison = TBaseHelper.compareTo(addedOn, typedOther.addedOn);
-
 
580
    if (lastComparison != 0) {
-
 
581
      return lastComparison;
-
 
582
    }
520
    lastComparison = Boolean.valueOf(isSetTrackerId()).compareTo(isSetTrackerId());
583
    lastComparison = Boolean.valueOf(isSetTrackerId()).compareTo(isSetTrackerId());
521
    if (lastComparison != 0) {
584
    if (lastComparison != 0) {
522
      return lastComparison;
585
      return lastComparison;
523
    }
586
    }
524
    lastComparison = TBaseHelper.compareTo(trackerId, typedOther.trackerId);
587
    lastComparison = TBaseHelper.compareTo(trackerId, typedOther.trackerId);
Line 580... Line 643...
580
              setIdIsSet(true);
643
              setIdIsSet(true);
581
            } else { 
644
            } else { 
582
              TProtocolUtil.skip(iprot, field.type);
645
              TProtocolUtil.skip(iprot, field.type);
583
            }
646
            }
584
            break;
647
            break;
-
 
648
          case ADDED_ON:
-
 
649
            if (field.type == TType.I64) {
-
 
650
              this.addedOn = iprot.readI64();
-
 
651
              setAddedOnIsSet(true);
-
 
652
            } else { 
-
 
653
              TProtocolUtil.skip(iprot, field.type);
-
 
654
            }
-
 
655
            break;
585
          case TRACKER_ID:
656
          case TRACKER_ID:
586
            if (field.type == TType.I64) {
657
            if (field.type == TType.I64) {
587
              this.trackerId = iprot.readI64();
658
              this.trackerId = iprot.readI64();
588
              setTrackerIdIsSet(true);
659
              setTrackerIdIsSet(true);
589
            } else { 
660
            } else { 
Line 632... Line 703...
632
 
703
 
633
    oprot.writeStructBegin(STRUCT_DESC);
704
    oprot.writeStructBegin(STRUCT_DESC);
634
    oprot.writeFieldBegin(ID_FIELD_DESC);
705
    oprot.writeFieldBegin(ID_FIELD_DESC);
635
    oprot.writeI64(this.id);
706
    oprot.writeI64(this.id);
636
    oprot.writeFieldEnd();
707
    oprot.writeFieldEnd();
-
 
708
    oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
-
 
709
    oprot.writeI64(this.addedOn);
-
 
710
    oprot.writeFieldEnd();
637
    oprot.writeFieldBegin(TRACKER_ID_FIELD_DESC);
711
    oprot.writeFieldBegin(TRACKER_ID_FIELD_DESC);
638
    oprot.writeI64(this.trackerId);
712
    oprot.writeI64(this.trackerId);
639
    oprot.writeFieldEnd();
713
    oprot.writeFieldEnd();
640
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
714
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
641
    oprot.writeI64(this.userId);
715
    oprot.writeI64(this.userId);
Line 666... Line 740...
666
 
740
 
667
    sb.append("id:");
741
    sb.append("id:");
668
    sb.append(this.id);
742
    sb.append(this.id);
669
    first = false;
743
    first = false;
670
    if (!first) sb.append(", ");
744
    if (!first) sb.append(", ");
-
 
745
    sb.append("addedOn:");
-
 
746
    sb.append(this.addedOn);
-
 
747
    first = false;
-
 
748
    if (!first) sb.append(", ");
671
    sb.append("trackerId:");
749
    sb.append("trackerId:");
672
    sb.append(this.trackerId);
750
    sb.append(this.trackerId);
673
    first = false;
751
    first = false;
674
    if (!first) sb.append(", ");
752
    if (!first) sb.append(", ");
675
    sb.append("userId:");
753
    sb.append("userId:");