| 6821 |
amar.kumar |
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.model.v1.inventory;
|
|
|
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 OOSStatus implements org.apache.thrift.TBase<OOSStatus, OOSStatus._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OOSStatus");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField IS_OOS_FIELD_DESC = new org.apache.thrift.protocol.TField("is_oos", org.apache.thrift.protocol.TType.BOOL, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField NUM_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_orders", org.apache.thrift.protocol.TType.I64, (short)4);
|
| 8182 |
amar.kumar |
30 |
private static final org.apache.thrift.protocol.TField RTO_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("rto_orders", org.apache.thrift.protocol.TType.I64, (short)5);
|
| 6821 |
amar.kumar |
31 |
|
|
|
32 |
private long item_id; // required
|
|
|
33 |
private long date; // required
|
|
|
34 |
private boolean is_oos; // required
|
|
|
35 |
private long num_orders; // required
|
| 8182 |
amar.kumar |
36 |
private long rto_orders; // required
|
| 6821 |
amar.kumar |
37 |
|
|
|
38 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
39 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
40 |
ITEM_ID((short)1, "item_id"),
|
|
|
41 |
DATE((short)2, "date"),
|
|
|
42 |
IS_OOS((short)3, "is_oos"),
|
| 8182 |
amar.kumar |
43 |
NUM_ORDERS((short)4, "num_orders"),
|
|
|
44 |
RTO_ORDERS((short)5, "rto_orders");
|
| 6821 |
amar.kumar |
45 |
|
|
|
46 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
47 |
|
|
|
48 |
static {
|
|
|
49 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
50 |
byName.put(field.getFieldName(), field);
|
|
|
51 |
}
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
/**
|
|
|
55 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
56 |
*/
|
|
|
57 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
58 |
switch(fieldId) {
|
|
|
59 |
case 1: // ITEM_ID
|
|
|
60 |
return ITEM_ID;
|
|
|
61 |
case 2: // DATE
|
|
|
62 |
return DATE;
|
|
|
63 |
case 3: // IS_OOS
|
|
|
64 |
return IS_OOS;
|
|
|
65 |
case 4: // NUM_ORDERS
|
|
|
66 |
return NUM_ORDERS;
|
| 8182 |
amar.kumar |
67 |
case 5: // RTO_ORDERS
|
|
|
68 |
return RTO_ORDERS;
|
| 6821 |
amar.kumar |
69 |
default:
|
|
|
70 |
return null;
|
|
|
71 |
}
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
/**
|
|
|
75 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
76 |
* if it is not found.
|
|
|
77 |
*/
|
|
|
78 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
79 |
_Fields fields = findByThriftId(fieldId);
|
|
|
80 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
81 |
return fields;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
/**
|
|
|
85 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
86 |
*/
|
|
|
87 |
public static _Fields findByName(String name) {
|
|
|
88 |
return byName.get(name);
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
private final short _thriftId;
|
|
|
92 |
private final String _fieldName;
|
|
|
93 |
|
|
|
94 |
_Fields(short thriftId, String fieldName) {
|
|
|
95 |
_thriftId = thriftId;
|
|
|
96 |
_fieldName = fieldName;
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
public short getThriftFieldId() {
|
|
|
100 |
return _thriftId;
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
public String getFieldName() {
|
|
|
104 |
return _fieldName;
|
|
|
105 |
}
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
// isset id assignments
|
|
|
109 |
private static final int __ITEM_ID_ISSET_ID = 0;
|
|
|
110 |
private static final int __DATE_ISSET_ID = 1;
|
|
|
111 |
private static final int __IS_OOS_ISSET_ID = 2;
|
|
|
112 |
private static final int __NUM_ORDERS_ISSET_ID = 3;
|
| 8182 |
amar.kumar |
113 |
private static final int __RTO_ORDERS_ISSET_ID = 4;
|
|
|
114 |
private BitSet __isset_bit_vector = new BitSet(5);
|
| 6821 |
amar.kumar |
115 |
|
|
|
116 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
117 |
static {
|
|
|
118 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
119 |
tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
120 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
121 |
tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
122 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
123 |
tmpMap.put(_Fields.IS_OOS, new org.apache.thrift.meta_data.FieldMetaData("is_oos", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
124 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
|
|
125 |
tmpMap.put(_Fields.NUM_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("num_orders", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
126 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
| 8182 |
amar.kumar |
127 |
tmpMap.put(_Fields.RTO_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("rto_orders", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
128 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
| 6821 |
amar.kumar |
129 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
130 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OOSStatus.class, metaDataMap);
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
public OOSStatus() {
|
|
|
134 |
}
|
|
|
135 |
|
|
|
136 |
public OOSStatus(
|
|
|
137 |
long item_id,
|
|
|
138 |
long date,
|
|
|
139 |
boolean is_oos,
|
| 8182 |
amar.kumar |
140 |
long num_orders,
|
|
|
141 |
long rto_orders)
|
| 6821 |
amar.kumar |
142 |
{
|
|
|
143 |
this();
|
|
|
144 |
this.item_id = item_id;
|
|
|
145 |
setItem_idIsSet(true);
|
|
|
146 |
this.date = date;
|
|
|
147 |
setDateIsSet(true);
|
|
|
148 |
this.is_oos = is_oos;
|
|
|
149 |
setIs_oosIsSet(true);
|
|
|
150 |
this.num_orders = num_orders;
|
|
|
151 |
setNum_ordersIsSet(true);
|
| 8182 |
amar.kumar |
152 |
this.rto_orders = rto_orders;
|
|
|
153 |
setRto_ordersIsSet(true);
|
| 6821 |
amar.kumar |
154 |
}
|
|
|
155 |
|
|
|
156 |
/**
|
|
|
157 |
* Performs a deep copy on <i>other</i>.
|
|
|
158 |
*/
|
|
|
159 |
public OOSStatus(OOSStatus other) {
|
|
|
160 |
__isset_bit_vector.clear();
|
|
|
161 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
162 |
this.item_id = other.item_id;
|
|
|
163 |
this.date = other.date;
|
|
|
164 |
this.is_oos = other.is_oos;
|
|
|
165 |
this.num_orders = other.num_orders;
|
| 8182 |
amar.kumar |
166 |
this.rto_orders = other.rto_orders;
|
| 6821 |
amar.kumar |
167 |
}
|
|
|
168 |
|
|
|
169 |
public OOSStatus deepCopy() {
|
|
|
170 |
return new OOSStatus(this);
|
|
|
171 |
}
|
|
|
172 |
|
|
|
173 |
@Override
|
|
|
174 |
public void clear() {
|
|
|
175 |
setItem_idIsSet(false);
|
|
|
176 |
this.item_id = 0;
|
|
|
177 |
setDateIsSet(false);
|
|
|
178 |
this.date = 0;
|
|
|
179 |
setIs_oosIsSet(false);
|
|
|
180 |
this.is_oos = false;
|
|
|
181 |
setNum_ordersIsSet(false);
|
|
|
182 |
this.num_orders = 0;
|
| 8182 |
amar.kumar |
183 |
setRto_ordersIsSet(false);
|
|
|
184 |
this.rto_orders = 0;
|
| 6821 |
amar.kumar |
185 |
}
|
|
|
186 |
|
|
|
187 |
public long getItem_id() {
|
|
|
188 |
return this.item_id;
|
|
|
189 |
}
|
|
|
190 |
|
|
|
191 |
public void setItem_id(long item_id) {
|
|
|
192 |
this.item_id = item_id;
|
|
|
193 |
setItem_idIsSet(true);
|
|
|
194 |
}
|
|
|
195 |
|
|
|
196 |
public void unsetItem_id() {
|
|
|
197 |
__isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
|
|
|
198 |
}
|
|
|
199 |
|
|
|
200 |
/** Returns true if field item_id is set (has been assigned a value) and false otherwise */
|
|
|
201 |
public boolean isSetItem_id() {
|
|
|
202 |
return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
|
|
|
203 |
}
|
|
|
204 |
|
|
|
205 |
public void setItem_idIsSet(boolean value) {
|
|
|
206 |
__isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
|
|
|
207 |
}
|
|
|
208 |
|
|
|
209 |
public long getDate() {
|
|
|
210 |
return this.date;
|
|
|
211 |
}
|
|
|
212 |
|
|
|
213 |
public void setDate(long date) {
|
|
|
214 |
this.date = date;
|
|
|
215 |
setDateIsSet(true);
|
|
|
216 |
}
|
|
|
217 |
|
|
|
218 |
public void unsetDate() {
|
|
|
219 |
__isset_bit_vector.clear(__DATE_ISSET_ID);
|
|
|
220 |
}
|
|
|
221 |
|
|
|
222 |
/** Returns true if field date is set (has been assigned a value) and false otherwise */
|
|
|
223 |
public boolean isSetDate() {
|
|
|
224 |
return __isset_bit_vector.get(__DATE_ISSET_ID);
|
|
|
225 |
}
|
|
|
226 |
|
|
|
227 |
public void setDateIsSet(boolean value) {
|
|
|
228 |
__isset_bit_vector.set(__DATE_ISSET_ID, value);
|
|
|
229 |
}
|
|
|
230 |
|
|
|
231 |
public boolean isIs_oos() {
|
|
|
232 |
return this.is_oos;
|
|
|
233 |
}
|
|
|
234 |
|
|
|
235 |
public void setIs_oos(boolean is_oos) {
|
|
|
236 |
this.is_oos = is_oos;
|
|
|
237 |
setIs_oosIsSet(true);
|
|
|
238 |
}
|
|
|
239 |
|
|
|
240 |
public void unsetIs_oos() {
|
|
|
241 |
__isset_bit_vector.clear(__IS_OOS_ISSET_ID);
|
|
|
242 |
}
|
|
|
243 |
|
|
|
244 |
/** Returns true if field is_oos is set (has been assigned a value) and false otherwise */
|
|
|
245 |
public boolean isSetIs_oos() {
|
|
|
246 |
return __isset_bit_vector.get(__IS_OOS_ISSET_ID);
|
|
|
247 |
}
|
|
|
248 |
|
|
|
249 |
public void setIs_oosIsSet(boolean value) {
|
|
|
250 |
__isset_bit_vector.set(__IS_OOS_ISSET_ID, value);
|
|
|
251 |
}
|
|
|
252 |
|
|
|
253 |
public long getNum_orders() {
|
|
|
254 |
return this.num_orders;
|
|
|
255 |
}
|
|
|
256 |
|
|
|
257 |
public void setNum_orders(long num_orders) {
|
|
|
258 |
this.num_orders = num_orders;
|
|
|
259 |
setNum_ordersIsSet(true);
|
|
|
260 |
}
|
|
|
261 |
|
|
|
262 |
public void unsetNum_orders() {
|
|
|
263 |
__isset_bit_vector.clear(__NUM_ORDERS_ISSET_ID);
|
|
|
264 |
}
|
|
|
265 |
|
|
|
266 |
/** Returns true if field num_orders is set (has been assigned a value) and false otherwise */
|
|
|
267 |
public boolean isSetNum_orders() {
|
|
|
268 |
return __isset_bit_vector.get(__NUM_ORDERS_ISSET_ID);
|
|
|
269 |
}
|
|
|
270 |
|
|
|
271 |
public void setNum_ordersIsSet(boolean value) {
|
|
|
272 |
__isset_bit_vector.set(__NUM_ORDERS_ISSET_ID, value);
|
|
|
273 |
}
|
|
|
274 |
|
| 8182 |
amar.kumar |
275 |
public long getRto_orders() {
|
|
|
276 |
return this.rto_orders;
|
|
|
277 |
}
|
|
|
278 |
|
|
|
279 |
public void setRto_orders(long rto_orders) {
|
|
|
280 |
this.rto_orders = rto_orders;
|
|
|
281 |
setRto_ordersIsSet(true);
|
|
|
282 |
}
|
|
|
283 |
|
|
|
284 |
public void unsetRto_orders() {
|
|
|
285 |
__isset_bit_vector.clear(__RTO_ORDERS_ISSET_ID);
|
|
|
286 |
}
|
|
|
287 |
|
|
|
288 |
/** Returns true if field rto_orders is set (has been assigned a value) and false otherwise */
|
|
|
289 |
public boolean isSetRto_orders() {
|
|
|
290 |
return __isset_bit_vector.get(__RTO_ORDERS_ISSET_ID);
|
|
|
291 |
}
|
|
|
292 |
|
|
|
293 |
public void setRto_ordersIsSet(boolean value) {
|
|
|
294 |
__isset_bit_vector.set(__RTO_ORDERS_ISSET_ID, value);
|
|
|
295 |
}
|
|
|
296 |
|
| 6821 |
amar.kumar |
297 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
298 |
switch (field) {
|
|
|
299 |
case ITEM_ID:
|
|
|
300 |
if (value == null) {
|
|
|
301 |
unsetItem_id();
|
|
|
302 |
} else {
|
|
|
303 |
setItem_id((Long)value);
|
|
|
304 |
}
|
|
|
305 |
break;
|
|
|
306 |
|
|
|
307 |
case DATE:
|
|
|
308 |
if (value == null) {
|
|
|
309 |
unsetDate();
|
|
|
310 |
} else {
|
|
|
311 |
setDate((Long)value);
|
|
|
312 |
}
|
|
|
313 |
break;
|
|
|
314 |
|
|
|
315 |
case IS_OOS:
|
|
|
316 |
if (value == null) {
|
|
|
317 |
unsetIs_oos();
|
|
|
318 |
} else {
|
|
|
319 |
setIs_oos((Boolean)value);
|
|
|
320 |
}
|
|
|
321 |
break;
|
|
|
322 |
|
|
|
323 |
case NUM_ORDERS:
|
|
|
324 |
if (value == null) {
|
|
|
325 |
unsetNum_orders();
|
|
|
326 |
} else {
|
|
|
327 |
setNum_orders((Long)value);
|
|
|
328 |
}
|
|
|
329 |
break;
|
|
|
330 |
|
| 8182 |
amar.kumar |
331 |
case RTO_ORDERS:
|
|
|
332 |
if (value == null) {
|
|
|
333 |
unsetRto_orders();
|
|
|
334 |
} else {
|
|
|
335 |
setRto_orders((Long)value);
|
|
|
336 |
}
|
|
|
337 |
break;
|
|
|
338 |
|
| 6821 |
amar.kumar |
339 |
}
|
|
|
340 |
}
|
|
|
341 |
|
|
|
342 |
public Object getFieldValue(_Fields field) {
|
|
|
343 |
switch (field) {
|
|
|
344 |
case ITEM_ID:
|
|
|
345 |
return Long.valueOf(getItem_id());
|
|
|
346 |
|
|
|
347 |
case DATE:
|
|
|
348 |
return Long.valueOf(getDate());
|
|
|
349 |
|
|
|
350 |
case IS_OOS:
|
|
|
351 |
return Boolean.valueOf(isIs_oos());
|
|
|
352 |
|
|
|
353 |
case NUM_ORDERS:
|
|
|
354 |
return Long.valueOf(getNum_orders());
|
|
|
355 |
|
| 8182 |
amar.kumar |
356 |
case RTO_ORDERS:
|
|
|
357 |
return Long.valueOf(getRto_orders());
|
|
|
358 |
|
| 6821 |
amar.kumar |
359 |
}
|
|
|
360 |
throw new IllegalStateException();
|
|
|
361 |
}
|
|
|
362 |
|
|
|
363 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
364 |
public boolean isSet(_Fields field) {
|
|
|
365 |
if (field == null) {
|
|
|
366 |
throw new IllegalArgumentException();
|
|
|
367 |
}
|
|
|
368 |
|
|
|
369 |
switch (field) {
|
|
|
370 |
case ITEM_ID:
|
|
|
371 |
return isSetItem_id();
|
|
|
372 |
case DATE:
|
|
|
373 |
return isSetDate();
|
|
|
374 |
case IS_OOS:
|
|
|
375 |
return isSetIs_oos();
|
|
|
376 |
case NUM_ORDERS:
|
|
|
377 |
return isSetNum_orders();
|
| 8182 |
amar.kumar |
378 |
case RTO_ORDERS:
|
|
|
379 |
return isSetRto_orders();
|
| 6821 |
amar.kumar |
380 |
}
|
|
|
381 |
throw new IllegalStateException();
|
|
|
382 |
}
|
|
|
383 |
|
|
|
384 |
@Override
|
|
|
385 |
public boolean equals(Object that) {
|
|
|
386 |
if (that == null)
|
|
|
387 |
return false;
|
|
|
388 |
if (that instanceof OOSStatus)
|
|
|
389 |
return this.equals((OOSStatus)that);
|
|
|
390 |
return false;
|
|
|
391 |
}
|
|
|
392 |
|
|
|
393 |
public boolean equals(OOSStatus that) {
|
|
|
394 |
if (that == null)
|
|
|
395 |
return false;
|
|
|
396 |
|
|
|
397 |
boolean this_present_item_id = true;
|
|
|
398 |
boolean that_present_item_id = true;
|
|
|
399 |
if (this_present_item_id || that_present_item_id) {
|
|
|
400 |
if (!(this_present_item_id && that_present_item_id))
|
|
|
401 |
return false;
|
|
|
402 |
if (this.item_id != that.item_id)
|
|
|
403 |
return false;
|
|
|
404 |
}
|
|
|
405 |
|
|
|
406 |
boolean this_present_date = true;
|
|
|
407 |
boolean that_present_date = true;
|
|
|
408 |
if (this_present_date || that_present_date) {
|
|
|
409 |
if (!(this_present_date && that_present_date))
|
|
|
410 |
return false;
|
|
|
411 |
if (this.date != that.date)
|
|
|
412 |
return false;
|
|
|
413 |
}
|
|
|
414 |
|
|
|
415 |
boolean this_present_is_oos = true;
|
|
|
416 |
boolean that_present_is_oos = true;
|
|
|
417 |
if (this_present_is_oos || that_present_is_oos) {
|
|
|
418 |
if (!(this_present_is_oos && that_present_is_oos))
|
|
|
419 |
return false;
|
|
|
420 |
if (this.is_oos != that.is_oos)
|
|
|
421 |
return false;
|
|
|
422 |
}
|
|
|
423 |
|
|
|
424 |
boolean this_present_num_orders = true;
|
|
|
425 |
boolean that_present_num_orders = true;
|
|
|
426 |
if (this_present_num_orders || that_present_num_orders) {
|
|
|
427 |
if (!(this_present_num_orders && that_present_num_orders))
|
|
|
428 |
return false;
|
|
|
429 |
if (this.num_orders != that.num_orders)
|
|
|
430 |
return false;
|
|
|
431 |
}
|
|
|
432 |
|
| 8182 |
amar.kumar |
433 |
boolean this_present_rto_orders = true;
|
|
|
434 |
boolean that_present_rto_orders = true;
|
|
|
435 |
if (this_present_rto_orders || that_present_rto_orders) {
|
|
|
436 |
if (!(this_present_rto_orders && that_present_rto_orders))
|
|
|
437 |
return false;
|
|
|
438 |
if (this.rto_orders != that.rto_orders)
|
|
|
439 |
return false;
|
|
|
440 |
}
|
|
|
441 |
|
| 6821 |
amar.kumar |
442 |
return true;
|
|
|
443 |
}
|
|
|
444 |
|
|
|
445 |
@Override
|
|
|
446 |
public int hashCode() {
|
|
|
447 |
return 0;
|
|
|
448 |
}
|
|
|
449 |
|
|
|
450 |
public int compareTo(OOSStatus other) {
|
|
|
451 |
if (!getClass().equals(other.getClass())) {
|
|
|
452 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
453 |
}
|
|
|
454 |
|
|
|
455 |
int lastComparison = 0;
|
|
|
456 |
OOSStatus typedOther = (OOSStatus)other;
|
|
|
457 |
|
|
|
458 |
lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
|
|
|
459 |
if (lastComparison != 0) {
|
|
|
460 |
return lastComparison;
|
|
|
461 |
}
|
|
|
462 |
if (isSetItem_id()) {
|
|
|
463 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
|
|
|
464 |
if (lastComparison != 0) {
|
|
|
465 |
return lastComparison;
|
|
|
466 |
}
|
|
|
467 |
}
|
|
|
468 |
lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
|
|
|
469 |
if (lastComparison != 0) {
|
|
|
470 |
return lastComparison;
|
|
|
471 |
}
|
|
|
472 |
if (isSetDate()) {
|
|
|
473 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
|
|
|
474 |
if (lastComparison != 0) {
|
|
|
475 |
return lastComparison;
|
|
|
476 |
}
|
|
|
477 |
}
|
|
|
478 |
lastComparison = Boolean.valueOf(isSetIs_oos()).compareTo(typedOther.isSetIs_oos());
|
|
|
479 |
if (lastComparison != 0) {
|
|
|
480 |
return lastComparison;
|
|
|
481 |
}
|
|
|
482 |
if (isSetIs_oos()) {
|
|
|
483 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_oos, typedOther.is_oos);
|
|
|
484 |
if (lastComparison != 0) {
|
|
|
485 |
return lastComparison;
|
|
|
486 |
}
|
|
|
487 |
}
|
|
|
488 |
lastComparison = Boolean.valueOf(isSetNum_orders()).compareTo(typedOther.isSetNum_orders());
|
|
|
489 |
if (lastComparison != 0) {
|
|
|
490 |
return lastComparison;
|
|
|
491 |
}
|
|
|
492 |
if (isSetNum_orders()) {
|
|
|
493 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_orders, typedOther.num_orders);
|
|
|
494 |
if (lastComparison != 0) {
|
|
|
495 |
return lastComparison;
|
|
|
496 |
}
|
|
|
497 |
}
|
| 8182 |
amar.kumar |
498 |
lastComparison = Boolean.valueOf(isSetRto_orders()).compareTo(typedOther.isSetRto_orders());
|
|
|
499 |
if (lastComparison != 0) {
|
|
|
500 |
return lastComparison;
|
|
|
501 |
}
|
|
|
502 |
if (isSetRto_orders()) {
|
|
|
503 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rto_orders, typedOther.rto_orders);
|
|
|
504 |
if (lastComparison != 0) {
|
|
|
505 |
return lastComparison;
|
|
|
506 |
}
|
|
|
507 |
}
|
| 6821 |
amar.kumar |
508 |
return 0;
|
|
|
509 |
}
|
|
|
510 |
|
|
|
511 |
public _Fields fieldForId(int fieldId) {
|
|
|
512 |
return _Fields.findByThriftId(fieldId);
|
|
|
513 |
}
|
|
|
514 |
|
|
|
515 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
516 |
org.apache.thrift.protocol.TField field;
|
|
|
517 |
iprot.readStructBegin();
|
|
|
518 |
while (true)
|
|
|
519 |
{
|
|
|
520 |
field = iprot.readFieldBegin();
|
|
|
521 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
522 |
break;
|
|
|
523 |
}
|
|
|
524 |
switch (field.id) {
|
|
|
525 |
case 1: // ITEM_ID
|
|
|
526 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
527 |
this.item_id = iprot.readI64();
|
|
|
528 |
setItem_idIsSet(true);
|
|
|
529 |
} else {
|
|
|
530 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
531 |
}
|
|
|
532 |
break;
|
|
|
533 |
case 2: // DATE
|
|
|
534 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
535 |
this.date = iprot.readI64();
|
|
|
536 |
setDateIsSet(true);
|
|
|
537 |
} else {
|
|
|
538 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
539 |
}
|
|
|
540 |
break;
|
|
|
541 |
case 3: // IS_OOS
|
|
|
542 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
543 |
this.is_oos = iprot.readBool();
|
|
|
544 |
setIs_oosIsSet(true);
|
|
|
545 |
} else {
|
|
|
546 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
547 |
}
|
|
|
548 |
break;
|
|
|
549 |
case 4: // NUM_ORDERS
|
|
|
550 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
551 |
this.num_orders = iprot.readI64();
|
|
|
552 |
setNum_ordersIsSet(true);
|
|
|
553 |
} else {
|
|
|
554 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
555 |
}
|
|
|
556 |
break;
|
| 8182 |
amar.kumar |
557 |
case 5: // RTO_ORDERS
|
|
|
558 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
559 |
this.rto_orders = iprot.readI64();
|
|
|
560 |
setRto_ordersIsSet(true);
|
|
|
561 |
} else {
|
|
|
562 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
563 |
}
|
|
|
564 |
break;
|
| 6821 |
amar.kumar |
565 |
default:
|
|
|
566 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
567 |
}
|
|
|
568 |
iprot.readFieldEnd();
|
|
|
569 |
}
|
|
|
570 |
iprot.readStructEnd();
|
|
|
571 |
validate();
|
|
|
572 |
}
|
|
|
573 |
|
|
|
574 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
575 |
validate();
|
|
|
576 |
|
|
|
577 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
578 |
oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
|
|
|
579 |
oprot.writeI64(this.item_id);
|
|
|
580 |
oprot.writeFieldEnd();
|
|
|
581 |
oprot.writeFieldBegin(DATE_FIELD_DESC);
|
|
|
582 |
oprot.writeI64(this.date);
|
|
|
583 |
oprot.writeFieldEnd();
|
|
|
584 |
oprot.writeFieldBegin(IS_OOS_FIELD_DESC);
|
|
|
585 |
oprot.writeBool(this.is_oos);
|
|
|
586 |
oprot.writeFieldEnd();
|
|
|
587 |
oprot.writeFieldBegin(NUM_ORDERS_FIELD_DESC);
|
|
|
588 |
oprot.writeI64(this.num_orders);
|
|
|
589 |
oprot.writeFieldEnd();
|
| 8182 |
amar.kumar |
590 |
oprot.writeFieldBegin(RTO_ORDERS_FIELD_DESC);
|
|
|
591 |
oprot.writeI64(this.rto_orders);
|
|
|
592 |
oprot.writeFieldEnd();
|
| 6821 |
amar.kumar |
593 |
oprot.writeFieldStop();
|
|
|
594 |
oprot.writeStructEnd();
|
|
|
595 |
}
|
|
|
596 |
|
|
|
597 |
@Override
|
|
|
598 |
public String toString() {
|
|
|
599 |
StringBuilder sb = new StringBuilder("OOSStatus(");
|
|
|
600 |
boolean first = true;
|
|
|
601 |
|
|
|
602 |
sb.append("item_id:");
|
|
|
603 |
sb.append(this.item_id);
|
|
|
604 |
first = false;
|
|
|
605 |
if (!first) sb.append(", ");
|
|
|
606 |
sb.append("date:");
|
|
|
607 |
sb.append(this.date);
|
|
|
608 |
first = false;
|
|
|
609 |
if (!first) sb.append(", ");
|
|
|
610 |
sb.append("is_oos:");
|
|
|
611 |
sb.append(this.is_oos);
|
|
|
612 |
first = false;
|
|
|
613 |
if (!first) sb.append(", ");
|
|
|
614 |
sb.append("num_orders:");
|
|
|
615 |
sb.append(this.num_orders);
|
|
|
616 |
first = false;
|
| 8182 |
amar.kumar |
617 |
if (!first) sb.append(", ");
|
|
|
618 |
sb.append("rto_orders:");
|
|
|
619 |
sb.append(this.rto_orders);
|
|
|
620 |
first = false;
|
| 6821 |
amar.kumar |
621 |
sb.append(")");
|
|
|
622 |
return sb.toString();
|
|
|
623 |
}
|
|
|
624 |
|
|
|
625 |
public void validate() throws org.apache.thrift.TException {
|
|
|
626 |
// check for required fields
|
|
|
627 |
}
|
|
|
628 |
|
|
|
629 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
630 |
try {
|
|
|
631 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
632 |
} catch (org.apache.thrift.TException te) {
|
|
|
633 |
throw new java.io.IOException(te);
|
|
|
634 |
}
|
|
|
635 |
}
|
|
|
636 |
|
|
|
637 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
638 |
try {
|
|
|
639 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
640 |
__isset_bit_vector = new BitSet(1);
|
|
|
641 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
642 |
} catch (org.apache.thrift.TException te) {
|
|
|
643 |
throw new java.io.IOException(te);
|
|
|
644 |
}
|
|
|
645 |
}
|
|
|
646 |
|
|
|
647 |
}
|
|
|
648 |
|