Subversion Repositories SmartDukaan

Rev

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

Rev 1998 Rev 3378
Line 28... Line 28...
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 ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)2);
31
  private static final TField AFFILIATE_ID_FIELD_DESC = new TField("affiliateId", TType.I64, (short)3);
31
  private static final TField AFFILIATE_ID_FIELD_DESC = new TField("affiliateId", 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 USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)4);
33
  private static final TField EVENT_FIELD_DESC = new TField("event", TType.STRING, (short)5);
33
  private static final TField EVENT_TYPE_FIELD_DESC = new TField("eventType", TType.I32, (short)5);
34
  private static final TField URL_FIELD_DESC = new TField("url", TType.STRING, (short)6);
34
  private static final TField URL_FIELD_DESC = new TField("url", TType.STRING, (short)6);
35
  private static final TField DATA_FIELD_DESC = new TField("data", TType.STRING, (short)7);
35
  private static final TField DATA_FIELD_DESC = new TField("data", TType.STRING, (short)7);
36
 
36
 
37
  private long id;
37
  private long id;
38
  private long addedOn;
38
  private long addedOn;
39
  private long affiliateId;
39
  private long affiliateId;
40
  private long userId;
40
  private long userId;
41
  private String event;
41
  private TrackLogType eventType;
42
  private String url;
42
  private String url;
43
  private String data;
43
  private String data;
44
 
44
 
45
  /** 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. */
46
  public enum _Fields implements TFieldIdEnum {
46
  public enum _Fields implements TFieldIdEnum {
47
    ID((short)1, "id"),
47
    ID((short)1, "id"),
48
    ADDED_ON((short)2, "addedOn"),
48
    ADDED_ON((short)2, "addedOn"),
49
    AFFILIATE_ID((short)3, "affiliateId"),
49
    AFFILIATE_ID((short)3, "affiliateId"),
50
    USER_ID((short)4, "userId"),
50
    USER_ID((short)4, "userId"),
-
 
51
    /**
-
 
52
     * 
-
 
53
     * @see TrackLogType
-
 
54
     */
51
    EVENT((short)5, "event"),
55
    EVENT_TYPE((short)5, "eventType"),
52
    URL((short)6, "url"),
56
    URL((short)6, "url"),
53
    DATA((short)7, "data");
57
    DATA((short)7, "data");
54
 
58
 
55
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
59
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
56
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
60
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
Line 117... Line 121...
117
        new FieldValueMetaData(TType.I64)));
121
        new FieldValueMetaData(TType.I64)));
118
    put(_Fields.AFFILIATE_ID, new FieldMetaData("affiliateId", TFieldRequirementType.DEFAULT, 
122
    put(_Fields.AFFILIATE_ID, new FieldMetaData("affiliateId", TFieldRequirementType.DEFAULT, 
119
        new FieldValueMetaData(TType.I64)));
123
        new FieldValueMetaData(TType.I64)));
120
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
124
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
121
        new FieldValueMetaData(TType.I64)));
125
        new FieldValueMetaData(TType.I64)));
122
    put(_Fields.EVENT, new FieldMetaData("event", TFieldRequirementType.DEFAULT, 
126
    put(_Fields.EVENT_TYPE, new FieldMetaData("eventType", TFieldRequirementType.DEFAULT, 
123
        new FieldValueMetaData(TType.STRING)));
127
        new EnumMetaData(TType.ENUM, TrackLogType.class)));
124
    put(_Fields.URL, new FieldMetaData("url", TFieldRequirementType.DEFAULT, 
128
    put(_Fields.URL, new FieldMetaData("url", TFieldRequirementType.DEFAULT, 
125
        new FieldValueMetaData(TType.STRING)));
129
        new FieldValueMetaData(TType.STRING)));
126
    put(_Fields.DATA, new FieldMetaData("data", TFieldRequirementType.DEFAULT, 
130
    put(_Fields.DATA, new FieldMetaData("data", TFieldRequirementType.DEFAULT, 
127
        new FieldValueMetaData(TType.STRING)));
131
        new FieldValueMetaData(TType.STRING)));
128
  }});
132
  }});
Line 137... Line 141...
137
  public TrackLog(
141
  public TrackLog(
138
    long id,
142
    long id,
139
    long addedOn,
143
    long addedOn,
140
    long affiliateId,
144
    long affiliateId,
141
    long userId,
145
    long userId,
142
    String event,
146
    TrackLogType eventType,
143
    String url,
147
    String url,
144
    String data)
148
    String data)
145
  {
149
  {
146
    this();
150
    this();
147
    this.id = id;
151
    this.id = id;
Line 150... Line 154...
150
    setAddedOnIsSet(true);
154
    setAddedOnIsSet(true);
151
    this.affiliateId = affiliateId;
155
    this.affiliateId = affiliateId;
152
    setAffiliateIdIsSet(true);
156
    setAffiliateIdIsSet(true);
153
    this.userId = userId;
157
    this.userId = userId;
154
    setUserIdIsSet(true);
158
    setUserIdIsSet(true);
155
    this.event = event;
159
    this.eventType = eventType;
156
    this.url = url;
160
    this.url = url;
157
    this.data = data;
161
    this.data = data;
158
  }
162
  }
159
 
163
 
160
  /**
164
  /**
Line 165... Line 169...
165
    __isset_bit_vector.or(other.__isset_bit_vector);
169
    __isset_bit_vector.or(other.__isset_bit_vector);
166
    this.id = other.id;
170
    this.id = other.id;
167
    this.addedOn = other.addedOn;
171
    this.addedOn = other.addedOn;
168
    this.affiliateId = other.affiliateId;
172
    this.affiliateId = other.affiliateId;
169
    this.userId = other.userId;
173
    this.userId = other.userId;
170
    if (other.isSetEvent()) {
174
    if (other.isSetEventType()) {
171
      this.event = other.event;
175
      this.eventType = other.eventType;
172
    }
176
    }
173
    if (other.isSetUrl()) {
177
    if (other.isSetUrl()) {
174
      this.url = other.url;
178
      this.url = other.url;
175
    }
179
    }
176
    if (other.isSetData()) {
180
    if (other.isSetData()) {
Line 277... Line 281...
277
 
281
 
278
  public void setUserIdIsSet(boolean value) {
282
  public void setUserIdIsSet(boolean value) {
279
    __isset_bit_vector.set(__USERID_ISSET_ID, value);
283
    __isset_bit_vector.set(__USERID_ISSET_ID, value);
280
  }
284
  }
281
 
285
 
-
 
286
  /**
-
 
287
   * 
-
 
288
   * @see TrackLogType
-
 
289
   */
282
  public String getEvent() {
290
  public TrackLogType getEventType() {
283
    return this.event;
291
    return this.eventType;
284
  }
292
  }
285
 
293
 
-
 
294
  /**
-
 
295
   * 
-
 
296
   * @see TrackLogType
-
 
297
   */
286
  public TrackLog setEvent(String event) {
298
  public TrackLog setEventType(TrackLogType eventType) {
287
    this.event = event;
299
    this.eventType = eventType;
288
    return this;
300
    return this;
289
  }
301
  }
290
 
302
 
291
  public void unsetEvent() {
303
  public void unsetEventType() {
292
    this.event = null;
304
    this.eventType = null;
293
  }
305
  }
294
 
306
 
295
  /** Returns true if field event is set (has been asigned a value) and false otherwise */
307
  /** Returns true if field eventType is set (has been asigned a value) and false otherwise */
296
  public boolean isSetEvent() {
308
  public boolean isSetEventType() {
297
    return this.event != null;
309
    return this.eventType != null;
298
  }
310
  }
299
 
311
 
300
  public void setEventIsSet(boolean value) {
312
  public void setEventTypeIsSet(boolean value) {
301
    if (!value) {
313
    if (!value) {
302
      this.event = null;
314
      this.eventType = null;
303
    }
315
    }
304
  }
316
  }
305
 
317
 
306
  public String getUrl() {
318
  public String getUrl() {
307
    return this.url;
319
    return this.url;
Line 383... Line 395...
383
      } else {
395
      } else {
384
        setUserId((Long)value);
396
        setUserId((Long)value);
385
      }
397
      }
386
      break;
398
      break;
387
 
399
 
388
    case EVENT:
400
    case EVENT_TYPE:
389
      if (value == null) {
401
      if (value == null) {
390
        unsetEvent();
402
        unsetEventType();
391
      } else {
403
      } else {
392
        setEvent((String)value);
404
        setEventType((TrackLogType)value);
393
      }
405
      }
394
      break;
406
      break;
395
 
407
 
396
    case URL:
408
    case URL:
397
      if (value == null) {
409
      if (value == null) {
Line 428... Line 440...
428
      return new Long(getAffiliateId());
440
      return new Long(getAffiliateId());
429
 
441
 
430
    case USER_ID:
442
    case USER_ID:
431
      return new Long(getUserId());
443
      return new Long(getUserId());
432
 
444
 
433
    case EVENT:
445
    case EVENT_TYPE:
434
      return getEvent();
446
      return getEventType();
435
 
447
 
436
    case URL:
448
    case URL:
437
      return getUrl();
449
      return getUrl();
438
 
450
 
439
    case DATA:
451
    case DATA:
Line 456... Line 468...
456
      return isSetAddedOn();
468
      return isSetAddedOn();
457
    case AFFILIATE_ID:
469
    case AFFILIATE_ID:
458
      return isSetAffiliateId();
470
      return isSetAffiliateId();
459
    case USER_ID:
471
    case USER_ID:
460
      return isSetUserId();
472
      return isSetUserId();
461
    case EVENT:
473
    case EVENT_TYPE:
462
      return isSetEvent();
474
      return isSetEventType();
463
    case URL:
475
    case URL:
464
      return isSetUrl();
476
      return isSetUrl();
465
    case DATA:
477
    case DATA:
466
      return isSetData();
478
      return isSetData();
467
    }
479
    }
Line 519... Line 531...
519
        return false;
531
        return false;
520
      if (this.userId != that.userId)
532
      if (this.userId != that.userId)
521
        return false;
533
        return false;
522
    }
534
    }
523
 
535
 
524
    boolean this_present_event = true && this.isSetEvent();
536
    boolean this_present_eventType = true && this.isSetEventType();
525
    boolean that_present_event = true && that.isSetEvent();
537
    boolean that_present_eventType = true && that.isSetEventType();
526
    if (this_present_event || that_present_event) {
538
    if (this_present_eventType || that_present_eventType) {
527
      if (!(this_present_event && that_present_event))
539
      if (!(this_present_eventType && that_present_eventType))
528
        return false;
540
        return false;
529
      if (!this.event.equals(that.event))
541
      if (!this.eventType.equals(that.eventType))
530
        return false;
542
        return false;
531
    }
543
    }
532
 
544
 
533
    boolean this_present_url = true && this.isSetUrl();
545
    boolean this_present_url = true && this.isSetUrl();
534
    boolean that_present_url = true && that.isSetUrl();
546
    boolean that_present_url = true && that.isSetUrl();
Line 594... Line 606...
594
    }
606
    }
595
    lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
607
    lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
596
    if (lastComparison != 0) {
608
    if (lastComparison != 0) {
597
      return lastComparison;
609
      return lastComparison;
598
    }
610
    }
599
    lastComparison = Boolean.valueOf(isSetEvent()).compareTo(isSetEvent());
611
    lastComparison = Boolean.valueOf(isSetEventType()).compareTo(isSetEventType());
600
    if (lastComparison != 0) {
612
    if (lastComparison != 0) {
601
      return lastComparison;
613
      return lastComparison;
602
    }
614
    }
603
    lastComparison = TBaseHelper.compareTo(event, typedOther.event);
615
    lastComparison = TBaseHelper.compareTo(eventType, typedOther.eventType);
604
    if (lastComparison != 0) {
616
    if (lastComparison != 0) {
605
      return lastComparison;
617
      return lastComparison;
606
    }
618
    }
607
    lastComparison = Boolean.valueOf(isSetUrl()).compareTo(isSetUrl());
619
    lastComparison = Boolean.valueOf(isSetUrl()).compareTo(isSetUrl());
608
    if (lastComparison != 0) {
620
    if (lastComparison != 0) {
Line 667... Line 679...
667
              setUserIdIsSet(true);
679
              setUserIdIsSet(true);
668
            } else { 
680
            } else { 
669
              TProtocolUtil.skip(iprot, field.type);
681
              TProtocolUtil.skip(iprot, field.type);
670
            }
682
            }
671
            break;
683
            break;
672
          case EVENT:
684
          case EVENT_TYPE:
673
            if (field.type == TType.STRING) {
685
            if (field.type == TType.I32) {
674
              this.event = iprot.readString();
686
              this.eventType = TrackLogType.findByValue(iprot.readI32());
675
            } else { 
687
            } else { 
676
              TProtocolUtil.skip(iprot, field.type);
688
              TProtocolUtil.skip(iprot, field.type);
677
            }
689
            }
678
            break;
690
            break;
679
          case URL:
691
          case URL:
Line 712... Line 724...
712
    oprot.writeI64(this.affiliateId);
724
    oprot.writeI64(this.affiliateId);
713
    oprot.writeFieldEnd();
725
    oprot.writeFieldEnd();
714
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
726
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
715
    oprot.writeI64(this.userId);
727
    oprot.writeI64(this.userId);
716
    oprot.writeFieldEnd();
728
    oprot.writeFieldEnd();
717
    if (this.event != null) {
729
    if (this.eventType != null) {
718
      oprot.writeFieldBegin(EVENT_FIELD_DESC);
730
      oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC);
719
      oprot.writeString(this.event);
731
      oprot.writeI32(this.eventType.getValue());
720
      oprot.writeFieldEnd();
732
      oprot.writeFieldEnd();
721
    }
733
    }
722
    if (this.url != null) {
734
    if (this.url != null) {
723
      oprot.writeFieldBegin(URL_FIELD_DESC);
735
      oprot.writeFieldBegin(URL_FIELD_DESC);
724
      oprot.writeString(this.url);
736
      oprot.writeString(this.url);
Line 752... Line 764...
752
    if (!first) sb.append(", ");
764
    if (!first) sb.append(", ");
753
    sb.append("userId:");
765
    sb.append("userId:");
754
    sb.append(this.userId);
766
    sb.append(this.userId);
755
    first = false;
767
    first = false;
756
    if (!first) sb.append(", ");
768
    if (!first) sb.append(", ");
757
    sb.append("event:");
769
    sb.append("eventType:");
758
    if (this.event == null) {
770
    if (this.eventType == null) {
759
      sb.append("null");
771
      sb.append("null");
760
    } else {
772
    } else {
-
 
773
      String eventType_name = eventType.name();
-
 
774
      if (eventType_name != null) {
-
 
775
        sb.append(eventType_name);
-
 
776
        sb.append(" (");
-
 
777
      }
761
      sb.append(this.event);
778
      sb.append(this.eventType);
-
 
779
      if (eventType_name != null) {
-
 
780
        sb.append(")");
-
 
781
      }
762
    }
782
    }
763
    first = false;
783
    first = false;
764
    if (!first) sb.append(", ");
784
    if (!first) sb.append(", ");
765
    sb.append("url:");
785
    sb.append("url:");
766
    if (this.url == null) {
786
    if (this.url == null) {