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