public Object getFieldValue(_Fields field) { switch (field) { case REVISION: return getRevision(); case AUTHOR: return getAuthor(); case TIMESTAMP: return getTimestamp(); case SUMMARY: return getSummary(); case DETAIL: return getDetail(); case DIFFS: return getDiffs(); } throw new IllegalStateException(); }
public Commit deepCopy() { return new Commit(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Commit) return this.equals((Commit)that); return false; }
/** 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 REVISION: return isSetRevision(); case AUTHOR: return isSetAuthor(); case TIMESTAMP: return isSetTimestamp(); case SUMMARY: return isSetSummary(); case DETAIL: return isSetDetail(); case DIFFS: return isSetDiffs(); } throw new IllegalStateException(); }
@Override protected PushResult doBackward(Commit commit) { return new PushResult(RevisionConverter.TO_MODEL.convert(commit.getRevision()), Instant.parse(commit.getTimestamp()).toEpochMilli()); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Repository struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.name = iprot.readString(); struct.setNameIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.head = new Commit(); struct.head.read(iprot); struct.setHeadIsSet(true); } } }
/** 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 REVISION: return isSetRevision(); case AUTHOR: return isSetAuthor(); case TIMESTAMP: return isSetTimestamp(); case SUMMARY: return isSetSummary(); case DETAIL: return isSetDetail(); case DIFFS: return isSetDiffs(); } throw new IllegalStateException(); }
@Override protected PushResult doBackward(Commit commit) { return new PushResult(RevisionConverter.TO_MODEL.convert(commit.getRevision()), Instant.parse(commit.getTimestamp()).toEpochMilli()); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Repository struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.name = iprot.readString(); struct.setNameIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.head = new Commit(); struct.head.read(iprot); struct.setHeadIsSet(true); } } }
public Object getFieldValue(_Fields field) { switch (field) { case REVISION: return getRevision(); case AUTHOR: return getAuthor(); case TIMESTAMP: return getTimestamp(); case SUMMARY: return getSummary(); case DETAIL: return getDetail(); case DIFFS: return getDiffs(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_revision = true && (isSetRevision()); list.add(present_revision); if (present_revision) list.add(revision); boolean present_author = true && (isSetAuthor()); list.add(present_author); if (present_author) list.add(author); boolean present_timestamp = true && (isSetTimestamp()); list.add(present_timestamp); if (present_timestamp) list.add(timestamp); boolean present_summary = true && (isSetSummary()); list.add(present_summary); if (present_summary) list.add(summary); boolean present_detail = true && (isSetDetail()); list.add(present_detail); if (present_detail) list.add(detail); boolean present_diffs = true && (isSetDiffs()); list.add(present_diffs); if (present_diffs) list.add(diffs); return list.hashCode(); }
public Commit deepCopy() { return new Commit(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Commit) return this.equals((Commit)that); return false; }
public CommitDto(Commit commit) { requireNonNull(commit, "commit"); revision = new RevisionDto(commit.getRevision()); author = new AuthorDto(commit.getAuthor()); timestamp = commit.getTimestamp(); summary = commit.getSummary(); detail = new CommentDto(commit.getDetail()); diffs = commit.getDiffs().stream().map(ChangeDto::new).collect(Collectors.toList()); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_revision = true && (isSetRevision()); list.add(present_revision); if (present_revision) list.add(revision); boolean present_author = true && (isSetAuthor()); list.add(present_author); if (present_author) list.add(author); boolean present_timestamp = true && (isSetTimestamp()); list.add(present_timestamp); if (present_timestamp) list.add(timestamp); boolean present_summary = true && (isSetSummary()); list.add(present_summary); if (present_summary) list.add(summary); boolean present_detail = true && (isSetDetail()); list.add(present_detail); if (present_detail) list.add(detail); boolean present_diffs = true && (isSetDiffs()); list.add(present_diffs); if (present_diffs) list.add(diffs); return list.hashCode(); }
/** * Performs a deep copy on <i>other</i>. */ public Repository(Repository other) { if (other.isSetName()) { this.name = other.name; } if (other.isSetHead()) { this.head = new Commit(other.head); } }
public boolean equals(Repository that) { if (that == null) return false; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_head = true && this.isSetHead(); boolean that_present_head = true && that.isSetHead(); if (this_present_head || that_present_head) { if (!(this_present_head && that_present_head)) return false; if (!this.head.equals(that.head)) return false; } return true; }
public CommitDto(Commit commit) { requireNonNull(commit, "commit"); revision = new RevisionDto(commit.getRevision()); author = new AuthorDto(commit.getAuthor()); timestamp = commit.getTimestamp(); summary = commit.getSummary(); detail = new CommentDto(commit.getDetail()); diffs = commit.getDiffs().stream().map(ChangeDto::new).collect(Collectors.toList()); }