| 6188 |
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.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 RechargeStatistics implements org.apache.thrift.TBase<RechargeStatistics, RechargeStatistics._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RechargeStatistics");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField STATUS_COUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("statusCounts", org.apache.thrift.protocol.TType.MAP, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField OPERATOR_COUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorCounts", org.apache.thrift.protocol.TType.MAP, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField CURRENT_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("currentOrders", org.apache.thrift.protocol.TType.MAP, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField AMOUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("amounts", org.apache.thrift.protocol.TType.MAP, (short)4);
|
|
|
30 |
|
|
|
31 |
private Map<RechargeOrderStatus,Long> statusCounts; // required
|
|
|
32 |
private Map<String,Long> operatorCounts; // required
|
|
|
33 |
private Map<String,List<RechargeOrder>> currentOrders; // required
|
|
|
34 |
private Map<String,Long> amounts; // required
|
|
|
35 |
|
|
|
36 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
37 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
38 |
STATUS_COUNTS((short)1, "statusCounts"),
|
|
|
39 |
OPERATOR_COUNTS((short)2, "operatorCounts"),
|
|
|
40 |
CURRENT_ORDERS((short)3, "currentOrders"),
|
|
|
41 |
AMOUNTS((short)4, "amounts");
|
|
|
42 |
|
|
|
43 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
44 |
|
|
|
45 |
static {
|
|
|
46 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
47 |
byName.put(field.getFieldName(), field);
|
|
|
48 |
}
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
/**
|
|
|
52 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
53 |
*/
|
|
|
54 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
55 |
switch(fieldId) {
|
|
|
56 |
case 1: // STATUS_COUNTS
|
|
|
57 |
return STATUS_COUNTS;
|
|
|
58 |
case 2: // OPERATOR_COUNTS
|
|
|
59 |
return OPERATOR_COUNTS;
|
|
|
60 |
case 3: // CURRENT_ORDERS
|
|
|
61 |
return CURRENT_ORDERS;
|
|
|
62 |
case 4: // AMOUNTS
|
|
|
63 |
return AMOUNTS;
|
|
|
64 |
default:
|
|
|
65 |
return null;
|
|
|
66 |
}
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
/**
|
|
|
70 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
71 |
* if it is not found.
|
|
|
72 |
*/
|
|
|
73 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
74 |
_Fields fields = findByThriftId(fieldId);
|
|
|
75 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
76 |
return fields;
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
/**
|
|
|
80 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
81 |
*/
|
|
|
82 |
public static _Fields findByName(String name) {
|
|
|
83 |
return byName.get(name);
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
private final short _thriftId;
|
|
|
87 |
private final String _fieldName;
|
|
|
88 |
|
|
|
89 |
_Fields(short thriftId, String fieldName) {
|
|
|
90 |
_thriftId = thriftId;
|
|
|
91 |
_fieldName = fieldName;
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
public short getThriftFieldId() {
|
|
|
95 |
return _thriftId;
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
public String getFieldName() {
|
|
|
99 |
return _fieldName;
|
|
|
100 |
}
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
// isset id assignments
|
|
|
104 |
|
|
|
105 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
106 |
static {
|
|
|
107 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
108 |
tmpMap.put(_Fields.STATUS_COUNTS, new org.apache.thrift.meta_data.FieldMetaData("statusCounts", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
109 |
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
|
|
110 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RechargeOrderStatus.class),
|
|
|
111 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
|
|
|
112 |
tmpMap.put(_Fields.OPERATOR_COUNTS, new org.apache.thrift.meta_data.FieldMetaData("operatorCounts", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
113 |
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
|
|
114 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
|
|
|
115 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
|
|
|
116 |
tmpMap.put(_Fields.CURRENT_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("currentOrders", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
117 |
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
|
|
118 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
|
|
|
119 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
120 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RechargeOrder.class)))));
|
|
|
121 |
tmpMap.put(_Fields.AMOUNTS, new org.apache.thrift.meta_data.FieldMetaData("amounts", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
122 |
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
|
|
123 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
|
|
|
124 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
|
|
|
125 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
126 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeStatistics.class, metaDataMap);
|
|
|
127 |
}
|
|
|
128 |
|
|
|
129 |
public RechargeStatistics() {
|
|
|
130 |
}
|
|
|
131 |
|
|
|
132 |
public RechargeStatistics(
|
|
|
133 |
Map<RechargeOrderStatus,Long> statusCounts,
|
|
|
134 |
Map<String,Long> operatorCounts,
|
|
|
135 |
Map<String,List<RechargeOrder>> currentOrders,
|
|
|
136 |
Map<String,Long> amounts)
|
|
|
137 |
{
|
|
|
138 |
this();
|
|
|
139 |
this.statusCounts = statusCounts;
|
|
|
140 |
this.operatorCounts = operatorCounts;
|
|
|
141 |
this.currentOrders = currentOrders;
|
|
|
142 |
this.amounts = amounts;
|
|
|
143 |
}
|
|
|
144 |
|
|
|
145 |
/**
|
|
|
146 |
* Performs a deep copy on <i>other</i>.
|
|
|
147 |
*/
|
|
|
148 |
public RechargeStatistics(RechargeStatistics other) {
|
|
|
149 |
if (other.isSetStatusCounts()) {
|
|
|
150 |
Map<RechargeOrderStatus,Long> __this__statusCounts = new HashMap<RechargeOrderStatus,Long>();
|
|
|
151 |
for (Map.Entry<RechargeOrderStatus, Long> other_element : other.statusCounts.entrySet()) {
|
|
|
152 |
|
|
|
153 |
RechargeOrderStatus other_element_key = other_element.getKey();
|
|
|
154 |
Long other_element_value = other_element.getValue();
|
|
|
155 |
|
|
|
156 |
RechargeOrderStatus __this__statusCounts_copy_key = other_element_key;
|
|
|
157 |
|
|
|
158 |
Long __this__statusCounts_copy_value = other_element_value;
|
|
|
159 |
|
|
|
160 |
__this__statusCounts.put(__this__statusCounts_copy_key, __this__statusCounts_copy_value);
|
|
|
161 |
}
|
|
|
162 |
this.statusCounts = __this__statusCounts;
|
|
|
163 |
}
|
|
|
164 |
if (other.isSetOperatorCounts()) {
|
|
|
165 |
Map<String,Long> __this__operatorCounts = new HashMap<String,Long>();
|
|
|
166 |
for (Map.Entry<String, Long> other_element : other.operatorCounts.entrySet()) {
|
|
|
167 |
|
|
|
168 |
String other_element_key = other_element.getKey();
|
|
|
169 |
Long other_element_value = other_element.getValue();
|
|
|
170 |
|
|
|
171 |
String __this__operatorCounts_copy_key = other_element_key;
|
|
|
172 |
|
|
|
173 |
Long __this__operatorCounts_copy_value = other_element_value;
|
|
|
174 |
|
|
|
175 |
__this__operatorCounts.put(__this__operatorCounts_copy_key, __this__operatorCounts_copy_value);
|
|
|
176 |
}
|
|
|
177 |
this.operatorCounts = __this__operatorCounts;
|
|
|
178 |
}
|
|
|
179 |
if (other.isSetCurrentOrders()) {
|
|
|
180 |
Map<String,List<RechargeOrder>> __this__currentOrders = new HashMap<String,List<RechargeOrder>>();
|
|
|
181 |
for (Map.Entry<String, List<RechargeOrder>> other_element : other.currentOrders.entrySet()) {
|
|
|
182 |
|
|
|
183 |
String other_element_key = other_element.getKey();
|
|
|
184 |
List<RechargeOrder> other_element_value = other_element.getValue();
|
|
|
185 |
|
|
|
186 |
String __this__currentOrders_copy_key = other_element_key;
|
|
|
187 |
|
|
|
188 |
List<RechargeOrder> __this__currentOrders_copy_value = new ArrayList<RechargeOrder>();
|
|
|
189 |
for (RechargeOrder other_element_value_element : other_element_value) {
|
|
|
190 |
__this__currentOrders_copy_value.add(new RechargeOrder(other_element_value_element));
|
|
|
191 |
}
|
|
|
192 |
|
|
|
193 |
__this__currentOrders.put(__this__currentOrders_copy_key, __this__currentOrders_copy_value);
|
|
|
194 |
}
|
|
|
195 |
this.currentOrders = __this__currentOrders;
|
|
|
196 |
}
|
|
|
197 |
if (other.isSetAmounts()) {
|
|
|
198 |
Map<String,Long> __this__amounts = new HashMap<String,Long>();
|
|
|
199 |
for (Map.Entry<String, Long> other_element : other.amounts.entrySet()) {
|
|
|
200 |
|
|
|
201 |
String other_element_key = other_element.getKey();
|
|
|
202 |
Long other_element_value = other_element.getValue();
|
|
|
203 |
|
|
|
204 |
String __this__amounts_copy_key = other_element_key;
|
|
|
205 |
|
|
|
206 |
Long __this__amounts_copy_value = other_element_value;
|
|
|
207 |
|
|
|
208 |
__this__amounts.put(__this__amounts_copy_key, __this__amounts_copy_value);
|
|
|
209 |
}
|
|
|
210 |
this.amounts = __this__amounts;
|
|
|
211 |
}
|
|
|
212 |
}
|
|
|
213 |
|
|
|
214 |
public RechargeStatistics deepCopy() {
|
|
|
215 |
return new RechargeStatistics(this);
|
|
|
216 |
}
|
|
|
217 |
|
|
|
218 |
@Override
|
|
|
219 |
public void clear() {
|
|
|
220 |
this.statusCounts = null;
|
|
|
221 |
this.operatorCounts = null;
|
|
|
222 |
this.currentOrders = null;
|
|
|
223 |
this.amounts = null;
|
|
|
224 |
}
|
|
|
225 |
|
|
|
226 |
public int getStatusCountsSize() {
|
|
|
227 |
return (this.statusCounts == null) ? 0 : this.statusCounts.size();
|
|
|
228 |
}
|
|
|
229 |
|
|
|
230 |
public void putToStatusCounts(RechargeOrderStatus key, long val) {
|
|
|
231 |
if (this.statusCounts == null) {
|
|
|
232 |
this.statusCounts = new HashMap<RechargeOrderStatus,Long>();
|
|
|
233 |
}
|
|
|
234 |
this.statusCounts.put(key, val);
|
|
|
235 |
}
|
|
|
236 |
|
|
|
237 |
public Map<RechargeOrderStatus,Long> getStatusCounts() {
|
|
|
238 |
return this.statusCounts;
|
|
|
239 |
}
|
|
|
240 |
|
|
|
241 |
public void setStatusCounts(Map<RechargeOrderStatus,Long> statusCounts) {
|
|
|
242 |
this.statusCounts = statusCounts;
|
|
|
243 |
}
|
|
|
244 |
|
|
|
245 |
public void unsetStatusCounts() {
|
|
|
246 |
this.statusCounts = null;
|
|
|
247 |
}
|
|
|
248 |
|
|
|
249 |
/** Returns true if field statusCounts is set (has been assigned a value) and false otherwise */
|
|
|
250 |
public boolean isSetStatusCounts() {
|
|
|
251 |
return this.statusCounts != null;
|
|
|
252 |
}
|
|
|
253 |
|
|
|
254 |
public void setStatusCountsIsSet(boolean value) {
|
|
|
255 |
if (!value) {
|
|
|
256 |
this.statusCounts = null;
|
|
|
257 |
}
|
|
|
258 |
}
|
|
|
259 |
|
|
|
260 |
public int getOperatorCountsSize() {
|
|
|
261 |
return (this.operatorCounts == null) ? 0 : this.operatorCounts.size();
|
|
|
262 |
}
|
|
|
263 |
|
|
|
264 |
public void putToOperatorCounts(String key, long val) {
|
|
|
265 |
if (this.operatorCounts == null) {
|
|
|
266 |
this.operatorCounts = new HashMap<String,Long>();
|
|
|
267 |
}
|
|
|
268 |
this.operatorCounts.put(key, val);
|
|
|
269 |
}
|
|
|
270 |
|
|
|
271 |
public Map<String,Long> getOperatorCounts() {
|
|
|
272 |
return this.operatorCounts;
|
|
|
273 |
}
|
|
|
274 |
|
|
|
275 |
public void setOperatorCounts(Map<String,Long> operatorCounts) {
|
|
|
276 |
this.operatorCounts = operatorCounts;
|
|
|
277 |
}
|
|
|
278 |
|
|
|
279 |
public void unsetOperatorCounts() {
|
|
|
280 |
this.operatorCounts = null;
|
|
|
281 |
}
|
|
|
282 |
|
|
|
283 |
/** Returns true if field operatorCounts is set (has been assigned a value) and false otherwise */
|
|
|
284 |
public boolean isSetOperatorCounts() {
|
|
|
285 |
return this.operatorCounts != null;
|
|
|
286 |
}
|
|
|
287 |
|
|
|
288 |
public void setOperatorCountsIsSet(boolean value) {
|
|
|
289 |
if (!value) {
|
|
|
290 |
this.operatorCounts = null;
|
|
|
291 |
}
|
|
|
292 |
}
|
|
|
293 |
|
|
|
294 |
public int getCurrentOrdersSize() {
|
|
|
295 |
return (this.currentOrders == null) ? 0 : this.currentOrders.size();
|
|
|
296 |
}
|
|
|
297 |
|
|
|
298 |
public void putToCurrentOrders(String key, List<RechargeOrder> val) {
|
|
|
299 |
if (this.currentOrders == null) {
|
|
|
300 |
this.currentOrders = new HashMap<String,List<RechargeOrder>>();
|
|
|
301 |
}
|
|
|
302 |
this.currentOrders.put(key, val);
|
|
|
303 |
}
|
|
|
304 |
|
|
|
305 |
public Map<String,List<RechargeOrder>> getCurrentOrders() {
|
|
|
306 |
return this.currentOrders;
|
|
|
307 |
}
|
|
|
308 |
|
|
|
309 |
public void setCurrentOrders(Map<String,List<RechargeOrder>> currentOrders) {
|
|
|
310 |
this.currentOrders = currentOrders;
|
|
|
311 |
}
|
|
|
312 |
|
|
|
313 |
public void unsetCurrentOrders() {
|
|
|
314 |
this.currentOrders = null;
|
|
|
315 |
}
|
|
|
316 |
|
|
|
317 |
/** Returns true if field currentOrders is set (has been assigned a value) and false otherwise */
|
|
|
318 |
public boolean isSetCurrentOrders() {
|
|
|
319 |
return this.currentOrders != null;
|
|
|
320 |
}
|
|
|
321 |
|
|
|
322 |
public void setCurrentOrdersIsSet(boolean value) {
|
|
|
323 |
if (!value) {
|
|
|
324 |
this.currentOrders = null;
|
|
|
325 |
}
|
|
|
326 |
}
|
|
|
327 |
|
|
|
328 |
public int getAmountsSize() {
|
|
|
329 |
return (this.amounts == null) ? 0 : this.amounts.size();
|
|
|
330 |
}
|
|
|
331 |
|
|
|
332 |
public void putToAmounts(String key, long val) {
|
|
|
333 |
if (this.amounts == null) {
|
|
|
334 |
this.amounts = new HashMap<String,Long>();
|
|
|
335 |
}
|
|
|
336 |
this.amounts.put(key, val);
|
|
|
337 |
}
|
|
|
338 |
|
|
|
339 |
public Map<String,Long> getAmounts() {
|
|
|
340 |
return this.amounts;
|
|
|
341 |
}
|
|
|
342 |
|
|
|
343 |
public void setAmounts(Map<String,Long> amounts) {
|
|
|
344 |
this.amounts = amounts;
|
|
|
345 |
}
|
|
|
346 |
|
|
|
347 |
public void unsetAmounts() {
|
|
|
348 |
this.amounts = null;
|
|
|
349 |
}
|
|
|
350 |
|
|
|
351 |
/** Returns true if field amounts is set (has been assigned a value) and false otherwise */
|
|
|
352 |
public boolean isSetAmounts() {
|
|
|
353 |
return this.amounts != null;
|
|
|
354 |
}
|
|
|
355 |
|
|
|
356 |
public void setAmountsIsSet(boolean value) {
|
|
|
357 |
if (!value) {
|
|
|
358 |
this.amounts = null;
|
|
|
359 |
}
|
|
|
360 |
}
|
|
|
361 |
|
|
|
362 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
363 |
switch (field) {
|
|
|
364 |
case STATUS_COUNTS:
|
|
|
365 |
if (value == null) {
|
|
|
366 |
unsetStatusCounts();
|
|
|
367 |
} else {
|
|
|
368 |
setStatusCounts((Map<RechargeOrderStatus,Long>)value);
|
|
|
369 |
}
|
|
|
370 |
break;
|
|
|
371 |
|
|
|
372 |
case OPERATOR_COUNTS:
|
|
|
373 |
if (value == null) {
|
|
|
374 |
unsetOperatorCounts();
|
|
|
375 |
} else {
|
|
|
376 |
setOperatorCounts((Map<String,Long>)value);
|
|
|
377 |
}
|
|
|
378 |
break;
|
|
|
379 |
|
|
|
380 |
case CURRENT_ORDERS:
|
|
|
381 |
if (value == null) {
|
|
|
382 |
unsetCurrentOrders();
|
|
|
383 |
} else {
|
|
|
384 |
setCurrentOrders((Map<String,List<RechargeOrder>>)value);
|
|
|
385 |
}
|
|
|
386 |
break;
|
|
|
387 |
|
|
|
388 |
case AMOUNTS:
|
|
|
389 |
if (value == null) {
|
|
|
390 |
unsetAmounts();
|
|
|
391 |
} else {
|
|
|
392 |
setAmounts((Map<String,Long>)value);
|
|
|
393 |
}
|
|
|
394 |
break;
|
|
|
395 |
|
|
|
396 |
}
|
|
|
397 |
}
|
|
|
398 |
|
|
|
399 |
public Object getFieldValue(_Fields field) {
|
|
|
400 |
switch (field) {
|
|
|
401 |
case STATUS_COUNTS:
|
|
|
402 |
return getStatusCounts();
|
|
|
403 |
|
|
|
404 |
case OPERATOR_COUNTS:
|
|
|
405 |
return getOperatorCounts();
|
|
|
406 |
|
|
|
407 |
case CURRENT_ORDERS:
|
|
|
408 |
return getCurrentOrders();
|
|
|
409 |
|
|
|
410 |
case AMOUNTS:
|
|
|
411 |
return getAmounts();
|
|
|
412 |
|
|
|
413 |
}
|
|
|
414 |
throw new IllegalStateException();
|
|
|
415 |
}
|
|
|
416 |
|
|
|
417 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
418 |
public boolean isSet(_Fields field) {
|
|
|
419 |
if (field == null) {
|
|
|
420 |
throw new IllegalArgumentException();
|
|
|
421 |
}
|
|
|
422 |
|
|
|
423 |
switch (field) {
|
|
|
424 |
case STATUS_COUNTS:
|
|
|
425 |
return isSetStatusCounts();
|
|
|
426 |
case OPERATOR_COUNTS:
|
|
|
427 |
return isSetOperatorCounts();
|
|
|
428 |
case CURRENT_ORDERS:
|
|
|
429 |
return isSetCurrentOrders();
|
|
|
430 |
case AMOUNTS:
|
|
|
431 |
return isSetAmounts();
|
|
|
432 |
}
|
|
|
433 |
throw new IllegalStateException();
|
|
|
434 |
}
|
|
|
435 |
|
|
|
436 |
@Override
|
|
|
437 |
public boolean equals(Object that) {
|
|
|
438 |
if (that == null)
|
|
|
439 |
return false;
|
|
|
440 |
if (that instanceof RechargeStatistics)
|
|
|
441 |
return this.equals((RechargeStatistics)that);
|
|
|
442 |
return false;
|
|
|
443 |
}
|
|
|
444 |
|
|
|
445 |
public boolean equals(RechargeStatistics that) {
|
|
|
446 |
if (that == null)
|
|
|
447 |
return false;
|
|
|
448 |
|
|
|
449 |
boolean this_present_statusCounts = true && this.isSetStatusCounts();
|
|
|
450 |
boolean that_present_statusCounts = true && that.isSetStatusCounts();
|
|
|
451 |
if (this_present_statusCounts || that_present_statusCounts) {
|
|
|
452 |
if (!(this_present_statusCounts && that_present_statusCounts))
|
|
|
453 |
return false;
|
|
|
454 |
if (!this.statusCounts.equals(that.statusCounts))
|
|
|
455 |
return false;
|
|
|
456 |
}
|
|
|
457 |
|
|
|
458 |
boolean this_present_operatorCounts = true && this.isSetOperatorCounts();
|
|
|
459 |
boolean that_present_operatorCounts = true && that.isSetOperatorCounts();
|
|
|
460 |
if (this_present_operatorCounts || that_present_operatorCounts) {
|
|
|
461 |
if (!(this_present_operatorCounts && that_present_operatorCounts))
|
|
|
462 |
return false;
|
|
|
463 |
if (!this.operatorCounts.equals(that.operatorCounts))
|
|
|
464 |
return false;
|
|
|
465 |
}
|
|
|
466 |
|
|
|
467 |
boolean this_present_currentOrders = true && this.isSetCurrentOrders();
|
|
|
468 |
boolean that_present_currentOrders = true && that.isSetCurrentOrders();
|
|
|
469 |
if (this_present_currentOrders || that_present_currentOrders) {
|
|
|
470 |
if (!(this_present_currentOrders && that_present_currentOrders))
|
|
|
471 |
return false;
|
|
|
472 |
if (!this.currentOrders.equals(that.currentOrders))
|
|
|
473 |
return false;
|
|
|
474 |
}
|
|
|
475 |
|
|
|
476 |
boolean this_present_amounts = true && this.isSetAmounts();
|
|
|
477 |
boolean that_present_amounts = true && that.isSetAmounts();
|
|
|
478 |
if (this_present_amounts || that_present_amounts) {
|
|
|
479 |
if (!(this_present_amounts && that_present_amounts))
|
|
|
480 |
return false;
|
|
|
481 |
if (!this.amounts.equals(that.amounts))
|
|
|
482 |
return false;
|
|
|
483 |
}
|
|
|
484 |
|
|
|
485 |
return true;
|
|
|
486 |
}
|
|
|
487 |
|
|
|
488 |
@Override
|
|
|
489 |
public int hashCode() {
|
|
|
490 |
return 0;
|
|
|
491 |
}
|
|
|
492 |
|
|
|
493 |
public int compareTo(RechargeStatistics other) {
|
|
|
494 |
if (!getClass().equals(other.getClass())) {
|
|
|
495 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
496 |
}
|
|
|
497 |
|
|
|
498 |
int lastComparison = 0;
|
|
|
499 |
RechargeStatistics typedOther = (RechargeStatistics)other;
|
|
|
500 |
|
|
|
501 |
lastComparison = Boolean.valueOf(isSetStatusCounts()).compareTo(typedOther.isSetStatusCounts());
|
|
|
502 |
if (lastComparison != 0) {
|
|
|
503 |
return lastComparison;
|
|
|
504 |
}
|
|
|
505 |
if (isSetStatusCounts()) {
|
|
|
506 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusCounts, typedOther.statusCounts);
|
|
|
507 |
if (lastComparison != 0) {
|
|
|
508 |
return lastComparison;
|
|
|
509 |
}
|
|
|
510 |
}
|
|
|
511 |
lastComparison = Boolean.valueOf(isSetOperatorCounts()).compareTo(typedOther.isSetOperatorCounts());
|
|
|
512 |
if (lastComparison != 0) {
|
|
|
513 |
return lastComparison;
|
|
|
514 |
}
|
|
|
515 |
if (isSetOperatorCounts()) {
|
|
|
516 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorCounts, typedOther.operatorCounts);
|
|
|
517 |
if (lastComparison != 0) {
|
|
|
518 |
return lastComparison;
|
|
|
519 |
}
|
|
|
520 |
}
|
|
|
521 |
lastComparison = Boolean.valueOf(isSetCurrentOrders()).compareTo(typedOther.isSetCurrentOrders());
|
|
|
522 |
if (lastComparison != 0) {
|
|
|
523 |
return lastComparison;
|
|
|
524 |
}
|
|
|
525 |
if (isSetCurrentOrders()) {
|
|
|
526 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currentOrders, typedOther.currentOrders);
|
|
|
527 |
if (lastComparison != 0) {
|
|
|
528 |
return lastComparison;
|
|
|
529 |
}
|
|
|
530 |
}
|
|
|
531 |
lastComparison = Boolean.valueOf(isSetAmounts()).compareTo(typedOther.isSetAmounts());
|
|
|
532 |
if (lastComparison != 0) {
|
|
|
533 |
return lastComparison;
|
|
|
534 |
}
|
|
|
535 |
if (isSetAmounts()) {
|
|
|
536 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amounts, typedOther.amounts);
|
|
|
537 |
if (lastComparison != 0) {
|
|
|
538 |
return lastComparison;
|
|
|
539 |
}
|
|
|
540 |
}
|
|
|
541 |
return 0;
|
|
|
542 |
}
|
|
|
543 |
|
|
|
544 |
public _Fields fieldForId(int fieldId) {
|
|
|
545 |
return _Fields.findByThriftId(fieldId);
|
|
|
546 |
}
|
|
|
547 |
|
|
|
548 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
549 |
org.apache.thrift.protocol.TField field;
|
|
|
550 |
iprot.readStructBegin();
|
|
|
551 |
while (true)
|
|
|
552 |
{
|
|
|
553 |
field = iprot.readFieldBegin();
|
|
|
554 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
555 |
break;
|
|
|
556 |
}
|
|
|
557 |
switch (field.id) {
|
|
|
558 |
case 1: // STATUS_COUNTS
|
|
|
559 |
if (field.type == org.apache.thrift.protocol.TType.MAP) {
|
|
|
560 |
{
|
|
|
561 |
org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
|
|
|
562 |
this.statusCounts = new HashMap<RechargeOrderStatus,Long>(2*_map8.size);
|
|
|
563 |
for (int _i9 = 0; _i9 < _map8.size; ++_i9)
|
|
|
564 |
{
|
|
|
565 |
RechargeOrderStatus _key10; // required
|
|
|
566 |
long _val11; // required
|
|
|
567 |
_key10 = RechargeOrderStatus.findByValue(iprot.readI32());
|
|
|
568 |
_val11 = iprot.readI64();
|
|
|
569 |
this.statusCounts.put(_key10, _val11);
|
|
|
570 |
}
|
|
|
571 |
iprot.readMapEnd();
|
|
|
572 |
}
|
|
|
573 |
} else {
|
|
|
574 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
575 |
}
|
|
|
576 |
break;
|
|
|
577 |
case 2: // OPERATOR_COUNTS
|
|
|
578 |
if (field.type == org.apache.thrift.protocol.TType.MAP) {
|
|
|
579 |
{
|
|
|
580 |
org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin();
|
|
|
581 |
this.operatorCounts = new HashMap<String,Long>(2*_map12.size);
|
|
|
582 |
for (int _i13 = 0; _i13 < _map12.size; ++_i13)
|
|
|
583 |
{
|
|
|
584 |
String _key14; // required
|
|
|
585 |
long _val15; // required
|
|
|
586 |
_key14 = iprot.readString();
|
|
|
587 |
_val15 = iprot.readI64();
|
|
|
588 |
this.operatorCounts.put(_key14, _val15);
|
|
|
589 |
}
|
|
|
590 |
iprot.readMapEnd();
|
|
|
591 |
}
|
|
|
592 |
} else {
|
|
|
593 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
594 |
}
|
|
|
595 |
break;
|
|
|
596 |
case 3: // CURRENT_ORDERS
|
|
|
597 |
if (field.type == org.apache.thrift.protocol.TType.MAP) {
|
|
|
598 |
{
|
|
|
599 |
org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
|
|
|
600 |
this.currentOrders = new HashMap<String,List<RechargeOrder>>(2*_map16.size);
|
|
|
601 |
for (int _i17 = 0; _i17 < _map16.size; ++_i17)
|
|
|
602 |
{
|
|
|
603 |
String _key18; // required
|
|
|
604 |
List<RechargeOrder> _val19; // required
|
|
|
605 |
_key18 = iprot.readString();
|
|
|
606 |
{
|
|
|
607 |
org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
|
|
|
608 |
_val19 = new ArrayList<RechargeOrder>(_list20.size);
|
|
|
609 |
for (int _i21 = 0; _i21 < _list20.size; ++_i21)
|
|
|
610 |
{
|
|
|
611 |
RechargeOrder _elem22; // required
|
|
|
612 |
_elem22 = new RechargeOrder();
|
|
|
613 |
_elem22.read(iprot);
|
|
|
614 |
_val19.add(_elem22);
|
|
|
615 |
}
|
|
|
616 |
iprot.readListEnd();
|
|
|
617 |
}
|
|
|
618 |
this.currentOrders.put(_key18, _val19);
|
|
|
619 |
}
|
|
|
620 |
iprot.readMapEnd();
|
|
|
621 |
}
|
|
|
622 |
} else {
|
|
|
623 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
624 |
}
|
|
|
625 |
break;
|
|
|
626 |
case 4: // AMOUNTS
|
|
|
627 |
if (field.type == org.apache.thrift.protocol.TType.MAP) {
|
|
|
628 |
{
|
|
|
629 |
org.apache.thrift.protocol.TMap _map23 = iprot.readMapBegin();
|
|
|
630 |
this.amounts = new HashMap<String,Long>(2*_map23.size);
|
|
|
631 |
for (int _i24 = 0; _i24 < _map23.size; ++_i24)
|
|
|
632 |
{
|
|
|
633 |
String _key25; // required
|
|
|
634 |
long _val26; // required
|
|
|
635 |
_key25 = iprot.readString();
|
|
|
636 |
_val26 = iprot.readI64();
|
|
|
637 |
this.amounts.put(_key25, _val26);
|
|
|
638 |
}
|
|
|
639 |
iprot.readMapEnd();
|
|
|
640 |
}
|
|
|
641 |
} else {
|
|
|
642 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
643 |
}
|
|
|
644 |
break;
|
|
|
645 |
default:
|
|
|
646 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
647 |
}
|
|
|
648 |
iprot.readFieldEnd();
|
|
|
649 |
}
|
|
|
650 |
iprot.readStructEnd();
|
|
|
651 |
validate();
|
|
|
652 |
}
|
|
|
653 |
|
|
|
654 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
655 |
validate();
|
|
|
656 |
|
|
|
657 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
658 |
if (this.statusCounts != null) {
|
|
|
659 |
oprot.writeFieldBegin(STATUS_COUNTS_FIELD_DESC);
|
|
|
660 |
{
|
|
|
661 |
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.I64, this.statusCounts.size()));
|
|
|
662 |
for (Map.Entry<RechargeOrderStatus, Long> _iter27 : this.statusCounts.entrySet())
|
|
|
663 |
{
|
|
|
664 |
oprot.writeI32(_iter27.getKey().getValue());
|
|
|
665 |
oprot.writeI64(_iter27.getValue());
|
|
|
666 |
}
|
|
|
667 |
oprot.writeMapEnd();
|
|
|
668 |
}
|
|
|
669 |
oprot.writeFieldEnd();
|
|
|
670 |
}
|
|
|
671 |
if (this.operatorCounts != null) {
|
|
|
672 |
oprot.writeFieldBegin(OPERATOR_COUNTS_FIELD_DESC);
|
|
|
673 |
{
|
|
|
674 |
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.operatorCounts.size()));
|
|
|
675 |
for (Map.Entry<String, Long> _iter28 : this.operatorCounts.entrySet())
|
|
|
676 |
{
|
|
|
677 |
oprot.writeString(_iter28.getKey());
|
|
|
678 |
oprot.writeI64(_iter28.getValue());
|
|
|
679 |
}
|
|
|
680 |
oprot.writeMapEnd();
|
|
|
681 |
}
|
|
|
682 |
oprot.writeFieldEnd();
|
|
|
683 |
}
|
|
|
684 |
if (this.currentOrders != null) {
|
|
|
685 |
oprot.writeFieldBegin(CURRENT_ORDERS_FIELD_DESC);
|
|
|
686 |
{
|
|
|
687 |
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, this.currentOrders.size()));
|
|
|
688 |
for (Map.Entry<String, List<RechargeOrder>> _iter29 : this.currentOrders.entrySet())
|
|
|
689 |
{
|
|
|
690 |
oprot.writeString(_iter29.getKey());
|
|
|
691 |
{
|
|
|
692 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter29.getValue().size()));
|
|
|
693 |
for (RechargeOrder _iter30 : _iter29.getValue())
|
|
|
694 |
{
|
|
|
695 |
_iter30.write(oprot);
|
|
|
696 |
}
|
|
|
697 |
oprot.writeListEnd();
|
|
|
698 |
}
|
|
|
699 |
}
|
|
|
700 |
oprot.writeMapEnd();
|
|
|
701 |
}
|
|
|
702 |
oprot.writeFieldEnd();
|
|
|
703 |
}
|
|
|
704 |
if (this.amounts != null) {
|
|
|
705 |
oprot.writeFieldBegin(AMOUNTS_FIELD_DESC);
|
|
|
706 |
{
|
|
|
707 |
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.amounts.size()));
|
|
|
708 |
for (Map.Entry<String, Long> _iter31 : this.amounts.entrySet())
|
|
|
709 |
{
|
|
|
710 |
oprot.writeString(_iter31.getKey());
|
|
|
711 |
oprot.writeI64(_iter31.getValue());
|
|
|
712 |
}
|
|
|
713 |
oprot.writeMapEnd();
|
|
|
714 |
}
|
|
|
715 |
oprot.writeFieldEnd();
|
|
|
716 |
}
|
|
|
717 |
oprot.writeFieldStop();
|
|
|
718 |
oprot.writeStructEnd();
|
|
|
719 |
}
|
|
|
720 |
|
|
|
721 |
@Override
|
|
|
722 |
public String toString() {
|
|
|
723 |
StringBuilder sb = new StringBuilder("RechargeStatistics(");
|
|
|
724 |
boolean first = true;
|
|
|
725 |
|
|
|
726 |
sb.append("statusCounts:");
|
|
|
727 |
if (this.statusCounts == null) {
|
|
|
728 |
sb.append("null");
|
|
|
729 |
} else {
|
|
|
730 |
sb.append(this.statusCounts);
|
|
|
731 |
}
|
|
|
732 |
first = false;
|
|
|
733 |
if (!first) sb.append(", ");
|
|
|
734 |
sb.append("operatorCounts:");
|
|
|
735 |
if (this.operatorCounts == null) {
|
|
|
736 |
sb.append("null");
|
|
|
737 |
} else {
|
|
|
738 |
sb.append(this.operatorCounts);
|
|
|
739 |
}
|
|
|
740 |
first = false;
|
|
|
741 |
if (!first) sb.append(", ");
|
|
|
742 |
sb.append("currentOrders:");
|
|
|
743 |
if (this.currentOrders == null) {
|
|
|
744 |
sb.append("null");
|
|
|
745 |
} else {
|
|
|
746 |
sb.append(this.currentOrders);
|
|
|
747 |
}
|
|
|
748 |
first = false;
|
|
|
749 |
if (!first) sb.append(", ");
|
|
|
750 |
sb.append("amounts:");
|
|
|
751 |
if (this.amounts == null) {
|
|
|
752 |
sb.append("null");
|
|
|
753 |
} else {
|
|
|
754 |
sb.append(this.amounts);
|
|
|
755 |
}
|
|
|
756 |
first = false;
|
|
|
757 |
sb.append(")");
|
|
|
758 |
return sb.toString();
|
|
|
759 |
}
|
|
|
760 |
|
|
|
761 |
public void validate() throws org.apache.thrift.TException {
|
|
|
762 |
// check for required fields
|
|
|
763 |
}
|
|
|
764 |
|
|
|
765 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
766 |
try {
|
|
|
767 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
768 |
} catch (org.apache.thrift.TException te) {
|
|
|
769 |
throw new java.io.IOException(te);
|
|
|
770 |
}
|
|
|
771 |
}
|
|
|
772 |
|
|
|
773 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
774 |
try {
|
|
|
775 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
776 |
} catch (org.apache.thrift.TException te) {
|
|
|
777 |
throw new java.io.IOException(te);
|
|
|
778 |
}
|
|
|
779 |
}
|
|
|
780 |
|
|
|
781 |
}
|
|
|
782 |
|