| 2643 |
varun.gupt |
1 |
/**
|
| 3430 |
rajveer |
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
| 2643 |
varun.gupt |
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.model.v1.user;
|
|
|
7 |
|
|
|
8 |
import java.util.List;
|
|
|
9 |
import java.util.ArrayList;
|
|
|
10 |
import java.util.Map;
|
|
|
11 |
import java.util.HashMap;
|
|
|
12 |
import java.util.EnumMap;
|
|
|
13 |
import java.util.Set;
|
|
|
14 |
import java.util.HashSet;
|
|
|
15 |
import java.util.EnumSet;
|
|
|
16 |
import java.util.Collections;
|
|
|
17 |
import java.util.BitSet;
|
| 3430 |
rajveer |
18 |
import java.nio.ByteBuffer;
|
| 2643 |
varun.gupt |
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
| 3430 |
rajveer |
23 |
public class UserNote implements org.apache.thrift.TBase<UserNote, UserNote._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserNote");
|
| 2643 |
varun.gupt |
25 |
|
| 3430 |
rajveer |
26 |
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("user_id", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entity_id", org.apache.thrift.protocol.TType.I64, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField SLIDE_FIELD_DESC = new org.apache.thrift.protocol.TField("slide", org.apache.thrift.protocol.TType.STRING, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField NOTE_FIELD_DESC = new org.apache.thrift.protocol.TField("note", org.apache.thrift.protocol.TType.STRING, (short)4);
|
| 2643 |
varun.gupt |
30 |
|
| 3430 |
rajveer |
31 |
private long user_id; // required
|
|
|
32 |
private long entity_id; // required
|
|
|
33 |
private String slide; // required
|
|
|
34 |
private String note; // required
|
| 2643 |
varun.gupt |
35 |
|
|
|
36 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
37 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 2643 |
varun.gupt |
38 |
USER_ID((short)1, "user_id"),
|
|
|
39 |
ENTITY_ID((short)2, "entity_id"),
|
| 2717 |
varun.gupt |
40 |
SLIDE((short)3, "slide"),
|
| 2643 |
varun.gupt |
41 |
NOTE((short)4, "note");
|
|
|
42 |
|
|
|
43 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
44 |
|
|
|
45 |
static {
|
|
|
46 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
47 |
byName.put(field.getFieldName(), field);
|
|
|
48 |
}
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
/**
|
|
|
52 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
53 |
*/
|
|
|
54 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
55 |
switch(fieldId) {
|
|
|
56 |
case 1: // USER_ID
|
|
|
57 |
return USER_ID;
|
|
|
58 |
case 2: // ENTITY_ID
|
|
|
59 |
return ENTITY_ID;
|
|
|
60 |
case 3: // SLIDE
|
|
|
61 |
return SLIDE;
|
|
|
62 |
case 4: // NOTE
|
|
|
63 |
return NOTE;
|
|
|
64 |
default:
|
|
|
65 |
return null;
|
|
|
66 |
}
|
| 2643 |
varun.gupt |
67 |
}
|
|
|
68 |
|
|
|
69 |
/**
|
|
|
70 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
71 |
* if it is not found.
|
|
|
72 |
*/
|
|
|
73 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
74 |
_Fields fields = findByThriftId(fieldId);
|
|
|
75 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
76 |
return fields;
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
/**
|
|
|
80 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
81 |
*/
|
|
|
82 |
public static _Fields findByName(String name) {
|
|
|
83 |
return byName.get(name);
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
private final short _thriftId;
|
|
|
87 |
private final String _fieldName;
|
|
|
88 |
|
|
|
89 |
_Fields(short thriftId, String fieldName) {
|
|
|
90 |
_thriftId = thriftId;
|
|
|
91 |
_fieldName = fieldName;
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
public short getThriftFieldId() {
|
|
|
95 |
return _thriftId;
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
public String getFieldName() {
|
|
|
99 |
return _fieldName;
|
|
|
100 |
}
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
// isset id assignments
|
|
|
104 |
private static final int __USER_ID_ISSET_ID = 0;
|
|
|
105 |
private static final int __ENTITY_ID_ISSET_ID = 1;
|
| 2717 |
varun.gupt |
106 |
private BitSet __isset_bit_vector = new BitSet(2);
|
| 2643 |
varun.gupt |
107 |
|
| 3430 |
rajveer |
108 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 2643 |
varun.gupt |
109 |
static {
|
| 3430 |
rajveer |
110 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
111 |
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("user_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
112 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
113 |
tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entity_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
114 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
115 |
tmpMap.put(_Fields.SLIDE, new org.apache.thrift.meta_data.FieldMetaData("slide", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
116 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
117 |
tmpMap.put(_Fields.NOTE, new org.apache.thrift.meta_data.FieldMetaData("note", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
118 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
119 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
120 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserNote.class, metaDataMap);
|
| 2643 |
varun.gupt |
121 |
}
|
|
|
122 |
|
|
|
123 |
public UserNote() {
|
|
|
124 |
}
|
|
|
125 |
|
|
|
126 |
public UserNote(
|
|
|
127 |
long user_id,
|
|
|
128 |
long entity_id,
|
| 2717 |
varun.gupt |
129 |
String slide,
|
| 2643 |
varun.gupt |
130 |
String note)
|
|
|
131 |
{
|
|
|
132 |
this();
|
|
|
133 |
this.user_id = user_id;
|
|
|
134 |
setUser_idIsSet(true);
|
|
|
135 |
this.entity_id = entity_id;
|
|
|
136 |
setEntity_idIsSet(true);
|
| 2717 |
varun.gupt |
137 |
this.slide = slide;
|
| 2643 |
varun.gupt |
138 |
this.note = note;
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
/**
|
|
|
142 |
* Performs a deep copy on <i>other</i>.
|
|
|
143 |
*/
|
|
|
144 |
public UserNote(UserNote other) {
|
|
|
145 |
__isset_bit_vector.clear();
|
|
|
146 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
147 |
this.user_id = other.user_id;
|
|
|
148 |
this.entity_id = other.entity_id;
|
| 2717 |
varun.gupt |
149 |
if (other.isSetSlide()) {
|
|
|
150 |
this.slide = other.slide;
|
|
|
151 |
}
|
| 2643 |
varun.gupt |
152 |
if (other.isSetNote()) {
|
|
|
153 |
this.note = other.note;
|
|
|
154 |
}
|
|
|
155 |
}
|
|
|
156 |
|
|
|
157 |
public UserNote deepCopy() {
|
|
|
158 |
return new UserNote(this);
|
|
|
159 |
}
|
|
|
160 |
|
| 3430 |
rajveer |
161 |
@Override
|
|
|
162 |
public void clear() {
|
|
|
163 |
setUser_idIsSet(false);
|
|
|
164 |
this.user_id = 0;
|
|
|
165 |
setEntity_idIsSet(false);
|
|
|
166 |
this.entity_id = 0;
|
|
|
167 |
this.slide = null;
|
|
|
168 |
this.note = null;
|
| 2643 |
varun.gupt |
169 |
}
|
|
|
170 |
|
|
|
171 |
public long getUser_id() {
|
|
|
172 |
return this.user_id;
|
|
|
173 |
}
|
|
|
174 |
|
| 3430 |
rajveer |
175 |
public void setUser_id(long user_id) {
|
| 2643 |
varun.gupt |
176 |
this.user_id = user_id;
|
|
|
177 |
setUser_idIsSet(true);
|
|
|
178 |
}
|
|
|
179 |
|
|
|
180 |
public void unsetUser_id() {
|
|
|
181 |
__isset_bit_vector.clear(__USER_ID_ISSET_ID);
|
|
|
182 |
}
|
|
|
183 |
|
| 3430 |
rajveer |
184 |
/** Returns true if field user_id is set (has been assigned a value) and false otherwise */
|
| 2643 |
varun.gupt |
185 |
public boolean isSetUser_id() {
|
|
|
186 |
return __isset_bit_vector.get(__USER_ID_ISSET_ID);
|
|
|
187 |
}
|
|
|
188 |
|
|
|
189 |
public void setUser_idIsSet(boolean value) {
|
|
|
190 |
__isset_bit_vector.set(__USER_ID_ISSET_ID, value);
|
|
|
191 |
}
|
|
|
192 |
|
|
|
193 |
public long getEntity_id() {
|
|
|
194 |
return this.entity_id;
|
|
|
195 |
}
|
|
|
196 |
|
| 3430 |
rajveer |
197 |
public void setEntity_id(long entity_id) {
|
| 2643 |
varun.gupt |
198 |
this.entity_id = entity_id;
|
|
|
199 |
setEntity_idIsSet(true);
|
|
|
200 |
}
|
|
|
201 |
|
|
|
202 |
public void unsetEntity_id() {
|
|
|
203 |
__isset_bit_vector.clear(__ENTITY_ID_ISSET_ID);
|
|
|
204 |
}
|
|
|
205 |
|
| 3430 |
rajveer |
206 |
/** Returns true if field entity_id is set (has been assigned a value) and false otherwise */
|
| 2643 |
varun.gupt |
207 |
public boolean isSetEntity_id() {
|
|
|
208 |
return __isset_bit_vector.get(__ENTITY_ID_ISSET_ID);
|
|
|
209 |
}
|
|
|
210 |
|
|
|
211 |
public void setEntity_idIsSet(boolean value) {
|
|
|
212 |
__isset_bit_vector.set(__ENTITY_ID_ISSET_ID, value);
|
|
|
213 |
}
|
|
|
214 |
|
| 2717 |
varun.gupt |
215 |
public String getSlide() {
|
|
|
216 |
return this.slide;
|
| 2643 |
varun.gupt |
217 |
}
|
|
|
218 |
|
| 3430 |
rajveer |
219 |
public void setSlide(String slide) {
|
| 2717 |
varun.gupt |
220 |
this.slide = slide;
|
| 2643 |
varun.gupt |
221 |
}
|
|
|
222 |
|
| 2717 |
varun.gupt |
223 |
public void unsetSlide() {
|
|
|
224 |
this.slide = null;
|
| 2643 |
varun.gupt |
225 |
}
|
|
|
226 |
|
| 3430 |
rajveer |
227 |
/** Returns true if field slide is set (has been assigned a value) and false otherwise */
|
| 2717 |
varun.gupt |
228 |
public boolean isSetSlide() {
|
|
|
229 |
return this.slide != null;
|
| 2643 |
varun.gupt |
230 |
}
|
|
|
231 |
|
| 2717 |
varun.gupt |
232 |
public void setSlideIsSet(boolean value) {
|
|
|
233 |
if (!value) {
|
|
|
234 |
this.slide = null;
|
|
|
235 |
}
|
| 2643 |
varun.gupt |
236 |
}
|
|
|
237 |
|
|
|
238 |
public String getNote() {
|
|
|
239 |
return this.note;
|
|
|
240 |
}
|
|
|
241 |
|
| 3430 |
rajveer |
242 |
public void setNote(String note) {
|
| 2643 |
varun.gupt |
243 |
this.note = note;
|
|
|
244 |
}
|
|
|
245 |
|
|
|
246 |
public void unsetNote() {
|
|
|
247 |
this.note = null;
|
|
|
248 |
}
|
|
|
249 |
|
| 3430 |
rajveer |
250 |
/** Returns true if field note is set (has been assigned a value) and false otherwise */
|
| 2643 |
varun.gupt |
251 |
public boolean isSetNote() {
|
|
|
252 |
return this.note != null;
|
|
|
253 |
}
|
|
|
254 |
|
|
|
255 |
public void setNoteIsSet(boolean value) {
|
|
|
256 |
if (!value) {
|
|
|
257 |
this.note = null;
|
|
|
258 |
}
|
|
|
259 |
}
|
|
|
260 |
|
|
|
261 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
262 |
switch (field) {
|
|
|
263 |
case USER_ID:
|
|
|
264 |
if (value == null) {
|
|
|
265 |
unsetUser_id();
|
|
|
266 |
} else {
|
|
|
267 |
setUser_id((Long)value);
|
|
|
268 |
}
|
|
|
269 |
break;
|
|
|
270 |
|
|
|
271 |
case ENTITY_ID:
|
|
|
272 |
if (value == null) {
|
|
|
273 |
unsetEntity_id();
|
|
|
274 |
} else {
|
|
|
275 |
setEntity_id((Long)value);
|
|
|
276 |
}
|
|
|
277 |
break;
|
|
|
278 |
|
| 2717 |
varun.gupt |
279 |
case SLIDE:
|
| 2643 |
varun.gupt |
280 |
if (value == null) {
|
| 2717 |
varun.gupt |
281 |
unsetSlide();
|
| 2643 |
varun.gupt |
282 |
} else {
|
| 2717 |
varun.gupt |
283 |
setSlide((String)value);
|
| 2643 |
varun.gupt |
284 |
}
|
|
|
285 |
break;
|
|
|
286 |
|
|
|
287 |
case NOTE:
|
|
|
288 |
if (value == null) {
|
|
|
289 |
unsetNote();
|
|
|
290 |
} else {
|
|
|
291 |
setNote((String)value);
|
|
|
292 |
}
|
|
|
293 |
break;
|
|
|
294 |
|
|
|
295 |
}
|
|
|
296 |
}
|
|
|
297 |
|
|
|
298 |
public Object getFieldValue(_Fields field) {
|
|
|
299 |
switch (field) {
|
|
|
300 |
case USER_ID:
|
| 3430 |
rajveer |
301 |
return Long.valueOf(getUser_id());
|
| 2643 |
varun.gupt |
302 |
|
|
|
303 |
case ENTITY_ID:
|
| 3430 |
rajveer |
304 |
return Long.valueOf(getEntity_id());
|
| 2643 |
varun.gupt |
305 |
|
| 2717 |
varun.gupt |
306 |
case SLIDE:
|
|
|
307 |
return getSlide();
|
| 2643 |
varun.gupt |
308 |
|
|
|
309 |
case NOTE:
|
|
|
310 |
return getNote();
|
|
|
311 |
|
|
|
312 |
}
|
|
|
313 |
throw new IllegalStateException();
|
|
|
314 |
}
|
|
|
315 |
|
| 3430 |
rajveer |
316 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
317 |
public boolean isSet(_Fields field) {
|
|
|
318 |
if (field == null) {
|
|
|
319 |
throw new IllegalArgumentException();
|
|
|
320 |
}
|
| 2643 |
varun.gupt |
321 |
|
|
|
322 |
switch (field) {
|
|
|
323 |
case USER_ID:
|
|
|
324 |
return isSetUser_id();
|
|
|
325 |
case ENTITY_ID:
|
|
|
326 |
return isSetEntity_id();
|
| 2717 |
varun.gupt |
327 |
case SLIDE:
|
|
|
328 |
return isSetSlide();
|
| 2643 |
varun.gupt |
329 |
case NOTE:
|
|
|
330 |
return isSetNote();
|
|
|
331 |
}
|
|
|
332 |
throw new IllegalStateException();
|
|
|
333 |
}
|
|
|
334 |
|
|
|
335 |
@Override
|
|
|
336 |
public boolean equals(Object that) {
|
|
|
337 |
if (that == null)
|
|
|
338 |
return false;
|
|
|
339 |
if (that instanceof UserNote)
|
|
|
340 |
return this.equals((UserNote)that);
|
|
|
341 |
return false;
|
|
|
342 |
}
|
|
|
343 |
|
|
|
344 |
public boolean equals(UserNote that) {
|
|
|
345 |
if (that == null)
|
|
|
346 |
return false;
|
|
|
347 |
|
|
|
348 |
boolean this_present_user_id = true;
|
|
|
349 |
boolean that_present_user_id = true;
|
|
|
350 |
if (this_present_user_id || that_present_user_id) {
|
|
|
351 |
if (!(this_present_user_id && that_present_user_id))
|
|
|
352 |
return false;
|
|
|
353 |
if (this.user_id != that.user_id)
|
|
|
354 |
return false;
|
|
|
355 |
}
|
|
|
356 |
|
|
|
357 |
boolean this_present_entity_id = true;
|
|
|
358 |
boolean that_present_entity_id = true;
|
|
|
359 |
if (this_present_entity_id || that_present_entity_id) {
|
|
|
360 |
if (!(this_present_entity_id && that_present_entity_id))
|
|
|
361 |
return false;
|
|
|
362 |
if (this.entity_id != that.entity_id)
|
|
|
363 |
return false;
|
|
|
364 |
}
|
|
|
365 |
|
| 2717 |
varun.gupt |
366 |
boolean this_present_slide = true && this.isSetSlide();
|
|
|
367 |
boolean that_present_slide = true && that.isSetSlide();
|
|
|
368 |
if (this_present_slide || that_present_slide) {
|
|
|
369 |
if (!(this_present_slide && that_present_slide))
|
| 2643 |
varun.gupt |
370 |
return false;
|
| 2717 |
varun.gupt |
371 |
if (!this.slide.equals(that.slide))
|
| 2643 |
varun.gupt |
372 |
return false;
|
|
|
373 |
}
|
|
|
374 |
|
|
|
375 |
boolean this_present_note = true && this.isSetNote();
|
|
|
376 |
boolean that_present_note = true && that.isSetNote();
|
|
|
377 |
if (this_present_note || that_present_note) {
|
|
|
378 |
if (!(this_present_note && that_present_note))
|
|
|
379 |
return false;
|
|
|
380 |
if (!this.note.equals(that.note))
|
|
|
381 |
return false;
|
|
|
382 |
}
|
|
|
383 |
|
|
|
384 |
return true;
|
|
|
385 |
}
|
|
|
386 |
|
|
|
387 |
@Override
|
|
|
388 |
public int hashCode() {
|
|
|
389 |
return 0;
|
|
|
390 |
}
|
|
|
391 |
|
|
|
392 |
public int compareTo(UserNote other) {
|
|
|
393 |
if (!getClass().equals(other.getClass())) {
|
|
|
394 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
395 |
}
|
|
|
396 |
|
|
|
397 |
int lastComparison = 0;
|
|
|
398 |
UserNote typedOther = (UserNote)other;
|
|
|
399 |
|
| 3430 |
rajveer |
400 |
lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(typedOther.isSetUser_id());
|
| 2643 |
varun.gupt |
401 |
if (lastComparison != 0) {
|
|
|
402 |
return lastComparison;
|
|
|
403 |
}
|
| 3430 |
rajveer |
404 |
if (isSetUser_id()) {
|
|
|
405 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_id, typedOther.user_id);
|
|
|
406 |
if (lastComparison != 0) {
|
|
|
407 |
return lastComparison;
|
|
|
408 |
}
|
| 2643 |
varun.gupt |
409 |
}
|
| 3430 |
rajveer |
410 |
lastComparison = Boolean.valueOf(isSetEntity_id()).compareTo(typedOther.isSetEntity_id());
|
| 2643 |
varun.gupt |
411 |
if (lastComparison != 0) {
|
|
|
412 |
return lastComparison;
|
|
|
413 |
}
|
| 3430 |
rajveer |
414 |
if (isSetEntity_id()) {
|
|
|
415 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entity_id, typedOther.entity_id);
|
|
|
416 |
if (lastComparison != 0) {
|
|
|
417 |
return lastComparison;
|
|
|
418 |
}
|
| 2643 |
varun.gupt |
419 |
}
|
| 3430 |
rajveer |
420 |
lastComparison = Boolean.valueOf(isSetSlide()).compareTo(typedOther.isSetSlide());
|
| 2643 |
varun.gupt |
421 |
if (lastComparison != 0) {
|
|
|
422 |
return lastComparison;
|
|
|
423 |
}
|
| 3430 |
rajveer |
424 |
if (isSetSlide()) {
|
|
|
425 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slide, typedOther.slide);
|
|
|
426 |
if (lastComparison != 0) {
|
|
|
427 |
return lastComparison;
|
|
|
428 |
}
|
| 2643 |
varun.gupt |
429 |
}
|
| 3430 |
rajveer |
430 |
lastComparison = Boolean.valueOf(isSetNote()).compareTo(typedOther.isSetNote());
|
| 2643 |
varun.gupt |
431 |
if (lastComparison != 0) {
|
|
|
432 |
return lastComparison;
|
|
|
433 |
}
|
| 3430 |
rajveer |
434 |
if (isSetNote()) {
|
|
|
435 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.note, typedOther.note);
|
|
|
436 |
if (lastComparison != 0) {
|
|
|
437 |
return lastComparison;
|
|
|
438 |
}
|
| 2643 |
varun.gupt |
439 |
}
|
|
|
440 |
return 0;
|
|
|
441 |
}
|
|
|
442 |
|
| 3430 |
rajveer |
443 |
public _Fields fieldForId(int fieldId) {
|
|
|
444 |
return _Fields.findByThriftId(fieldId);
|
|
|
445 |
}
|
|
|
446 |
|
|
|
447 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
448 |
org.apache.thrift.protocol.TField field;
|
| 2643 |
varun.gupt |
449 |
iprot.readStructBegin();
|
|
|
450 |
while (true)
|
|
|
451 |
{
|
|
|
452 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
453 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 2643 |
varun.gupt |
454 |
break;
|
|
|
455 |
}
|
| 3430 |
rajveer |
456 |
switch (field.id) {
|
|
|
457 |
case 1: // USER_ID
|
|
|
458 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
459 |
this.user_id = iprot.readI64();
|
|
|
460 |
setUser_idIsSet(true);
|
|
|
461 |
} else {
|
|
|
462 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
463 |
}
|
|
|
464 |
break;
|
|
|
465 |
case 2: // ENTITY_ID
|
|
|
466 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
467 |
this.entity_id = iprot.readI64();
|
|
|
468 |
setEntity_idIsSet(true);
|
|
|
469 |
} else {
|
|
|
470 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
471 |
}
|
|
|
472 |
break;
|
|
|
473 |
case 3: // SLIDE
|
|
|
474 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
475 |
this.slide = iprot.readString();
|
|
|
476 |
} else {
|
|
|
477 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
478 |
}
|
|
|
479 |
break;
|
|
|
480 |
case 4: // NOTE
|
|
|
481 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
482 |
this.note = iprot.readString();
|
|
|
483 |
} else {
|
|
|
484 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
485 |
}
|
|
|
486 |
break;
|
|
|
487 |
default:
|
|
|
488 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 2643 |
varun.gupt |
489 |
}
|
| 3430 |
rajveer |
490 |
iprot.readFieldEnd();
|
| 2643 |
varun.gupt |
491 |
}
|
|
|
492 |
iprot.readStructEnd();
|
|
|
493 |
validate();
|
|
|
494 |
}
|
|
|
495 |
|
| 3430 |
rajveer |
496 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 2643 |
varun.gupt |
497 |
validate();
|
|
|
498 |
|
|
|
499 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
500 |
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
|
|
|
501 |
oprot.writeI64(this.user_id);
|
|
|
502 |
oprot.writeFieldEnd();
|
|
|
503 |
oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
|
|
|
504 |
oprot.writeI64(this.entity_id);
|
|
|
505 |
oprot.writeFieldEnd();
|
| 2717 |
varun.gupt |
506 |
if (this.slide != null) {
|
|
|
507 |
oprot.writeFieldBegin(SLIDE_FIELD_DESC);
|
|
|
508 |
oprot.writeString(this.slide);
|
|
|
509 |
oprot.writeFieldEnd();
|
|
|
510 |
}
|
| 2643 |
varun.gupt |
511 |
if (this.note != null) {
|
|
|
512 |
oprot.writeFieldBegin(NOTE_FIELD_DESC);
|
|
|
513 |
oprot.writeString(this.note);
|
|
|
514 |
oprot.writeFieldEnd();
|
|
|
515 |
}
|
|
|
516 |
oprot.writeFieldStop();
|
|
|
517 |
oprot.writeStructEnd();
|
|
|
518 |
}
|
|
|
519 |
|
|
|
520 |
@Override
|
|
|
521 |
public String toString() {
|
|
|
522 |
StringBuilder sb = new StringBuilder("UserNote(");
|
|
|
523 |
boolean first = true;
|
|
|
524 |
|
|
|
525 |
sb.append("user_id:");
|
|
|
526 |
sb.append(this.user_id);
|
|
|
527 |
first = false;
|
|
|
528 |
if (!first) sb.append(", ");
|
|
|
529 |
sb.append("entity_id:");
|
|
|
530 |
sb.append(this.entity_id);
|
|
|
531 |
first = false;
|
|
|
532 |
if (!first) sb.append(", ");
|
| 2717 |
varun.gupt |
533 |
sb.append("slide:");
|
|
|
534 |
if (this.slide == null) {
|
|
|
535 |
sb.append("null");
|
|
|
536 |
} else {
|
|
|
537 |
sb.append(this.slide);
|
|
|
538 |
}
|
| 2643 |
varun.gupt |
539 |
first = false;
|
|
|
540 |
if (!first) sb.append(", ");
|
|
|
541 |
sb.append("note:");
|
|
|
542 |
if (this.note == null) {
|
|
|
543 |
sb.append("null");
|
|
|
544 |
} else {
|
|
|
545 |
sb.append(this.note);
|
|
|
546 |
}
|
|
|
547 |
first = false;
|
|
|
548 |
sb.append(")");
|
|
|
549 |
return sb.toString();
|
|
|
550 |
}
|
|
|
551 |
|
| 3430 |
rajveer |
552 |
public void validate() throws org.apache.thrift.TException {
|
| 2643 |
varun.gupt |
553 |
// check for required fields
|
|
|
554 |
}
|
|
|
555 |
|
| 3430 |
rajveer |
556 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
557 |
try {
|
|
|
558 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
559 |
} catch (org.apache.thrift.TException te) {
|
|
|
560 |
throw new java.io.IOException(te);
|
|
|
561 |
}
|
|
|
562 |
}
|
|
|
563 |
|
|
|
564 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
565 |
try {
|
|
|
566 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
567 |
__isset_bit_vector = new BitSet(1);
|
|
|
568 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
569 |
} catch (org.apache.thrift.TException te) {
|
|
|
570 |
throw new java.io.IOException(te);
|
|
|
571 |
}
|
|
|
572 |
}
|
|
|
573 |
|
| 2643 |
varun.gupt |
574 |
}
|
|
|
575 |
|