Rev 3430 | 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_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)2);private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)3);private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (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 static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRING, (short)6);private String awbNumber; // requiredprivate long providerId; // requiredprivate long date; // requiredprivate String status; // requiredprivate String description; // requiredprivate String location; // 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_ID((short)2, "providerId"),DATE((short)3, "date"),STATUS((short)4, "status"),DESCRIPTION((short)5, "description"),LOCATION((short)6, "location");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_IDreturn PROVIDER_ID;case 3: // DATEreturn DATE;case 4: // STATUSreturn STATUS;case 5: // DESCRIPTIONreturn DESCRIPTION;case 6: // LOCATIONreturn LOCATION;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 __PROVIDERID_ISSET_ID = 0;private static final int __DATE_ISSET_ID = 1;private BitSet __isset_bit_vector = new BitSet(2);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_ID, new org.apache.thrift.meta_data.FieldMetaData("providerId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));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)));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)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AwbUpdate.class, metaDataMap);}public AwbUpdate() {}public AwbUpdate(String awbNumber,long providerId,long date,String status,String description,String location){this();this.awbNumber = awbNumber;this.providerId = providerId;setProviderIdIsSet(true);this.date = date;setDateIsSet(true);this.status = status;this.description = description;this.location = location;}/*** 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;}this.providerId = other.providerId;this.date = other.date;if (other.isSetStatus()) {this.status = other.status;}if (other.isSetDescription()) {this.description = other.description;}if (other.isSetLocation()) {this.location = other.location;}}public AwbUpdate deepCopy() {return new AwbUpdate(this);}@Overridepublic void clear() {this.awbNumber = null;setProviderIdIsSet(false);this.providerId = 0;setDateIsSet(false);this.date = 0;this.status = null;this.description = null;this.location = 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 long getProviderId() {return this.providerId;}public void setProviderId(long providerId) {this.providerId = providerId;setProviderIdIsSet(true);}public void unsetProviderId() {__isset_bit_vector.clear(__PROVIDERID_ISSET_ID);}/** Returns true if field providerId is set (has been assigned a value) and false otherwise */public boolean isSetProviderId() {return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);}public void setProviderIdIsSet(boolean value) {__isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);}public long getDate() {return this.date;}public void setDate(long date) {this.date = date;setDateIsSet(true);}public void unsetDate() {__isset_bit_vector.clear(__DATE_ISSET_ID);}/** Returns true if field date is set (has been assigned a value) and false otherwise */public boolean isSetDate() {return __isset_bit_vector.get(__DATE_ISSET_ID);}public void setDateIsSet(boolean value) {__isset_bit_vector.set(__DATE_ISSET_ID, value);}public String getStatus() {return this.status;}public void setStatus(String status) {this.status = status;}public void unsetStatus() {this.status = null;}/** Returns true if field status is set (has been assigned a value) and false otherwise */public boolean isSetStatus() {return this.status != null;}public void setStatusIsSet(boolean value) {if (!value) {this.status = null;}}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 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 void setFieldValue(_Fields field, Object value) {switch (field) {case AWB_NUMBER:if (value == null) {unsetAwbNumber();} else {setAwbNumber((String)value);}break;case PROVIDER_ID:if (value == null) {unsetProviderId();} else {setProviderId((Long)value);}break;case DATE:if (value == null) {unsetDate();} else {setDate((Long)value);}break;case STATUS:if (value == null) {unsetStatus();} else {setStatus((String)value);}break;case DESCRIPTION:if (value == null) {unsetDescription();} else {setDescription((String)value);}break;case LOCATION:if (value == null) {unsetLocation();} else {setLocation((String)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case AWB_NUMBER:return getAwbNumber();case PROVIDER_ID:return Long.valueOf(getProviderId());case DATE:return Long.valueOf(getDate());case STATUS:return getStatus();case DESCRIPTION:return getDescription();case LOCATION:return getLocation();}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_ID:return isSetProviderId();case DATE:return isSetDate();case STATUS:return isSetStatus();case DESCRIPTION:return isSetDescription();case LOCATION:return isSetLocation();}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_providerId = true;boolean that_present_providerId = true;if (this_present_providerId || that_present_providerId) {if (!(this_present_providerId && that_present_providerId))return false;if (this.providerId != that.providerId)return false;}boolean this_present_date = true;boolean that_present_date = true;if (this_present_date || that_present_date) {if (!(this_present_date && that_present_date))return false;if (this.date != that.date)return false;}boolean this_present_status = true && this.isSetStatus();boolean that_present_status = true && that.isSetStatus();if (this_present_status || that_present_status) {if (!(this_present_status && that_present_status))return false;if (!this.status.equals(that.status))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;}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;}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(isSetProviderId()).compareTo(typedOther.isSetProviderId());if (lastComparison != 0) {return lastComparison;}if (isSetProviderId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerId, typedOther.providerId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());if (lastComparison != 0) {return lastComparison;}if (isSetDate()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());if (lastComparison != 0) {return lastComparison;}if (isSetStatus()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);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;}}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;}}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_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.providerId = iprot.readI64();setProviderIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // DATEif (field.type == org.apache.thrift.protocol.TType.I64) {this.date = iprot.readI64();setDateIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // STATUSif (field.type == org.apache.thrift.protocol.TType.STRING) {this.status = iprot.readString();} 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;case 6: // LOCATIONif (field.type == org.apache.thrift.protocol.TType.STRING) {this.location = 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();}oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);oprot.writeI64(this.providerId);oprot.writeFieldEnd();oprot.writeFieldBegin(DATE_FIELD_DESC);oprot.writeI64(this.date);oprot.writeFieldEnd();if (this.status != null) {oprot.writeFieldBegin(STATUS_FIELD_DESC);oprot.writeString(this.status);oprot.writeFieldEnd();}if (this.description != null) {oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);oprot.writeString(this.description);oprot.writeFieldEnd();}if (this.location != null) {oprot.writeFieldBegin(LOCATION_FIELD_DESC);oprot.writeString(this.location);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("providerId:");sb.append(this.providerId);first = false;if (!first) sb.append(", ");sb.append("date:");sb.append(this.date);first = false;if (!first) sb.append(", ");sb.append("status:");if (this.status == null) {sb.append("null");} else {sb.append(this.status);}first = false;if (!first) sb.append(", ");sb.append("description:");if (this.description == null) {sb.append("null");} else {sb.append(this.description);}first = false;if (!first) sb.append(", ");sb.append("location:");if (this.location == null) {sb.append("null");} else {sb.append(this.location);}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);}}}