Rev 648 | Rev 4009 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift** 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.util.Arrays;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.apache.thrift.*;import org.apache.thrift.meta_data.*;import org.apache.thrift.protocol.*;public class LogisticsInfo implements TBase<LogisticsInfo._Fields>, java.io.Serializable, Cloneable, Comparable<LogisticsInfo> {private static final TStruct STRUCT_DESC = new TStruct("LogisticsInfo");private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);private static final TField DELIVERY_TIME_FIELD_DESC = new TField("deliveryTime", TType.I64, (short)3);private static final TField AIRWAY_BILLNO_FIELD_DESC = new TField("airway_billno", TType.STRING, (short)4);private long warehouseId;private long providerId;private long deliveryTime;private String airway_billno;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {WAREHOUSE_ID((short)1, "warehouseId"),PROVIDER_ID((short)2, "providerId"),DELIVERY_TIME((short)3, "deliveryTime"),AIRWAY_BILLNO((short)4, "airway_billno");private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byId.put((int)field._thriftId, field);byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {return byId.get(fieldId);}/*** 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 __WAREHOUSEID_ISSET_ID = 0;private static final int __PROVIDERID_ISSET_ID = 1;private static final int __DELIVERYTIME_ISSET_ID = 2;private BitSet __isset_bit_vector = new BitSet(3);public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.DELIVERY_TIME, new FieldMetaData("deliveryTime", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.AIRWAY_BILLNO, new FieldMetaData("airway_billno", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));}});static {FieldMetaData.addStructMetaDataMap(LogisticsInfo.class, metaDataMap);}public LogisticsInfo() {}public LogisticsInfo(long warehouseId,long providerId,long deliveryTime,String airway_billno){this();this.warehouseId = warehouseId;setWarehouseIdIsSet(true);this.providerId = providerId;setProviderIdIsSet(true);this.deliveryTime = deliveryTime;setDeliveryTimeIsSet(true);this.airway_billno = airway_billno;}/*** Performs a deep copy on <i>other</i>.*/public LogisticsInfo(LogisticsInfo other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.warehouseId = other.warehouseId;this.providerId = other.providerId;this.deliveryTime = other.deliveryTime;if (other.isSetAirway_billno()) {this.airway_billno = other.airway_billno;}}public LogisticsInfo deepCopy() {return new LogisticsInfo(this);}@Deprecatedpublic LogisticsInfo clone() {return new LogisticsInfo(this);}public long getWarehouseId() {return this.warehouseId;}public LogisticsInfo setWarehouseId(long warehouseId) {this.warehouseId = warehouseId;setWarehouseIdIsSet(true);return this;}public void unsetWarehouseId() {__isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);}/** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */public boolean isSetWarehouseId() {return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);}public void setWarehouseIdIsSet(boolean value) {__isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);}public long getProviderId() {return this.providerId;}public LogisticsInfo setProviderId(long providerId) {this.providerId = providerId;setProviderIdIsSet(true);return this;}public void unsetProviderId() {__isset_bit_vector.clear(__PROVIDERID_ISSET_ID);}/** Returns true if field providerId is set (has been asigned 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 getDeliveryTime() {return this.deliveryTime;}public LogisticsInfo setDeliveryTime(long deliveryTime) {this.deliveryTime = deliveryTime;setDeliveryTimeIsSet(true);return this;}public void unsetDeliveryTime() {__isset_bit_vector.clear(__DELIVERYTIME_ISSET_ID);}/** Returns true if field deliveryTime is set (has been asigned a value) and false otherwise */public boolean isSetDeliveryTime() {return __isset_bit_vector.get(__DELIVERYTIME_ISSET_ID);}public void setDeliveryTimeIsSet(boolean value) {__isset_bit_vector.set(__DELIVERYTIME_ISSET_ID, value);}public String getAirway_billno() {return this.airway_billno;}public LogisticsInfo setAirway_billno(String airway_billno) {this.airway_billno = airway_billno;return this;}public void unsetAirway_billno() {this.airway_billno = null;}/** Returns true if field airway_billno is set (has been asigned a value) and false otherwise */public boolean isSetAirway_billno() {return this.airway_billno != null;}public void setAirway_billnoIsSet(boolean value) {if (!value) {this.airway_billno = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case WAREHOUSE_ID:if (value == null) {unsetWarehouseId();} else {setWarehouseId((Long)value);}break;case PROVIDER_ID:if (value == null) {unsetProviderId();} else {setProviderId((Long)value);}break;case DELIVERY_TIME:if (value == null) {unsetDeliveryTime();} else {setDeliveryTime((Long)value);}break;case AIRWAY_BILLNO:if (value == null) {unsetAirway_billno();} else {setAirway_billno((String)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case WAREHOUSE_ID:return new Long(getWarehouseId());case PROVIDER_ID:return new Long(getProviderId());case DELIVERY_TIME:return new Long(getDeliveryTime());case AIRWAY_BILLNO:return getAirway_billno();}throw new IllegalStateException();}public Object getFieldValue(int fieldId) {return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));}/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */public boolean isSet(_Fields field) {switch (field) {case WAREHOUSE_ID:return isSetWarehouseId();case PROVIDER_ID:return isSetProviderId();case DELIVERY_TIME:return isSetDeliveryTime();case AIRWAY_BILLNO:return isSetAirway_billno();}throw new IllegalStateException();}public boolean isSet(int fieldID) {return isSet(_Fields.findByThriftIdOrThrow(fieldID));}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof LogisticsInfo)return this.equals((LogisticsInfo)that);return false;}public boolean equals(LogisticsInfo that) {if (that == null)return false;boolean this_present_warehouseId = true;boolean that_present_warehouseId = true;if (this_present_warehouseId || that_present_warehouseId) {if (!(this_present_warehouseId && that_present_warehouseId))return false;if (this.warehouseId != that.warehouseId)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_deliveryTime = true;boolean that_present_deliveryTime = true;if (this_present_deliveryTime || that_present_deliveryTime) {if (!(this_present_deliveryTime && that_present_deliveryTime))return false;if (this.deliveryTime != that.deliveryTime)return false;}boolean this_present_airway_billno = true && this.isSetAirway_billno();boolean that_present_airway_billno = true && that.isSetAirway_billno();if (this_present_airway_billno || that_present_airway_billno) {if (!(this_present_airway_billno && that_present_airway_billno))return false;if (!this.airway_billno.equals(that.airway_billno))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(LogisticsInfo other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;LogisticsInfo typedOther = (LogisticsInfo)other;lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetDeliveryTime()).compareTo(isSetDeliveryTime());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(deliveryTime, typedOther.deliveryTime);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetAirway_billno()).compareTo(isSetAirway_billno());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(airway_billno, typedOther.airway_billno);if (lastComparison != 0) {return lastComparison;}return 0;}public void read(TProtocol iprot) throws TException {TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == TType.STOP) {break;}_Fields fieldId = _Fields.findByThriftId(field.id);if (fieldId == null) {TProtocolUtil.skip(iprot, field.type);} else {switch (fieldId) {case WAREHOUSE_ID:if (field.type == TType.I64) {this.warehouseId = iprot.readI64();setWarehouseIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case PROVIDER_ID:if (field.type == TType.I64) {this.providerId = iprot.readI64();setProviderIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case DELIVERY_TIME:if (field.type == TType.I64) {this.deliveryTime = iprot.readI64();setDeliveryTimeIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case AIRWAY_BILLNO:if (field.type == TType.STRING) {this.airway_billno = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);oprot.writeI64(this.warehouseId);oprot.writeFieldEnd();oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);oprot.writeI64(this.providerId);oprot.writeFieldEnd();oprot.writeFieldBegin(DELIVERY_TIME_FIELD_DESC);oprot.writeI64(this.deliveryTime);oprot.writeFieldEnd();if (this.airway_billno != null) {oprot.writeFieldBegin(AIRWAY_BILLNO_FIELD_DESC);oprot.writeString(this.airway_billno);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("LogisticsInfo(");boolean first = true;sb.append("warehouseId:");sb.append(this.warehouseId);first = false;if (!first) sb.append(", ");sb.append("providerId:");sb.append(this.providerId);first = false;if (!first) sb.append(", ");sb.append("deliveryTime:");sb.append(this.deliveryTime);first = false;if (!first) sb.append(", ");sb.append("airway_billno:");if (this.airway_billno == null) {sb.append("null");} else {sb.append(this.airway_billno);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}