Rev 5545 | Go to most recent revision | 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.warehouse;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 DetailedPurchaseScan implements org.apache.thrift.TBase<DetailedPurchaseScan, DetailedPurchaseScan._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DetailedPurchaseScan");private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField PO_CREATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("poCreatedAt", org.apache.thrift.protocol.TType.I64, (short)2);private static final org.apache.thrift.protocol.TField SUPPLIER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("supplierName", org.apache.thrift.protocol.TType.STRING, (short)3);private static final org.apache.thrift.protocol.TField INVOICE_NUMBERS_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumbers", org.apache.thrift.protocol.TType.STRING, (short)4);private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)5);private static final org.apache.thrift.protocol.TField ITEM_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("itemName", org.apache.thrift.protocol.TType.STRING, (short)6);private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)7);private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)8);private long purchaseOrderId; // requiredprivate long poCreatedAt; // requiredprivate String supplierName; // requiredprivate String invoiceNumbers; // requiredprivate long itemId; // requiredprivate String itemName; // requiredprivate double unitPrice; // requiredprivate long quantity; // 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 {PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),PO_CREATED_AT((short)2, "poCreatedAt"),SUPPLIER_NAME((short)3, "supplierName"),INVOICE_NUMBERS((short)4, "invoiceNumbers"),ITEM_ID((short)5, "itemId"),ITEM_NAME((short)6, "itemName"),UNIT_PRICE((short)7, "unitPrice"),QUANTITY((short)8, "quantity");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: // PURCHASE_ORDER_IDreturn PURCHASE_ORDER_ID;case 2: // PO_CREATED_ATreturn PO_CREATED_AT;case 3: // SUPPLIER_NAMEreturn SUPPLIER_NAME;case 4: // INVOICE_NUMBERSreturn INVOICE_NUMBERS;case 5: // ITEM_IDreturn ITEM_ID;case 6: // ITEM_NAMEreturn ITEM_NAME;case 7: // UNIT_PRICEreturn UNIT_PRICE;case 8: // QUANTITYreturn QUANTITY;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 __PURCHASEORDERID_ISSET_ID = 0;private static final int __POCREATEDAT_ISSET_ID = 1;private static final int __ITEMID_ISSET_ID = 2;private static final int __UNITPRICE_ISSET_ID = 3;private static final int __QUANTITY_ISSET_ID = 4;private BitSet __isset_bit_vector = new BitSet(5);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.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.PO_CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("poCreatedAt", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.SUPPLIER_NAME, new org.apache.thrift.meta_data.FieldMetaData("supplierName", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.INVOICE_NUMBERS, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumbers", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.ITEM_NAME, new org.apache.thrift.meta_data.FieldMetaData("itemName", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DetailedPurchaseScan.class, metaDataMap);}public DetailedPurchaseScan() {}public DetailedPurchaseScan(long purchaseOrderId,long poCreatedAt,String supplierName,String invoiceNumbers,long itemId,String itemName,double unitPrice,long quantity){this();this.purchaseOrderId = purchaseOrderId;setPurchaseOrderIdIsSet(true);this.poCreatedAt = poCreatedAt;setPoCreatedAtIsSet(true);this.supplierName = supplierName;this.invoiceNumbers = invoiceNumbers;this.itemId = itemId;setItemIdIsSet(true);this.itemName = itemName;this.unitPrice = unitPrice;setUnitPriceIsSet(true);this.quantity = quantity;setQuantityIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public DetailedPurchaseScan(DetailedPurchaseScan other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.purchaseOrderId = other.purchaseOrderId;this.poCreatedAt = other.poCreatedAt;if (other.isSetSupplierName()) {this.supplierName = other.supplierName;}if (other.isSetInvoiceNumbers()) {this.invoiceNumbers = other.invoiceNumbers;}this.itemId = other.itemId;if (other.isSetItemName()) {this.itemName = other.itemName;}this.unitPrice = other.unitPrice;this.quantity = other.quantity;}public DetailedPurchaseScan deepCopy() {return new DetailedPurchaseScan(this);}@Overridepublic void clear() {setPurchaseOrderIdIsSet(false);this.purchaseOrderId = 0;setPoCreatedAtIsSet(false);this.poCreatedAt = 0;this.supplierName = null;this.invoiceNumbers = null;setItemIdIsSet(false);this.itemId = 0;this.itemName = null;setUnitPriceIsSet(false);this.unitPrice = 0.0;setQuantityIsSet(false);this.quantity = 0;}public long getPurchaseOrderId() {return this.purchaseOrderId;}public void setPurchaseOrderId(long purchaseOrderId) {this.purchaseOrderId = purchaseOrderId;setPurchaseOrderIdIsSet(true);}public void unsetPurchaseOrderId() {__isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);}/** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */public boolean isSetPurchaseOrderId() {return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);}public void setPurchaseOrderIdIsSet(boolean value) {__isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);}public long getPoCreatedAt() {return this.poCreatedAt;}public void setPoCreatedAt(long poCreatedAt) {this.poCreatedAt = poCreatedAt;setPoCreatedAtIsSet(true);}public void unsetPoCreatedAt() {__isset_bit_vector.clear(__POCREATEDAT_ISSET_ID);}/** Returns true if field poCreatedAt is set (has been assigned a value) and false otherwise */public boolean isSetPoCreatedAt() {return __isset_bit_vector.get(__POCREATEDAT_ISSET_ID);}public void setPoCreatedAtIsSet(boolean value) {__isset_bit_vector.set(__POCREATEDAT_ISSET_ID, value);}public String getSupplierName() {return this.supplierName;}public void setSupplierName(String supplierName) {this.supplierName = supplierName;}public void unsetSupplierName() {this.supplierName = null;}/** Returns true if field supplierName is set (has been assigned a value) and false otherwise */public boolean isSetSupplierName() {return this.supplierName != null;}public void setSupplierNameIsSet(boolean value) {if (!value) {this.supplierName = null;}}public String getInvoiceNumbers() {return this.invoiceNumbers;}public void setInvoiceNumbers(String invoiceNumbers) {this.invoiceNumbers = invoiceNumbers;}public void unsetInvoiceNumbers() {this.invoiceNumbers = null;}/** Returns true if field invoiceNumbers is set (has been assigned a value) and false otherwise */public boolean isSetInvoiceNumbers() {return this.invoiceNumbers != null;}public void setInvoiceNumbersIsSet(boolean value) {if (!value) {this.invoiceNumbers = null;}}public long getItemId() {return this.itemId;}public void setItemId(long itemId) {this.itemId = itemId;setItemIdIsSet(true);}public void unsetItemId() {__isset_bit_vector.clear(__ITEMID_ISSET_ID);}/** Returns true if field itemId is set (has been assigned a value) and false otherwise */public boolean isSetItemId() {return __isset_bit_vector.get(__ITEMID_ISSET_ID);}public void setItemIdIsSet(boolean value) {__isset_bit_vector.set(__ITEMID_ISSET_ID, value);}public String getItemName() {return this.itemName;}public void setItemName(String itemName) {this.itemName = itemName;}public void unsetItemName() {this.itemName = null;}/** Returns true if field itemName is set (has been assigned a value) and false otherwise */public boolean isSetItemName() {return this.itemName != null;}public void setItemNameIsSet(boolean value) {if (!value) {this.itemName = null;}}public double getUnitPrice() {return this.unitPrice;}public void setUnitPrice(double unitPrice) {this.unitPrice = unitPrice;setUnitPriceIsSet(true);}public void unsetUnitPrice() {__isset_bit_vector.clear(__UNITPRICE_ISSET_ID);}/** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */public boolean isSetUnitPrice() {return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);}public void setUnitPriceIsSet(boolean value) {__isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);}public long getQuantity() {return this.quantity;}public void setQuantity(long quantity) {this.quantity = quantity;setQuantityIsSet(true);}public void unsetQuantity() {__isset_bit_vector.clear(__QUANTITY_ISSET_ID);}/** Returns true if field quantity is set (has been assigned a value) and false otherwise */public boolean isSetQuantity() {return __isset_bit_vector.get(__QUANTITY_ISSET_ID);}public void setQuantityIsSet(boolean value) {__isset_bit_vector.set(__QUANTITY_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case PURCHASE_ORDER_ID:if (value == null) {unsetPurchaseOrderId();} else {setPurchaseOrderId((Long)value);}break;case PO_CREATED_AT:if (value == null) {unsetPoCreatedAt();} else {setPoCreatedAt((Long)value);}break;case SUPPLIER_NAME:if (value == null) {unsetSupplierName();} else {setSupplierName((String)value);}break;case INVOICE_NUMBERS:if (value == null) {unsetInvoiceNumbers();} else {setInvoiceNumbers((String)value);}break;case ITEM_ID:if (value == null) {unsetItemId();} else {setItemId((Long)value);}break;case ITEM_NAME:if (value == null) {unsetItemName();} else {setItemName((String)value);}break;case UNIT_PRICE:if (value == null) {unsetUnitPrice();} else {setUnitPrice((Double)value);}break;case QUANTITY:if (value == null) {unsetQuantity();} else {setQuantity((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case PURCHASE_ORDER_ID:return Long.valueOf(getPurchaseOrderId());case PO_CREATED_AT:return Long.valueOf(getPoCreatedAt());case SUPPLIER_NAME:return getSupplierName();case INVOICE_NUMBERS:return getInvoiceNumbers();case ITEM_ID:return Long.valueOf(getItemId());case ITEM_NAME:return getItemName();case UNIT_PRICE:return Double.valueOf(getUnitPrice());case QUANTITY:return Long.valueOf(getQuantity());}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 PURCHASE_ORDER_ID:return isSetPurchaseOrderId();case PO_CREATED_AT:return isSetPoCreatedAt();case SUPPLIER_NAME:return isSetSupplierName();case INVOICE_NUMBERS:return isSetInvoiceNumbers();case ITEM_ID:return isSetItemId();case ITEM_NAME:return isSetItemName();case UNIT_PRICE:return isSetUnitPrice();case QUANTITY:return isSetQuantity();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof DetailedPurchaseScan)return this.equals((DetailedPurchaseScan)that);return false;}public boolean equals(DetailedPurchaseScan that) {if (that == null)return false;boolean this_present_purchaseOrderId = true;boolean that_present_purchaseOrderId = true;if (this_present_purchaseOrderId || that_present_purchaseOrderId) {if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))return false;if (this.purchaseOrderId != that.purchaseOrderId)return false;}boolean this_present_poCreatedAt = true;boolean that_present_poCreatedAt = true;if (this_present_poCreatedAt || that_present_poCreatedAt) {if (!(this_present_poCreatedAt && that_present_poCreatedAt))return false;if (this.poCreatedAt != that.poCreatedAt)return false;}boolean this_present_supplierName = true && this.isSetSupplierName();boolean that_present_supplierName = true && that.isSetSupplierName();if (this_present_supplierName || that_present_supplierName) {if (!(this_present_supplierName && that_present_supplierName))return false;if (!this.supplierName.equals(that.supplierName))return false;}boolean this_present_invoiceNumbers = true && this.isSetInvoiceNumbers();boolean that_present_invoiceNumbers = true && that.isSetInvoiceNumbers();if (this_present_invoiceNumbers || that_present_invoiceNumbers) {if (!(this_present_invoiceNumbers && that_present_invoiceNumbers))return false;if (!this.invoiceNumbers.equals(that.invoiceNumbers))return false;}boolean this_present_itemId = true;boolean that_present_itemId = true;if (this_present_itemId || that_present_itemId) {if (!(this_present_itemId && that_present_itemId))return false;if (this.itemId != that.itemId)return false;}boolean this_present_itemName = true && this.isSetItemName();boolean that_present_itemName = true && that.isSetItemName();if (this_present_itemName || that_present_itemName) {if (!(this_present_itemName && that_present_itemName))return false;if (!this.itemName.equals(that.itemName))return false;}boolean this_present_unitPrice = true;boolean that_present_unitPrice = true;if (this_present_unitPrice || that_present_unitPrice) {if (!(this_present_unitPrice && that_present_unitPrice))return false;if (this.unitPrice != that.unitPrice)return false;}boolean this_present_quantity = true;boolean that_present_quantity = true;if (this_present_quantity || that_present_quantity) {if (!(this_present_quantity && that_present_quantity))return false;if (this.quantity != that.quantity)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(DetailedPurchaseScan other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;DetailedPurchaseScan typedOther = (DetailedPurchaseScan)other;lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());if (lastComparison != 0) {return lastComparison;}if (isSetPurchaseOrderId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetPoCreatedAt()).compareTo(typedOther.isSetPoCreatedAt());if (lastComparison != 0) {return lastComparison;}if (isSetPoCreatedAt()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poCreatedAt, typedOther.poCreatedAt);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSupplierName()).compareTo(typedOther.isSetSupplierName());if (lastComparison != 0) {return lastComparison;}if (isSetSupplierName()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierName, typedOther.supplierName);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetInvoiceNumbers()).compareTo(typedOther.isSetInvoiceNumbers());if (lastComparison != 0) {return lastComparison;}if (isSetInvoiceNumbers()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumbers, typedOther.invoiceNumbers);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());if (lastComparison != 0) {return lastComparison;}if (isSetItemId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetItemName()).compareTo(typedOther.isSetItemName());if (lastComparison != 0) {return lastComparison;}if (isSetItemName()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemName, typedOther.itemName);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());if (lastComparison != 0) {return lastComparison;}if (isSetUnitPrice()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());if (lastComparison != 0) {return lastComparison;}if (isSetQuantity()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);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: // PURCHASE_ORDER_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.purchaseOrderId = iprot.readI64();setPurchaseOrderIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // PO_CREATED_ATif (field.type == org.apache.thrift.protocol.TType.I64) {this.poCreatedAt = iprot.readI64();setPoCreatedAtIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // SUPPLIER_NAMEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.supplierName = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // INVOICE_NUMBERSif (field.type == org.apache.thrift.protocol.TType.STRING) {this.invoiceNumbers = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // ITEM_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.itemId = iprot.readI64();setItemIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // ITEM_NAMEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.itemName = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // UNIT_PRICEif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.unitPrice = iprot.readDouble();setUnitPriceIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 8: // QUANTITYif (field.type == org.apache.thrift.protocol.TType.I64) {this.quantity = iprot.readI64();setQuantityIsSet(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(PURCHASE_ORDER_ID_FIELD_DESC);oprot.writeI64(this.purchaseOrderId);oprot.writeFieldEnd();oprot.writeFieldBegin(PO_CREATED_AT_FIELD_DESC);oprot.writeI64(this.poCreatedAt);oprot.writeFieldEnd();if (this.supplierName != null) {oprot.writeFieldBegin(SUPPLIER_NAME_FIELD_DESC);oprot.writeString(this.supplierName);oprot.writeFieldEnd();}if (this.invoiceNumbers != null) {oprot.writeFieldBegin(INVOICE_NUMBERS_FIELD_DESC);oprot.writeString(this.invoiceNumbers);oprot.writeFieldEnd();}oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);oprot.writeI64(this.itemId);oprot.writeFieldEnd();if (this.itemName != null) {oprot.writeFieldBegin(ITEM_NAME_FIELD_DESC);oprot.writeString(this.itemName);oprot.writeFieldEnd();}oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);oprot.writeDouble(this.unitPrice);oprot.writeFieldEnd();oprot.writeFieldBegin(QUANTITY_FIELD_DESC);oprot.writeI64(this.quantity);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("DetailedPurchaseScan(");boolean first = true;sb.append("purchaseOrderId:");sb.append(this.purchaseOrderId);first = false;if (!first) sb.append(", ");sb.append("poCreatedAt:");sb.append(this.poCreatedAt);first = false;if (!first) sb.append(", ");sb.append("supplierName:");if (this.supplierName == null) {sb.append("null");} else {sb.append(this.supplierName);}first = false;if (!first) sb.append(", ");sb.append("invoiceNumbers:");if (this.invoiceNumbers == null) {sb.append("null");} else {sb.append(this.invoiceNumbers);}first = false;if (!first) sb.append(", ");sb.append("itemId:");sb.append(this.itemId);first = false;if (!first) sb.append(", ");sb.append("itemName:");if (this.itemName == null) {sb.append("null");} else {sb.append(this.itemName);}first = false;if (!first) sb.append(", ");sb.append("unitPrice:");sb.append(this.unitPrice);first = false;if (!first) sb.append(", ");sb.append("quantity:");sb.append(this.quantity);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);}}}