Rev 18634 | 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 LoanHistory implements org.apache.thrift.TBase<LoanHistory, LoanHistory._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LoanHistory");private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("user_id", org.apache.thrift.protocol.TType.I64, (short)2);private static final org.apache.thrift.protocol.TField CREDITOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("creditor_id", org.apache.thrift.protocol.TType.I64, (short)3);private static final org.apache.thrift.protocol.TField PAYMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("payment_id", org.apache.thrift.protocol.TType.I64, (short)4);private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.DOUBLE, (short)5);private static final org.apache.thrift.protocol.TField CREDIT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("credit_type", org.apache.thrift.protocol.TType.I32, (short)6);private static final org.apache.thrift.protocol.TField CREATED_FIELD_DESC = new org.apache.thrift.protocol.TField("created", org.apache.thrift.protocol.TType.I64, (short)7);private static final org.apache.thrift.protocol.TField UPDATED_FIELD_DESC = new org.apache.thrift.protocol.TField("updated", org.apache.thrift.protocol.TType.I64, (short)8);private static final org.apache.thrift.protocol.TField LOAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("loan_id", org.apache.thrift.protocol.TType.STRING, (short)9);private static final org.apache.thrift.protocol.TField DUE_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("due_date", org.apache.thrift.protocol.TType.I64, (short)10);private static final org.apache.thrift.protocol.TField VALUE_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("value_date", org.apache.thrift.protocol.TType.I64, (short)11);private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)12);private long id; // requiredprivate long user_id; // requiredprivate long creditor_id; // requiredprivate long payment_id; // requiredprivate double amount; // requiredprivate CreditTxnType credit_type; // requiredprivate long created; // requiredprivate long updated; // requiredprivate String loan_id; // requiredprivate long due_date; // requiredprivate long value_date; // requiredprivate String invoiceNumber; // 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 {ID((short)1, "id"),USER_ID((short)2, "user_id"),CREDITOR_ID((short)3, "creditor_id"),PAYMENT_ID((short)4, "payment_id"),AMOUNT((short)5, "amount"),/**** @see CreditTxnType*/CREDIT_TYPE((short)6, "credit_type"),CREATED((short)7, "created"),UPDATED((short)8, "updated"),LOAN_ID((short)9, "loan_id"),DUE_DATE((short)10, "due_date"),VALUE_DATE((short)11, "value_date"),INVOICE_NUMBER((short)12, "invoiceNumber");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 1: // IDreturn ID;case 2: // USER_IDreturn USER_ID;case 3: // CREDITOR_IDreturn CREDITOR_ID;case 4: // PAYMENT_IDreturn PAYMENT_ID;case 5: // AMOUNTreturn AMOUNT;case 6: // CREDIT_TYPEreturn CREDIT_TYPE;case 7: // CREATEDreturn CREATED;case 8: // UPDATEDreturn UPDATED;case 9: // LOAN_IDreturn LOAN_ID;case 10: // DUE_DATEreturn DUE_DATE;case 11: // VALUE_DATEreturn VALUE_DATE;case 12: // INVOICE_NUMBERreturn INVOICE_NUMBER;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 __ID_ISSET_ID = 0;private static final int __USER_ID_ISSET_ID = 1;private static final int __CREDITOR_ID_ISSET_ID = 2;private static final int __PAYMENT_ID_ISSET_ID = 3;private static final int __AMOUNT_ISSET_ID = 4;private static final int __CREATED_ISSET_ID = 5;private static final int __UPDATED_ISSET_ID = 6;private static final int __DUE_DATE_ISSET_ID = 7;private static final int __VALUE_DATE_ISSET_ID = 8;private BitSet __isset_bit_vector = new BitSet(9);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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("user_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.CREDITOR_ID, new org.apache.thrift.meta_data.FieldMetaData("creditor_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("payment_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.CREDIT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("credit_type", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CreditTxnType.class)));tmpMap.put(_Fields.CREATED, new org.apache.thrift.meta_data.FieldMetaData("created", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.UPDATED, new org.apache.thrift.meta_data.FieldMetaData("updated", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.LOAN_ID, new org.apache.thrift.meta_data.FieldMetaData("loan_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.DUE_DATE, new org.apache.thrift.meta_data.FieldMetaData("due_date", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.VALUE_DATE, new org.apache.thrift.meta_data.FieldMetaData("value_date", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LoanHistory.class, metaDataMap);}public LoanHistory() {}public LoanHistory(long id,long user_id,long creditor_id,long payment_id,double amount,CreditTxnType credit_type,long created,long updated,String loan_id,long due_date,long value_date,String invoiceNumber){this();this.id = id;setIdIsSet(true);this.user_id = user_id;setUser_idIsSet(true);this.creditor_id = creditor_id;setCreditor_idIsSet(true);this.payment_id = payment_id;setPayment_idIsSet(true);this.amount = amount;setAmountIsSet(true);this.credit_type = credit_type;this.created = created;setCreatedIsSet(true);this.updated = updated;setUpdatedIsSet(true);this.loan_id = loan_id;this.due_date = due_date;setDue_dateIsSet(true);this.value_date = value_date;setValue_dateIsSet(true);this.invoiceNumber = invoiceNumber;}/*** Performs a deep copy on <i>other</i>.*/public LoanHistory(LoanHistory other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;this.user_id = other.user_id;this.creditor_id = other.creditor_id;this.payment_id = other.payment_id;this.amount = other.amount;if (other.isSetCredit_type()) {this.credit_type = other.credit_type;}this.created = other.created;this.updated = other.updated;if (other.isSetLoan_id()) {this.loan_id = other.loan_id;}this.due_date = other.due_date;this.value_date = other.value_date;if (other.isSetInvoiceNumber()) {this.invoiceNumber = other.invoiceNumber;}}public LoanHistory deepCopy() {return new LoanHistory(this);}@Overridepublic void clear() {setIdIsSet(false);this.id = 0;setUser_idIsSet(false);this.user_id = 0;setCreditor_idIsSet(false);this.creditor_id = 0;setPayment_idIsSet(false);this.payment_id = 0;setAmountIsSet(false);this.amount = 0.0;this.credit_type = null;setCreatedIsSet(false);this.created = 0;setUpdatedIsSet(false);this.updated = 0;this.loan_id = null;setDue_dateIsSet(false);this.due_date = 0;setValue_dateIsSet(false);this.value_date = 0;this.invoiceNumber = null;}public long getId() {return this.id;}public void setId(long id) {this.id = id;setIdIsSet(true);}public void unsetId() {__isset_bit_vector.clear(__ID_ISSET_ID);}/** Returns true if field id is set (has been assigned a value) and false otherwise */public boolean isSetId() {return __isset_bit_vector.get(__ID_ISSET_ID);}public void setIdIsSet(boolean value) {__isset_bit_vector.set(__ID_ISSET_ID, value);}public long getUser_id() {return this.user_id;}public void setUser_id(long user_id) {this.user_id = user_id;setUser_idIsSet(true);}public void unsetUser_id() {__isset_bit_vector.clear(__USER_ID_ISSET_ID);}/** Returns true if field user_id is set (has been assigned a value) and false otherwise */public boolean isSetUser_id() {return __isset_bit_vector.get(__USER_ID_ISSET_ID);}public void setUser_idIsSet(boolean value) {__isset_bit_vector.set(__USER_ID_ISSET_ID, value);}public long getCreditor_id() {return this.creditor_id;}public void setCreditor_id(long creditor_id) {this.creditor_id = creditor_id;setCreditor_idIsSet(true);}public void unsetCreditor_id() {__isset_bit_vector.clear(__CREDITOR_ID_ISSET_ID);}/** Returns true if field creditor_id is set (has been assigned a value) and false otherwise */public boolean isSetCreditor_id() {return __isset_bit_vector.get(__CREDITOR_ID_ISSET_ID);}public void setCreditor_idIsSet(boolean value) {__isset_bit_vector.set(__CREDITOR_ID_ISSET_ID, value);}public long getPayment_id() {return this.payment_id;}public void setPayment_id(long payment_id) {this.payment_id = payment_id;setPayment_idIsSet(true);}public void unsetPayment_id() {__isset_bit_vector.clear(__PAYMENT_ID_ISSET_ID);}/** Returns true if field payment_id is set (has been assigned a value) and false otherwise */public boolean isSetPayment_id() {return __isset_bit_vector.get(__PAYMENT_ID_ISSET_ID);}public void setPayment_idIsSet(boolean value) {__isset_bit_vector.set(__PAYMENT_ID_ISSET_ID, value);}public double getAmount() {return this.amount;}public void setAmount(double amount) {this.amount = amount;setAmountIsSet(true);}public void unsetAmount() {__isset_bit_vector.clear(__AMOUNT_ISSET_ID);}/** Returns true if field amount is set (has been assigned a value) and false otherwise */public boolean isSetAmount() {return __isset_bit_vector.get(__AMOUNT_ISSET_ID);}public void setAmountIsSet(boolean value) {__isset_bit_vector.set(__AMOUNT_ISSET_ID, value);}/**** @see CreditTxnType*/public CreditTxnType getCredit_type() {return this.credit_type;}/**** @see CreditTxnType*/public void setCredit_type(CreditTxnType credit_type) {this.credit_type = credit_type;}public void unsetCredit_type() {this.credit_type = null;}/** Returns true if field credit_type is set (has been assigned a value) and false otherwise */public boolean isSetCredit_type() {return this.credit_type != null;}public void setCredit_typeIsSet(boolean value) {if (!value) {this.credit_type = null;}}public long getCreated() {return this.created;}public void setCreated(long created) {this.created = created;setCreatedIsSet(true);}public void unsetCreated() {__isset_bit_vector.clear(__CREATED_ISSET_ID);}/** Returns true if field created is set (has been assigned a value) and false otherwise */public boolean isSetCreated() {return __isset_bit_vector.get(__CREATED_ISSET_ID);}public void setCreatedIsSet(boolean value) {__isset_bit_vector.set(__CREATED_ISSET_ID, value);}public long getUpdated() {return this.updated;}public void setUpdated(long updated) {this.updated = updated;setUpdatedIsSet(true);}public void unsetUpdated() {__isset_bit_vector.clear(__UPDATED_ISSET_ID);}/** Returns true if field updated is set (has been assigned a value) and false otherwise */public boolean isSetUpdated() {return __isset_bit_vector.get(__UPDATED_ISSET_ID);}public void setUpdatedIsSet(boolean value) {__isset_bit_vector.set(__UPDATED_ISSET_ID, value);}public String getLoan_id() {return this.loan_id;}public void setLoan_id(String loan_id) {this.loan_id = loan_id;}public void unsetLoan_id() {this.loan_id = null;}/** Returns true if field loan_id is set (has been assigned a value) and false otherwise */public boolean isSetLoan_id() {return this.loan_id != null;}public void setLoan_idIsSet(boolean value) {if (!value) {this.loan_id = null;}}public long getDue_date() {return this.due_date;}public void setDue_date(long due_date) {this.due_date = due_date;setDue_dateIsSet(true);}public void unsetDue_date() {__isset_bit_vector.clear(__DUE_DATE_ISSET_ID);}/** Returns true if field due_date is set (has been assigned a value) and false otherwise */public boolean isSetDue_date() {return __isset_bit_vector.get(__DUE_DATE_ISSET_ID);}public void setDue_dateIsSet(boolean value) {__isset_bit_vector.set(__DUE_DATE_ISSET_ID, value);}public long getValue_date() {return this.value_date;}public void setValue_date(long value_date) {this.value_date = value_date;setValue_dateIsSet(true);}public void unsetValue_date() {__isset_bit_vector.clear(__VALUE_DATE_ISSET_ID);}/** Returns true if field value_date is set (has been assigned a value) and false otherwise */public boolean isSetValue_date() {return __isset_bit_vector.get(__VALUE_DATE_ISSET_ID);}public void setValue_dateIsSet(boolean value) {__isset_bit_vector.set(__VALUE_DATE_ISSET_ID, value);}public String getInvoiceNumber() {return this.invoiceNumber;}public void setInvoiceNumber(String invoiceNumber) {this.invoiceNumber = invoiceNumber;}public void unsetInvoiceNumber() {this.invoiceNumber = null;}/** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */public boolean isSetInvoiceNumber() {return this.invoiceNumber != null;}public void setInvoiceNumberIsSet(boolean value) {if (!value) {this.invoiceNumber = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;case USER_ID:if (value == null) {unsetUser_id();} else {setUser_id((Long)value);}break;case CREDITOR_ID:if (value == null) {unsetCreditor_id();} else {setCreditor_id((Long)value);}break;case PAYMENT_ID:if (value == null) {unsetPayment_id();} else {setPayment_id((Long)value);}break;case AMOUNT:if (value == null) {unsetAmount();} else {setAmount((Double)value);}break;case CREDIT_TYPE:if (value == null) {unsetCredit_type();} else {setCredit_type((CreditTxnType)value);}break;case CREATED:if (value == null) {unsetCreated();} else {setCreated((Long)value);}break;case UPDATED:if (value == null) {unsetUpdated();} else {setUpdated((Long)value);}break;case LOAN_ID:if (value == null) {unsetLoan_id();} else {setLoan_id((String)value);}break;case DUE_DATE:if (value == null) {unsetDue_date();} else {setDue_date((Long)value);}break;case VALUE_DATE:if (value == null) {unsetValue_date();} else {setValue_date((Long)value);}break;case INVOICE_NUMBER:if (value == null) {unsetInvoiceNumber();} else {setInvoiceNumber((String)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ID:return Long.valueOf(getId());case USER_ID:return Long.valueOf(getUser_id());case CREDITOR_ID:return Long.valueOf(getCreditor_id());case PAYMENT_ID:return Long.valueOf(getPayment_id());case AMOUNT:return Double.valueOf(getAmount());case CREDIT_TYPE:return getCredit_type();case CREATED:return Long.valueOf(getCreated());case UPDATED:return Long.valueOf(getUpdated());case LOAN_ID:return getLoan_id();case DUE_DATE:return Long.valueOf(getDue_date());case VALUE_DATE:return Long.valueOf(getValue_date());case INVOICE_NUMBER:return getInvoiceNumber();}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 ID:return isSetId();case USER_ID:return isSetUser_id();case CREDITOR_ID:return isSetCreditor_id();case PAYMENT_ID:return isSetPayment_id();case AMOUNT:return isSetAmount();case CREDIT_TYPE:return isSetCredit_type();case CREATED:return isSetCreated();case UPDATED:return isSetUpdated();case LOAN_ID:return isSetLoan_id();case DUE_DATE:return isSetDue_date();case VALUE_DATE:return isSetValue_date();case INVOICE_NUMBER:return isSetInvoiceNumber();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof LoanHistory)return this.equals((LoanHistory)that);return false;}public boolean equals(LoanHistory that) {if (that == null)return false;boolean this_present_id = true;boolean that_present_id = true;if (this_present_id || that_present_id) {if (!(this_present_id && that_present_id))return false;if (this.id != that.id)return false;}boolean this_present_user_id = true;boolean that_present_user_id = true;if (this_present_user_id || that_present_user_id) {if (!(this_present_user_id && that_present_user_id))return false;if (this.user_id != that.user_id)return false;}boolean this_present_creditor_id = true;boolean that_present_creditor_id = true;if (this_present_creditor_id || that_present_creditor_id) {if (!(this_present_creditor_id && that_present_creditor_id))return false;if (this.creditor_id != that.creditor_id)return false;}boolean this_present_payment_id = true;boolean that_present_payment_id = true;if (this_present_payment_id || that_present_payment_id) {if (!(this_present_payment_id && that_present_payment_id))return false;if (this.payment_id != that.payment_id)return false;}boolean this_present_amount = true;boolean that_present_amount = true;if (this_present_amount || that_present_amount) {if (!(this_present_amount && that_present_amount))return false;if (this.amount != that.amount)return false;}boolean this_present_credit_type = true && this.isSetCredit_type();boolean that_present_credit_type = true && that.isSetCredit_type();if (this_present_credit_type || that_present_credit_type) {if (!(this_present_credit_type && that_present_credit_type))return false;if (!this.credit_type.equals(that.credit_type))return false;}boolean this_present_created = true;boolean that_present_created = true;if (this_present_created || that_present_created) {if (!(this_present_created && that_present_created))return false;if (this.created != that.created)return false;}boolean this_present_updated = true;boolean that_present_updated = true;if (this_present_updated || that_present_updated) {if (!(this_present_updated && that_present_updated))return false;if (this.updated != that.updated)return false;}boolean this_present_loan_id = true && this.isSetLoan_id();boolean that_present_loan_id = true && that.isSetLoan_id();if (this_present_loan_id || that_present_loan_id) {if (!(this_present_loan_id && that_present_loan_id))return false;if (!this.loan_id.equals(that.loan_id))return false;}boolean this_present_due_date = true;boolean that_present_due_date = true;if (this_present_due_date || that_present_due_date) {if (!(this_present_due_date && that_present_due_date))return false;if (this.due_date != that.due_date)return false;}boolean this_present_value_date = true;boolean that_present_value_date = true;if (this_present_value_date || that_present_value_date) {if (!(this_present_value_date && that_present_value_date))return false;if (this.value_date != that.value_date)return false;}boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();if (this_present_invoiceNumber || that_present_invoiceNumber) {if (!(this_present_invoiceNumber && that_present_invoiceNumber))return false;if (!this.invoiceNumber.equals(that.invoiceNumber))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(LoanHistory other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;LoanHistory typedOther = (LoanHistory)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());if (lastComparison != 0) {return lastComparison;}if (isSetId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(typedOther.isSetUser_id());if (lastComparison != 0) {return lastComparison;}if (isSetUser_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_id, typedOther.user_id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCreditor_id()).compareTo(typedOther.isSetCreditor_id());if (lastComparison != 0) {return lastComparison;}if (isSetCreditor_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creditor_id, typedOther.creditor_id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetPayment_id()).compareTo(typedOther.isSetPayment_id());if (lastComparison != 0) {return lastComparison;}if (isSetPayment_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.payment_id, typedOther.payment_id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());if (lastComparison != 0) {return lastComparison;}if (isSetAmount()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCredit_type()).compareTo(typedOther.isSetCredit_type());if (lastComparison != 0) {return lastComparison;}if (isSetCredit_type()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credit_type, typedOther.credit_type);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCreated()).compareTo(typedOther.isSetCreated());if (lastComparison != 0) {return lastComparison;}if (isSetCreated()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.created, typedOther.created);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetUpdated()).compareTo(typedOther.isSetUpdated());if (lastComparison != 0) {return lastComparison;}if (isSetUpdated()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updated, typedOther.updated);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetLoan_id()).compareTo(typedOther.isSetLoan_id());if (lastComparison != 0) {return lastComparison;}if (isSetLoan_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.loan_id, typedOther.loan_id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetDue_date()).compareTo(typedOther.isSetDue_date());if (lastComparison != 0) {return lastComparison;}if (isSetDue_date()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.due_date, typedOther.due_date);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetValue_date()).compareTo(typedOther.isSetValue_date());if (lastComparison != 0) {return lastComparison;}if (isSetValue_date()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value_date, typedOther.value_date);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());if (lastComparison != 0) {return lastComparison;}if (isSetInvoiceNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);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 1: // IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.id = iprot.readI64();setIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // USER_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.user_id = iprot.readI64();setUser_idIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // CREDITOR_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.creditor_id = iprot.readI64();setCreditor_idIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // PAYMENT_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.payment_id = iprot.readI64();setPayment_idIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // AMOUNTif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.amount = iprot.readDouble();setAmountIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // CREDIT_TYPEif (field.type == org.apache.thrift.protocol.TType.I32) {this.credit_type = CreditTxnType.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // CREATEDif (field.type == org.apache.thrift.protocol.TType.I64) {this.created = iprot.readI64();setCreatedIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 8: // UPDATEDif (field.type == org.apache.thrift.protocol.TType.I64) {this.updated = iprot.readI64();setUpdatedIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 9: // LOAN_IDif (field.type == org.apache.thrift.protocol.TType.STRING) {this.loan_id = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 10: // DUE_DATEif (field.type == org.apache.thrift.protocol.TType.I64) {this.due_date = iprot.readI64();setDue_dateIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 11: // VALUE_DATEif (field.type == org.apache.thrift.protocol.TType.I64) {this.value_date = iprot.readI64();setValue_dateIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 12: // INVOICE_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.invoiceNumber = iprot.readString();} 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(ID_FIELD_DESC);oprot.writeI64(this.id);oprot.writeFieldEnd();oprot.writeFieldBegin(USER_ID_FIELD_DESC);oprot.writeI64(this.user_id);oprot.writeFieldEnd();oprot.writeFieldBegin(CREDITOR_ID_FIELD_DESC);oprot.writeI64(this.creditor_id);oprot.writeFieldEnd();oprot.writeFieldBegin(PAYMENT_ID_FIELD_DESC);oprot.writeI64(this.payment_id);oprot.writeFieldEnd();oprot.writeFieldBegin(AMOUNT_FIELD_DESC);oprot.writeDouble(this.amount);oprot.writeFieldEnd();if (this.credit_type != null) {oprot.writeFieldBegin(CREDIT_TYPE_FIELD_DESC);oprot.writeI32(this.credit_type.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(CREATED_FIELD_DESC);oprot.writeI64(this.created);oprot.writeFieldEnd();oprot.writeFieldBegin(UPDATED_FIELD_DESC);oprot.writeI64(this.updated);oprot.writeFieldEnd();if (this.loan_id != null) {oprot.writeFieldBegin(LOAN_ID_FIELD_DESC);oprot.writeString(this.loan_id);oprot.writeFieldEnd();}oprot.writeFieldBegin(DUE_DATE_FIELD_DESC);oprot.writeI64(this.due_date);oprot.writeFieldEnd();oprot.writeFieldBegin(VALUE_DATE_FIELD_DESC);oprot.writeI64(this.value_date);oprot.writeFieldEnd();if (this.invoiceNumber != null) {oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);oprot.writeString(this.invoiceNumber);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("LoanHistory(");boolean first = true;sb.append("id:");sb.append(this.id);first = false;if (!first) sb.append(", ");sb.append("user_id:");sb.append(this.user_id);first = false;if (!first) sb.append(", ");sb.append("creditor_id:");sb.append(this.creditor_id);first = false;if (!first) sb.append(", ");sb.append("payment_id:");sb.append(this.payment_id);first = false;if (!first) sb.append(", ");sb.append("amount:");sb.append(this.amount);first = false;if (!first) sb.append(", ");sb.append("credit_type:");if (this.credit_type == null) {sb.append("null");} else {sb.append(this.credit_type);}first = false;if (!first) sb.append(", ");sb.append("created:");sb.append(this.created);first = false;if (!first) sb.append(", ");sb.append("updated:");sb.append(this.updated);first = false;if (!first) sb.append(", ");sb.append("loan_id:");if (this.loan_id == null) {sb.append("null");} else {sb.append(this.loan_id);}first = false;if (!first) sb.append(", ");sb.append("due_date:");sb.append(this.due_date);first = false;if (!first) sb.append(", ");sb.append("value_date:");sb.append(this.value_date);first = false;if (!first) sb.append(", ");sb.append("invoiceNumber:");if (this.invoiceNumber == null) {sb.append("null");} else {sb.append(this.invoiceNumber);}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);}}}