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