public TArticle( String title, String content, String summary, long publishTime, String originalUrl, String articleFrom, int articleType, int topDay, List<TImageItem> imageItems, String articleUuid) { this(); this.title = title; this.content = content; this.summary = summary; this.publishTime = publishTime; setPublishTimeIsSet(true); this.originalUrl = originalUrl; this.articleFrom = articleFrom; this.articleType = articleType; setArticleTypeIsSet(true); this.topDay = topDay; setTopDayIsSet(true); this.imageItems = imageItems; this.articleUuid = articleUuid; }
@Override public void clear() { this.title = null; this.content = null; this.summary = null; setPublishTimeIsSet(false); this.publishTime = 0; this.originalUrl = null; this.articleFrom = null; setArticleTypeIsSet(false); this.articleType = 0; setTopDayIsSet(false); this.topDay = 0; this.imageItems = null; this.articleUuid = ""; }
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: // TITLE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.title = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // CONTENT if (field.type == org.apache.thrift.protocol.TType.STRING) { this.content = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // SUMMARY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.summary = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // PUBLISH_TIME if (field.type == org.apache.thrift.protocol.TType.I64) { this.publishTime = iprot.readI64(); setPublishTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // ORIGINAL_URL if (field.type == org.apache.thrift.protocol.TType.STRING) { this.originalUrl = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 7: // ARTICLE_FROM if (field.type == org.apache.thrift.protocol.TType.STRING) { this.articleFrom = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 8: // ARTICLE_TYPE if (field.type == org.apache.thrift.protocol.TType.I32) { this.articleType = iprot.readI32(); setArticleTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 9: // TOP_DAY if (field.type == org.apache.thrift.protocol.TType.I32) { this.topDay = iprot.readI32(); setTopDayIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 10: // IMAGE_ITEMS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); this.imageItems = new ArrayList<TImageItem>(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { TImageItem _elem10; // required _elem10 = new TImageItem(); _elem10.read(iprot); this.imageItems.add(_elem10); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 11: // ARTICLE_UUID if (field.type == org.apache.thrift.protocol.TType.STRING) { this.articleUuid = 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(); // check for required fields of primitive type, which can't be checked in the validate method validate(); }
public TArticle setPublishTime(long publishTime) { this.publishTime = publishTime; setPublishTimeIsSet(true); return this; }