Subversion Repositories SmartDukaan

Rev

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

Rev 2643 Rev 2717
Line 26... Line 26...
26
public class UserNote implements TBase<UserNote._Fields>, java.io.Serializable, Cloneable, Comparable<UserNote> {
26
public class UserNote implements TBase<UserNote._Fields>, java.io.Serializable, Cloneable, Comparable<UserNote> {
27
  private static final TStruct STRUCT_DESC = new TStruct("UserNote");
27
  private static final TStruct STRUCT_DESC = new TStruct("UserNote");
28
 
28
 
29
  private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
29
  private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
30
  private static final TField ENTITY_ID_FIELD_DESC = new TField("entity_id", TType.I64, (short)2);
30
  private static final TField ENTITY_ID_FIELD_DESC = new TField("entity_id", TType.I64, (short)2);
31
  private static final TField SLIDE_ID_FIELD_DESC = new TField("slide_id", TType.I64, (short)3);
31
  private static final TField SLIDE_FIELD_DESC = new TField("slide", TType.STRING, (short)3);
32
  private static final TField NOTE_FIELD_DESC = new TField("note", TType.STRING, (short)4);
32
  private static final TField NOTE_FIELD_DESC = new TField("note", TType.STRING, (short)4);
33
 
33
 
34
  private long user_id;
34
  private long user_id;
35
  private long entity_id;
35
  private long entity_id;
36
  private long slide_id;
36
  private String slide;
37
  private String note;
37
  private String note;
38
 
38
 
39
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
39
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
40
  public enum _Fields implements TFieldIdEnum {
40
  public enum _Fields implements TFieldIdEnum {
41
    USER_ID((short)1, "user_id"),
41
    USER_ID((short)1, "user_id"),
42
    ENTITY_ID((short)2, "entity_id"),
42
    ENTITY_ID((short)2, "entity_id"),
43
    SLIDE_ID((short)3, "slide_id"),
43
    SLIDE((short)3, "slide"),
44
    NOTE((short)4, "note");
44
    NOTE((short)4, "note");
45
 
45
 
46
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
46
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
47
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
47
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
48
 
48
 
Line 95... Line 95...
95
  }
95
  }
96
 
96
 
97
  // isset id assignments
97
  // isset id assignments
98
  private static final int __USER_ID_ISSET_ID = 0;
98
  private static final int __USER_ID_ISSET_ID = 0;
99
  private static final int __ENTITY_ID_ISSET_ID = 1;
99
  private static final int __ENTITY_ID_ISSET_ID = 1;
100
  private static final int __SLIDE_ID_ISSET_ID = 2;
-
 
101
  private BitSet __isset_bit_vector = new BitSet(3);
100
  private BitSet __isset_bit_vector = new BitSet(2);
102
 
101
 
103
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
102
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
104
    put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
103
    put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
105
        new FieldValueMetaData(TType.I64)));
104
        new FieldValueMetaData(TType.I64)));
106
    put(_Fields.ENTITY_ID, new FieldMetaData("entity_id", TFieldRequirementType.DEFAULT, 
105
    put(_Fields.ENTITY_ID, new FieldMetaData("entity_id", TFieldRequirementType.DEFAULT, 
107
        new FieldValueMetaData(TType.I64)));
106
        new FieldValueMetaData(TType.I64)));
108
    put(_Fields.SLIDE_ID, new FieldMetaData("slide_id", TFieldRequirementType.DEFAULT, 
107
    put(_Fields.SLIDE, new FieldMetaData("slide", TFieldRequirementType.DEFAULT, 
109
        new FieldValueMetaData(TType.I64)));
108
        new FieldValueMetaData(TType.STRING)));
110
    put(_Fields.NOTE, new FieldMetaData("note", TFieldRequirementType.DEFAULT, 
109
    put(_Fields.NOTE, new FieldMetaData("note", TFieldRequirementType.DEFAULT, 
111
        new FieldValueMetaData(TType.STRING)));
110
        new FieldValueMetaData(TType.STRING)));
112
  }});
111
  }});
113
 
112
 
114
  static {
113
  static {
Line 119... Line 118...
119
  }
118
  }
120
 
119
 
121
  public UserNote(
120
  public UserNote(
122
    long user_id,
121
    long user_id,
123
    long entity_id,
122
    long entity_id,
124
    long slide_id,
123
    String slide,
125
    String note)
124
    String note)
126
  {
125
  {
127
    this();
126
    this();
128
    this.user_id = user_id;
127
    this.user_id = user_id;
129
    setUser_idIsSet(true);
128
    setUser_idIsSet(true);
130
    this.entity_id = entity_id;
129
    this.entity_id = entity_id;
131
    setEntity_idIsSet(true);
130
    setEntity_idIsSet(true);
132
    this.slide_id = slide_id;
131
    this.slide = slide;
133
    setSlide_idIsSet(true);
-
 
134
    this.note = note;
132
    this.note = note;
135
  }
133
  }
136
 
134
 
137
  /**
135
  /**
138
   * Performs a deep copy on <i>other</i>.
136
   * Performs a deep copy on <i>other</i>.
Line 140... Line 138...
140
  public UserNote(UserNote other) {
138
  public UserNote(UserNote other) {
141
    __isset_bit_vector.clear();
139
    __isset_bit_vector.clear();
142
    __isset_bit_vector.or(other.__isset_bit_vector);
140
    __isset_bit_vector.or(other.__isset_bit_vector);
143
    this.user_id = other.user_id;
141
    this.user_id = other.user_id;
144
    this.entity_id = other.entity_id;
142
    this.entity_id = other.entity_id;
-
 
143
    if (other.isSetSlide()) {
145
    this.slide_id = other.slide_id;
144
      this.slide = other.slide;
-
 
145
    }
146
    if (other.isSetNote()) {
146
    if (other.isSetNote()) {
147
      this.note = other.note;
147
      this.note = other.note;
148
    }
148
    }
149
  }
149
  }
150
 
150
 
Line 201... Line 201...
201
 
201
 
202
  public void setEntity_idIsSet(boolean value) {
202
  public void setEntity_idIsSet(boolean value) {
203
    __isset_bit_vector.set(__ENTITY_ID_ISSET_ID, value);
203
    __isset_bit_vector.set(__ENTITY_ID_ISSET_ID, value);
204
  }
204
  }
205
 
205
 
206
  public long getSlide_id() {
206
  public String getSlide() {
207
    return this.slide_id;
207
    return this.slide;
208
  }
208
  }
209
 
209
 
210
  public UserNote setSlide_id(long slide_id) {
210
  public UserNote setSlide(String slide) {
211
    this.slide_id = slide_id;
211
    this.slide = slide;
212
    setSlide_idIsSet(true);
-
 
213
    return this;
212
    return this;
214
  }
213
  }
215
 
214
 
216
  public void unsetSlide_id() {
215
  public void unsetSlide() {
217
    __isset_bit_vector.clear(__SLIDE_ID_ISSET_ID);
216
    this.slide = null;
218
  }
217
  }
219
 
218
 
220
  /** Returns true if field slide_id is set (has been asigned a value) and false otherwise */
219
  /** Returns true if field slide is set (has been asigned a value) and false otherwise */
221
  public boolean isSetSlide_id() {
220
  public boolean isSetSlide() {
222
    return __isset_bit_vector.get(__SLIDE_ID_ISSET_ID);
221
    return this.slide != null;
223
  }
222
  }
224
 
223
 
225
  public void setSlide_idIsSet(boolean value) {
224
  public void setSlideIsSet(boolean value) {
-
 
225
    if (!value) {
226
    __isset_bit_vector.set(__SLIDE_ID_ISSET_ID, value);
226
      this.slide = null;
-
 
227
    }
227
  }
228
  }
228
 
229
 
229
  public String getNote() {
230
  public String getNote() {
230
    return this.note;
231
    return this.note;
231
  }
232
  }
Line 266... Line 267...
266
      } else {
267
      } else {
267
        setEntity_id((Long)value);
268
        setEntity_id((Long)value);
268
      }
269
      }
269
      break;
270
      break;
270
 
271
 
271
    case SLIDE_ID:
272
    case SLIDE:
272
      if (value == null) {
273
      if (value == null) {
273
        unsetSlide_id();
274
        unsetSlide();
274
      } else {
275
      } else {
275
        setSlide_id((Long)value);
276
        setSlide((String)value);
276
      }
277
      }
277
      break;
278
      break;
278
 
279
 
279
    case NOTE:
280
    case NOTE:
280
      if (value == null) {
281
      if (value == null) {
Line 297... Line 298...
297
      return new Long(getUser_id());
298
      return new Long(getUser_id());
298
 
299
 
299
    case ENTITY_ID:
300
    case ENTITY_ID:
300
      return new Long(getEntity_id());
301
      return new Long(getEntity_id());
301
 
302
 
302
    case SLIDE_ID:
303
    case SLIDE:
303
      return new Long(getSlide_id());
304
      return getSlide();
304
 
305
 
305
    case NOTE:
306
    case NOTE:
306
      return getNote();
307
      return getNote();
307
 
308
 
308
    }
309
    }
Line 318... Line 319...
318
    switch (field) {
319
    switch (field) {
319
    case USER_ID:
320
    case USER_ID:
320
      return isSetUser_id();
321
      return isSetUser_id();
321
    case ENTITY_ID:
322
    case ENTITY_ID:
322
      return isSetEntity_id();
323
      return isSetEntity_id();
323
    case SLIDE_ID:
324
    case SLIDE:
324
      return isSetSlide_id();
325
      return isSetSlide();
325
    case NOTE:
326
    case NOTE:
326
      return isSetNote();
327
      return isSetNote();
327
    }
328
    }
328
    throw new IllegalStateException();
329
    throw new IllegalStateException();
329
  }
330
  }
Line 361... Line 362...
361
        return false;
362
        return false;
362
      if (this.entity_id != that.entity_id)
363
      if (this.entity_id != that.entity_id)
363
        return false;
364
        return false;
364
    }
365
    }
365
 
366
 
366
    boolean this_present_slide_id = true;
367
    boolean this_present_slide = true && this.isSetSlide();
367
    boolean that_present_slide_id = true;
368
    boolean that_present_slide = true && that.isSetSlide();
368
    if (this_present_slide_id || that_present_slide_id) {
369
    if (this_present_slide || that_present_slide) {
369
      if (!(this_present_slide_id && that_present_slide_id))
370
      if (!(this_present_slide && that_present_slide))
370
        return false;
371
        return false;
371
      if (this.slide_id != that.slide_id)
372
      if (!this.slide.equals(that.slide))
372
        return false;
373
        return false;
373
    }
374
    }
374
 
375
 
375
    boolean this_present_note = true && this.isSetNote();
376
    boolean this_present_note = true && this.isSetNote();
376
    boolean that_present_note = true && that.isSetNote();
377
    boolean that_present_note = true && that.isSetNote();
Line 411... Line 412...
411
    }
412
    }
412
    lastComparison = TBaseHelper.compareTo(entity_id, typedOther.entity_id);
413
    lastComparison = TBaseHelper.compareTo(entity_id, typedOther.entity_id);
413
    if (lastComparison != 0) {
414
    if (lastComparison != 0) {
414
      return lastComparison;
415
      return lastComparison;
415
    }
416
    }
416
    lastComparison = Boolean.valueOf(isSetSlide_id()).compareTo(isSetSlide_id());
417
    lastComparison = Boolean.valueOf(isSetSlide()).compareTo(isSetSlide());
417
    if (lastComparison != 0) {
418
    if (lastComparison != 0) {
418
      return lastComparison;
419
      return lastComparison;
419
    }
420
    }
420
    lastComparison = TBaseHelper.compareTo(slide_id, typedOther.slide_id);
421
    lastComparison = TBaseHelper.compareTo(slide, typedOther.slide);
421
    if (lastComparison != 0) {
422
    if (lastComparison != 0) {
422
      return lastComparison;
423
      return lastComparison;
423
    }
424
    }
424
    lastComparison = Boolean.valueOf(isSetNote()).compareTo(isSetNote());
425
    lastComparison = Boolean.valueOf(isSetNote()).compareTo(isSetNote());
425
    if (lastComparison != 0) {
426
    if (lastComparison != 0) {
Line 460... Line 461...
460
              setEntity_idIsSet(true);
461
              setEntity_idIsSet(true);
461
            } else { 
462
            } else { 
462
              TProtocolUtil.skip(iprot, field.type);
463
              TProtocolUtil.skip(iprot, field.type);
463
            }
464
            }
464
            break;
465
            break;
465
          case SLIDE_ID:
466
          case SLIDE:
466
            if (field.type == TType.I64) {
467
            if (field.type == TType.STRING) {
467
              this.slide_id = iprot.readI64();
468
              this.slide = iprot.readString();
468
              setSlide_idIsSet(true);
-
 
469
            } else { 
469
            } else { 
470
              TProtocolUtil.skip(iprot, field.type);
470
              TProtocolUtil.skip(iprot, field.type);
471
            }
471
            }
472
            break;
472
            break;
473
          case NOTE:
473
          case NOTE:
Line 493... Line 493...
493
    oprot.writeI64(this.user_id);
493
    oprot.writeI64(this.user_id);
494
    oprot.writeFieldEnd();
494
    oprot.writeFieldEnd();
495
    oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
495
    oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
496
    oprot.writeI64(this.entity_id);
496
    oprot.writeI64(this.entity_id);
497
    oprot.writeFieldEnd();
497
    oprot.writeFieldEnd();
-
 
498
    if (this.slide != null) {
498
    oprot.writeFieldBegin(SLIDE_ID_FIELD_DESC);
499
      oprot.writeFieldBegin(SLIDE_FIELD_DESC);
499
    oprot.writeI64(this.slide_id);
500
      oprot.writeString(this.slide);
500
    oprot.writeFieldEnd();
501
      oprot.writeFieldEnd();
-
 
502
    }
501
    if (this.note != null) {
503
    if (this.note != null) {
502
      oprot.writeFieldBegin(NOTE_FIELD_DESC);
504
      oprot.writeFieldBegin(NOTE_FIELD_DESC);
503
      oprot.writeString(this.note);
505
      oprot.writeString(this.note);
504
      oprot.writeFieldEnd();
506
      oprot.writeFieldEnd();
505
    }
507
    }
Line 518... Line 520...
518
    if (!first) sb.append(", ");
520
    if (!first) sb.append(", ");
519
    sb.append("entity_id:");
521
    sb.append("entity_id:");
520
    sb.append(this.entity_id);
522
    sb.append(this.entity_id);
521
    first = false;
523
    first = false;
522
    if (!first) sb.append(", ");
524
    if (!first) sb.append(", ");
523
    sb.append("slide_id:");
525
    sb.append("slide:");
-
 
526
    if (this.slide == null) {
-
 
527
      sb.append("null");
-
 
528
    } else {
524
    sb.append(this.slide_id);
529
      sb.append(this.slide);
-
 
530
    }
525
    first = false;
531
    first = false;
526
    if (!first) sb.append(", ");
532
    if (!first) sb.append(", ");
527
    sb.append("note:");
533
    sb.append("note:");
528
    if (this.note == null) {
534
    if (this.note == null) {
529
      sb.append("null");
535
      sb.append("null");