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