public CommentDto(Comment comment) { requireNonNull(comment, "comment"); content = comment.getContent(); markup = comment.getMarkup().name(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_content = true && (isSetContent()); list.add(present_content); if (present_content) list.add(content); boolean present_markup = true && (isSetMarkup()); list.add(present_markup); if (present_markup) list.add(markup.getValue()); return list.hashCode(); }
case 2: // MARKUP if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.markup = com.linecorp.centraldogma.internal.thrift.Markup.findByValue(iprot.readI32()); struct.setMarkupIsSet(true); } else {
public boolean equals(Comment that) { if (that == null) return false; boolean this_present_content = true && this.isSetContent(); boolean that_present_content = true && that.isSetContent(); if (this_present_content || that_present_content) { if (!(this_present_content && that_present_content)) return false; if (!this.content.equals(that.content)) return false; } boolean this_present_markup = true && this.isSetMarkup(); boolean that_present_markup = true && that.isSetMarkup(); if (this_present_markup || that_present_markup) { if (!(this_present_markup && that_present_markup)) return false; if (!this.markup.equals(that.markup)) return false; } return true; }
case 2: // MARKUP if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.markup = com.linecorp.centraldogma.internal.thrift.Markup.findByValue(iprot.readI32()); struct.setMarkupIsSet(true); } else {
public boolean equals(Comment that) { if (that == null) return false; boolean this_present_content = true && this.isSetContent(); boolean that_present_content = true && that.isSetContent(); if (this_present_content || that_present_content) { if (!(this_present_content && that_present_content)) return false; if (!this.content.equals(that.content)) return false; } boolean this_present_markup = true && this.isSetMarkup(); boolean that_present_markup = true && that.isSetMarkup(); if (this_present_markup || that_present_markup) { if (!(this_present_markup && that_present_markup)) return false; if (!this.markup.equals(that.markup)) return false; } return true; }
public CommentDto(Comment comment) { requireNonNull(comment, "comment"); content = comment.getContent(); markup = comment.getMarkup().name(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_content = true && (isSetContent()); list.add(present_content); if (present_content) list.add(content); boolean present_markup = true && (isSetMarkup()); list.add(present_markup); if (present_markup) list.add(markup.getValue()); return list.hashCode(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Comment struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.content = iprot.readString(); struct.setContentIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.markup = com.linecorp.centraldogma.internal.thrift.Markup.findByValue(iprot.readI32()); struct.setMarkupIsSet(true); } } }
public CommentDto(Comment comment) { requireNonNull(comment, "comment"); content = comment.getContent(); markup = comment.getMarkup().name(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Comment struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.content != null) { oprot.writeFieldBegin(CONTENT_FIELD_DESC); oprot.writeString(struct.content); oprot.writeFieldEnd(); } if (struct.markup != null) { if (struct.isSetMarkup()) { oprot.writeFieldBegin(MARKUP_FIELD_DESC); oprot.writeI32(struct.markup.getValue()); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Comment struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.content = iprot.readString(); struct.setContentIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.markup = com.linecorp.centraldogma.internal.thrift.Markup.findByValue(iprot.readI32()); struct.setMarkupIsSet(true); } } }
@Override protected com.linecorp.centraldogma.common.Commit doBackward(Commit commit) { final Markup markup = Markup.valueOf(commit.getDetail().getMarkup().name()); return new com.linecorp.centraldogma.common.Commit( RevisionConverter.TO_MODEL.convert(commit.getRevision()), AuthorConverter.TO_MODEL.convert(commit.getAuthor()), Instant.parse(commit.getTimestamp()).toEpochMilli(), commit.getSummary(), commit.getDetail().getContent(), markup); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, Comment struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.content != null) { oprot.writeFieldBegin(CONTENT_FIELD_DESC); oprot.writeString(struct.content); oprot.writeFieldEnd(); } if (struct.markup != null) { if (struct.isSetMarkup()) { oprot.writeFieldBegin(MARKUP_FIELD_DESC); oprot.writeI32(struct.markup.getValue()); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override protected com.linecorp.centraldogma.common.Commit doBackward(Commit commit) { final Markup markup = Markup.valueOf(commit.getDetail().getMarkup().name()); return new com.linecorp.centraldogma.common.Commit( RevisionConverter.TO_MODEL.convert(commit.getRevision()), AuthorConverter.TO_MODEL.convert(commit.getAuthor()), Instant.parse(commit.getTimestamp()).toEpochMilli(), commit.getSummary(), commit.getDetail().getContent(), markup); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Comment struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.content); BitSet optionals = new BitSet(); if (struct.isSetMarkup()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetMarkup()) { oprot.writeI32(struct.markup.getValue()); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Comment struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.content); BitSet optionals = new BitSet(); if (struct.isSetMarkup()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetMarkup()) { oprot.writeI32(struct.markup.getValue()); } }