Rev 3106 | 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.crm;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 Activity implements TBase<Activity._Fields>, java.io.Serializable, Cloneable, Comparable<Activity> {private static final TStruct STRUCT_DESC = new TStruct("Activity");private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)2);private static final TField CONTACT_TIMESTAMP_FIELD_DESC = new TField("contactTimestamp", TType.I64, (short)3);private static final TField CONTACT_MEDIUM_FIELD_DESC = new TField("contactMedium", TType.I32, (short)4);private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)5);private static final TField CREATOR_ID_FIELD_DESC = new TField("creatorId", TType.I64, (short)6);private static final TField CONTACTING_AGENT_ID_FIELD_DESC = new TField("contactingAgentId", TType.I64, (short)7);private static final TField TICKET_ID_FIELD_DESC = new TField("ticketId", TType.I64, (short)8);private static final TField TICKET_PRIORITY_FIELD_DESC = new TField("ticketPriority", TType.I32, (short)9);private static final TField TICKET_ASSIGNEE_ID_FIELD_DESC = new TField("ticketAssigneeId", TType.I64, (short)10);private static final TField TICKET_STATUS_FIELD_DESC = new TField("ticketStatus", TType.I32, (short)11);private static final TField TICKET_CATEGORY_FIELD_DESC = new TField("ticketCategory", TType.I32, (short)12);private long id;private String description;private long contactTimestamp;private ContactMedium contactMedium;private long customerId;private long creatorId;private long contactingAgentId;private long ticketId;private TicketPriority ticketPriority;private long ticketAssigneeId;private TicketStatus ticketStatus;private TicketCategory ticketCategory;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {ID((short)1, "id"),DESCRIPTION((short)2, "description"),CONTACT_TIMESTAMP((short)3, "contactTimestamp"),/**** @see ContactMedium*/CONTACT_MEDIUM((short)4, "contactMedium"),CUSTOMER_ID((short)5, "customerId"),CREATOR_ID((short)6, "creatorId"),CONTACTING_AGENT_ID((short)7, "contactingAgentId"),TICKET_ID((short)8, "ticketId"),/**** @see TicketPriority*/TICKET_PRIORITY((short)9, "ticketPriority"),TICKET_ASSIGNEE_ID((short)10, "ticketAssigneeId"),/**** @see TicketStatus*/TICKET_STATUS((short)11, "ticketStatus"),/**** @see TicketCategory*/TICKET_CATEGORY((short)12, "ticketCategory");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 __ID_ISSET_ID = 0;private static final int __CONTACTTIMESTAMP_ISSET_ID = 1;private static final int __CUSTOMERID_ISSET_ID = 2;private static final int __CREATORID_ISSET_ID = 3;private static final int __CONTACTINGAGENTID_ISSET_ID = 4;private static final int __TICKETID_ISSET_ID = 5;private static final int __TICKETASSIGNEEID_ISSET_ID = 6;private BitSet __isset_bit_vector = new BitSet(7);public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.CONTACT_TIMESTAMP, new FieldMetaData("contactTimestamp", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.CONTACT_MEDIUM, new FieldMetaData("contactMedium", TFieldRequirementType.DEFAULT,new EnumMetaData(TType.ENUM, ContactMedium.class)));put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.CREATOR_ID, new FieldMetaData("creatorId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.CONTACTING_AGENT_ID, new FieldMetaData("contactingAgentId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.TICKET_ID, new FieldMetaData("ticketId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.TICKET_PRIORITY, new FieldMetaData("ticketPriority", TFieldRequirementType.DEFAULT,new EnumMetaData(TType.ENUM, TicketPriority.class)));put(_Fields.TICKET_ASSIGNEE_ID, new FieldMetaData("ticketAssigneeId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.TICKET_STATUS, new FieldMetaData("ticketStatus", TFieldRequirementType.DEFAULT,new EnumMetaData(TType.ENUM, TicketStatus.class)));put(_Fields.TICKET_CATEGORY, new FieldMetaData("ticketCategory", TFieldRequirementType.DEFAULT,new EnumMetaData(TType.ENUM, TicketCategory.class)));}});static {FieldMetaData.addStructMetaDataMap(Activity.class, metaDataMap);}public Activity() {}public Activity(long id,String description,long contactTimestamp,ContactMedium contactMedium,long customerId,long creatorId,long contactingAgentId,long ticketId,TicketPriority ticketPriority,long ticketAssigneeId,TicketStatus ticketStatus,TicketCategory ticketCategory){this();this.id = id;setIdIsSet(true);this.description = description;this.contactTimestamp = contactTimestamp;setContactTimestampIsSet(true);this.contactMedium = contactMedium;this.customerId = customerId;setCustomerIdIsSet(true);this.creatorId = creatorId;setCreatorIdIsSet(true);this.contactingAgentId = contactingAgentId;setContactingAgentIdIsSet(true);this.ticketId = ticketId;setTicketIdIsSet(true);this.ticketPriority = ticketPriority;this.ticketAssigneeId = ticketAssigneeId;setTicketAssigneeIdIsSet(true);this.ticketStatus = ticketStatus;this.ticketCategory = ticketCategory;}/*** Performs a deep copy on <i>other</i>.*/public Activity(Activity other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;if (other.isSetDescription()) {this.description = other.description;}this.contactTimestamp = other.contactTimestamp;if (other.isSetContactMedium()) {this.contactMedium = other.contactMedium;}this.customerId = other.customerId;this.creatorId = other.creatorId;this.contactingAgentId = other.contactingAgentId;this.ticketId = other.ticketId;if (other.isSetTicketPriority()) {this.ticketPriority = other.ticketPriority;}this.ticketAssigneeId = other.ticketAssigneeId;if (other.isSetTicketStatus()) {this.ticketStatus = other.ticketStatus;}if (other.isSetTicketCategory()) {this.ticketCategory = other.ticketCategory;}}public Activity deepCopy() {return new Activity(this);}@Deprecatedpublic Activity clone() {return new Activity(this);}public long getId() {return this.id;}public Activity setId(long id) {this.id = id;setIdIsSet(true);return this;}public void unsetId() {__isset_bit_vector.clear(__ID_ISSET_ID);}/** Returns true if field id is set (has been asigned 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 String getDescription() {return this.description;}public Activity setDescription(String description) {this.description = description;return this;}public void unsetDescription() {this.description = null;}/** Returns true if field description is set (has been asigned a value) and false otherwise */public boolean isSetDescription() {return this.description != null;}public void setDescriptionIsSet(boolean value) {if (!value) {this.description = null;}}public long getContactTimestamp() {return this.contactTimestamp;}public Activity setContactTimestamp(long contactTimestamp) {this.contactTimestamp = contactTimestamp;setContactTimestampIsSet(true);return this;}public void unsetContactTimestamp() {__isset_bit_vector.clear(__CONTACTTIMESTAMP_ISSET_ID);}/** Returns true if field contactTimestamp is set (has been asigned a value) and false otherwise */public boolean isSetContactTimestamp() {return __isset_bit_vector.get(__CONTACTTIMESTAMP_ISSET_ID);}public void setContactTimestampIsSet(boolean value) {__isset_bit_vector.set(__CONTACTTIMESTAMP_ISSET_ID, value);}/**** @see ContactMedium*/public ContactMedium getContactMedium() {return this.contactMedium;}/**** @see ContactMedium*/public Activity setContactMedium(ContactMedium contactMedium) {this.contactMedium = contactMedium;return this;}public void unsetContactMedium() {this.contactMedium = null;}/** Returns true if field contactMedium is set (has been asigned a value) and false otherwise */public boolean isSetContactMedium() {return this.contactMedium != null;}public void setContactMediumIsSet(boolean value) {if (!value) {this.contactMedium = null;}}public long getCustomerId() {return this.customerId;}public Activity setCustomerId(long customerId) {this.customerId = customerId;setCustomerIdIsSet(true);return this;}public void unsetCustomerId() {__isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);}/** Returns true if field customerId is set (has been asigned a value) and false otherwise */public boolean isSetCustomerId() {return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);}public void setCustomerIdIsSet(boolean value) {__isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);}public long getCreatorId() {return this.creatorId;}public Activity setCreatorId(long creatorId) {this.creatorId = creatorId;setCreatorIdIsSet(true);return this;}public void unsetCreatorId() {__isset_bit_vector.clear(__CREATORID_ISSET_ID);}/** Returns true if field creatorId is set (has been asigned a value) and false otherwise */public boolean isSetCreatorId() {return __isset_bit_vector.get(__CREATORID_ISSET_ID);}public void setCreatorIdIsSet(boolean value) {__isset_bit_vector.set(__CREATORID_ISSET_ID, value);}public long getContactingAgentId() {return this.contactingAgentId;}public Activity setContactingAgentId(long contactingAgentId) {this.contactingAgentId = contactingAgentId;setContactingAgentIdIsSet(true);return this;}public void unsetContactingAgentId() {__isset_bit_vector.clear(__CONTACTINGAGENTID_ISSET_ID);}/** Returns true if field contactingAgentId is set (has been asigned a value) and false otherwise */public boolean isSetContactingAgentId() {return __isset_bit_vector.get(__CONTACTINGAGENTID_ISSET_ID);}public void setContactingAgentIdIsSet(boolean value) {__isset_bit_vector.set(__CONTACTINGAGENTID_ISSET_ID, value);}public long getTicketId() {return this.ticketId;}public Activity setTicketId(long ticketId) {this.ticketId = ticketId;setTicketIdIsSet(true);return this;}public void unsetTicketId() {__isset_bit_vector.clear(__TICKETID_ISSET_ID);}/** Returns true if field ticketId is set (has been asigned a value) and false otherwise */public boolean isSetTicketId() {return __isset_bit_vector.get(__TICKETID_ISSET_ID);}public void setTicketIdIsSet(boolean value) {__isset_bit_vector.set(__TICKETID_ISSET_ID, value);}/**** @see TicketPriority*/public TicketPriority getTicketPriority() {return this.ticketPriority;}/**** @see TicketPriority*/public Activity setTicketPriority(TicketPriority ticketPriority) {this.ticketPriority = ticketPriority;return this;}public void unsetTicketPriority() {this.ticketPriority = null;}/** Returns true if field ticketPriority is set (has been asigned a value) and false otherwise */public boolean isSetTicketPriority() {return this.ticketPriority != null;}public void setTicketPriorityIsSet(boolean value) {if (!value) {this.ticketPriority = null;}}public long getTicketAssigneeId() {return this.ticketAssigneeId;}public Activity setTicketAssigneeId(long ticketAssigneeId) {this.ticketAssigneeId = ticketAssigneeId;setTicketAssigneeIdIsSet(true);return this;}public void unsetTicketAssigneeId() {__isset_bit_vector.clear(__TICKETASSIGNEEID_ISSET_ID);}/** Returns true if field ticketAssigneeId is set (has been asigned a value) and false otherwise */public boolean isSetTicketAssigneeId() {return __isset_bit_vector.get(__TICKETASSIGNEEID_ISSET_ID);}public void setTicketAssigneeIdIsSet(boolean value) {__isset_bit_vector.set(__TICKETASSIGNEEID_ISSET_ID, value);}/**** @see TicketStatus*/public TicketStatus getTicketStatus() {return this.ticketStatus;}/**** @see TicketStatus*/public Activity setTicketStatus(TicketStatus ticketStatus) {this.ticketStatus = ticketStatus;return this;}public void unsetTicketStatus() {this.ticketStatus = null;}/** Returns true if field ticketStatus is set (has been asigned a value) and false otherwise */public boolean isSetTicketStatus() {return this.ticketStatus != null;}public void setTicketStatusIsSet(boolean value) {if (!value) {this.ticketStatus = null;}}/**** @see TicketCategory*/public TicketCategory getTicketCategory() {return this.ticketCategory;}/**** @see TicketCategory*/public Activity setTicketCategory(TicketCategory ticketCategory) {this.ticketCategory = ticketCategory;return this;}public void unsetTicketCategory() {this.ticketCategory = null;}/** Returns true if field ticketCategory is set (has been asigned a value) and false otherwise */public boolean isSetTicketCategory() {return this.ticketCategory != null;}public void setTicketCategoryIsSet(boolean value) {if (!value) {this.ticketCategory = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;case DESCRIPTION:if (value == null) {unsetDescription();} else {setDescription((String)value);}break;case CONTACT_TIMESTAMP:if (value == null) {unsetContactTimestamp();} else {setContactTimestamp((Long)value);}break;case CONTACT_MEDIUM:if (value == null) {unsetContactMedium();} else {setContactMedium((ContactMedium)value);}break;case CUSTOMER_ID:if (value == null) {unsetCustomerId();} else {setCustomerId((Long)value);}break;case CREATOR_ID:if (value == null) {unsetCreatorId();} else {setCreatorId((Long)value);}break;case CONTACTING_AGENT_ID:if (value == null) {unsetContactingAgentId();} else {setContactingAgentId((Long)value);}break;case TICKET_ID:if (value == null) {unsetTicketId();} else {setTicketId((Long)value);}break;case TICKET_PRIORITY:if (value == null) {unsetTicketPriority();} else {setTicketPriority((TicketPriority)value);}break;case TICKET_ASSIGNEE_ID:if (value == null) {unsetTicketAssigneeId();} else {setTicketAssigneeId((Long)value);}break;case TICKET_STATUS:if (value == null) {unsetTicketStatus();} else {setTicketStatus((TicketStatus)value);}break;case TICKET_CATEGORY:if (value == null) {unsetTicketCategory();} else {setTicketCategory((TicketCategory)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case ID:return new Long(getId());case DESCRIPTION:return getDescription();case CONTACT_TIMESTAMP:return new Long(getContactTimestamp());case CONTACT_MEDIUM:return getContactMedium();case CUSTOMER_ID:return new Long(getCustomerId());case CREATOR_ID:return new Long(getCreatorId());case CONTACTING_AGENT_ID:return new Long(getContactingAgentId());case TICKET_ID:return new Long(getTicketId());case TICKET_PRIORITY:return getTicketPriority();case TICKET_ASSIGNEE_ID:return new Long(getTicketAssigneeId());case TICKET_STATUS:return getTicketStatus();case TICKET_CATEGORY:return getTicketCategory();}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 ID:return isSetId();case DESCRIPTION:return isSetDescription();case CONTACT_TIMESTAMP:return isSetContactTimestamp();case CONTACT_MEDIUM:return isSetContactMedium();case CUSTOMER_ID:return isSetCustomerId();case CREATOR_ID:return isSetCreatorId();case CONTACTING_AGENT_ID:return isSetContactingAgentId();case TICKET_ID:return isSetTicketId();case TICKET_PRIORITY:return isSetTicketPriority();case TICKET_ASSIGNEE_ID:return isSetTicketAssigneeId();case TICKET_STATUS:return isSetTicketStatus();case TICKET_CATEGORY:return isSetTicketCategory();}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 Activity)return this.equals((Activity)that);return false;}public boolean equals(Activity 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_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_contactTimestamp = true;boolean that_present_contactTimestamp = true;if (this_present_contactTimestamp || that_present_contactTimestamp) {if (!(this_present_contactTimestamp && that_present_contactTimestamp))return false;if (this.contactTimestamp != that.contactTimestamp)return false;}boolean this_present_contactMedium = true && this.isSetContactMedium();boolean that_present_contactMedium = true && that.isSetContactMedium();if (this_present_contactMedium || that_present_contactMedium) {if (!(this_present_contactMedium && that_present_contactMedium))return false;if (!this.contactMedium.equals(that.contactMedium))return false;}boolean this_present_customerId = true;boolean that_present_customerId = true;if (this_present_customerId || that_present_customerId) {if (!(this_present_customerId && that_present_customerId))return false;if (this.customerId != that.customerId)return false;}boolean this_present_creatorId = true;boolean that_present_creatorId = true;if (this_present_creatorId || that_present_creatorId) {if (!(this_present_creatorId && that_present_creatorId))return false;if (this.creatorId != that.creatorId)return false;}boolean this_present_contactingAgentId = true;boolean that_present_contactingAgentId = true;if (this_present_contactingAgentId || that_present_contactingAgentId) {if (!(this_present_contactingAgentId && that_present_contactingAgentId))return false;if (this.contactingAgentId != that.contactingAgentId)return false;}boolean this_present_ticketId = true;boolean that_present_ticketId = true;if (this_present_ticketId || that_present_ticketId) {if (!(this_present_ticketId && that_present_ticketId))return false;if (this.ticketId != that.ticketId)return false;}boolean this_present_ticketPriority = true && this.isSetTicketPriority();boolean that_present_ticketPriority = true && that.isSetTicketPriority();if (this_present_ticketPriority || that_present_ticketPriority) {if (!(this_present_ticketPriority && that_present_ticketPriority))return false;if (!this.ticketPriority.equals(that.ticketPriority))return false;}boolean this_present_ticketAssigneeId = true;boolean that_present_ticketAssigneeId = true;if (this_present_ticketAssigneeId || that_present_ticketAssigneeId) {if (!(this_present_ticketAssigneeId && that_present_ticketAssigneeId))return false;if (this.ticketAssigneeId != that.ticketAssigneeId)return false;}boolean this_present_ticketStatus = true && this.isSetTicketStatus();boolean that_present_ticketStatus = true && that.isSetTicketStatus();if (this_present_ticketStatus || that_present_ticketStatus) {if (!(this_present_ticketStatus && that_present_ticketStatus))return false;if (!this.ticketStatus.equals(that.ticketStatus))return false;}boolean this_present_ticketCategory = true && this.isSetTicketCategory();boolean that_present_ticketCategory = true && that.isSetTicketCategory();if (this_present_ticketCategory || that_present_ticketCategory) {if (!(this_present_ticketCategory && that_present_ticketCategory))return false;if (!this.ticketCategory.equals(that.ticketCategory))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(Activity other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;Activity typedOther = (Activity)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(id, typedOther.id);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(description, typedOther.description);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetContactTimestamp()).compareTo(isSetContactTimestamp());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(contactTimestamp, typedOther.contactTimestamp);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetContactMedium()).compareTo(isSetContactMedium());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(contactMedium, typedOther.contactMedium);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetCreatorId()).compareTo(isSetCreatorId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(creatorId, typedOther.creatorId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetContactingAgentId()).compareTo(isSetContactingAgentId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(contactingAgentId, typedOther.contactingAgentId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetTicketId()).compareTo(isSetTicketId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(ticketId, typedOther.ticketId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetTicketPriority()).compareTo(isSetTicketPriority());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(ticketPriority, typedOther.ticketPriority);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetTicketAssigneeId()).compareTo(isSetTicketAssigneeId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(ticketAssigneeId, typedOther.ticketAssigneeId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetTicketStatus()).compareTo(isSetTicketStatus());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(ticketStatus, typedOther.ticketStatus);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetTicketCategory()).compareTo(isSetTicketCategory());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(ticketCategory, typedOther.ticketCategory);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 ID:if (field.type == TType.I64) {this.id = iprot.readI64();setIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case DESCRIPTION:if (field.type == TType.STRING) {this.description = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case CONTACT_TIMESTAMP:if (field.type == TType.I64) {this.contactTimestamp = iprot.readI64();setContactTimestampIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case CONTACT_MEDIUM:if (field.type == TType.I32) {this.contactMedium = ContactMedium.findByValue(iprot.readI32());} else {TProtocolUtil.skip(iprot, field.type);}break;case CUSTOMER_ID:if (field.type == TType.I64) {this.customerId = iprot.readI64();setCustomerIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case CREATOR_ID:if (field.type == TType.I64) {this.creatorId = iprot.readI64();setCreatorIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case CONTACTING_AGENT_ID:if (field.type == TType.I64) {this.contactingAgentId = iprot.readI64();setContactingAgentIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case TICKET_ID:if (field.type == TType.I64) {this.ticketId = iprot.readI64();setTicketIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case TICKET_PRIORITY:if (field.type == TType.I32) {this.ticketPriority = TicketPriority.findByValue(iprot.readI32());} else {TProtocolUtil.skip(iprot, field.type);}break;case TICKET_ASSIGNEE_ID:if (field.type == TType.I64) {this.ticketAssigneeId = iprot.readI64();setTicketAssigneeIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case TICKET_STATUS:if (field.type == TType.I32) {this.ticketStatus = TicketStatus.findByValue(iprot.readI32());} else {TProtocolUtil.skip(iprot, field.type);}break;case TICKET_CATEGORY:if (field.type == TType.I32) {this.ticketCategory = TicketCategory.findByValue(iprot.readI32());} 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(ID_FIELD_DESC);oprot.writeI64(this.id);oprot.writeFieldEnd();if (this.description != null) {oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);oprot.writeString(this.description);oprot.writeFieldEnd();}oprot.writeFieldBegin(CONTACT_TIMESTAMP_FIELD_DESC);oprot.writeI64(this.contactTimestamp);oprot.writeFieldEnd();if (this.contactMedium != null) {oprot.writeFieldBegin(CONTACT_MEDIUM_FIELD_DESC);oprot.writeI32(this.contactMedium.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);oprot.writeI64(this.customerId);oprot.writeFieldEnd();oprot.writeFieldBegin(CREATOR_ID_FIELD_DESC);oprot.writeI64(this.creatorId);oprot.writeFieldEnd();oprot.writeFieldBegin(CONTACTING_AGENT_ID_FIELD_DESC);oprot.writeI64(this.contactingAgentId);oprot.writeFieldEnd();oprot.writeFieldBegin(TICKET_ID_FIELD_DESC);oprot.writeI64(this.ticketId);oprot.writeFieldEnd();if (this.ticketPriority != null) {oprot.writeFieldBegin(TICKET_PRIORITY_FIELD_DESC);oprot.writeI32(this.ticketPriority.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(TICKET_ASSIGNEE_ID_FIELD_DESC);oprot.writeI64(this.ticketAssigneeId);oprot.writeFieldEnd();if (this.ticketStatus != null) {oprot.writeFieldBegin(TICKET_STATUS_FIELD_DESC);oprot.writeI32(this.ticketStatus.getValue());oprot.writeFieldEnd();}if (this.ticketCategory != null) {oprot.writeFieldBegin(TICKET_CATEGORY_FIELD_DESC);oprot.writeI32(this.ticketCategory.getValue());oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("Activity(");boolean first = true;sb.append("id:");sb.append(this.id);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("contactTimestamp:");sb.append(this.contactTimestamp);first = false;if (!first) sb.append(", ");sb.append("contactMedium:");if (this.contactMedium == null) {sb.append("null");} else {String contactMedium_name = contactMedium.name();if (contactMedium_name != null) {sb.append(contactMedium_name);sb.append(" (");}sb.append(this.contactMedium);if (contactMedium_name != null) {sb.append(")");}}first = false;if (!first) sb.append(", ");sb.append("customerId:");sb.append(this.customerId);first = false;if (!first) sb.append(", ");sb.append("creatorId:");sb.append(this.creatorId);first = false;if (!first) sb.append(", ");sb.append("contactingAgentId:");sb.append(this.contactingAgentId);first = false;if (!first) sb.append(", ");sb.append("ticketId:");sb.append(this.ticketId);first = false;if (!first) sb.append(", ");sb.append("ticketPriority:");if (this.ticketPriority == null) {sb.append("null");} else {String ticketPriority_name = ticketPriority.name();if (ticketPriority_name != null) {sb.append(ticketPriority_name);sb.append(" (");}sb.append(this.ticketPriority);if (ticketPriority_name != null) {sb.append(")");}}first = false;if (!first) sb.append(", ");sb.append("ticketAssigneeId:");sb.append(this.ticketAssigneeId);first = false;if (!first) sb.append(", ");sb.append("ticketStatus:");if (this.ticketStatus == null) {sb.append("null");} else {String ticketStatus_name = ticketStatus.name();if (ticketStatus_name != null) {sb.append(ticketStatus_name);sb.append(" (");}sb.append(this.ticketStatus);if (ticketStatus_name != null) {sb.append(")");}}first = false;if (!first) sb.append(", ");sb.append("ticketCategory:");if (this.ticketCategory == null) {sb.append("null");} else {String ticketCategory_name = ticketCategory.name();if (ticketCategory_name != null) {sb.append(ticketCategory_name);sb.append(" (");}sb.append(this.ticketCategory);if (ticketCategory_name != null) {sb.append(")");}}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}