| 12696 |
amit.gupta |
1 |
/**
|
|
|
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
|
|
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.utils;
|
|
|
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;
|
|
|
18 |
import java.nio.ByteBuffer;
|
|
|
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
|
|
23 |
public class DealerAuth implements org.apache.thrift.TBase<DealerAuth, DealerAuth._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DealerAuth");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.I32, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField CREATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("createdOn", org.apache.thrift.protocol.TType.I64, (short)4);
|
|
|
30 |
private static final org.apache.thrift.protocol.TField LAST_LOGGED_IN_FIELD_DESC = new org.apache.thrift.protocol.TField("lastLoggedIn", org.apache.thrift.protocol.TType.I64, (short)5);
|
|
|
31 |
private static final org.apache.thrift.protocol.TField LAST_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("lastLocation", org.apache.thrift.protocol.TType.STRUCT, (short)6);
|
|
|
32 |
private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)7);
|
|
|
33 |
|
|
|
34 |
private String username; // required
|
|
|
35 |
private String password; // required
|
|
|
36 |
private DealerAuthRole role; // required
|
|
|
37 |
private long createdOn; // required
|
|
|
38 |
private long lastLoggedIn; // required
|
|
|
39 |
private Location lastLocation; // required
|
|
|
40 |
private boolean isActive; // required
|
|
|
41 |
|
|
|
42 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
43 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
44 |
USERNAME((short)1, "username"),
|
|
|
45 |
PASSWORD((short)2, "password"),
|
|
|
46 |
/**
|
|
|
47 |
*
|
|
|
48 |
* @see DealerAuthRole
|
|
|
49 |
*/
|
|
|
50 |
ROLE((short)3, "role"),
|
|
|
51 |
CREATED_ON((short)4, "createdOn"),
|
|
|
52 |
LAST_LOGGED_IN((short)5, "lastLoggedIn"),
|
|
|
53 |
LAST_LOCATION((short)6, "lastLocation"),
|
|
|
54 |
IS_ACTIVE((short)7, "isActive");
|
|
|
55 |
|
|
|
56 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
57 |
|
|
|
58 |
static {
|
|
|
59 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
60 |
byName.put(field.getFieldName(), field);
|
|
|
61 |
}
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
/**
|
|
|
65 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
66 |
*/
|
|
|
67 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
68 |
switch(fieldId) {
|
|
|
69 |
case 1: // USERNAME
|
|
|
70 |
return USERNAME;
|
|
|
71 |
case 2: // PASSWORD
|
|
|
72 |
return PASSWORD;
|
|
|
73 |
case 3: // ROLE
|
|
|
74 |
return ROLE;
|
|
|
75 |
case 4: // CREATED_ON
|
|
|
76 |
return CREATED_ON;
|
|
|
77 |
case 5: // LAST_LOGGED_IN
|
|
|
78 |
return LAST_LOGGED_IN;
|
|
|
79 |
case 6: // LAST_LOCATION
|
|
|
80 |
return LAST_LOCATION;
|
|
|
81 |
case 7: // IS_ACTIVE
|
|
|
82 |
return IS_ACTIVE;
|
|
|
83 |
default:
|
|
|
84 |
return null;
|
|
|
85 |
}
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
/**
|
|
|
89 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
90 |
* if it is not found.
|
|
|
91 |
*/
|
|
|
92 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
93 |
_Fields fields = findByThriftId(fieldId);
|
|
|
94 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
95 |
return fields;
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
/**
|
|
|
99 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
100 |
*/
|
|
|
101 |
public static _Fields findByName(String name) {
|
|
|
102 |
return byName.get(name);
|
|
|
103 |
}
|
|
|
104 |
|
|
|
105 |
private final short _thriftId;
|
|
|
106 |
private final String _fieldName;
|
|
|
107 |
|
|
|
108 |
_Fields(short thriftId, String fieldName) {
|
|
|
109 |
_thriftId = thriftId;
|
|
|
110 |
_fieldName = fieldName;
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
public short getThriftFieldId() {
|
|
|
114 |
return _thriftId;
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
public String getFieldName() {
|
|
|
118 |
return _fieldName;
|
|
|
119 |
}
|
|
|
120 |
}
|
|
|
121 |
|
|
|
122 |
// isset id assignments
|
|
|
123 |
private static final int __CREATEDON_ISSET_ID = 0;
|
|
|
124 |
private static final int __LASTLOGGEDIN_ISSET_ID = 1;
|
|
|
125 |
private static final int __ISACTIVE_ISSET_ID = 2;
|
|
|
126 |
private BitSet __isset_bit_vector = new BitSet(3);
|
|
|
127 |
|
|
|
128 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
129 |
static {
|
|
|
130 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
131 |
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
132 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
133 |
tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
134 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
135 |
tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
136 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DealerAuthRole.class)));
|
|
|
137 |
tmpMap.put(_Fields.CREATED_ON, new org.apache.thrift.meta_data.FieldMetaData("createdOn", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
138 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
139 |
tmpMap.put(_Fields.LAST_LOGGED_IN, new org.apache.thrift.meta_data.FieldMetaData("lastLoggedIn", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
140 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
141 |
tmpMap.put(_Fields.LAST_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("lastLocation", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
142 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Location.class)));
|
|
|
143 |
tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
144 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
|
|
145 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
146 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DealerAuth.class, metaDataMap);
|
|
|
147 |
}
|
|
|
148 |
|
|
|
149 |
public DealerAuth() {
|
|
|
150 |
}
|
|
|
151 |
|
|
|
152 |
public DealerAuth(
|
|
|
153 |
String username,
|
|
|
154 |
String password,
|
|
|
155 |
DealerAuthRole role,
|
|
|
156 |
long createdOn,
|
|
|
157 |
long lastLoggedIn,
|
|
|
158 |
Location lastLocation,
|
|
|
159 |
boolean isActive)
|
|
|
160 |
{
|
|
|
161 |
this();
|
|
|
162 |
this.username = username;
|
|
|
163 |
this.password = password;
|
|
|
164 |
this.role = role;
|
|
|
165 |
this.createdOn = createdOn;
|
|
|
166 |
setCreatedOnIsSet(true);
|
|
|
167 |
this.lastLoggedIn = lastLoggedIn;
|
|
|
168 |
setLastLoggedInIsSet(true);
|
|
|
169 |
this.lastLocation = lastLocation;
|
|
|
170 |
this.isActive = isActive;
|
|
|
171 |
setIsActiveIsSet(true);
|
|
|
172 |
}
|
|
|
173 |
|
|
|
174 |
/**
|
|
|
175 |
* Performs a deep copy on <i>other</i>.
|
|
|
176 |
*/
|
|
|
177 |
public DealerAuth(DealerAuth other) {
|
|
|
178 |
__isset_bit_vector.clear();
|
|
|
179 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
180 |
if (other.isSetUsername()) {
|
|
|
181 |
this.username = other.username;
|
|
|
182 |
}
|
|
|
183 |
if (other.isSetPassword()) {
|
|
|
184 |
this.password = other.password;
|
|
|
185 |
}
|
|
|
186 |
if (other.isSetRole()) {
|
|
|
187 |
this.role = other.role;
|
|
|
188 |
}
|
|
|
189 |
this.createdOn = other.createdOn;
|
|
|
190 |
this.lastLoggedIn = other.lastLoggedIn;
|
|
|
191 |
if (other.isSetLastLocation()) {
|
|
|
192 |
this.lastLocation = new Location(other.lastLocation);
|
|
|
193 |
}
|
|
|
194 |
this.isActive = other.isActive;
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
public DealerAuth deepCopy() {
|
|
|
198 |
return new DealerAuth(this);
|
|
|
199 |
}
|
|
|
200 |
|
|
|
201 |
@Override
|
|
|
202 |
public void clear() {
|
|
|
203 |
this.username = null;
|
|
|
204 |
this.password = null;
|
|
|
205 |
this.role = null;
|
|
|
206 |
setCreatedOnIsSet(false);
|
|
|
207 |
this.createdOn = 0;
|
|
|
208 |
setLastLoggedInIsSet(false);
|
|
|
209 |
this.lastLoggedIn = 0;
|
|
|
210 |
this.lastLocation = null;
|
|
|
211 |
setIsActiveIsSet(false);
|
|
|
212 |
this.isActive = false;
|
|
|
213 |
}
|
|
|
214 |
|
|
|
215 |
public String getUsername() {
|
|
|
216 |
return this.username;
|
|
|
217 |
}
|
|
|
218 |
|
|
|
219 |
public void setUsername(String username) {
|
|
|
220 |
this.username = username;
|
|
|
221 |
}
|
|
|
222 |
|
|
|
223 |
public void unsetUsername() {
|
|
|
224 |
this.username = null;
|
|
|
225 |
}
|
|
|
226 |
|
|
|
227 |
/** Returns true if field username is set (has been assigned a value) and false otherwise */
|
|
|
228 |
public boolean isSetUsername() {
|
|
|
229 |
return this.username != null;
|
|
|
230 |
}
|
|
|
231 |
|
|
|
232 |
public void setUsernameIsSet(boolean value) {
|
|
|
233 |
if (!value) {
|
|
|
234 |
this.username = null;
|
|
|
235 |
}
|
|
|
236 |
}
|
|
|
237 |
|
|
|
238 |
public String getPassword() {
|
|
|
239 |
return this.password;
|
|
|
240 |
}
|
|
|
241 |
|
|
|
242 |
public void setPassword(String password) {
|
|
|
243 |
this.password = password;
|
|
|
244 |
}
|
|
|
245 |
|
|
|
246 |
public void unsetPassword() {
|
|
|
247 |
this.password = null;
|
|
|
248 |
}
|
|
|
249 |
|
|
|
250 |
/** Returns true if field password is set (has been assigned a value) and false otherwise */
|
|
|
251 |
public boolean isSetPassword() {
|
|
|
252 |
return this.password != null;
|
|
|
253 |
}
|
|
|
254 |
|
|
|
255 |
public void setPasswordIsSet(boolean value) {
|
|
|
256 |
if (!value) {
|
|
|
257 |
this.password = null;
|
|
|
258 |
}
|
|
|
259 |
}
|
|
|
260 |
|
|
|
261 |
/**
|
|
|
262 |
*
|
|
|
263 |
* @see DealerAuthRole
|
|
|
264 |
*/
|
|
|
265 |
public DealerAuthRole getRole() {
|
|
|
266 |
return this.role;
|
|
|
267 |
}
|
|
|
268 |
|
|
|
269 |
/**
|
|
|
270 |
*
|
|
|
271 |
* @see DealerAuthRole
|
|
|
272 |
*/
|
|
|
273 |
public void setRole(DealerAuthRole role) {
|
|
|
274 |
this.role = role;
|
|
|
275 |
}
|
|
|
276 |
|
|
|
277 |
public void unsetRole() {
|
|
|
278 |
this.role = null;
|
|
|
279 |
}
|
|
|
280 |
|
|
|
281 |
/** Returns true if field role is set (has been assigned a value) and false otherwise */
|
|
|
282 |
public boolean isSetRole() {
|
|
|
283 |
return this.role != null;
|
|
|
284 |
}
|
|
|
285 |
|
|
|
286 |
public void setRoleIsSet(boolean value) {
|
|
|
287 |
if (!value) {
|
|
|
288 |
this.role = null;
|
|
|
289 |
}
|
|
|
290 |
}
|
|
|
291 |
|
|
|
292 |
public long getCreatedOn() {
|
|
|
293 |
return this.createdOn;
|
|
|
294 |
}
|
|
|
295 |
|
|
|
296 |
public void setCreatedOn(long createdOn) {
|
|
|
297 |
this.createdOn = createdOn;
|
|
|
298 |
setCreatedOnIsSet(true);
|
|
|
299 |
}
|
|
|
300 |
|
|
|
301 |
public void unsetCreatedOn() {
|
|
|
302 |
__isset_bit_vector.clear(__CREATEDON_ISSET_ID);
|
|
|
303 |
}
|
|
|
304 |
|
|
|
305 |
/** Returns true if field createdOn is set (has been assigned a value) and false otherwise */
|
|
|
306 |
public boolean isSetCreatedOn() {
|
|
|
307 |
return __isset_bit_vector.get(__CREATEDON_ISSET_ID);
|
|
|
308 |
}
|
|
|
309 |
|
|
|
310 |
public void setCreatedOnIsSet(boolean value) {
|
|
|
311 |
__isset_bit_vector.set(__CREATEDON_ISSET_ID, value);
|
|
|
312 |
}
|
|
|
313 |
|
|
|
314 |
public long getLastLoggedIn() {
|
|
|
315 |
return this.lastLoggedIn;
|
|
|
316 |
}
|
|
|
317 |
|
|
|
318 |
public void setLastLoggedIn(long lastLoggedIn) {
|
|
|
319 |
this.lastLoggedIn = lastLoggedIn;
|
|
|
320 |
setLastLoggedInIsSet(true);
|
|
|
321 |
}
|
|
|
322 |
|
|
|
323 |
public void unsetLastLoggedIn() {
|
|
|
324 |
__isset_bit_vector.clear(__LASTLOGGEDIN_ISSET_ID);
|
|
|
325 |
}
|
|
|
326 |
|
|
|
327 |
/** Returns true if field lastLoggedIn is set (has been assigned a value) and false otherwise */
|
|
|
328 |
public boolean isSetLastLoggedIn() {
|
|
|
329 |
return __isset_bit_vector.get(__LASTLOGGEDIN_ISSET_ID);
|
|
|
330 |
}
|
|
|
331 |
|
|
|
332 |
public void setLastLoggedInIsSet(boolean value) {
|
|
|
333 |
__isset_bit_vector.set(__LASTLOGGEDIN_ISSET_ID, value);
|
|
|
334 |
}
|
|
|
335 |
|
|
|
336 |
public Location getLastLocation() {
|
|
|
337 |
return this.lastLocation;
|
|
|
338 |
}
|
|
|
339 |
|
|
|
340 |
public void setLastLocation(Location lastLocation) {
|
|
|
341 |
this.lastLocation = lastLocation;
|
|
|
342 |
}
|
|
|
343 |
|
|
|
344 |
public void unsetLastLocation() {
|
|
|
345 |
this.lastLocation = null;
|
|
|
346 |
}
|
|
|
347 |
|
|
|
348 |
/** Returns true if field lastLocation is set (has been assigned a value) and false otherwise */
|
|
|
349 |
public boolean isSetLastLocation() {
|
|
|
350 |
return this.lastLocation != null;
|
|
|
351 |
}
|
|
|
352 |
|
|
|
353 |
public void setLastLocationIsSet(boolean value) {
|
|
|
354 |
if (!value) {
|
|
|
355 |
this.lastLocation = null;
|
|
|
356 |
}
|
|
|
357 |
}
|
|
|
358 |
|
|
|
359 |
public boolean isIsActive() {
|
|
|
360 |
return this.isActive;
|
|
|
361 |
}
|
|
|
362 |
|
|
|
363 |
public void setIsActive(boolean isActive) {
|
|
|
364 |
this.isActive = isActive;
|
|
|
365 |
setIsActiveIsSet(true);
|
|
|
366 |
}
|
|
|
367 |
|
|
|
368 |
public void unsetIsActive() {
|
|
|
369 |
__isset_bit_vector.clear(__ISACTIVE_ISSET_ID);
|
|
|
370 |
}
|
|
|
371 |
|
|
|
372 |
/** Returns true if field isActive is set (has been assigned a value) and false otherwise */
|
|
|
373 |
public boolean isSetIsActive() {
|
|
|
374 |
return __isset_bit_vector.get(__ISACTIVE_ISSET_ID);
|
|
|
375 |
}
|
|
|
376 |
|
|
|
377 |
public void setIsActiveIsSet(boolean value) {
|
|
|
378 |
__isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
|
|
|
379 |
}
|
|
|
380 |
|
|
|
381 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
382 |
switch (field) {
|
|
|
383 |
case USERNAME:
|
|
|
384 |
if (value == null) {
|
|
|
385 |
unsetUsername();
|
|
|
386 |
} else {
|
|
|
387 |
setUsername((String)value);
|
|
|
388 |
}
|
|
|
389 |
break;
|
|
|
390 |
|
|
|
391 |
case PASSWORD:
|
|
|
392 |
if (value == null) {
|
|
|
393 |
unsetPassword();
|
|
|
394 |
} else {
|
|
|
395 |
setPassword((String)value);
|
|
|
396 |
}
|
|
|
397 |
break;
|
|
|
398 |
|
|
|
399 |
case ROLE:
|
|
|
400 |
if (value == null) {
|
|
|
401 |
unsetRole();
|
|
|
402 |
} else {
|
|
|
403 |
setRole((DealerAuthRole)value);
|
|
|
404 |
}
|
|
|
405 |
break;
|
|
|
406 |
|
|
|
407 |
case CREATED_ON:
|
|
|
408 |
if (value == null) {
|
|
|
409 |
unsetCreatedOn();
|
|
|
410 |
} else {
|
|
|
411 |
setCreatedOn((Long)value);
|
|
|
412 |
}
|
|
|
413 |
break;
|
|
|
414 |
|
|
|
415 |
case LAST_LOGGED_IN:
|
|
|
416 |
if (value == null) {
|
|
|
417 |
unsetLastLoggedIn();
|
|
|
418 |
} else {
|
|
|
419 |
setLastLoggedIn((Long)value);
|
|
|
420 |
}
|
|
|
421 |
break;
|
|
|
422 |
|
|
|
423 |
case LAST_LOCATION:
|
|
|
424 |
if (value == null) {
|
|
|
425 |
unsetLastLocation();
|
|
|
426 |
} else {
|
|
|
427 |
setLastLocation((Location)value);
|
|
|
428 |
}
|
|
|
429 |
break;
|
|
|
430 |
|
|
|
431 |
case IS_ACTIVE:
|
|
|
432 |
if (value == null) {
|
|
|
433 |
unsetIsActive();
|
|
|
434 |
} else {
|
|
|
435 |
setIsActive((Boolean)value);
|
|
|
436 |
}
|
|
|
437 |
break;
|
|
|
438 |
|
|
|
439 |
}
|
|
|
440 |
}
|
|
|
441 |
|
|
|
442 |
public Object getFieldValue(_Fields field) {
|
|
|
443 |
switch (field) {
|
|
|
444 |
case USERNAME:
|
|
|
445 |
return getUsername();
|
|
|
446 |
|
|
|
447 |
case PASSWORD:
|
|
|
448 |
return getPassword();
|
|
|
449 |
|
|
|
450 |
case ROLE:
|
|
|
451 |
return getRole();
|
|
|
452 |
|
|
|
453 |
case CREATED_ON:
|
|
|
454 |
return Long.valueOf(getCreatedOn());
|
|
|
455 |
|
|
|
456 |
case LAST_LOGGED_IN:
|
|
|
457 |
return Long.valueOf(getLastLoggedIn());
|
|
|
458 |
|
|
|
459 |
case LAST_LOCATION:
|
|
|
460 |
return getLastLocation();
|
|
|
461 |
|
|
|
462 |
case IS_ACTIVE:
|
|
|
463 |
return Boolean.valueOf(isIsActive());
|
|
|
464 |
|
|
|
465 |
}
|
|
|
466 |
throw new IllegalStateException();
|
|
|
467 |
}
|
|
|
468 |
|
|
|
469 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
470 |
public boolean isSet(_Fields field) {
|
|
|
471 |
if (field == null) {
|
|
|
472 |
throw new IllegalArgumentException();
|
|
|
473 |
}
|
|
|
474 |
|
|
|
475 |
switch (field) {
|
|
|
476 |
case USERNAME:
|
|
|
477 |
return isSetUsername();
|
|
|
478 |
case PASSWORD:
|
|
|
479 |
return isSetPassword();
|
|
|
480 |
case ROLE:
|
|
|
481 |
return isSetRole();
|
|
|
482 |
case CREATED_ON:
|
|
|
483 |
return isSetCreatedOn();
|
|
|
484 |
case LAST_LOGGED_IN:
|
|
|
485 |
return isSetLastLoggedIn();
|
|
|
486 |
case LAST_LOCATION:
|
|
|
487 |
return isSetLastLocation();
|
|
|
488 |
case IS_ACTIVE:
|
|
|
489 |
return isSetIsActive();
|
|
|
490 |
}
|
|
|
491 |
throw new IllegalStateException();
|
|
|
492 |
}
|
|
|
493 |
|
|
|
494 |
@Override
|
|
|
495 |
public boolean equals(Object that) {
|
|
|
496 |
if (that == null)
|
|
|
497 |
return false;
|
|
|
498 |
if (that instanceof DealerAuth)
|
|
|
499 |
return this.equals((DealerAuth)that);
|
|
|
500 |
return false;
|
|
|
501 |
}
|
|
|
502 |
|
|
|
503 |
public boolean equals(DealerAuth that) {
|
|
|
504 |
if (that == null)
|
|
|
505 |
return false;
|
|
|
506 |
|
|
|
507 |
boolean this_present_username = true && this.isSetUsername();
|
|
|
508 |
boolean that_present_username = true && that.isSetUsername();
|
|
|
509 |
if (this_present_username || that_present_username) {
|
|
|
510 |
if (!(this_present_username && that_present_username))
|
|
|
511 |
return false;
|
|
|
512 |
if (!this.username.equals(that.username))
|
|
|
513 |
return false;
|
|
|
514 |
}
|
|
|
515 |
|
|
|
516 |
boolean this_present_password = true && this.isSetPassword();
|
|
|
517 |
boolean that_present_password = true && that.isSetPassword();
|
|
|
518 |
if (this_present_password || that_present_password) {
|
|
|
519 |
if (!(this_present_password && that_present_password))
|
|
|
520 |
return false;
|
|
|
521 |
if (!this.password.equals(that.password))
|
|
|
522 |
return false;
|
|
|
523 |
}
|
|
|
524 |
|
|
|
525 |
boolean this_present_role = true && this.isSetRole();
|
|
|
526 |
boolean that_present_role = true && that.isSetRole();
|
|
|
527 |
if (this_present_role || that_present_role) {
|
|
|
528 |
if (!(this_present_role && that_present_role))
|
|
|
529 |
return false;
|
|
|
530 |
if (!this.role.equals(that.role))
|
|
|
531 |
return false;
|
|
|
532 |
}
|
|
|
533 |
|
|
|
534 |
boolean this_present_createdOn = true;
|
|
|
535 |
boolean that_present_createdOn = true;
|
|
|
536 |
if (this_present_createdOn || that_present_createdOn) {
|
|
|
537 |
if (!(this_present_createdOn && that_present_createdOn))
|
|
|
538 |
return false;
|
|
|
539 |
if (this.createdOn != that.createdOn)
|
|
|
540 |
return false;
|
|
|
541 |
}
|
|
|
542 |
|
|
|
543 |
boolean this_present_lastLoggedIn = true;
|
|
|
544 |
boolean that_present_lastLoggedIn = true;
|
|
|
545 |
if (this_present_lastLoggedIn || that_present_lastLoggedIn) {
|
|
|
546 |
if (!(this_present_lastLoggedIn && that_present_lastLoggedIn))
|
|
|
547 |
return false;
|
|
|
548 |
if (this.lastLoggedIn != that.lastLoggedIn)
|
|
|
549 |
return false;
|
|
|
550 |
}
|
|
|
551 |
|
|
|
552 |
boolean this_present_lastLocation = true && this.isSetLastLocation();
|
|
|
553 |
boolean that_present_lastLocation = true && that.isSetLastLocation();
|
|
|
554 |
if (this_present_lastLocation || that_present_lastLocation) {
|
|
|
555 |
if (!(this_present_lastLocation && that_present_lastLocation))
|
|
|
556 |
return false;
|
|
|
557 |
if (!this.lastLocation.equals(that.lastLocation))
|
|
|
558 |
return false;
|
|
|
559 |
}
|
|
|
560 |
|
|
|
561 |
boolean this_present_isActive = true;
|
|
|
562 |
boolean that_present_isActive = true;
|
|
|
563 |
if (this_present_isActive || that_present_isActive) {
|
|
|
564 |
if (!(this_present_isActive && that_present_isActive))
|
|
|
565 |
return false;
|
|
|
566 |
if (this.isActive != that.isActive)
|
|
|
567 |
return false;
|
|
|
568 |
}
|
|
|
569 |
|
|
|
570 |
return true;
|
|
|
571 |
}
|
|
|
572 |
|
|
|
573 |
@Override
|
|
|
574 |
public int hashCode() {
|
|
|
575 |
return 0;
|
|
|
576 |
}
|
|
|
577 |
|
|
|
578 |
public int compareTo(DealerAuth other) {
|
|
|
579 |
if (!getClass().equals(other.getClass())) {
|
|
|
580 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
581 |
}
|
|
|
582 |
|
|
|
583 |
int lastComparison = 0;
|
|
|
584 |
DealerAuth typedOther = (DealerAuth)other;
|
|
|
585 |
|
|
|
586 |
lastComparison = Boolean.valueOf(isSetUsername()).compareTo(typedOther.isSetUsername());
|
|
|
587 |
if (lastComparison != 0) {
|
|
|
588 |
return lastComparison;
|
|
|
589 |
}
|
|
|
590 |
if (isSetUsername()) {
|
|
|
591 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, typedOther.username);
|
|
|
592 |
if (lastComparison != 0) {
|
|
|
593 |
return lastComparison;
|
|
|
594 |
}
|
|
|
595 |
}
|
|
|
596 |
lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword());
|
|
|
597 |
if (lastComparison != 0) {
|
|
|
598 |
return lastComparison;
|
|
|
599 |
}
|
|
|
600 |
if (isSetPassword()) {
|
|
|
601 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password);
|
|
|
602 |
if (lastComparison != 0) {
|
|
|
603 |
return lastComparison;
|
|
|
604 |
}
|
|
|
605 |
}
|
|
|
606 |
lastComparison = Boolean.valueOf(isSetRole()).compareTo(typedOther.isSetRole());
|
|
|
607 |
if (lastComparison != 0) {
|
|
|
608 |
return lastComparison;
|
|
|
609 |
}
|
|
|
610 |
if (isSetRole()) {
|
|
|
611 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, typedOther.role);
|
|
|
612 |
if (lastComparison != 0) {
|
|
|
613 |
return lastComparison;
|
|
|
614 |
}
|
|
|
615 |
}
|
|
|
616 |
lastComparison = Boolean.valueOf(isSetCreatedOn()).compareTo(typedOther.isSetCreatedOn());
|
|
|
617 |
if (lastComparison != 0) {
|
|
|
618 |
return lastComparison;
|
|
|
619 |
}
|
|
|
620 |
if (isSetCreatedOn()) {
|
|
|
621 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdOn, typedOther.createdOn);
|
|
|
622 |
if (lastComparison != 0) {
|
|
|
623 |
return lastComparison;
|
|
|
624 |
}
|
|
|
625 |
}
|
|
|
626 |
lastComparison = Boolean.valueOf(isSetLastLoggedIn()).compareTo(typedOther.isSetLastLoggedIn());
|
|
|
627 |
if (lastComparison != 0) {
|
|
|
628 |
return lastComparison;
|
|
|
629 |
}
|
|
|
630 |
if (isSetLastLoggedIn()) {
|
|
|
631 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastLoggedIn, typedOther.lastLoggedIn);
|
|
|
632 |
if (lastComparison != 0) {
|
|
|
633 |
return lastComparison;
|
|
|
634 |
}
|
|
|
635 |
}
|
|
|
636 |
lastComparison = Boolean.valueOf(isSetLastLocation()).compareTo(typedOther.isSetLastLocation());
|
|
|
637 |
if (lastComparison != 0) {
|
|
|
638 |
return lastComparison;
|
|
|
639 |
}
|
|
|
640 |
if (isSetLastLocation()) {
|
|
|
641 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastLocation, typedOther.lastLocation);
|
|
|
642 |
if (lastComparison != 0) {
|
|
|
643 |
return lastComparison;
|
|
|
644 |
}
|
|
|
645 |
}
|
|
|
646 |
lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(typedOther.isSetIsActive());
|
|
|
647 |
if (lastComparison != 0) {
|
|
|
648 |
return lastComparison;
|
|
|
649 |
}
|
|
|
650 |
if (isSetIsActive()) {
|
|
|
651 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
|
|
|
652 |
if (lastComparison != 0) {
|
|
|
653 |
return lastComparison;
|
|
|
654 |
}
|
|
|
655 |
}
|
|
|
656 |
return 0;
|
|
|
657 |
}
|
|
|
658 |
|
|
|
659 |
public _Fields fieldForId(int fieldId) {
|
|
|
660 |
return _Fields.findByThriftId(fieldId);
|
|
|
661 |
}
|
|
|
662 |
|
|
|
663 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
664 |
org.apache.thrift.protocol.TField field;
|
|
|
665 |
iprot.readStructBegin();
|
|
|
666 |
while (true)
|
|
|
667 |
{
|
|
|
668 |
field = iprot.readFieldBegin();
|
|
|
669 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
670 |
break;
|
|
|
671 |
}
|
|
|
672 |
switch (field.id) {
|
|
|
673 |
case 1: // USERNAME
|
|
|
674 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
675 |
this.username = iprot.readString();
|
|
|
676 |
} else {
|
|
|
677 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
678 |
}
|
|
|
679 |
break;
|
|
|
680 |
case 2: // PASSWORD
|
|
|
681 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
682 |
this.password = iprot.readString();
|
|
|
683 |
} else {
|
|
|
684 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
685 |
}
|
|
|
686 |
break;
|
|
|
687 |
case 3: // ROLE
|
|
|
688 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
689 |
this.role = DealerAuthRole.findByValue(iprot.readI32());
|
|
|
690 |
} else {
|
|
|
691 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
692 |
}
|
|
|
693 |
break;
|
|
|
694 |
case 4: // CREATED_ON
|
|
|
695 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
696 |
this.createdOn = iprot.readI64();
|
|
|
697 |
setCreatedOnIsSet(true);
|
|
|
698 |
} else {
|
|
|
699 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
700 |
}
|
|
|
701 |
break;
|
|
|
702 |
case 5: // LAST_LOGGED_IN
|
|
|
703 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
704 |
this.lastLoggedIn = iprot.readI64();
|
|
|
705 |
setLastLoggedInIsSet(true);
|
|
|
706 |
} else {
|
|
|
707 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
708 |
}
|
|
|
709 |
break;
|
|
|
710 |
case 6: // LAST_LOCATION
|
|
|
711 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
712 |
this.lastLocation = new Location();
|
|
|
713 |
this.lastLocation.read(iprot);
|
|
|
714 |
} else {
|
|
|
715 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
716 |
}
|
|
|
717 |
break;
|
|
|
718 |
case 7: // IS_ACTIVE
|
|
|
719 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
720 |
this.isActive = iprot.readBool();
|
|
|
721 |
setIsActiveIsSet(true);
|
|
|
722 |
} else {
|
|
|
723 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
724 |
}
|
|
|
725 |
break;
|
|
|
726 |
default:
|
|
|
727 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
728 |
}
|
|
|
729 |
iprot.readFieldEnd();
|
|
|
730 |
}
|
|
|
731 |
iprot.readStructEnd();
|
|
|
732 |
validate();
|
|
|
733 |
}
|
|
|
734 |
|
|
|
735 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
736 |
validate();
|
|
|
737 |
|
|
|
738 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
739 |
if (this.username != null) {
|
|
|
740 |
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
|
|
|
741 |
oprot.writeString(this.username);
|
|
|
742 |
oprot.writeFieldEnd();
|
|
|
743 |
}
|
|
|
744 |
if (this.password != null) {
|
|
|
745 |
oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
|
|
|
746 |
oprot.writeString(this.password);
|
|
|
747 |
oprot.writeFieldEnd();
|
|
|
748 |
}
|
|
|
749 |
if (this.role != null) {
|
|
|
750 |
oprot.writeFieldBegin(ROLE_FIELD_DESC);
|
|
|
751 |
oprot.writeI32(this.role.getValue());
|
|
|
752 |
oprot.writeFieldEnd();
|
|
|
753 |
}
|
|
|
754 |
oprot.writeFieldBegin(CREATED_ON_FIELD_DESC);
|
|
|
755 |
oprot.writeI64(this.createdOn);
|
|
|
756 |
oprot.writeFieldEnd();
|
|
|
757 |
oprot.writeFieldBegin(LAST_LOGGED_IN_FIELD_DESC);
|
|
|
758 |
oprot.writeI64(this.lastLoggedIn);
|
|
|
759 |
oprot.writeFieldEnd();
|
|
|
760 |
if (this.lastLocation != null) {
|
|
|
761 |
oprot.writeFieldBegin(LAST_LOCATION_FIELD_DESC);
|
|
|
762 |
this.lastLocation.write(oprot);
|
|
|
763 |
oprot.writeFieldEnd();
|
|
|
764 |
}
|
|
|
765 |
oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
|
|
|
766 |
oprot.writeBool(this.isActive);
|
|
|
767 |
oprot.writeFieldEnd();
|
|
|
768 |
oprot.writeFieldStop();
|
|
|
769 |
oprot.writeStructEnd();
|
|
|
770 |
}
|
|
|
771 |
|
|
|
772 |
@Override
|
|
|
773 |
public String toString() {
|
|
|
774 |
StringBuilder sb = new StringBuilder("DealerAuth(");
|
|
|
775 |
boolean first = true;
|
|
|
776 |
|
|
|
777 |
sb.append("username:");
|
|
|
778 |
if (this.username == null) {
|
|
|
779 |
sb.append("null");
|
|
|
780 |
} else {
|
|
|
781 |
sb.append(this.username);
|
|
|
782 |
}
|
|
|
783 |
first = false;
|
|
|
784 |
if (!first) sb.append(", ");
|
|
|
785 |
sb.append("password:");
|
|
|
786 |
if (this.password == null) {
|
|
|
787 |
sb.append("null");
|
|
|
788 |
} else {
|
|
|
789 |
sb.append(this.password);
|
|
|
790 |
}
|
|
|
791 |
first = false;
|
|
|
792 |
if (!first) sb.append(", ");
|
|
|
793 |
sb.append("role:");
|
|
|
794 |
if (this.role == null) {
|
|
|
795 |
sb.append("null");
|
|
|
796 |
} else {
|
|
|
797 |
sb.append(this.role);
|
|
|
798 |
}
|
|
|
799 |
first = false;
|
|
|
800 |
if (!first) sb.append(", ");
|
|
|
801 |
sb.append("createdOn:");
|
|
|
802 |
sb.append(this.createdOn);
|
|
|
803 |
first = false;
|
|
|
804 |
if (!first) sb.append(", ");
|
|
|
805 |
sb.append("lastLoggedIn:");
|
|
|
806 |
sb.append(this.lastLoggedIn);
|
|
|
807 |
first = false;
|
|
|
808 |
if (!first) sb.append(", ");
|
|
|
809 |
sb.append("lastLocation:");
|
|
|
810 |
if (this.lastLocation == null) {
|
|
|
811 |
sb.append("null");
|
|
|
812 |
} else {
|
|
|
813 |
sb.append(this.lastLocation);
|
|
|
814 |
}
|
|
|
815 |
first = false;
|
|
|
816 |
if (!first) sb.append(", ");
|
|
|
817 |
sb.append("isActive:");
|
|
|
818 |
sb.append(this.isActive);
|
|
|
819 |
first = false;
|
|
|
820 |
sb.append(")");
|
|
|
821 |
return sb.toString();
|
|
|
822 |
}
|
|
|
823 |
|
|
|
824 |
public void validate() throws org.apache.thrift.TException {
|
|
|
825 |
// check for required fields
|
|
|
826 |
}
|
|
|
827 |
|
|
|
828 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
829 |
try {
|
|
|
830 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
831 |
} catch (org.apache.thrift.TException te) {
|
|
|
832 |
throw new java.io.IOException(te);
|
|
|
833 |
}
|
|
|
834 |
}
|
|
|
835 |
|
|
|
836 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
837 |
try {
|
|
|
838 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
839 |
__isset_bit_vector = new BitSet(1);
|
|
|
840 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
841 |
} catch (org.apache.thrift.TException te) {
|
|
|
842 |
throw new java.io.IOException(te);
|
|
|
843 |
}
|
|
|
844 |
}
|
|
|
845 |
|
|
|
846 |
}
|
|
|
847 |
|