Blame | 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.model.v1.catalog;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 PageViewEvents implements org.apache.thrift.TBase<PageViewEvents, PageViewEvents._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PageViewEvents");private static final org.apache.thrift.protocol.TField CATALOG_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("catalogId", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField URL_FIELD_DESC = new org.apache.thrift.protocol.TField("url", org.apache.thrift.protocol.TType.STRING, (short)2);private static final org.apache.thrift.protocol.TField SELLING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("sellingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)3);private static final org.apache.thrift.protocol.TField COMING_SOON_FIELD_DESC = new org.apache.thrift.protocol.TField("comingSoon", org.apache.thrift.protocol.TType.BOOL, (short)4);private static final org.apache.thrift.protocol.TField IP_FIELD_DESC = new org.apache.thrift.protocol.TField("ip", org.apache.thrift.protocol.TType.STRING, (short)5);private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)6);private static final org.apache.thrift.protocol.TField EVENT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventDate", org.apache.thrift.protocol.TType.I64, (short)7);private long catalogId; // requiredprivate String url; // requiredprivate double sellingPrice; // requiredprivate boolean comingSoon; // requiredprivate String ip; // requiredprivate String sessionId; // requiredprivate long eventDate; // 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 {CATALOG_ID((short)1, "catalogId"),URL((short)2, "url"),SELLING_PRICE((short)3, "sellingPrice"),COMING_SOON((short)4, "comingSoon"),IP((short)5, "ip"),SESSION_ID((short)6, "sessionId"),EVENT_DATE((short)7, "eventDate");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: // CATALOG_IDreturn CATALOG_ID;case 2: // URLreturn URL;case 3: // SELLING_PRICEreturn SELLING_PRICE;case 4: // COMING_SOONreturn COMING_SOON;case 5: // IPreturn IP;case 6: // SESSION_IDreturn SESSION_ID;case 7: // EVENT_DATEreturn EVENT_DATE;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 __CATALOGID_ISSET_ID = 0;private static final int __SELLINGPRICE_ISSET_ID = 1;private static final int __COMINGSOON_ISSET_ID = 2;private static final int __EVENTDATE_ISSET_ID = 3;private BitSet __isset_bit_vector = new BitSet(4);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.CATALOG_ID, new org.apache.thrift.meta_data.FieldMetaData("catalogId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.URL, new org.apache.thrift.meta_data.FieldMetaData("url", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SELLING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("sellingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.COMING_SOON, new org.apache.thrift.meta_data.FieldMetaData("comingSoon", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));tmpMap.put(_Fields.IP, new org.apache.thrift.meta_data.FieldMetaData("ip", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.EVENT_DATE, new org.apache.thrift.meta_data.FieldMetaData("eventDate", 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(PageViewEvents.class, metaDataMap);}public PageViewEvents() {}public PageViewEvents(long catalogId,String url,double sellingPrice,boolean comingSoon,String ip,String sessionId,long eventDate){this();this.catalogId = catalogId;setCatalogIdIsSet(true);this.url = url;this.sellingPrice = sellingPrice;setSellingPriceIsSet(true);this.comingSoon = comingSoon;setComingSoonIsSet(true);this.ip = ip;this.sessionId = sessionId;this.eventDate = eventDate;setEventDateIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public PageViewEvents(PageViewEvents other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.catalogId = other.catalogId;if (other.isSetUrl()) {this.url = other.url;}this.sellingPrice = other.sellingPrice;this.comingSoon = other.comingSoon;if (other.isSetIp()) {this.ip = other.ip;}if (other.isSetSessionId()) {this.sessionId = other.sessionId;}this.eventDate = other.eventDate;}public PageViewEvents deepCopy() {return new PageViewEvents(this);}@Overridepublic void clear() {setCatalogIdIsSet(false);this.catalogId = 0;this.url = null;setSellingPriceIsSet(false);this.sellingPrice = 0.0;setComingSoonIsSet(false);this.comingSoon = false;this.ip = null;this.sessionId = null;setEventDateIsSet(false);this.eventDate = 0;}public long getCatalogId() {return this.catalogId;}public void setCatalogId(long catalogId) {this.catalogId = catalogId;setCatalogIdIsSet(true);}public void unsetCatalogId() {__isset_bit_vector.clear(__CATALOGID_ISSET_ID);}/** Returns true if field catalogId is set (has been assigned a value) and false otherwise */public boolean isSetCatalogId() {return __isset_bit_vector.get(__CATALOGID_ISSET_ID);}public void setCatalogIdIsSet(boolean value) {__isset_bit_vector.set(__CATALOGID_ISSET_ID, value);}public String getUrl() {return this.url;}public void setUrl(String url) {this.url = url;}public void unsetUrl() {this.url = null;}/** Returns true if field url is set (has been assigned a value) and false otherwise */public boolean isSetUrl() {return this.url != null;}public void setUrlIsSet(boolean value) {if (!value) {this.url = null;}}public double getSellingPrice() {return this.sellingPrice;}public void setSellingPrice(double sellingPrice) {this.sellingPrice = sellingPrice;setSellingPriceIsSet(true);}public void unsetSellingPrice() {__isset_bit_vector.clear(__SELLINGPRICE_ISSET_ID);}/** Returns true if field sellingPrice is set (has been assigned a value) and false otherwise */public boolean isSetSellingPrice() {return __isset_bit_vector.get(__SELLINGPRICE_ISSET_ID);}public void setSellingPriceIsSet(boolean value) {__isset_bit_vector.set(__SELLINGPRICE_ISSET_ID, value);}public boolean isComingSoon() {return this.comingSoon;}public void setComingSoon(boolean comingSoon) {this.comingSoon = comingSoon;setComingSoonIsSet(true);}public void unsetComingSoon() {__isset_bit_vector.clear(__COMINGSOON_ISSET_ID);}/** Returns true if field comingSoon is set (has been assigned a value) and false otherwise */public boolean isSetComingSoon() {return __isset_bit_vector.get(__COMINGSOON_ISSET_ID);}public void setComingSoonIsSet(boolean value) {__isset_bit_vector.set(__COMINGSOON_ISSET_ID, value);}public String getIp() {return this.ip;}public void setIp(String ip) {this.ip = ip;}public void unsetIp() {this.ip = null;}/** Returns true if field ip is set (has been assigned a value) and false otherwise */public boolean isSetIp() {return this.ip != null;}public void setIpIsSet(boolean value) {if (!value) {this.ip = null;}}public String getSessionId() {return this.sessionId;}public void setSessionId(String sessionId) {this.sessionId = sessionId;}public void unsetSessionId() {this.sessionId = null;}/** Returns true if field sessionId is set (has been assigned a value) and false otherwise */public boolean isSetSessionId() {return this.sessionId != null;}public void setSessionIdIsSet(boolean value) {if (!value) {this.sessionId = null;}}public long getEventDate() {return this.eventDate;}public void setEventDate(long eventDate) {this.eventDate = eventDate;setEventDateIsSet(true);}public void unsetEventDate() {__isset_bit_vector.clear(__EVENTDATE_ISSET_ID);}/** Returns true if field eventDate is set (has been assigned a value) and false otherwise */public boolean isSetEventDate() {return __isset_bit_vector.get(__EVENTDATE_ISSET_ID);}public void setEventDateIsSet(boolean value) {__isset_bit_vector.set(__EVENTDATE_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case CATALOG_ID:if (value == null) {unsetCatalogId();} else {setCatalogId((Long)value);}break;case URL:if (value == null) {unsetUrl();} else {setUrl((String)value);}break;case SELLING_PRICE:if (value == null) {unsetSellingPrice();} else {setSellingPrice((Double)value);}break;case COMING_SOON:if (value == null) {unsetComingSoon();} else {setComingSoon((Boolean)value);}break;case IP:if (value == null) {unsetIp();} else {setIp((String)value);}break;case SESSION_ID:if (value == null) {unsetSessionId();} else {setSessionId((String)value);}break;case EVENT_DATE:if (value == null) {unsetEventDate();} else {setEventDate((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case CATALOG_ID:return Long.valueOf(getCatalogId());case URL:return getUrl();case SELLING_PRICE:return Double.valueOf(getSellingPrice());case COMING_SOON:return Boolean.valueOf(isComingSoon());case IP:return getIp();case SESSION_ID:return getSessionId();case EVENT_DATE:return Long.valueOf(getEventDate());}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 CATALOG_ID:return isSetCatalogId();case URL:return isSetUrl();case SELLING_PRICE:return isSetSellingPrice();case COMING_SOON:return isSetComingSoon();case IP:return isSetIp();case SESSION_ID:return isSetSessionId();case EVENT_DATE:return isSetEventDate();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof PageViewEvents)return this.equals((PageViewEvents)that);return false;}public boolean equals(PageViewEvents that) {if (that == null)return false;boolean this_present_catalogId = true;boolean that_present_catalogId = true;if (this_present_catalogId || that_present_catalogId) {if (!(this_present_catalogId && that_present_catalogId))return false;if (this.catalogId != that.catalogId)return false;}boolean this_present_url = true && this.isSetUrl();boolean that_present_url = true && that.isSetUrl();if (this_present_url || that_present_url) {if (!(this_present_url && that_present_url))return false;if (!this.url.equals(that.url))return false;}boolean this_present_sellingPrice = true;boolean that_present_sellingPrice = true;if (this_present_sellingPrice || that_present_sellingPrice) {if (!(this_present_sellingPrice && that_present_sellingPrice))return false;if (this.sellingPrice != that.sellingPrice)return false;}boolean this_present_comingSoon = true;boolean that_present_comingSoon = true;if (this_present_comingSoon || that_present_comingSoon) {if (!(this_present_comingSoon && that_present_comingSoon))return false;if (this.comingSoon != that.comingSoon)return false;}boolean this_present_ip = true && this.isSetIp();boolean that_present_ip = true && that.isSetIp();if (this_present_ip || that_present_ip) {if (!(this_present_ip && that_present_ip))return false;if (!this.ip.equals(that.ip))return false;}boolean this_present_sessionId = true && this.isSetSessionId();boolean that_present_sessionId = true && that.isSetSessionId();if (this_present_sessionId || that_present_sessionId) {if (!(this_present_sessionId && that_present_sessionId))return false;if (!this.sessionId.equals(that.sessionId))return false;}boolean this_present_eventDate = true;boolean that_present_eventDate = true;if (this_present_eventDate || that_present_eventDate) {if (!(this_present_eventDate && that_present_eventDate))return false;if (this.eventDate != that.eventDate)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(PageViewEvents other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;PageViewEvents typedOther = (PageViewEvents)other;lastComparison = Boolean.valueOf(isSetCatalogId()).compareTo(typedOther.isSetCatalogId());if (lastComparison != 0) {return lastComparison;}if (isSetCatalogId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogId, typedOther.catalogId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetUrl()).compareTo(typedOther.isSetUrl());if (lastComparison != 0) {return lastComparison;}if (isSetUrl()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.url, typedOther.url);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSellingPrice()).compareTo(typedOther.isSetSellingPrice());if (lastComparison != 0) {return lastComparison;}if (isSetSellingPrice()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sellingPrice, typedOther.sellingPrice);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetComingSoon()).compareTo(typedOther.isSetComingSoon());if (lastComparison != 0) {return lastComparison;}if (isSetComingSoon()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comingSoon, typedOther.comingSoon);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetIp()).compareTo(typedOther.isSetIp());if (lastComparison != 0) {return lastComparison;}if (isSetIp()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ip, typedOther.ip);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId());if (lastComparison != 0) {return lastComparison;}if (isSetSessionId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetEventDate()).compareTo(typedOther.isSetEventDate());if (lastComparison != 0) {return lastComparison;}if (isSetEventDate()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventDate, typedOther.eventDate);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: // CATALOG_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.catalogId = iprot.readI64();setCatalogIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // URLif (field.type == org.apache.thrift.protocol.TType.STRING) {this.url = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // SELLING_PRICEif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.sellingPrice = iprot.readDouble();setSellingPriceIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // COMING_SOONif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.comingSoon = iprot.readBool();setComingSoonIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // IPif (field.type == org.apache.thrift.protocol.TType.STRING) {this.ip = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // SESSION_IDif (field.type == org.apache.thrift.protocol.TType.STRING) {this.sessionId = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // EVENT_DATEif (field.type == org.apache.thrift.protocol.TType.I64) {this.eventDate = iprot.readI64();setEventDateIsSet(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(CATALOG_ID_FIELD_DESC);oprot.writeI64(this.catalogId);oprot.writeFieldEnd();if (this.url != null) {oprot.writeFieldBegin(URL_FIELD_DESC);oprot.writeString(this.url);oprot.writeFieldEnd();}oprot.writeFieldBegin(SELLING_PRICE_FIELD_DESC);oprot.writeDouble(this.sellingPrice);oprot.writeFieldEnd();oprot.writeFieldBegin(COMING_SOON_FIELD_DESC);oprot.writeBool(this.comingSoon);oprot.writeFieldEnd();if (this.ip != null) {oprot.writeFieldBegin(IP_FIELD_DESC);oprot.writeString(this.ip);oprot.writeFieldEnd();}if (this.sessionId != null) {oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);oprot.writeString(this.sessionId);oprot.writeFieldEnd();}oprot.writeFieldBegin(EVENT_DATE_FIELD_DESC);oprot.writeI64(this.eventDate);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("PageViewEvents(");boolean first = true;sb.append("catalogId:");sb.append(this.catalogId);first = false;if (!first) sb.append(", ");sb.append("url:");if (this.url == null) {sb.append("null");} else {sb.append(this.url);}first = false;if (!first) sb.append(", ");sb.append("sellingPrice:");sb.append(this.sellingPrice);first = false;if (!first) sb.append(", ");sb.append("comingSoon:");sb.append(this.comingSoon);first = false;if (!first) sb.append(", ");sb.append("ip:");if (this.ip == null) {sb.append("null");} else {sb.append(this.ip);}first = false;if (!first) sb.append(", ");sb.append("sessionId:");if (this.sessionId == null) {sb.append("null");} else {sb.append(this.sessionId);}first = false;if (!first) sb.append(", ");sb.append("eventDate:");sb.append(this.eventDate);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);}}}