Rev 4600 | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift Compiler (0.7.0)** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING*/package in.shop2020.model.v1.order;import java.util.List;import java.util.ArrayList;import java.util.Map;import java.util.HashMap;import java.util.EnumMap;import java.util.Set;import java.util.HashSet;import java.util.EnumSet;import java.util.Collections;import java.util.BitSet;import java.nio.ByteBuffer;import java.util.Arrays;import org.slf4j.Logger;import org.slf4j.LoggerFactory;public class PaymentSettlement implements org.apache.thrift.TBase<PaymentSettlement, PaymentSettlement._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PaymentSettlement");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);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);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);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);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);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);private long paymentGatewayId; // requiredprivate long referenceId; // requiredprivate long settlementDate; // requiredprivate double serviceTax; // requiredprivate double otherCharges; // requiredprivate double netCollection; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {PAYMENT_GATEWAY_ID((short)2, "paymentGatewayId"),REFERENCE_ID((short)3, "referenceId"),SETTLEMENT_DATE((short)4, "settlementDate"),SERVICE_TAX((short)5, "serviceTax"),OTHER_CHARGES((short)6, "otherCharges"),NET_COLLECTION((short)7, "netCollection");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 2: // PAYMENT_GATEWAY_IDreturn PAYMENT_GATEWAY_ID;case 3: // REFERENCE_IDreturn REFERENCE_ID;case 4: // SETTLEMENT_DATEreturn SETTLEMENT_DATE;case 5: // SERVICE_TAXreturn SERVICE_TAX;case 6: // OTHER_CHARGESreturn OTHER_CHARGES;case 7: // NET_COLLECTIONreturn NET_COLLECTION;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __PAYMENTGATEWAYID_ISSET_ID = 0;private static final int __REFERENCEID_ISSET_ID = 1;private static final int __SETTLEMENTDATE_ISSET_ID = 2;private static final int __SERVICETAX_ISSET_ID = 3;private static final int __OTHERCHARGES_ISSET_ID = 4;private static final int __NETCOLLECTION_ISSET_ID = 5;private BitSet __isset_bit_vector = new BitSet(6);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.PAYMENT_GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentGatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.REFERENCE_ID, new org.apache.thrift.meta_data.FieldMetaData("referenceId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.SETTLEMENT_DATE, new org.apache.thrift.meta_data.FieldMetaData("settlementDate", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.SERVICE_TAX, new org.apache.thrift.meta_data.FieldMetaData("serviceTax", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.OTHER_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("otherCharges", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.NET_COLLECTION, new org.apache.thrift.meta_data.FieldMetaData("netCollection", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PaymentSettlement.class, metaDataMap);}public PaymentSettlement() {}public PaymentSettlement(long paymentGatewayId,long referenceId,long settlementDate,double serviceTax,double otherCharges,double netCollection){this();this.paymentGatewayId = paymentGatewayId;setPaymentGatewayIdIsSet(true);this.referenceId = referenceId;setReferenceIdIsSet(true);this.settlementDate = settlementDate;setSettlementDateIsSet(true);this.serviceTax = serviceTax;setServiceTaxIsSet(true);this.otherCharges = otherCharges;setOtherChargesIsSet(true);this.netCollection = netCollection;setNetCollectionIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public PaymentSettlement(PaymentSettlement other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.paymentGatewayId = other.paymentGatewayId;this.referenceId = other.referenceId;this.settlementDate = other.settlementDate;this.serviceTax = other.serviceTax;this.otherCharges = other.otherCharges;this.netCollection = other.netCollection;}public PaymentSettlement deepCopy() {return new PaymentSettlement(this);}@Overridepublic void clear() {setPaymentGatewayIdIsSet(false);this.paymentGatewayId = 0;setReferenceIdIsSet(false);this.referenceId = 0;setSettlementDateIsSet(false);this.settlementDate = 0;setServiceTaxIsSet(false);this.serviceTax = 0.0;setOtherChargesIsSet(false);this.otherCharges = 0.0;setNetCollectionIsSet(false);this.netCollection = 0.0;}public long getPaymentGatewayId() {return this.paymentGatewayId;}public void setPaymentGatewayId(long paymentGatewayId) {this.paymentGatewayId = paymentGatewayId;setPaymentGatewayIdIsSet(true);}public void unsetPaymentGatewayId() {__isset_bit_vector.clear(__PAYMENTGATEWAYID_ISSET_ID);}/** Returns true if field paymentGatewayId is set (has been assigned a value) and false otherwise */public boolean isSetPaymentGatewayId() {return __isset_bit_vector.get(__PAYMENTGATEWAYID_ISSET_ID);}public void setPaymentGatewayIdIsSet(boolean value) {__isset_bit_vector.set(__PAYMENTGATEWAYID_ISSET_ID, value);}public long getReferenceId() {return this.referenceId;}public void setReferenceId(long referenceId) {this.referenceId = referenceId;setReferenceIdIsSet(true);}public void unsetReferenceId() {__isset_bit_vector.clear(__REFERENCEID_ISSET_ID);}/** Returns true if field referenceId is set (has been assigned a value) and false otherwise */public boolean isSetReferenceId() {return __isset_bit_vector.get(__REFERENCEID_ISSET_ID);}public void setReferenceIdIsSet(boolean value) {__isset_bit_vector.set(__REFERENCEID_ISSET_ID, value);}public long getSettlementDate() {return this.settlementDate;}public void setSettlementDate(long settlementDate) {this.settlementDate = settlementDate;setSettlementDateIsSet(true);}public void unsetSettlementDate() {__isset_bit_vector.clear(__SETTLEMENTDATE_ISSET_ID);}/** Returns true if field settlementDate is set (has been assigned a value) and false otherwise */public boolean isSetSettlementDate() {return __isset_bit_vector.get(__SETTLEMENTDATE_ISSET_ID);}public void setSettlementDateIsSet(boolean value) {__isset_bit_vector.set(__SETTLEMENTDATE_ISSET_ID, value);}public double getServiceTax() {return this.serviceTax;}public void setServiceTax(double serviceTax) {this.serviceTax = serviceTax;setServiceTaxIsSet(true);}public void unsetServiceTax() {__isset_bit_vector.clear(__SERVICETAX_ISSET_ID);}/** Returns true if field serviceTax is set (has been assigned a value) and false otherwise */public boolean isSetServiceTax() {return __isset_bit_vector.get(__SERVICETAX_ISSET_ID);}public void setServiceTaxIsSet(boolean value) {__isset_bit_vector.set(__SERVICETAX_ISSET_ID, value);}public double getOtherCharges() {return this.otherCharges;}public void setOtherCharges(double otherCharges) {this.otherCharges = otherCharges;setOtherChargesIsSet(true);}public void unsetOtherCharges() {__isset_bit_vector.clear(__OTHERCHARGES_ISSET_ID);}/** Returns true if field otherCharges is set (has been assigned a value) and false otherwise */public boolean isSetOtherCharges() {return __isset_bit_vector.get(__OTHERCHARGES_ISSET_ID);}public void setOtherChargesIsSet(boolean value) {__isset_bit_vector.set(__OTHERCHARGES_ISSET_ID, value);}public double getNetCollection() {return this.netCollection;}public void setNetCollection(double netCollection) {this.netCollection = netCollection;setNetCollectionIsSet(true);}public void unsetNetCollection() {__isset_bit_vector.clear(__NETCOLLECTION_ISSET_ID);}/** Returns true if field netCollection is set (has been assigned a value) and false otherwise */public boolean isSetNetCollection() {return __isset_bit_vector.get(__NETCOLLECTION_ISSET_ID);}public void setNetCollectionIsSet(boolean value) {__isset_bit_vector.set(__NETCOLLECTION_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case PAYMENT_GATEWAY_ID:if (value == null) {unsetPaymentGatewayId();} else {setPaymentGatewayId((Long)value);}break;case REFERENCE_ID:if (value == null) {unsetReferenceId();} else {setReferenceId((Long)value);}break;case SETTLEMENT_DATE:if (value == null) {unsetSettlementDate();} else {setSettlementDate((Long)value);}break;case SERVICE_TAX:if (value == null) {unsetServiceTax();} else {setServiceTax((Double)value);}break;case OTHER_CHARGES:if (value == null) {unsetOtherCharges();} else {setOtherCharges((Double)value);}break;case NET_COLLECTION:if (value == null) {unsetNetCollection();} else {setNetCollection((Double)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case PAYMENT_GATEWAY_ID:return Long.valueOf(getPaymentGatewayId());case REFERENCE_ID:return Long.valueOf(getReferenceId());case SETTLEMENT_DATE:return Long.valueOf(getSettlementDate());case SERVICE_TAX:return Double.valueOf(getServiceTax());case OTHER_CHARGES:return Double.valueOf(getOtherCharges());case NET_COLLECTION:return Double.valueOf(getNetCollection());}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case PAYMENT_GATEWAY_ID:return isSetPaymentGatewayId();case REFERENCE_ID:return isSetReferenceId();case SETTLEMENT_DATE:return isSetSettlementDate();case SERVICE_TAX:return isSetServiceTax();case OTHER_CHARGES:return isSetOtherCharges();case NET_COLLECTION:return isSetNetCollection();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof PaymentSettlement)return this.equals((PaymentSettlement)that);return false;}public boolean equals(PaymentSettlement that) {if (that == null)return false;boolean this_present_paymentGatewayId = true;boolean that_present_paymentGatewayId = true;if (this_present_paymentGatewayId || that_present_paymentGatewayId) {if (!(this_present_paymentGatewayId && that_present_paymentGatewayId))return false;if (this.paymentGatewayId != that.paymentGatewayId)return false;}boolean this_present_referenceId = true;boolean that_present_referenceId = true;if (this_present_referenceId || that_present_referenceId) {if (!(this_present_referenceId && that_present_referenceId))return false;if (this.referenceId != that.referenceId)return false;}boolean this_present_settlementDate = true;boolean that_present_settlementDate = true;if (this_present_settlementDate || that_present_settlementDate) {if (!(this_present_settlementDate && that_present_settlementDate))return false;if (this.settlementDate != that.settlementDate)return false;}boolean this_present_serviceTax = true;boolean that_present_serviceTax = true;if (this_present_serviceTax || that_present_serviceTax) {if (!(this_present_serviceTax && that_present_serviceTax))return false;if (this.serviceTax != that.serviceTax)return false;}boolean this_present_otherCharges = true;boolean that_present_otherCharges = true;if (this_present_otherCharges || that_present_otherCharges) {if (!(this_present_otherCharges && that_present_otherCharges))return false;if (this.otherCharges != that.otherCharges)return false;}boolean this_present_netCollection = true;boolean that_present_netCollection = true;if (this_present_netCollection || that_present_netCollection) {if (!(this_present_netCollection && that_present_netCollection))return false;if (this.netCollection != that.netCollection)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(PaymentSettlement other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;PaymentSettlement typedOther = (PaymentSettlement)other;lastComparison = Boolean.valueOf(isSetPaymentGatewayId()).compareTo(typedOther.isSetPaymentGatewayId());if (lastComparison != 0) {return lastComparison;}if (isSetPaymentGatewayId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paymentGatewayId, typedOther.paymentGatewayId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetReferenceId()).compareTo(typedOther.isSetReferenceId());if (lastComparison != 0) {return lastComparison;}if (isSetReferenceId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.referenceId, typedOther.referenceId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSettlementDate()).compareTo(typedOther.isSetSettlementDate());if (lastComparison != 0) {return lastComparison;}if (isSetSettlementDate()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settlementDate, typedOther.settlementDate);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetServiceTax()).compareTo(typedOther.isSetServiceTax());if (lastComparison != 0) {return lastComparison;}if (isSetServiceTax()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceTax, typedOther.serviceTax);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetOtherCharges()).compareTo(typedOther.isSetOtherCharges());if (lastComparison != 0) {return lastComparison;}if (isSetOtherCharges()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.otherCharges, typedOther.otherCharges);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetNetCollection()).compareTo(typedOther.isSetNetCollection());if (lastComparison != 0) {return lastComparison;}if (isSetNetCollection()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.netCollection, typedOther.netCollection);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 2: // PAYMENT_GATEWAY_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.paymentGatewayId = iprot.readI64();setPaymentGatewayIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // REFERENCE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.referenceId = iprot.readI64();setReferenceIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // SETTLEMENT_DATEif (field.type == org.apache.thrift.protocol.TType.I64) {this.settlementDate = iprot.readI64();setSettlementDateIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // SERVICE_TAXif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.serviceTax = iprot.readDouble();setServiceTaxIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // OTHER_CHARGESif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.otherCharges = iprot.readDouble();setOtherChargesIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // NET_COLLECTIONif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.netCollection = iprot.readDouble();setNetCollectionIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(PAYMENT_GATEWAY_ID_FIELD_DESC);oprot.writeI64(this.paymentGatewayId);oprot.writeFieldEnd();oprot.writeFieldBegin(REFERENCE_ID_FIELD_DESC);oprot.writeI64(this.referenceId);oprot.writeFieldEnd();oprot.writeFieldBegin(SETTLEMENT_DATE_FIELD_DESC);oprot.writeI64(this.settlementDate);oprot.writeFieldEnd();oprot.writeFieldBegin(SERVICE_TAX_FIELD_DESC);oprot.writeDouble(this.serviceTax);oprot.writeFieldEnd();oprot.writeFieldBegin(OTHER_CHARGES_FIELD_DESC);oprot.writeDouble(this.otherCharges);oprot.writeFieldEnd();oprot.writeFieldBegin(NET_COLLECTION_FIELD_DESC);oprot.writeDouble(this.netCollection);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("PaymentSettlement(");boolean first = true;sb.append("paymentGatewayId:");sb.append(this.paymentGatewayId);first = false;if (!first) sb.append(", ");sb.append("referenceId:");sb.append(this.referenceId);first = false;if (!first) sb.append(", ");sb.append("settlementDate:");sb.append(this.settlementDate);first = false;if (!first) sb.append(", ");sb.append("serviceTax:");sb.append(this.serviceTax);first = false;if (!first) sb.append(", ");sb.append("otherCharges:");sb.append(this.otherCharges);first = false;if (!first) sb.append(", ");sb.append("netCollection:");sb.append(this.netCollection);first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.__isset_bit_vector = new BitSet(1);read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}