| 13709 |
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.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 HsItem implements org.apache.thrift.TBase<HsItem, HsItem._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HsItem");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField HS_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hsItemId", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
27 |
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)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField HS_PRODUCT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hsProductId", org.apache.thrift.protocol.TType.STRING, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField LISTING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("listingPrice", org.apache.thrift.protocol.TType.I64, (short)4);
|
|
|
30 |
private static final org.apache.thrift.protocol.TField DEFAULT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultWarehouseId", org.apache.thrift.protocol.TType.I64, (short)5);
|
|
|
31 |
private static final org.apache.thrift.protocol.TField ADDED_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("addedTimestamp", org.apache.thrift.protocol.TType.I64, (short)6);
|
|
|
32 |
private static final org.apache.thrift.protocol.TField ADDED_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("addedBy", org.apache.thrift.protocol.TType.STRING, (short)7);
|
|
|
33 |
|
|
|
34 |
private String hsItemId; // required
|
|
|
35 |
private long itemId; // required
|
|
|
36 |
private String hsProductId; // required
|
|
|
37 |
private long listingPrice; // required
|
|
|
38 |
private long defaultWarehouseId; // required
|
|
|
39 |
private long addedTimestamp; // required
|
|
|
40 |
private String addedBy; // required
|
|
|
41 |
|
|
|
42 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
43 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
44 |
HS_ITEM_ID((short)1, "hsItemId"),
|
|
|
45 |
ITEM_ID((short)2, "itemId"),
|
|
|
46 |
HS_PRODUCT_ID((short)3, "hsProductId"),
|
|
|
47 |
LISTING_PRICE((short)4, "listingPrice"),
|
|
|
48 |
DEFAULT_WAREHOUSE_ID((short)5, "defaultWarehouseId"),
|
|
|
49 |
ADDED_TIMESTAMP((short)6, "addedTimestamp"),
|
|
|
50 |
ADDED_BY((short)7, "addedBy");
|
|
|
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: // HS_ITEM_ID
|
|
|
66 |
return HS_ITEM_ID;
|
|
|
67 |
case 2: // ITEM_ID
|
|
|
68 |
return ITEM_ID;
|
|
|
69 |
case 3: // HS_PRODUCT_ID
|
|
|
70 |
return HS_PRODUCT_ID;
|
|
|
71 |
case 4: // LISTING_PRICE
|
|
|
72 |
return LISTING_PRICE;
|
|
|
73 |
case 5: // DEFAULT_WAREHOUSE_ID
|
|
|
74 |
return DEFAULT_WAREHOUSE_ID;
|
|
|
75 |
case 6: // ADDED_TIMESTAMP
|
|
|
76 |
return ADDED_TIMESTAMP;
|
|
|
77 |
case 7: // ADDED_BY
|
|
|
78 |
return ADDED_BY;
|
|
|
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 __LISTINGPRICE_ISSET_ID = 1;
|
|
|
121 |
private static final int __DEFAULTWAREHOUSEID_ISSET_ID = 2;
|
|
|
122 |
private static final int __ADDEDTIMESTAMP_ISSET_ID = 3;
|
|
|
123 |
private BitSet __isset_bit_vector = new BitSet(4);
|
|
|
124 |
|
|
|
125 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
126 |
static {
|
|
|
127 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
128 |
tmpMap.put(_Fields.HS_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("hsItemId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
129 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
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.HS_PRODUCT_ID, new org.apache.thrift.meta_data.FieldMetaData("hsProductId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
133 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
134 |
tmpMap.put(_Fields.LISTING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("listingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
135 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
136 |
tmpMap.put(_Fields.DEFAULT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("defaultWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
137 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
138 |
tmpMap.put(_Fields.ADDED_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("addedTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
139 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
140 |
tmpMap.put(_Fields.ADDED_BY, new org.apache.thrift.meta_data.FieldMetaData("addedBy", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
141 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
142 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
143 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HsItem.class, metaDataMap);
|
|
|
144 |
}
|
|
|
145 |
|
|
|
146 |
public HsItem() {
|
|
|
147 |
}
|
|
|
148 |
|
|
|
149 |
public HsItem(
|
|
|
150 |
String hsItemId,
|
|
|
151 |
long itemId,
|
|
|
152 |
String hsProductId,
|
|
|
153 |
long listingPrice,
|
|
|
154 |
long defaultWarehouseId,
|
|
|
155 |
long addedTimestamp,
|
|
|
156 |
String addedBy)
|
|
|
157 |
{
|
|
|
158 |
this();
|
|
|
159 |
this.hsItemId = hsItemId;
|
|
|
160 |
this.itemId = itemId;
|
|
|
161 |
setItemIdIsSet(true);
|
|
|
162 |
this.hsProductId = hsProductId;
|
|
|
163 |
this.listingPrice = listingPrice;
|
|
|
164 |
setListingPriceIsSet(true);
|
|
|
165 |
this.defaultWarehouseId = defaultWarehouseId;
|
|
|
166 |
setDefaultWarehouseIdIsSet(true);
|
|
|
167 |
this.addedTimestamp = addedTimestamp;
|
|
|
168 |
setAddedTimestampIsSet(true);
|
|
|
169 |
this.addedBy = addedBy;
|
|
|
170 |
}
|
|
|
171 |
|
|
|
172 |
/**
|
|
|
173 |
* Performs a deep copy on <i>other</i>.
|
|
|
174 |
*/
|
|
|
175 |
public HsItem(HsItem other) {
|
|
|
176 |
__isset_bit_vector.clear();
|
|
|
177 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
178 |
if (other.isSetHsItemId()) {
|
|
|
179 |
this.hsItemId = other.hsItemId;
|
|
|
180 |
}
|
|
|
181 |
this.itemId = other.itemId;
|
|
|
182 |
if (other.isSetHsProductId()) {
|
|
|
183 |
this.hsProductId = other.hsProductId;
|
|
|
184 |
}
|
|
|
185 |
this.listingPrice = other.listingPrice;
|
|
|
186 |
this.defaultWarehouseId = other.defaultWarehouseId;
|
|
|
187 |
this.addedTimestamp = other.addedTimestamp;
|
|
|
188 |
if (other.isSetAddedBy()) {
|
|
|
189 |
this.addedBy = other.addedBy;
|
|
|
190 |
}
|
|
|
191 |
}
|
|
|
192 |
|
|
|
193 |
public HsItem deepCopy() {
|
|
|
194 |
return new HsItem(this);
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
@Override
|
|
|
198 |
public void clear() {
|
|
|
199 |
this.hsItemId = null;
|
|
|
200 |
setItemIdIsSet(false);
|
|
|
201 |
this.itemId = 0;
|
|
|
202 |
this.hsProductId = null;
|
|
|
203 |
setListingPriceIsSet(false);
|
|
|
204 |
this.listingPrice = 0;
|
|
|
205 |
setDefaultWarehouseIdIsSet(false);
|
|
|
206 |
this.defaultWarehouseId = 0;
|
|
|
207 |
setAddedTimestampIsSet(false);
|
|
|
208 |
this.addedTimestamp = 0;
|
|
|
209 |
this.addedBy = null;
|
|
|
210 |
}
|
|
|
211 |
|
|
|
212 |
public String getHsItemId() {
|
|
|
213 |
return this.hsItemId;
|
|
|
214 |
}
|
|
|
215 |
|
|
|
216 |
public void setHsItemId(String hsItemId) {
|
|
|
217 |
this.hsItemId = hsItemId;
|
|
|
218 |
}
|
|
|
219 |
|
|
|
220 |
public void unsetHsItemId() {
|
|
|
221 |
this.hsItemId = null;
|
|
|
222 |
}
|
|
|
223 |
|
|
|
224 |
/** Returns true if field hsItemId is set (has been assigned a value) and false otherwise */
|
|
|
225 |
public boolean isSetHsItemId() {
|
|
|
226 |
return this.hsItemId != null;
|
|
|
227 |
}
|
|
|
228 |
|
|
|
229 |
public void setHsItemIdIsSet(boolean value) {
|
|
|
230 |
if (!value) {
|
|
|
231 |
this.hsItemId = null;
|
|
|
232 |
}
|
|
|
233 |
}
|
|
|
234 |
|
|
|
235 |
public long getItemId() {
|
|
|
236 |
return this.itemId;
|
|
|
237 |
}
|
|
|
238 |
|
|
|
239 |
public void setItemId(long itemId) {
|
|
|
240 |
this.itemId = itemId;
|
|
|
241 |
setItemIdIsSet(true);
|
|
|
242 |
}
|
|
|
243 |
|
|
|
244 |
public void unsetItemId() {
|
|
|
245 |
__isset_bit_vector.clear(__ITEMID_ISSET_ID);
|
|
|
246 |
}
|
|
|
247 |
|
|
|
248 |
/** Returns true if field itemId is set (has been assigned a value) and false otherwise */
|
|
|
249 |
public boolean isSetItemId() {
|
|
|
250 |
return __isset_bit_vector.get(__ITEMID_ISSET_ID);
|
|
|
251 |
}
|
|
|
252 |
|
|
|
253 |
public void setItemIdIsSet(boolean value) {
|
|
|
254 |
__isset_bit_vector.set(__ITEMID_ISSET_ID, value);
|
|
|
255 |
}
|
|
|
256 |
|
|
|
257 |
public String getHsProductId() {
|
|
|
258 |
return this.hsProductId;
|
|
|
259 |
}
|
|
|
260 |
|
|
|
261 |
public void setHsProductId(String hsProductId) {
|
|
|
262 |
this.hsProductId = hsProductId;
|
|
|
263 |
}
|
|
|
264 |
|
|
|
265 |
public void unsetHsProductId() {
|
|
|
266 |
this.hsProductId = null;
|
|
|
267 |
}
|
|
|
268 |
|
|
|
269 |
/** Returns true if field hsProductId is set (has been assigned a value) and false otherwise */
|
|
|
270 |
public boolean isSetHsProductId() {
|
|
|
271 |
return this.hsProductId != null;
|
|
|
272 |
}
|
|
|
273 |
|
|
|
274 |
public void setHsProductIdIsSet(boolean value) {
|
|
|
275 |
if (!value) {
|
|
|
276 |
this.hsProductId = null;
|
|
|
277 |
}
|
|
|
278 |
}
|
|
|
279 |
|
|
|
280 |
public long getListingPrice() {
|
|
|
281 |
return this.listingPrice;
|
|
|
282 |
}
|
|
|
283 |
|
|
|
284 |
public void setListingPrice(long listingPrice) {
|
|
|
285 |
this.listingPrice = listingPrice;
|
|
|
286 |
setListingPriceIsSet(true);
|
|
|
287 |
}
|
|
|
288 |
|
|
|
289 |
public void unsetListingPrice() {
|
|
|
290 |
__isset_bit_vector.clear(__LISTINGPRICE_ISSET_ID);
|
|
|
291 |
}
|
|
|
292 |
|
|
|
293 |
/** Returns true if field listingPrice is set (has been assigned a value) and false otherwise */
|
|
|
294 |
public boolean isSetListingPrice() {
|
|
|
295 |
return __isset_bit_vector.get(__LISTINGPRICE_ISSET_ID);
|
|
|
296 |
}
|
|
|
297 |
|
|
|
298 |
public void setListingPriceIsSet(boolean value) {
|
|
|
299 |
__isset_bit_vector.set(__LISTINGPRICE_ISSET_ID, value);
|
|
|
300 |
}
|
|
|
301 |
|
|
|
302 |
public long getDefaultWarehouseId() {
|
|
|
303 |
return this.defaultWarehouseId;
|
|
|
304 |
}
|
|
|
305 |
|
|
|
306 |
public void setDefaultWarehouseId(long defaultWarehouseId) {
|
|
|
307 |
this.defaultWarehouseId = defaultWarehouseId;
|
|
|
308 |
setDefaultWarehouseIdIsSet(true);
|
|
|
309 |
}
|
|
|
310 |
|
|
|
311 |
public void unsetDefaultWarehouseId() {
|
|
|
312 |
__isset_bit_vector.clear(__DEFAULTWAREHOUSEID_ISSET_ID);
|
|
|
313 |
}
|
|
|
314 |
|
|
|
315 |
/** Returns true if field defaultWarehouseId is set (has been assigned a value) and false otherwise */
|
|
|
316 |
public boolean isSetDefaultWarehouseId() {
|
|
|
317 |
return __isset_bit_vector.get(__DEFAULTWAREHOUSEID_ISSET_ID);
|
|
|
318 |
}
|
|
|
319 |
|
|
|
320 |
public void setDefaultWarehouseIdIsSet(boolean value) {
|
|
|
321 |
__isset_bit_vector.set(__DEFAULTWAREHOUSEID_ISSET_ID, value);
|
|
|
322 |
}
|
|
|
323 |
|
|
|
324 |
public long getAddedTimestamp() {
|
|
|
325 |
return this.addedTimestamp;
|
|
|
326 |
}
|
|
|
327 |
|
|
|
328 |
public void setAddedTimestamp(long addedTimestamp) {
|
|
|
329 |
this.addedTimestamp = addedTimestamp;
|
|
|
330 |
setAddedTimestampIsSet(true);
|
|
|
331 |
}
|
|
|
332 |
|
|
|
333 |
public void unsetAddedTimestamp() {
|
|
|
334 |
__isset_bit_vector.clear(__ADDEDTIMESTAMP_ISSET_ID);
|
|
|
335 |
}
|
|
|
336 |
|
|
|
337 |
/** Returns true if field addedTimestamp is set (has been assigned a value) and false otherwise */
|
|
|
338 |
public boolean isSetAddedTimestamp() {
|
|
|
339 |
return __isset_bit_vector.get(__ADDEDTIMESTAMP_ISSET_ID);
|
|
|
340 |
}
|
|
|
341 |
|
|
|
342 |
public void setAddedTimestampIsSet(boolean value) {
|
|
|
343 |
__isset_bit_vector.set(__ADDEDTIMESTAMP_ISSET_ID, value);
|
|
|
344 |
}
|
|
|
345 |
|
|
|
346 |
public String getAddedBy() {
|
|
|
347 |
return this.addedBy;
|
|
|
348 |
}
|
|
|
349 |
|
|
|
350 |
public void setAddedBy(String addedBy) {
|
|
|
351 |
this.addedBy = addedBy;
|
|
|
352 |
}
|
|
|
353 |
|
|
|
354 |
public void unsetAddedBy() {
|
|
|
355 |
this.addedBy = null;
|
|
|
356 |
}
|
|
|
357 |
|
|
|
358 |
/** Returns true if field addedBy is set (has been assigned a value) and false otherwise */
|
|
|
359 |
public boolean isSetAddedBy() {
|
|
|
360 |
return this.addedBy != null;
|
|
|
361 |
}
|
|
|
362 |
|
|
|
363 |
public void setAddedByIsSet(boolean value) {
|
|
|
364 |
if (!value) {
|
|
|
365 |
this.addedBy = null;
|
|
|
366 |
}
|
|
|
367 |
}
|
|
|
368 |
|
|
|
369 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
370 |
switch (field) {
|
|
|
371 |
case HS_ITEM_ID:
|
|
|
372 |
if (value == null) {
|
|
|
373 |
unsetHsItemId();
|
|
|
374 |
} else {
|
|
|
375 |
setHsItemId((String)value);
|
|
|
376 |
}
|
|
|
377 |
break;
|
|
|
378 |
|
|
|
379 |
case ITEM_ID:
|
|
|
380 |
if (value == null) {
|
|
|
381 |
unsetItemId();
|
|
|
382 |
} else {
|
|
|
383 |
setItemId((Long)value);
|
|
|
384 |
}
|
|
|
385 |
break;
|
|
|
386 |
|
|
|
387 |
case HS_PRODUCT_ID:
|
|
|
388 |
if (value == null) {
|
|
|
389 |
unsetHsProductId();
|
|
|
390 |
} else {
|
|
|
391 |
setHsProductId((String)value);
|
|
|
392 |
}
|
|
|
393 |
break;
|
|
|
394 |
|
|
|
395 |
case LISTING_PRICE:
|
|
|
396 |
if (value == null) {
|
|
|
397 |
unsetListingPrice();
|
|
|
398 |
} else {
|
|
|
399 |
setListingPrice((Long)value);
|
|
|
400 |
}
|
|
|
401 |
break;
|
|
|
402 |
|
|
|
403 |
case DEFAULT_WAREHOUSE_ID:
|
|
|
404 |
if (value == null) {
|
|
|
405 |
unsetDefaultWarehouseId();
|
|
|
406 |
} else {
|
|
|
407 |
setDefaultWarehouseId((Long)value);
|
|
|
408 |
}
|
|
|
409 |
break;
|
|
|
410 |
|
|
|
411 |
case ADDED_TIMESTAMP:
|
|
|
412 |
if (value == null) {
|
|
|
413 |
unsetAddedTimestamp();
|
|
|
414 |
} else {
|
|
|
415 |
setAddedTimestamp((Long)value);
|
|
|
416 |
}
|
|
|
417 |
break;
|
|
|
418 |
|
|
|
419 |
case ADDED_BY:
|
|
|
420 |
if (value == null) {
|
|
|
421 |
unsetAddedBy();
|
|
|
422 |
} else {
|
|
|
423 |
setAddedBy((String)value);
|
|
|
424 |
}
|
|
|
425 |
break;
|
|
|
426 |
|
|
|
427 |
}
|
|
|
428 |
}
|
|
|
429 |
|
|
|
430 |
public Object getFieldValue(_Fields field) {
|
|
|
431 |
switch (field) {
|
|
|
432 |
case HS_ITEM_ID:
|
|
|
433 |
return getHsItemId();
|
|
|
434 |
|
|
|
435 |
case ITEM_ID:
|
|
|
436 |
return Long.valueOf(getItemId());
|
|
|
437 |
|
|
|
438 |
case HS_PRODUCT_ID:
|
|
|
439 |
return getHsProductId();
|
|
|
440 |
|
|
|
441 |
case LISTING_PRICE:
|
|
|
442 |
return Long.valueOf(getListingPrice());
|
|
|
443 |
|
|
|
444 |
case DEFAULT_WAREHOUSE_ID:
|
|
|
445 |
return Long.valueOf(getDefaultWarehouseId());
|
|
|
446 |
|
|
|
447 |
case ADDED_TIMESTAMP:
|
|
|
448 |
return Long.valueOf(getAddedTimestamp());
|
|
|
449 |
|
|
|
450 |
case ADDED_BY:
|
|
|
451 |
return getAddedBy();
|
|
|
452 |
|
|
|
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 HS_ITEM_ID:
|
|
|
465 |
return isSetHsItemId();
|
|
|
466 |
case ITEM_ID:
|
|
|
467 |
return isSetItemId();
|
|
|
468 |
case HS_PRODUCT_ID:
|
|
|
469 |
return isSetHsProductId();
|
|
|
470 |
case LISTING_PRICE:
|
|
|
471 |
return isSetListingPrice();
|
|
|
472 |
case DEFAULT_WAREHOUSE_ID:
|
|
|
473 |
return isSetDefaultWarehouseId();
|
|
|
474 |
case ADDED_TIMESTAMP:
|
|
|
475 |
return isSetAddedTimestamp();
|
|
|
476 |
case ADDED_BY:
|
|
|
477 |
return isSetAddedBy();
|
|
|
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 HsItem)
|
|
|
487 |
return this.equals((HsItem)that);
|
|
|
488 |
return false;
|
|
|
489 |
}
|
|
|
490 |
|
|
|
491 |
public boolean equals(HsItem that) {
|
|
|
492 |
if (that == null)
|
|
|
493 |
return false;
|
|
|
494 |
|
|
|
495 |
boolean this_present_hsItemId = true && this.isSetHsItemId();
|
|
|
496 |
boolean that_present_hsItemId = true && that.isSetHsItemId();
|
|
|
497 |
if (this_present_hsItemId || that_present_hsItemId) {
|
|
|
498 |
if (!(this_present_hsItemId && that_present_hsItemId))
|
|
|
499 |
return false;
|
|
|
500 |
if (!this.hsItemId.equals(that.hsItemId))
|
|
|
501 |
return false;
|
|
|
502 |
}
|
|
|
503 |
|
|
|
504 |
boolean this_present_itemId = true;
|
|
|
505 |
boolean that_present_itemId = true;
|
|
|
506 |
if (this_present_itemId || that_present_itemId) {
|
|
|
507 |
if (!(this_present_itemId && that_present_itemId))
|
|
|
508 |
return false;
|
|
|
509 |
if (this.itemId != that.itemId)
|
|
|
510 |
return false;
|
|
|
511 |
}
|
|
|
512 |
|
|
|
513 |
boolean this_present_hsProductId = true && this.isSetHsProductId();
|
|
|
514 |
boolean that_present_hsProductId = true && that.isSetHsProductId();
|
|
|
515 |
if (this_present_hsProductId || that_present_hsProductId) {
|
|
|
516 |
if (!(this_present_hsProductId && that_present_hsProductId))
|
|
|
517 |
return false;
|
|
|
518 |
if (!this.hsProductId.equals(that.hsProductId))
|
|
|
519 |
return false;
|
|
|
520 |
}
|
|
|
521 |
|
|
|
522 |
boolean this_present_listingPrice = true;
|
|
|
523 |
boolean that_present_listingPrice = true;
|
|
|
524 |
if (this_present_listingPrice || that_present_listingPrice) {
|
|
|
525 |
if (!(this_present_listingPrice && that_present_listingPrice))
|
|
|
526 |
return false;
|
|
|
527 |
if (this.listingPrice != that.listingPrice)
|
|
|
528 |
return false;
|
|
|
529 |
}
|
|
|
530 |
|
|
|
531 |
boolean this_present_defaultWarehouseId = true;
|
|
|
532 |
boolean that_present_defaultWarehouseId = true;
|
|
|
533 |
if (this_present_defaultWarehouseId || that_present_defaultWarehouseId) {
|
|
|
534 |
if (!(this_present_defaultWarehouseId && that_present_defaultWarehouseId))
|
|
|
535 |
return false;
|
|
|
536 |
if (this.defaultWarehouseId != that.defaultWarehouseId)
|
|
|
537 |
return false;
|
|
|
538 |
}
|
|
|
539 |
|
|
|
540 |
boolean this_present_addedTimestamp = true;
|
|
|
541 |
boolean that_present_addedTimestamp = true;
|
|
|
542 |
if (this_present_addedTimestamp || that_present_addedTimestamp) {
|
|
|
543 |
if (!(this_present_addedTimestamp && that_present_addedTimestamp))
|
|
|
544 |
return false;
|
|
|
545 |
if (this.addedTimestamp != that.addedTimestamp)
|
|
|
546 |
return false;
|
|
|
547 |
}
|
|
|
548 |
|
|
|
549 |
boolean this_present_addedBy = true && this.isSetAddedBy();
|
|
|
550 |
boolean that_present_addedBy = true && that.isSetAddedBy();
|
|
|
551 |
if (this_present_addedBy || that_present_addedBy) {
|
|
|
552 |
if (!(this_present_addedBy && that_present_addedBy))
|
|
|
553 |
return false;
|
|
|
554 |
if (!this.addedBy.equals(that.addedBy))
|
|
|
555 |
return false;
|
|
|
556 |
}
|
|
|
557 |
|
|
|
558 |
return true;
|
|
|
559 |
}
|
|
|
560 |
|
|
|
561 |
@Override
|
|
|
562 |
public int hashCode() {
|
|
|
563 |
return 0;
|
|
|
564 |
}
|
|
|
565 |
|
|
|
566 |
public int compareTo(HsItem other) {
|
|
|
567 |
if (!getClass().equals(other.getClass())) {
|
|
|
568 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
569 |
}
|
|
|
570 |
|
|
|
571 |
int lastComparison = 0;
|
|
|
572 |
HsItem typedOther = (HsItem)other;
|
|
|
573 |
|
|
|
574 |
lastComparison = Boolean.valueOf(isSetHsItemId()).compareTo(typedOther.isSetHsItemId());
|
|
|
575 |
if (lastComparison != 0) {
|
|
|
576 |
return lastComparison;
|
|
|
577 |
}
|
|
|
578 |
if (isSetHsItemId()) {
|
|
|
579 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsItemId, typedOther.hsItemId);
|
|
|
580 |
if (lastComparison != 0) {
|
|
|
581 |
return lastComparison;
|
|
|
582 |
}
|
|
|
583 |
}
|
|
|
584 |
lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
|
|
|
585 |
if (lastComparison != 0) {
|
|
|
586 |
return lastComparison;
|
|
|
587 |
}
|
|
|
588 |
if (isSetItemId()) {
|
|
|
589 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
|
|
|
590 |
if (lastComparison != 0) {
|
|
|
591 |
return lastComparison;
|
|
|
592 |
}
|
|
|
593 |
}
|
|
|
594 |
lastComparison = Boolean.valueOf(isSetHsProductId()).compareTo(typedOther.isSetHsProductId());
|
|
|
595 |
if (lastComparison != 0) {
|
|
|
596 |
return lastComparison;
|
|
|
597 |
}
|
|
|
598 |
if (isSetHsProductId()) {
|
|
|
599 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsProductId, typedOther.hsProductId);
|
|
|
600 |
if (lastComparison != 0) {
|
|
|
601 |
return lastComparison;
|
|
|
602 |
}
|
|
|
603 |
}
|
|
|
604 |
lastComparison = Boolean.valueOf(isSetListingPrice()).compareTo(typedOther.isSetListingPrice());
|
|
|
605 |
if (lastComparison != 0) {
|
|
|
606 |
return lastComparison;
|
|
|
607 |
}
|
|
|
608 |
if (isSetListingPrice()) {
|
|
|
609 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.listingPrice, typedOther.listingPrice);
|
|
|
610 |
if (lastComparison != 0) {
|
|
|
611 |
return lastComparison;
|
|
|
612 |
}
|
|
|
613 |
}
|
|
|
614 |
lastComparison = Boolean.valueOf(isSetDefaultWarehouseId()).compareTo(typedOther.isSetDefaultWarehouseId());
|
|
|
615 |
if (lastComparison != 0) {
|
|
|
616 |
return lastComparison;
|
|
|
617 |
}
|
|
|
618 |
if (isSetDefaultWarehouseId()) {
|
|
|
619 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultWarehouseId, typedOther.defaultWarehouseId);
|
|
|
620 |
if (lastComparison != 0) {
|
|
|
621 |
return lastComparison;
|
|
|
622 |
}
|
|
|
623 |
}
|
|
|
624 |
lastComparison = Boolean.valueOf(isSetAddedTimestamp()).compareTo(typedOther.isSetAddedTimestamp());
|
|
|
625 |
if (lastComparison != 0) {
|
|
|
626 |
return lastComparison;
|
|
|
627 |
}
|
|
|
628 |
if (isSetAddedTimestamp()) {
|
|
|
629 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedTimestamp, typedOther.addedTimestamp);
|
|
|
630 |
if (lastComparison != 0) {
|
|
|
631 |
return lastComparison;
|
|
|
632 |
}
|
|
|
633 |
}
|
|
|
634 |
lastComparison = Boolean.valueOf(isSetAddedBy()).compareTo(typedOther.isSetAddedBy());
|
|
|
635 |
if (lastComparison != 0) {
|
|
|
636 |
return lastComparison;
|
|
|
637 |
}
|
|
|
638 |
if (isSetAddedBy()) {
|
|
|
639 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedBy, typedOther.addedBy);
|
|
|
640 |
if (lastComparison != 0) {
|
|
|
641 |
return lastComparison;
|
|
|
642 |
}
|
|
|
643 |
}
|
|
|
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: // HS_ITEM_ID
|
|
|
662 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
663 |
this.hsItemId = iprot.readString();
|
|
|
664 |
} else {
|
|
|
665 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
666 |
}
|
|
|
667 |
break;
|
|
|
668 |
case 2: // ITEM_ID
|
|
|
669 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
670 |
this.itemId = iprot.readI64();
|
|
|
671 |
setItemIdIsSet(true);
|
|
|
672 |
} else {
|
|
|
673 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
674 |
}
|
|
|
675 |
break;
|
|
|
676 |
case 3: // HS_PRODUCT_ID
|
|
|
677 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
678 |
this.hsProductId = iprot.readString();
|
|
|
679 |
} else {
|
|
|
680 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
681 |
}
|
|
|
682 |
break;
|
|
|
683 |
case 4: // LISTING_PRICE
|
|
|
684 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
685 |
this.listingPrice = iprot.readI64();
|
|
|
686 |
setListingPriceIsSet(true);
|
|
|
687 |
} else {
|
|
|
688 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
689 |
}
|
|
|
690 |
break;
|
|
|
691 |
case 5: // DEFAULT_WAREHOUSE_ID
|
|
|
692 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
693 |
this.defaultWarehouseId = iprot.readI64();
|
|
|
694 |
setDefaultWarehouseIdIsSet(true);
|
|
|
695 |
} else {
|
|
|
696 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
697 |
}
|
|
|
698 |
break;
|
|
|
699 |
case 6: // ADDED_TIMESTAMP
|
|
|
700 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
701 |
this.addedTimestamp = iprot.readI64();
|
|
|
702 |
setAddedTimestampIsSet(true);
|
|
|
703 |
} else {
|
|
|
704 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
705 |
}
|
|
|
706 |
break;
|
|
|
707 |
case 7: // ADDED_BY
|
|
|
708 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
709 |
this.addedBy = iprot.readString();
|
|
|
710 |
} else {
|
|
|
711 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
712 |
}
|
|
|
713 |
break;
|
|
|
714 |
default:
|
|
|
715 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
716 |
}
|
|
|
717 |
iprot.readFieldEnd();
|
|
|
718 |
}
|
|
|
719 |
iprot.readStructEnd();
|
|
|
720 |
validate();
|
|
|
721 |
}
|
|
|
722 |
|
|
|
723 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
724 |
validate();
|
|
|
725 |
|
|
|
726 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
727 |
if (this.hsItemId != null) {
|
|
|
728 |
oprot.writeFieldBegin(HS_ITEM_ID_FIELD_DESC);
|
|
|
729 |
oprot.writeString(this.hsItemId);
|
|
|
730 |
oprot.writeFieldEnd();
|
|
|
731 |
}
|
|
|
732 |
oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
|
|
|
733 |
oprot.writeI64(this.itemId);
|
|
|
734 |
oprot.writeFieldEnd();
|
|
|
735 |
if (this.hsProductId != null) {
|
|
|
736 |
oprot.writeFieldBegin(HS_PRODUCT_ID_FIELD_DESC);
|
|
|
737 |
oprot.writeString(this.hsProductId);
|
|
|
738 |
oprot.writeFieldEnd();
|
|
|
739 |
}
|
|
|
740 |
oprot.writeFieldBegin(LISTING_PRICE_FIELD_DESC);
|
|
|
741 |
oprot.writeI64(this.listingPrice);
|
|
|
742 |
oprot.writeFieldEnd();
|
|
|
743 |
oprot.writeFieldBegin(DEFAULT_WAREHOUSE_ID_FIELD_DESC);
|
|
|
744 |
oprot.writeI64(this.defaultWarehouseId);
|
|
|
745 |
oprot.writeFieldEnd();
|
|
|
746 |
oprot.writeFieldBegin(ADDED_TIMESTAMP_FIELD_DESC);
|
|
|
747 |
oprot.writeI64(this.addedTimestamp);
|
|
|
748 |
oprot.writeFieldEnd();
|
|
|
749 |
if (this.addedBy != null) {
|
|
|
750 |
oprot.writeFieldBegin(ADDED_BY_FIELD_DESC);
|
|
|
751 |
oprot.writeString(this.addedBy);
|
|
|
752 |
oprot.writeFieldEnd();
|
|
|
753 |
}
|
|
|
754 |
oprot.writeFieldStop();
|
|
|
755 |
oprot.writeStructEnd();
|
|
|
756 |
}
|
|
|
757 |
|
|
|
758 |
@Override
|
|
|
759 |
public String toString() {
|
|
|
760 |
StringBuilder sb = new StringBuilder("HsItem(");
|
|
|
761 |
boolean first = true;
|
|
|
762 |
|
|
|
763 |
sb.append("hsItemId:");
|
|
|
764 |
if (this.hsItemId == null) {
|
|
|
765 |
sb.append("null");
|
|
|
766 |
} else {
|
|
|
767 |
sb.append(this.hsItemId);
|
|
|
768 |
}
|
|
|
769 |
first = false;
|
|
|
770 |
if (!first) sb.append(", ");
|
|
|
771 |
sb.append("itemId:");
|
|
|
772 |
sb.append(this.itemId);
|
|
|
773 |
first = false;
|
|
|
774 |
if (!first) sb.append(", ");
|
|
|
775 |
sb.append("hsProductId:");
|
|
|
776 |
if (this.hsProductId == null) {
|
|
|
777 |
sb.append("null");
|
|
|
778 |
} else {
|
|
|
779 |
sb.append(this.hsProductId);
|
|
|
780 |
}
|
|
|
781 |
first = false;
|
|
|
782 |
if (!first) sb.append(", ");
|
|
|
783 |
sb.append("listingPrice:");
|
|
|
784 |
sb.append(this.listingPrice);
|
|
|
785 |
first = false;
|
|
|
786 |
if (!first) sb.append(", ");
|
|
|
787 |
sb.append("defaultWarehouseId:");
|
|
|
788 |
sb.append(this.defaultWarehouseId);
|
|
|
789 |
first = false;
|
|
|
790 |
if (!first) sb.append(", ");
|
|
|
791 |
sb.append("addedTimestamp:");
|
|
|
792 |
sb.append(this.addedTimestamp);
|
|
|
793 |
first = false;
|
|
|
794 |
if (!first) sb.append(", ");
|
|
|
795 |
sb.append("addedBy:");
|
|
|
796 |
if (this.addedBy == null) {
|
|
|
797 |
sb.append("null");
|
|
|
798 |
} else {
|
|
|
799 |
sb.append(this.addedBy);
|
|
|
800 |
}
|
|
|
801 |
first = false;
|
|
|
802 |
sb.append(")");
|
|
|
803 |
return sb.toString();
|
|
|
804 |
}
|
|
|
805 |
|
|
|
806 |
public void validate() throws org.apache.thrift.TException {
|
|
|
807 |
// check for required fields
|
|
|
808 |
}
|
|
|
809 |
|
|
|
810 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
811 |
try {
|
|
|
812 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
813 |
} catch (org.apache.thrift.TException te) {
|
|
|
814 |
throw new java.io.IOException(te);
|
|
|
815 |
}
|
|
|
816 |
}
|
|
|
817 |
|
|
|
818 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
819 |
try {
|
|
|
820 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
821 |
__isset_bit_vector = new BitSet(1);
|
|
|
822 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
823 |
} catch (org.apache.thrift.TException te) {
|
|
|
824 |
throw new java.io.IOException(te);
|
|
|
825 |
}
|
|
|
826 |
}
|
|
|
827 |
|
|
|
828 |
}
|
|
|
829 |
|