| 13154 |
manish.sha |
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.order;
|
|
|
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 FlipkartFaSalesSnapshot implements org.apache.thrift.TBase<FlipkartFaSalesSnapshot, FlipkartFaSalesSnapshot._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FlipkartFaSalesSnapshot");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField DATE_OF_SALE_FIELD_DESC = new org.apache.thrift.protocol.TField("dateOfSale", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
27 |
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)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField TOTAL_ORDER_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalOrderCount", org.apache.thrift.protocol.TType.I32, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField IS_OUT_OF_STOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("isOutOfStock", org.apache.thrift.protocol.TType.BOOL, (short)4);
|
|
|
30 |
private static final org.apache.thrift.protocol.TField TOTAL_SALE_FIELD_DESC = new org.apache.thrift.protocol.TField("totalSale", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
|
|
|
31 |
private static final org.apache.thrift.protocol.TField OUR_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("ourPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
|
| 13584 |
manish.sha |
32 |
private static final org.apache.thrift.protocol.TField FC_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("fcLocation", org.apache.thrift.protocol.TType.I32, (short)7);
|
|
|
33 |
private static final org.apache.thrift.protocol.TField RETURN_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("returnQuantity", org.apache.thrift.protocol.TType.I32, (short)8);
|
|
|
34 |
private static final org.apache.thrift.protocol.TField RETURN_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("returnValue", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
|
| 13154 |
manish.sha |
35 |
|
|
|
36 |
private long dateOfSale; // required
|
|
|
37 |
private long item_id; // required
|
|
|
38 |
private int totalOrderCount; // required
|
|
|
39 |
private boolean isOutOfStock; // required
|
|
|
40 |
private double totalSale; // required
|
|
|
41 |
private double ourPrice; // required
|
| 13584 |
manish.sha |
42 |
private FlipkartFCWarehouseLocation fcLocation; // required
|
|
|
43 |
private int returnQuantity; // required
|
|
|
44 |
private double returnValue; // required
|
| 13154 |
manish.sha |
45 |
|
|
|
46 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
47 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
48 |
DATE_OF_SALE((short)1, "dateOfSale"),
|
|
|
49 |
ITEM_ID((short)2, "item_id"),
|
|
|
50 |
TOTAL_ORDER_COUNT((short)3, "totalOrderCount"),
|
|
|
51 |
IS_OUT_OF_STOCK((short)4, "isOutOfStock"),
|
|
|
52 |
TOTAL_SALE((short)5, "totalSale"),
|
| 13584 |
manish.sha |
53 |
OUR_PRICE((short)6, "ourPrice"),
|
|
|
54 |
/**
|
|
|
55 |
*
|
|
|
56 |
* @see FlipkartFCWarehouseLocation
|
|
|
57 |
*/
|
|
|
58 |
FC_LOCATION((short)7, "fcLocation"),
|
|
|
59 |
RETURN_QUANTITY((short)8, "returnQuantity"),
|
|
|
60 |
RETURN_VALUE((short)9, "returnValue");
|
| 13154 |
manish.sha |
61 |
|
|
|
62 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
63 |
|
|
|
64 |
static {
|
|
|
65 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
66 |
byName.put(field.getFieldName(), field);
|
|
|
67 |
}
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
/**
|
|
|
71 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
72 |
*/
|
|
|
73 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
74 |
switch(fieldId) {
|
|
|
75 |
case 1: // DATE_OF_SALE
|
|
|
76 |
return DATE_OF_SALE;
|
|
|
77 |
case 2: // ITEM_ID
|
|
|
78 |
return ITEM_ID;
|
|
|
79 |
case 3: // TOTAL_ORDER_COUNT
|
|
|
80 |
return TOTAL_ORDER_COUNT;
|
|
|
81 |
case 4: // IS_OUT_OF_STOCK
|
|
|
82 |
return IS_OUT_OF_STOCK;
|
|
|
83 |
case 5: // TOTAL_SALE
|
|
|
84 |
return TOTAL_SALE;
|
|
|
85 |
case 6: // OUR_PRICE
|
|
|
86 |
return OUR_PRICE;
|
| 13584 |
manish.sha |
87 |
case 7: // FC_LOCATION
|
|
|
88 |
return FC_LOCATION;
|
|
|
89 |
case 8: // RETURN_QUANTITY
|
|
|
90 |
return RETURN_QUANTITY;
|
|
|
91 |
case 9: // RETURN_VALUE
|
|
|
92 |
return RETURN_VALUE;
|
| 13154 |
manish.sha |
93 |
default:
|
|
|
94 |
return null;
|
|
|
95 |
}
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
/**
|
|
|
99 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
100 |
* if it is not found.
|
|
|
101 |
*/
|
|
|
102 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
103 |
_Fields fields = findByThriftId(fieldId);
|
|
|
104 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
105 |
return fields;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
/**
|
|
|
109 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
110 |
*/
|
|
|
111 |
public static _Fields findByName(String name) {
|
|
|
112 |
return byName.get(name);
|
|
|
113 |
}
|
|
|
114 |
|
|
|
115 |
private final short _thriftId;
|
|
|
116 |
private final String _fieldName;
|
|
|
117 |
|
|
|
118 |
_Fields(short thriftId, String fieldName) {
|
|
|
119 |
_thriftId = thriftId;
|
|
|
120 |
_fieldName = fieldName;
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
public short getThriftFieldId() {
|
|
|
124 |
return _thriftId;
|
|
|
125 |
}
|
|
|
126 |
|
|
|
127 |
public String getFieldName() {
|
|
|
128 |
return _fieldName;
|
|
|
129 |
}
|
|
|
130 |
}
|
|
|
131 |
|
|
|
132 |
// isset id assignments
|
|
|
133 |
private static final int __DATEOFSALE_ISSET_ID = 0;
|
|
|
134 |
private static final int __ITEM_ID_ISSET_ID = 1;
|
|
|
135 |
private static final int __TOTALORDERCOUNT_ISSET_ID = 2;
|
|
|
136 |
private static final int __ISOUTOFSTOCK_ISSET_ID = 3;
|
|
|
137 |
private static final int __TOTALSALE_ISSET_ID = 4;
|
|
|
138 |
private static final int __OURPRICE_ISSET_ID = 5;
|
| 13584 |
manish.sha |
139 |
private static final int __RETURNQUANTITY_ISSET_ID = 6;
|
|
|
140 |
private static final int __RETURNVALUE_ISSET_ID = 7;
|
|
|
141 |
private BitSet __isset_bit_vector = new BitSet(8);
|
| 13154 |
manish.sha |
142 |
|
|
|
143 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
144 |
static {
|
|
|
145 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
146 |
tmpMap.put(_Fields.DATE_OF_SALE, new org.apache.thrift.meta_data.FieldMetaData("dateOfSale", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
147 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
148 |
tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
149 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
150 |
tmpMap.put(_Fields.TOTAL_ORDER_COUNT, new org.apache.thrift.meta_data.FieldMetaData("totalOrderCount", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
151 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
|
|
152 |
tmpMap.put(_Fields.IS_OUT_OF_STOCK, new org.apache.thrift.meta_data.FieldMetaData("isOutOfStock", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
153 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
|
|
154 |
tmpMap.put(_Fields.TOTAL_SALE, new org.apache.thrift.meta_data.FieldMetaData("totalSale", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
155 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
|
|
|
156 |
tmpMap.put(_Fields.OUR_PRICE, new org.apache.thrift.meta_data.FieldMetaData("ourPrice", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
157 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
|
| 13584 |
manish.sha |
158 |
tmpMap.put(_Fields.FC_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("fcLocation", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
159 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FlipkartFCWarehouseLocation.class)));
|
|
|
160 |
tmpMap.put(_Fields.RETURN_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("returnQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
161 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
|
|
162 |
tmpMap.put(_Fields.RETURN_VALUE, new org.apache.thrift.meta_data.FieldMetaData("returnValue", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
163 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
|
| 13154 |
manish.sha |
164 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
165 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FlipkartFaSalesSnapshot.class, metaDataMap);
|
|
|
166 |
}
|
|
|
167 |
|
|
|
168 |
public FlipkartFaSalesSnapshot() {
|
|
|
169 |
}
|
|
|
170 |
|
|
|
171 |
public FlipkartFaSalesSnapshot(
|
|
|
172 |
long dateOfSale,
|
|
|
173 |
long item_id,
|
|
|
174 |
int totalOrderCount,
|
|
|
175 |
boolean isOutOfStock,
|
|
|
176 |
double totalSale,
|
| 13584 |
manish.sha |
177 |
double ourPrice,
|
|
|
178 |
FlipkartFCWarehouseLocation fcLocation,
|
|
|
179 |
int returnQuantity,
|
|
|
180 |
double returnValue)
|
| 13154 |
manish.sha |
181 |
{
|
|
|
182 |
this();
|
|
|
183 |
this.dateOfSale = dateOfSale;
|
|
|
184 |
setDateOfSaleIsSet(true);
|
|
|
185 |
this.item_id = item_id;
|
|
|
186 |
setItem_idIsSet(true);
|
|
|
187 |
this.totalOrderCount = totalOrderCount;
|
|
|
188 |
setTotalOrderCountIsSet(true);
|
|
|
189 |
this.isOutOfStock = isOutOfStock;
|
|
|
190 |
setIsOutOfStockIsSet(true);
|
|
|
191 |
this.totalSale = totalSale;
|
|
|
192 |
setTotalSaleIsSet(true);
|
|
|
193 |
this.ourPrice = ourPrice;
|
|
|
194 |
setOurPriceIsSet(true);
|
| 13584 |
manish.sha |
195 |
this.fcLocation = fcLocation;
|
|
|
196 |
this.returnQuantity = returnQuantity;
|
|
|
197 |
setReturnQuantityIsSet(true);
|
|
|
198 |
this.returnValue = returnValue;
|
|
|
199 |
setReturnValueIsSet(true);
|
| 13154 |
manish.sha |
200 |
}
|
|
|
201 |
|
|
|
202 |
/**
|
|
|
203 |
* Performs a deep copy on <i>other</i>.
|
|
|
204 |
*/
|
|
|
205 |
public FlipkartFaSalesSnapshot(FlipkartFaSalesSnapshot other) {
|
|
|
206 |
__isset_bit_vector.clear();
|
|
|
207 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
208 |
this.dateOfSale = other.dateOfSale;
|
|
|
209 |
this.item_id = other.item_id;
|
|
|
210 |
this.totalOrderCount = other.totalOrderCount;
|
|
|
211 |
this.isOutOfStock = other.isOutOfStock;
|
|
|
212 |
this.totalSale = other.totalSale;
|
|
|
213 |
this.ourPrice = other.ourPrice;
|
| 13584 |
manish.sha |
214 |
if (other.isSetFcLocation()) {
|
|
|
215 |
this.fcLocation = other.fcLocation;
|
|
|
216 |
}
|
|
|
217 |
this.returnQuantity = other.returnQuantity;
|
|
|
218 |
this.returnValue = other.returnValue;
|
| 13154 |
manish.sha |
219 |
}
|
|
|
220 |
|
|
|
221 |
public FlipkartFaSalesSnapshot deepCopy() {
|
|
|
222 |
return new FlipkartFaSalesSnapshot(this);
|
|
|
223 |
}
|
|
|
224 |
|
|
|
225 |
@Override
|
|
|
226 |
public void clear() {
|
|
|
227 |
setDateOfSaleIsSet(false);
|
|
|
228 |
this.dateOfSale = 0;
|
|
|
229 |
setItem_idIsSet(false);
|
|
|
230 |
this.item_id = 0;
|
|
|
231 |
setTotalOrderCountIsSet(false);
|
|
|
232 |
this.totalOrderCount = 0;
|
|
|
233 |
setIsOutOfStockIsSet(false);
|
|
|
234 |
this.isOutOfStock = false;
|
|
|
235 |
setTotalSaleIsSet(false);
|
|
|
236 |
this.totalSale = 0.0;
|
|
|
237 |
setOurPriceIsSet(false);
|
|
|
238 |
this.ourPrice = 0.0;
|
| 13584 |
manish.sha |
239 |
this.fcLocation = null;
|
|
|
240 |
setReturnQuantityIsSet(false);
|
|
|
241 |
this.returnQuantity = 0;
|
|
|
242 |
setReturnValueIsSet(false);
|
|
|
243 |
this.returnValue = 0.0;
|
| 13154 |
manish.sha |
244 |
}
|
|
|
245 |
|
|
|
246 |
public long getDateOfSale() {
|
|
|
247 |
return this.dateOfSale;
|
|
|
248 |
}
|
|
|
249 |
|
|
|
250 |
public void setDateOfSale(long dateOfSale) {
|
|
|
251 |
this.dateOfSale = dateOfSale;
|
|
|
252 |
setDateOfSaleIsSet(true);
|
|
|
253 |
}
|
|
|
254 |
|
|
|
255 |
public void unsetDateOfSale() {
|
|
|
256 |
__isset_bit_vector.clear(__DATEOFSALE_ISSET_ID);
|
|
|
257 |
}
|
|
|
258 |
|
|
|
259 |
/** Returns true if field dateOfSale is set (has been assigned a value) and false otherwise */
|
|
|
260 |
public boolean isSetDateOfSale() {
|
|
|
261 |
return __isset_bit_vector.get(__DATEOFSALE_ISSET_ID);
|
|
|
262 |
}
|
|
|
263 |
|
|
|
264 |
public void setDateOfSaleIsSet(boolean value) {
|
|
|
265 |
__isset_bit_vector.set(__DATEOFSALE_ISSET_ID, value);
|
|
|
266 |
}
|
|
|
267 |
|
|
|
268 |
public long getItem_id() {
|
|
|
269 |
return this.item_id;
|
|
|
270 |
}
|
|
|
271 |
|
|
|
272 |
public void setItem_id(long item_id) {
|
|
|
273 |
this.item_id = item_id;
|
|
|
274 |
setItem_idIsSet(true);
|
|
|
275 |
}
|
|
|
276 |
|
|
|
277 |
public void unsetItem_id() {
|
|
|
278 |
__isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
|
|
|
279 |
}
|
|
|
280 |
|
|
|
281 |
/** Returns true if field item_id is set (has been assigned a value) and false otherwise */
|
|
|
282 |
public boolean isSetItem_id() {
|
|
|
283 |
return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
|
|
|
284 |
}
|
|
|
285 |
|
|
|
286 |
public void setItem_idIsSet(boolean value) {
|
|
|
287 |
__isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
|
|
|
288 |
}
|
|
|
289 |
|
|
|
290 |
public int getTotalOrderCount() {
|
|
|
291 |
return this.totalOrderCount;
|
|
|
292 |
}
|
|
|
293 |
|
|
|
294 |
public void setTotalOrderCount(int totalOrderCount) {
|
|
|
295 |
this.totalOrderCount = totalOrderCount;
|
|
|
296 |
setTotalOrderCountIsSet(true);
|
|
|
297 |
}
|
|
|
298 |
|
|
|
299 |
public void unsetTotalOrderCount() {
|
|
|
300 |
__isset_bit_vector.clear(__TOTALORDERCOUNT_ISSET_ID);
|
|
|
301 |
}
|
|
|
302 |
|
|
|
303 |
/** Returns true if field totalOrderCount is set (has been assigned a value) and false otherwise */
|
|
|
304 |
public boolean isSetTotalOrderCount() {
|
|
|
305 |
return __isset_bit_vector.get(__TOTALORDERCOUNT_ISSET_ID);
|
|
|
306 |
}
|
|
|
307 |
|
|
|
308 |
public void setTotalOrderCountIsSet(boolean value) {
|
|
|
309 |
__isset_bit_vector.set(__TOTALORDERCOUNT_ISSET_ID, value);
|
|
|
310 |
}
|
|
|
311 |
|
|
|
312 |
public boolean isIsOutOfStock() {
|
|
|
313 |
return this.isOutOfStock;
|
|
|
314 |
}
|
|
|
315 |
|
|
|
316 |
public void setIsOutOfStock(boolean isOutOfStock) {
|
|
|
317 |
this.isOutOfStock = isOutOfStock;
|
|
|
318 |
setIsOutOfStockIsSet(true);
|
|
|
319 |
}
|
|
|
320 |
|
|
|
321 |
public void unsetIsOutOfStock() {
|
|
|
322 |
__isset_bit_vector.clear(__ISOUTOFSTOCK_ISSET_ID);
|
|
|
323 |
}
|
|
|
324 |
|
|
|
325 |
/** Returns true if field isOutOfStock is set (has been assigned a value) and false otherwise */
|
|
|
326 |
public boolean isSetIsOutOfStock() {
|
|
|
327 |
return __isset_bit_vector.get(__ISOUTOFSTOCK_ISSET_ID);
|
|
|
328 |
}
|
|
|
329 |
|
|
|
330 |
public void setIsOutOfStockIsSet(boolean value) {
|
|
|
331 |
__isset_bit_vector.set(__ISOUTOFSTOCK_ISSET_ID, value);
|
|
|
332 |
}
|
|
|
333 |
|
|
|
334 |
public double getTotalSale() {
|
|
|
335 |
return this.totalSale;
|
|
|
336 |
}
|
|
|
337 |
|
|
|
338 |
public void setTotalSale(double totalSale) {
|
|
|
339 |
this.totalSale = totalSale;
|
|
|
340 |
setTotalSaleIsSet(true);
|
|
|
341 |
}
|
|
|
342 |
|
|
|
343 |
public void unsetTotalSale() {
|
|
|
344 |
__isset_bit_vector.clear(__TOTALSALE_ISSET_ID);
|
|
|
345 |
}
|
|
|
346 |
|
|
|
347 |
/** Returns true if field totalSale is set (has been assigned a value) and false otherwise */
|
|
|
348 |
public boolean isSetTotalSale() {
|
|
|
349 |
return __isset_bit_vector.get(__TOTALSALE_ISSET_ID);
|
|
|
350 |
}
|
|
|
351 |
|
|
|
352 |
public void setTotalSaleIsSet(boolean value) {
|
|
|
353 |
__isset_bit_vector.set(__TOTALSALE_ISSET_ID, value);
|
|
|
354 |
}
|
|
|
355 |
|
|
|
356 |
public double getOurPrice() {
|
|
|
357 |
return this.ourPrice;
|
|
|
358 |
}
|
|
|
359 |
|
|
|
360 |
public void setOurPrice(double ourPrice) {
|
|
|
361 |
this.ourPrice = ourPrice;
|
|
|
362 |
setOurPriceIsSet(true);
|
|
|
363 |
}
|
|
|
364 |
|
|
|
365 |
public void unsetOurPrice() {
|
|
|
366 |
__isset_bit_vector.clear(__OURPRICE_ISSET_ID);
|
|
|
367 |
}
|
|
|
368 |
|
|
|
369 |
/** Returns true if field ourPrice is set (has been assigned a value) and false otherwise */
|
|
|
370 |
public boolean isSetOurPrice() {
|
|
|
371 |
return __isset_bit_vector.get(__OURPRICE_ISSET_ID);
|
|
|
372 |
}
|
|
|
373 |
|
|
|
374 |
public void setOurPriceIsSet(boolean value) {
|
|
|
375 |
__isset_bit_vector.set(__OURPRICE_ISSET_ID, value);
|
|
|
376 |
}
|
|
|
377 |
|
| 13584 |
manish.sha |
378 |
/**
|
|
|
379 |
*
|
|
|
380 |
* @see FlipkartFCWarehouseLocation
|
|
|
381 |
*/
|
|
|
382 |
public FlipkartFCWarehouseLocation getFcLocation() {
|
|
|
383 |
return this.fcLocation;
|
|
|
384 |
}
|
|
|
385 |
|
|
|
386 |
/**
|
|
|
387 |
*
|
|
|
388 |
* @see FlipkartFCWarehouseLocation
|
|
|
389 |
*/
|
|
|
390 |
public void setFcLocation(FlipkartFCWarehouseLocation fcLocation) {
|
|
|
391 |
this.fcLocation = fcLocation;
|
|
|
392 |
}
|
|
|
393 |
|
|
|
394 |
public void unsetFcLocation() {
|
|
|
395 |
this.fcLocation = null;
|
|
|
396 |
}
|
|
|
397 |
|
|
|
398 |
/** Returns true if field fcLocation is set (has been assigned a value) and false otherwise */
|
|
|
399 |
public boolean isSetFcLocation() {
|
|
|
400 |
return this.fcLocation != null;
|
|
|
401 |
}
|
|
|
402 |
|
|
|
403 |
public void setFcLocationIsSet(boolean value) {
|
|
|
404 |
if (!value) {
|
|
|
405 |
this.fcLocation = null;
|
|
|
406 |
}
|
|
|
407 |
}
|
|
|
408 |
|
|
|
409 |
public int getReturnQuantity() {
|
|
|
410 |
return this.returnQuantity;
|
|
|
411 |
}
|
|
|
412 |
|
|
|
413 |
public void setReturnQuantity(int returnQuantity) {
|
|
|
414 |
this.returnQuantity = returnQuantity;
|
|
|
415 |
setReturnQuantityIsSet(true);
|
|
|
416 |
}
|
|
|
417 |
|
|
|
418 |
public void unsetReturnQuantity() {
|
|
|
419 |
__isset_bit_vector.clear(__RETURNQUANTITY_ISSET_ID);
|
|
|
420 |
}
|
|
|
421 |
|
|
|
422 |
/** Returns true if field returnQuantity is set (has been assigned a value) and false otherwise */
|
|
|
423 |
public boolean isSetReturnQuantity() {
|
|
|
424 |
return __isset_bit_vector.get(__RETURNQUANTITY_ISSET_ID);
|
|
|
425 |
}
|
|
|
426 |
|
|
|
427 |
public void setReturnQuantityIsSet(boolean value) {
|
|
|
428 |
__isset_bit_vector.set(__RETURNQUANTITY_ISSET_ID, value);
|
|
|
429 |
}
|
|
|
430 |
|
|
|
431 |
public double getReturnValue() {
|
|
|
432 |
return this.returnValue;
|
|
|
433 |
}
|
|
|
434 |
|
|
|
435 |
public void setReturnValue(double returnValue) {
|
|
|
436 |
this.returnValue = returnValue;
|
|
|
437 |
setReturnValueIsSet(true);
|
|
|
438 |
}
|
|
|
439 |
|
|
|
440 |
public void unsetReturnValue() {
|
|
|
441 |
__isset_bit_vector.clear(__RETURNVALUE_ISSET_ID);
|
|
|
442 |
}
|
|
|
443 |
|
|
|
444 |
/** Returns true if field returnValue is set (has been assigned a value) and false otherwise */
|
|
|
445 |
public boolean isSetReturnValue() {
|
|
|
446 |
return __isset_bit_vector.get(__RETURNVALUE_ISSET_ID);
|
|
|
447 |
}
|
|
|
448 |
|
|
|
449 |
public void setReturnValueIsSet(boolean value) {
|
|
|
450 |
__isset_bit_vector.set(__RETURNVALUE_ISSET_ID, value);
|
|
|
451 |
}
|
|
|
452 |
|
| 13154 |
manish.sha |
453 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
454 |
switch (field) {
|
|
|
455 |
case DATE_OF_SALE:
|
|
|
456 |
if (value == null) {
|
|
|
457 |
unsetDateOfSale();
|
|
|
458 |
} else {
|
|
|
459 |
setDateOfSale((Long)value);
|
|
|
460 |
}
|
|
|
461 |
break;
|
|
|
462 |
|
|
|
463 |
case ITEM_ID:
|
|
|
464 |
if (value == null) {
|
|
|
465 |
unsetItem_id();
|
|
|
466 |
} else {
|
|
|
467 |
setItem_id((Long)value);
|
|
|
468 |
}
|
|
|
469 |
break;
|
|
|
470 |
|
|
|
471 |
case TOTAL_ORDER_COUNT:
|
|
|
472 |
if (value == null) {
|
|
|
473 |
unsetTotalOrderCount();
|
|
|
474 |
} else {
|
|
|
475 |
setTotalOrderCount((Integer)value);
|
|
|
476 |
}
|
|
|
477 |
break;
|
|
|
478 |
|
|
|
479 |
case IS_OUT_OF_STOCK:
|
|
|
480 |
if (value == null) {
|
|
|
481 |
unsetIsOutOfStock();
|
|
|
482 |
} else {
|
|
|
483 |
setIsOutOfStock((Boolean)value);
|
|
|
484 |
}
|
|
|
485 |
break;
|
|
|
486 |
|
|
|
487 |
case TOTAL_SALE:
|
|
|
488 |
if (value == null) {
|
|
|
489 |
unsetTotalSale();
|
|
|
490 |
} else {
|
|
|
491 |
setTotalSale((Double)value);
|
|
|
492 |
}
|
|
|
493 |
break;
|
|
|
494 |
|
|
|
495 |
case OUR_PRICE:
|
|
|
496 |
if (value == null) {
|
|
|
497 |
unsetOurPrice();
|
|
|
498 |
} else {
|
|
|
499 |
setOurPrice((Double)value);
|
|
|
500 |
}
|
|
|
501 |
break;
|
|
|
502 |
|
| 13584 |
manish.sha |
503 |
case FC_LOCATION:
|
|
|
504 |
if (value == null) {
|
|
|
505 |
unsetFcLocation();
|
|
|
506 |
} else {
|
|
|
507 |
setFcLocation((FlipkartFCWarehouseLocation)value);
|
|
|
508 |
}
|
|
|
509 |
break;
|
|
|
510 |
|
|
|
511 |
case RETURN_QUANTITY:
|
|
|
512 |
if (value == null) {
|
|
|
513 |
unsetReturnQuantity();
|
|
|
514 |
} else {
|
|
|
515 |
setReturnQuantity((Integer)value);
|
|
|
516 |
}
|
|
|
517 |
break;
|
|
|
518 |
|
|
|
519 |
case RETURN_VALUE:
|
|
|
520 |
if (value == null) {
|
|
|
521 |
unsetReturnValue();
|
|
|
522 |
} else {
|
|
|
523 |
setReturnValue((Double)value);
|
|
|
524 |
}
|
|
|
525 |
break;
|
|
|
526 |
|
| 13154 |
manish.sha |
527 |
}
|
|
|
528 |
}
|
|
|
529 |
|
|
|
530 |
public Object getFieldValue(_Fields field) {
|
|
|
531 |
switch (field) {
|
|
|
532 |
case DATE_OF_SALE:
|
|
|
533 |
return Long.valueOf(getDateOfSale());
|
|
|
534 |
|
|
|
535 |
case ITEM_ID:
|
|
|
536 |
return Long.valueOf(getItem_id());
|
|
|
537 |
|
|
|
538 |
case TOTAL_ORDER_COUNT:
|
|
|
539 |
return Integer.valueOf(getTotalOrderCount());
|
|
|
540 |
|
|
|
541 |
case IS_OUT_OF_STOCK:
|
|
|
542 |
return Boolean.valueOf(isIsOutOfStock());
|
|
|
543 |
|
|
|
544 |
case TOTAL_SALE:
|
|
|
545 |
return Double.valueOf(getTotalSale());
|
|
|
546 |
|
|
|
547 |
case OUR_PRICE:
|
|
|
548 |
return Double.valueOf(getOurPrice());
|
|
|
549 |
|
| 13584 |
manish.sha |
550 |
case FC_LOCATION:
|
|
|
551 |
return getFcLocation();
|
|
|
552 |
|
|
|
553 |
case RETURN_QUANTITY:
|
|
|
554 |
return Integer.valueOf(getReturnQuantity());
|
|
|
555 |
|
|
|
556 |
case RETURN_VALUE:
|
|
|
557 |
return Double.valueOf(getReturnValue());
|
|
|
558 |
|
| 13154 |
manish.sha |
559 |
}
|
|
|
560 |
throw new IllegalStateException();
|
|
|
561 |
}
|
|
|
562 |
|
|
|
563 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
564 |
public boolean isSet(_Fields field) {
|
|
|
565 |
if (field == null) {
|
|
|
566 |
throw new IllegalArgumentException();
|
|
|
567 |
}
|
|
|
568 |
|
|
|
569 |
switch (field) {
|
|
|
570 |
case DATE_OF_SALE:
|
|
|
571 |
return isSetDateOfSale();
|
|
|
572 |
case ITEM_ID:
|
|
|
573 |
return isSetItem_id();
|
|
|
574 |
case TOTAL_ORDER_COUNT:
|
|
|
575 |
return isSetTotalOrderCount();
|
|
|
576 |
case IS_OUT_OF_STOCK:
|
|
|
577 |
return isSetIsOutOfStock();
|
|
|
578 |
case TOTAL_SALE:
|
|
|
579 |
return isSetTotalSale();
|
|
|
580 |
case OUR_PRICE:
|
|
|
581 |
return isSetOurPrice();
|
| 13584 |
manish.sha |
582 |
case FC_LOCATION:
|
|
|
583 |
return isSetFcLocation();
|
|
|
584 |
case RETURN_QUANTITY:
|
|
|
585 |
return isSetReturnQuantity();
|
|
|
586 |
case RETURN_VALUE:
|
|
|
587 |
return isSetReturnValue();
|
| 13154 |
manish.sha |
588 |
}
|
|
|
589 |
throw new IllegalStateException();
|
|
|
590 |
}
|
|
|
591 |
|
|
|
592 |
@Override
|
|
|
593 |
public boolean equals(Object that) {
|
|
|
594 |
if (that == null)
|
|
|
595 |
return false;
|
|
|
596 |
if (that instanceof FlipkartFaSalesSnapshot)
|
|
|
597 |
return this.equals((FlipkartFaSalesSnapshot)that);
|
|
|
598 |
return false;
|
|
|
599 |
}
|
|
|
600 |
|
|
|
601 |
public boolean equals(FlipkartFaSalesSnapshot that) {
|
|
|
602 |
if (that == null)
|
|
|
603 |
return false;
|
|
|
604 |
|
|
|
605 |
boolean this_present_dateOfSale = true;
|
|
|
606 |
boolean that_present_dateOfSale = true;
|
|
|
607 |
if (this_present_dateOfSale || that_present_dateOfSale) {
|
|
|
608 |
if (!(this_present_dateOfSale && that_present_dateOfSale))
|
|
|
609 |
return false;
|
|
|
610 |
if (this.dateOfSale != that.dateOfSale)
|
|
|
611 |
return false;
|
|
|
612 |
}
|
|
|
613 |
|
|
|
614 |
boolean this_present_item_id = true;
|
|
|
615 |
boolean that_present_item_id = true;
|
|
|
616 |
if (this_present_item_id || that_present_item_id) {
|
|
|
617 |
if (!(this_present_item_id && that_present_item_id))
|
|
|
618 |
return false;
|
|
|
619 |
if (this.item_id != that.item_id)
|
|
|
620 |
return false;
|
|
|
621 |
}
|
|
|
622 |
|
|
|
623 |
boolean this_present_totalOrderCount = true;
|
|
|
624 |
boolean that_present_totalOrderCount = true;
|
|
|
625 |
if (this_present_totalOrderCount || that_present_totalOrderCount) {
|
|
|
626 |
if (!(this_present_totalOrderCount && that_present_totalOrderCount))
|
|
|
627 |
return false;
|
|
|
628 |
if (this.totalOrderCount != that.totalOrderCount)
|
|
|
629 |
return false;
|
|
|
630 |
}
|
|
|
631 |
|
|
|
632 |
boolean this_present_isOutOfStock = true;
|
|
|
633 |
boolean that_present_isOutOfStock = true;
|
|
|
634 |
if (this_present_isOutOfStock || that_present_isOutOfStock) {
|
|
|
635 |
if (!(this_present_isOutOfStock && that_present_isOutOfStock))
|
|
|
636 |
return false;
|
|
|
637 |
if (this.isOutOfStock != that.isOutOfStock)
|
|
|
638 |
return false;
|
|
|
639 |
}
|
|
|
640 |
|
|
|
641 |
boolean this_present_totalSale = true;
|
|
|
642 |
boolean that_present_totalSale = true;
|
|
|
643 |
if (this_present_totalSale || that_present_totalSale) {
|
|
|
644 |
if (!(this_present_totalSale && that_present_totalSale))
|
|
|
645 |
return false;
|
|
|
646 |
if (this.totalSale != that.totalSale)
|
|
|
647 |
return false;
|
|
|
648 |
}
|
|
|
649 |
|
|
|
650 |
boolean this_present_ourPrice = true;
|
|
|
651 |
boolean that_present_ourPrice = true;
|
|
|
652 |
if (this_present_ourPrice || that_present_ourPrice) {
|
|
|
653 |
if (!(this_present_ourPrice && that_present_ourPrice))
|
|
|
654 |
return false;
|
|
|
655 |
if (this.ourPrice != that.ourPrice)
|
|
|
656 |
return false;
|
|
|
657 |
}
|
|
|
658 |
|
| 13584 |
manish.sha |
659 |
boolean this_present_fcLocation = true && this.isSetFcLocation();
|
|
|
660 |
boolean that_present_fcLocation = true && that.isSetFcLocation();
|
|
|
661 |
if (this_present_fcLocation || that_present_fcLocation) {
|
|
|
662 |
if (!(this_present_fcLocation && that_present_fcLocation))
|
|
|
663 |
return false;
|
|
|
664 |
if (!this.fcLocation.equals(that.fcLocation))
|
|
|
665 |
return false;
|
|
|
666 |
}
|
|
|
667 |
|
|
|
668 |
boolean this_present_returnQuantity = true;
|
|
|
669 |
boolean that_present_returnQuantity = true;
|
|
|
670 |
if (this_present_returnQuantity || that_present_returnQuantity) {
|
|
|
671 |
if (!(this_present_returnQuantity && that_present_returnQuantity))
|
|
|
672 |
return false;
|
|
|
673 |
if (this.returnQuantity != that.returnQuantity)
|
|
|
674 |
return false;
|
|
|
675 |
}
|
|
|
676 |
|
|
|
677 |
boolean this_present_returnValue = true;
|
|
|
678 |
boolean that_present_returnValue = true;
|
|
|
679 |
if (this_present_returnValue || that_present_returnValue) {
|
|
|
680 |
if (!(this_present_returnValue && that_present_returnValue))
|
|
|
681 |
return false;
|
|
|
682 |
if (this.returnValue != that.returnValue)
|
|
|
683 |
return false;
|
|
|
684 |
}
|
|
|
685 |
|
| 13154 |
manish.sha |
686 |
return true;
|
|
|
687 |
}
|
|
|
688 |
|
|
|
689 |
@Override
|
|
|
690 |
public int hashCode() {
|
|
|
691 |
return 0;
|
|
|
692 |
}
|
|
|
693 |
|
|
|
694 |
public int compareTo(FlipkartFaSalesSnapshot other) {
|
|
|
695 |
if (!getClass().equals(other.getClass())) {
|
|
|
696 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
697 |
}
|
|
|
698 |
|
|
|
699 |
int lastComparison = 0;
|
|
|
700 |
FlipkartFaSalesSnapshot typedOther = (FlipkartFaSalesSnapshot)other;
|
|
|
701 |
|
|
|
702 |
lastComparison = Boolean.valueOf(isSetDateOfSale()).compareTo(typedOther.isSetDateOfSale());
|
|
|
703 |
if (lastComparison != 0) {
|
|
|
704 |
return lastComparison;
|
|
|
705 |
}
|
|
|
706 |
if (isSetDateOfSale()) {
|
|
|
707 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateOfSale, typedOther.dateOfSale);
|
|
|
708 |
if (lastComparison != 0) {
|
|
|
709 |
return lastComparison;
|
|
|
710 |
}
|
|
|
711 |
}
|
|
|
712 |
lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
|
|
|
713 |
if (lastComparison != 0) {
|
|
|
714 |
return lastComparison;
|
|
|
715 |
}
|
|
|
716 |
if (isSetItem_id()) {
|
|
|
717 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
|
|
|
718 |
if (lastComparison != 0) {
|
|
|
719 |
return lastComparison;
|
|
|
720 |
}
|
|
|
721 |
}
|
|
|
722 |
lastComparison = Boolean.valueOf(isSetTotalOrderCount()).compareTo(typedOther.isSetTotalOrderCount());
|
|
|
723 |
if (lastComparison != 0) {
|
|
|
724 |
return lastComparison;
|
|
|
725 |
}
|
|
|
726 |
if (isSetTotalOrderCount()) {
|
|
|
727 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalOrderCount, typedOther.totalOrderCount);
|
|
|
728 |
if (lastComparison != 0) {
|
|
|
729 |
return lastComparison;
|
|
|
730 |
}
|
|
|
731 |
}
|
|
|
732 |
lastComparison = Boolean.valueOf(isSetIsOutOfStock()).compareTo(typedOther.isSetIsOutOfStock());
|
|
|
733 |
if (lastComparison != 0) {
|
|
|
734 |
return lastComparison;
|
|
|
735 |
}
|
|
|
736 |
if (isSetIsOutOfStock()) {
|
|
|
737 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isOutOfStock, typedOther.isOutOfStock);
|
|
|
738 |
if (lastComparison != 0) {
|
|
|
739 |
return lastComparison;
|
|
|
740 |
}
|
|
|
741 |
}
|
|
|
742 |
lastComparison = Boolean.valueOf(isSetTotalSale()).compareTo(typedOther.isSetTotalSale());
|
|
|
743 |
if (lastComparison != 0) {
|
|
|
744 |
return lastComparison;
|
|
|
745 |
}
|
|
|
746 |
if (isSetTotalSale()) {
|
|
|
747 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalSale, typedOther.totalSale);
|
|
|
748 |
if (lastComparison != 0) {
|
|
|
749 |
return lastComparison;
|
|
|
750 |
}
|
|
|
751 |
}
|
|
|
752 |
lastComparison = Boolean.valueOf(isSetOurPrice()).compareTo(typedOther.isSetOurPrice());
|
|
|
753 |
if (lastComparison != 0) {
|
|
|
754 |
return lastComparison;
|
|
|
755 |
}
|
|
|
756 |
if (isSetOurPrice()) {
|
|
|
757 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ourPrice, typedOther.ourPrice);
|
|
|
758 |
if (lastComparison != 0) {
|
|
|
759 |
return lastComparison;
|
|
|
760 |
}
|
|
|
761 |
}
|
| 13584 |
manish.sha |
762 |
lastComparison = Boolean.valueOf(isSetFcLocation()).compareTo(typedOther.isSetFcLocation());
|
|
|
763 |
if (lastComparison != 0) {
|
|
|
764 |
return lastComparison;
|
|
|
765 |
}
|
|
|
766 |
if (isSetFcLocation()) {
|
|
|
767 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fcLocation, typedOther.fcLocation);
|
|
|
768 |
if (lastComparison != 0) {
|
|
|
769 |
return lastComparison;
|
|
|
770 |
}
|
|
|
771 |
}
|
|
|
772 |
lastComparison = Boolean.valueOf(isSetReturnQuantity()).compareTo(typedOther.isSetReturnQuantity());
|
|
|
773 |
if (lastComparison != 0) {
|
|
|
774 |
return lastComparison;
|
|
|
775 |
}
|
|
|
776 |
if (isSetReturnQuantity()) {
|
|
|
777 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.returnQuantity, typedOther.returnQuantity);
|
|
|
778 |
if (lastComparison != 0) {
|
|
|
779 |
return lastComparison;
|
|
|
780 |
}
|
|
|
781 |
}
|
|
|
782 |
lastComparison = Boolean.valueOf(isSetReturnValue()).compareTo(typedOther.isSetReturnValue());
|
|
|
783 |
if (lastComparison != 0) {
|
|
|
784 |
return lastComparison;
|
|
|
785 |
}
|
|
|
786 |
if (isSetReturnValue()) {
|
|
|
787 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.returnValue, typedOther.returnValue);
|
|
|
788 |
if (lastComparison != 0) {
|
|
|
789 |
return lastComparison;
|
|
|
790 |
}
|
|
|
791 |
}
|
| 13154 |
manish.sha |
792 |
return 0;
|
|
|
793 |
}
|
|
|
794 |
|
|
|
795 |
public _Fields fieldForId(int fieldId) {
|
|
|
796 |
return _Fields.findByThriftId(fieldId);
|
|
|
797 |
}
|
|
|
798 |
|
|
|
799 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
800 |
org.apache.thrift.protocol.TField field;
|
|
|
801 |
iprot.readStructBegin();
|
|
|
802 |
while (true)
|
|
|
803 |
{
|
|
|
804 |
field = iprot.readFieldBegin();
|
|
|
805 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
806 |
break;
|
|
|
807 |
}
|
|
|
808 |
switch (field.id) {
|
|
|
809 |
case 1: // DATE_OF_SALE
|
|
|
810 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
811 |
this.dateOfSale = iprot.readI64();
|
|
|
812 |
setDateOfSaleIsSet(true);
|
|
|
813 |
} else {
|
|
|
814 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
815 |
}
|
|
|
816 |
break;
|
|
|
817 |
case 2: // ITEM_ID
|
|
|
818 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
819 |
this.item_id = iprot.readI64();
|
|
|
820 |
setItem_idIsSet(true);
|
|
|
821 |
} else {
|
|
|
822 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
823 |
}
|
|
|
824 |
break;
|
|
|
825 |
case 3: // TOTAL_ORDER_COUNT
|
|
|
826 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
827 |
this.totalOrderCount = iprot.readI32();
|
|
|
828 |
setTotalOrderCountIsSet(true);
|
|
|
829 |
} else {
|
|
|
830 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
831 |
}
|
|
|
832 |
break;
|
|
|
833 |
case 4: // IS_OUT_OF_STOCK
|
|
|
834 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
835 |
this.isOutOfStock = iprot.readBool();
|
|
|
836 |
setIsOutOfStockIsSet(true);
|
|
|
837 |
} else {
|
|
|
838 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
839 |
}
|
|
|
840 |
break;
|
|
|
841 |
case 5: // TOTAL_SALE
|
|
|
842 |
if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
|
|
|
843 |
this.totalSale = iprot.readDouble();
|
|
|
844 |
setTotalSaleIsSet(true);
|
|
|
845 |
} else {
|
|
|
846 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
847 |
}
|
|
|
848 |
break;
|
|
|
849 |
case 6: // OUR_PRICE
|
|
|
850 |
if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
|
|
|
851 |
this.ourPrice = iprot.readDouble();
|
|
|
852 |
setOurPriceIsSet(true);
|
|
|
853 |
} else {
|
|
|
854 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
855 |
}
|
|
|
856 |
break;
|
| 13584 |
manish.sha |
857 |
case 7: // FC_LOCATION
|
|
|
858 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
859 |
this.fcLocation = FlipkartFCWarehouseLocation.findByValue(iprot.readI32());
|
|
|
860 |
} else {
|
|
|
861 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
862 |
}
|
|
|
863 |
break;
|
|
|
864 |
case 8: // RETURN_QUANTITY
|
|
|
865 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
866 |
this.returnQuantity = iprot.readI32();
|
|
|
867 |
setReturnQuantityIsSet(true);
|
|
|
868 |
} else {
|
|
|
869 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
870 |
}
|
|
|
871 |
break;
|
|
|
872 |
case 9: // RETURN_VALUE
|
|
|
873 |
if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
|
|
|
874 |
this.returnValue = iprot.readDouble();
|
|
|
875 |
setReturnValueIsSet(true);
|
|
|
876 |
} else {
|
|
|
877 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
878 |
}
|
|
|
879 |
break;
|
| 13154 |
manish.sha |
880 |
default:
|
|
|
881 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
882 |
}
|
|
|
883 |
iprot.readFieldEnd();
|
|
|
884 |
}
|
|
|
885 |
iprot.readStructEnd();
|
|
|
886 |
validate();
|
|
|
887 |
}
|
|
|
888 |
|
|
|
889 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
890 |
validate();
|
|
|
891 |
|
|
|
892 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
893 |
oprot.writeFieldBegin(DATE_OF_SALE_FIELD_DESC);
|
|
|
894 |
oprot.writeI64(this.dateOfSale);
|
|
|
895 |
oprot.writeFieldEnd();
|
|
|
896 |
oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
|
|
|
897 |
oprot.writeI64(this.item_id);
|
|
|
898 |
oprot.writeFieldEnd();
|
|
|
899 |
oprot.writeFieldBegin(TOTAL_ORDER_COUNT_FIELD_DESC);
|
|
|
900 |
oprot.writeI32(this.totalOrderCount);
|
|
|
901 |
oprot.writeFieldEnd();
|
|
|
902 |
oprot.writeFieldBegin(IS_OUT_OF_STOCK_FIELD_DESC);
|
|
|
903 |
oprot.writeBool(this.isOutOfStock);
|
|
|
904 |
oprot.writeFieldEnd();
|
|
|
905 |
oprot.writeFieldBegin(TOTAL_SALE_FIELD_DESC);
|
|
|
906 |
oprot.writeDouble(this.totalSale);
|
|
|
907 |
oprot.writeFieldEnd();
|
|
|
908 |
oprot.writeFieldBegin(OUR_PRICE_FIELD_DESC);
|
|
|
909 |
oprot.writeDouble(this.ourPrice);
|
|
|
910 |
oprot.writeFieldEnd();
|
| 13584 |
manish.sha |
911 |
if (this.fcLocation != null) {
|
|
|
912 |
oprot.writeFieldBegin(FC_LOCATION_FIELD_DESC);
|
|
|
913 |
oprot.writeI32(this.fcLocation.getValue());
|
|
|
914 |
oprot.writeFieldEnd();
|
|
|
915 |
}
|
|
|
916 |
oprot.writeFieldBegin(RETURN_QUANTITY_FIELD_DESC);
|
|
|
917 |
oprot.writeI32(this.returnQuantity);
|
|
|
918 |
oprot.writeFieldEnd();
|
|
|
919 |
oprot.writeFieldBegin(RETURN_VALUE_FIELD_DESC);
|
|
|
920 |
oprot.writeDouble(this.returnValue);
|
|
|
921 |
oprot.writeFieldEnd();
|
| 13154 |
manish.sha |
922 |
oprot.writeFieldStop();
|
|
|
923 |
oprot.writeStructEnd();
|
|
|
924 |
}
|
|
|
925 |
|
|
|
926 |
@Override
|
|
|
927 |
public String toString() {
|
|
|
928 |
StringBuilder sb = new StringBuilder("FlipkartFaSalesSnapshot(");
|
|
|
929 |
boolean first = true;
|
|
|
930 |
|
|
|
931 |
sb.append("dateOfSale:");
|
|
|
932 |
sb.append(this.dateOfSale);
|
|
|
933 |
first = false;
|
|
|
934 |
if (!first) sb.append(", ");
|
|
|
935 |
sb.append("item_id:");
|
|
|
936 |
sb.append(this.item_id);
|
|
|
937 |
first = false;
|
|
|
938 |
if (!first) sb.append(", ");
|
|
|
939 |
sb.append("totalOrderCount:");
|
|
|
940 |
sb.append(this.totalOrderCount);
|
|
|
941 |
first = false;
|
|
|
942 |
if (!first) sb.append(", ");
|
|
|
943 |
sb.append("isOutOfStock:");
|
|
|
944 |
sb.append(this.isOutOfStock);
|
|
|
945 |
first = false;
|
|
|
946 |
if (!first) sb.append(", ");
|
|
|
947 |
sb.append("totalSale:");
|
|
|
948 |
sb.append(this.totalSale);
|
|
|
949 |
first = false;
|
|
|
950 |
if (!first) sb.append(", ");
|
|
|
951 |
sb.append("ourPrice:");
|
|
|
952 |
sb.append(this.ourPrice);
|
|
|
953 |
first = false;
|
| 13584 |
manish.sha |
954 |
if (!first) sb.append(", ");
|
|
|
955 |
sb.append("fcLocation:");
|
|
|
956 |
if (this.fcLocation == null) {
|
|
|
957 |
sb.append("null");
|
|
|
958 |
} else {
|
|
|
959 |
sb.append(this.fcLocation);
|
|
|
960 |
}
|
|
|
961 |
first = false;
|
|
|
962 |
if (!first) sb.append(", ");
|
|
|
963 |
sb.append("returnQuantity:");
|
|
|
964 |
sb.append(this.returnQuantity);
|
|
|
965 |
first = false;
|
|
|
966 |
if (!first) sb.append(", ");
|
|
|
967 |
sb.append("returnValue:");
|
|
|
968 |
sb.append(this.returnValue);
|
|
|
969 |
first = false;
|
| 13154 |
manish.sha |
970 |
sb.append(")");
|
|
|
971 |
return sb.toString();
|
|
|
972 |
}
|
|
|
973 |
|
|
|
974 |
public void validate() throws org.apache.thrift.TException {
|
|
|
975 |
// check for required fields
|
|
|
976 |
}
|
|
|
977 |
|
|
|
978 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
979 |
try {
|
|
|
980 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
981 |
} catch (org.apache.thrift.TException te) {
|
|
|
982 |
throw new java.io.IOException(te);
|
|
|
983 |
}
|
|
|
984 |
}
|
|
|
985 |
|
|
|
986 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
987 |
try {
|
|
|
988 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
989 |
__isset_bit_vector = new BitSet(1);
|
|
|
990 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
991 |
} catch (org.apache.thrift.TException te) {
|
|
|
992 |
throw new java.io.IOException(te);
|
|
|
993 |
}
|
|
|
994 |
}
|
|
|
995 |
|
|
|
996 |
}
|
|
|
997 |
|