Rev 1013 | 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.logistics;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 AwbUpdate implements org.apache.thrift.TBase<AwbUpdate, AwbUpdate._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AwbUpdate");private static final org.apache.thrift.protocol.TField AWB_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("awbNumber", org.apache.thrift.protocol.TType.STRING, (short)1);private static final org.apache.thrift.protocol.TField PROVIDER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("providerName", org.apache.thrift.protocol.TType.STRING, (short)2);private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRING, (short)3);private static final org.apache.thrift.protocol.TField ENTRY_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("entryDate", org.apache.thrift.protocol.TType.I64, (short)4);private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5);private String awbNumber; // requiredprivate String providerName; // requiredprivate String location; // requiredprivate long entryDate; // requiredprivate String description; // 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 {AWB_NUMBER((short)1, "awbNumber"),PROVIDER_NAME((short)2, "providerName"),LOCATION((short)3, "location"),ENTRY_DATE((short)4, "entryDate"),DESCRIPTION((short)5, "description");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: // AWB_NUMBERreturn AWB_NUMBER;case 2: // PROVIDER_NAMEreturn PROVIDER_NAME;case 3: // LOCATIONreturn LOCATION;case 4: // ENTRY_DATEreturn ENTRY_DATE;case 5: // DESCRIPTIONreturn DESCRIPTION;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 __ENTRYDATE_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);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.AWB_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("awbNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.PROVIDER_NAME, new org.apache.thrift.meta_data.FieldMetaData("providerName", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.ENTRY_DATE, new org.apache.thrift.meta_data.FieldMetaData("entryDate", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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(AwbUpdate.class, metaDataMap);}public AwbUpdate() {}public AwbUpdate(String awbNumber,String providerName,String location,long entryDate,String description){this();this.awbNumber = awbNumber;this.providerName = providerName;this.location = location;this.entryDate = entryDate;setEntryDateIsSet(true);this.description = description;}/*** Performs a deep copy on <i>other</i>.*/public AwbUpdate(AwbUpdate other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);if (other.isSetAwbNumber()) {this.awbNumber = other.awbNumber;}if (other.isSetProviderName()) {this.providerName = other.providerName;}if (other.isSetLocation()) {this.location = other.location;}this.entryDate = other.entryDate;if (other.isSetDescription()) {this.description = other.description;}}public AwbUpdate deepCopy() {return new AwbUpdate(this);}@Overridepublic void clear() {this.awbNumber = null;this.providerName = null;this.location = null;setEntryDateIsSet(false);this.entryDate = 0;this.description = null;}public String getAwbNumber() {return this.awbNumber;}public void setAwbNumber(String awbNumber) {this.awbNumber = awbNumber;}public void unsetAwbNumber() {this.awbNumber = null;}/** Returns true if field awbNumber is set (has been assigned a value) and false otherwise */public boolean isSetAwbNumber() {return this.awbNumber != null;}public void setAwbNumberIsSet(boolean value) {if (!value) {this.awbNumber = null;}}public String getProviderName() {return this.providerName;}public void setProviderName(String providerName) {this.providerName = providerName;}public void unsetProviderName() {this.providerName = null;}/** Returns true if field providerName is set (has been assigned a value) and false otherwise */public boolean isSetProviderName() {return this.providerName != null;}public void setProviderNameIsSet(boolean value) {if (!value) {this.providerName = null;}}public String getLocation() {return this.location;}public void setLocation(String location) {this.location = location;}public void unsetLocation() {this.location = null;}/** Returns true if field location is set (has been assigned a value) and false otherwise */public boolean isSetLocation() {return this.location != null;}public void setLocationIsSet(boolean value) {if (!value) {this.location = null;}}public long getEntryDate() {return this.entryDate;}public void setEntryDate(long entryDate) {this.entryDate = entryDate;setEntryDateIsSet(true);}public void unsetEntryDate() {__isset_bit_vector.clear(__ENTRYDATE_ISSET_ID);}/** Returns true if field entryDate is set (has been assigned a value) and false otherwise */public boolean isSetEntryDate() {return __isset_bit_vector.get(__ENTRYDATE_ISSET_ID);}public void setEntryDateIsSet(boolean value) {__isset_bit_vector.set(__ENTRYDATE_ISSET_ID, value);}public String getDescription() {return this.description;}public void setDescription(String description) {this.description = description;}public void unsetDescription() {this.description = null;}/** Returns true if field description is set (has been assigned a value) and false otherwise */public boolean isSetDescription() {return this.description != null;}public void setDescriptionIsSet(boolean value) {if (!value) {this.description = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case AWB_NUMBER:if (value == null) {unsetAwbNumber();} else {setAwbNumber((String)value);}break;case PROVIDER_NAME:if (value == null) {unsetProviderName();} else {setProviderName((String)value);}break;case LOCATION:if (value == null) {unsetLocation();} else {setLocation((String)value);}break;case ENTRY_DATE:if (value == null) {unsetEntryDate();} else {setEntryDate((Long)value);}break;case DESCRIPTION:if (value == null) {unsetDescription();} else {setDescription((String)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case AWB_NUMBER:return getAwbNumber();case PROVIDER_NAME:return getProviderName();case LOCATION:return getLocation();case ENTRY_DATE:return Long.valueOf(getEntryDate());case DESCRIPTION:return getDescription();}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 AWB_NUMBER:return isSetAwbNumber();case PROVIDER_NAME:return isSetProviderName();case LOCATION:return isSetLocation();case ENTRY_DATE:return isSetEntryDate();case DESCRIPTION:return isSetDescription();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof AwbUpdate)return this.equals((AwbUpdate)that);return false;}public boolean equals(AwbUpdate that) {if (that == null)return false;boolean this_present_awbNumber = true && this.isSetAwbNumber();boolean that_present_awbNumber = true && that.isSetAwbNumber();if (this_present_awbNumber || that_present_awbNumber) {if (!(this_present_awbNumber && that_present_awbNumber))return false;if (!this.awbNumber.equals(that.awbNumber))return false;}boolean this_present_providerName = true && this.isSetProviderName();boolean that_present_providerName = true && that.isSetProviderName();if (this_present_providerName || that_present_providerName) {if (!(this_present_providerName && that_present_providerName))return false;if (!this.providerName.equals(that.providerName))return false;}boolean this_present_location = true && this.isSetLocation();boolean that_present_location = true && that.isSetLocation();if (this_present_location || that_present_location) {if (!(this_present_location && that_present_location))return false;if (!this.location.equals(that.location))return false;}boolean this_present_entryDate = true;boolean that_present_entryDate = true;if (this_present_entryDate || that_present_entryDate) {if (!(this_present_entryDate && that_present_entryDate))return false;if (this.entryDate != that.entryDate)return false;}boolean this_present_description = true && this.isSetDescription();boolean that_present_description = true && that.isSetDescription();if (this_present_description || that_present_description) {if (!(this_present_description && that_present_description))return false;if (!this.description.equals(that.description))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(AwbUpdate other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;AwbUpdate typedOther = (AwbUpdate)other;lastComparison = Boolean.valueOf(isSetAwbNumber()).compareTo(typedOther.isSetAwbNumber());if (lastComparison != 0) {return lastComparison;}if (isSetAwbNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.awbNumber, typedOther.awbNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetProviderName()).compareTo(typedOther.isSetProviderName());if (lastComparison != 0) {return lastComparison;}if (isSetProviderName()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerName, typedOther.providerName);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetLocation()).compareTo(typedOther.isSetLocation());if (lastComparison != 0) {return lastComparison;}if (isSetLocation()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, typedOther.location);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetEntryDate()).compareTo(typedOther.isSetEntryDate());if (lastComparison != 0) {return lastComparison;}if (isSetEntryDate()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entryDate, typedOther.entryDate);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());if (lastComparison != 0) {return lastComparison;}if (isSetDescription()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);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: // AWB_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.awbNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // PROVIDER_NAMEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.providerName = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // LOCATIONif (field.type == org.apache.thrift.protocol.TType.STRING) {this.location = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // ENTRY_DATEif (field.type == org.apache.thrift.protocol.TType.I64) {this.entryDate = iprot.readI64();setEntryDateIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // DESCRIPTIONif (field.type == org.apache.thrift.protocol.TType.STRING) {this.description = 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);if (this.awbNumber != null) {oprot.writeFieldBegin(AWB_NUMBER_FIELD_DESC);oprot.writeString(this.awbNumber);oprot.writeFieldEnd();}if (this.providerName != null) {oprot.writeFieldBegin(PROVIDER_NAME_FIELD_DESC);oprot.writeString(this.providerName);oprot.writeFieldEnd();}if (this.location != null) {oprot.writeFieldBegin(LOCATION_FIELD_DESC);oprot.writeString(this.location);oprot.writeFieldEnd();}oprot.writeFieldBegin(ENTRY_DATE_FIELD_DESC);oprot.writeI64(this.entryDate);oprot.writeFieldEnd();if (this.description != null) {oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);oprot.writeString(this.description);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("AwbUpdate(");boolean first = true;sb.append("awbNumber:");if (this.awbNumber == null) {sb.append("null");} else {sb.append(this.awbNumber);}first = false;if (!first) sb.append(", ");sb.append("providerName:");if (this.providerName == null) {sb.append("null");} else {sb.append(this.providerName);}first = false;if (!first) sb.append(", ");sb.append("location:");if (this.location == null) {sb.append("null");} else {sb.append(this.location);}first = false;if (!first) sb.append(", ");sb.append("entryDate:");sb.append(this.entryDate);first = false;if (!first) sb.append(", ");sb.append("description:");if (this.description == null) {sb.append("null");} else {sb.append(this.description);}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);}}}