public class ChangeData extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ChangeData.AssistedFactory |
static class |
ChangeData.ChangedLines |
static class |
ChangeData.Factory |
public static List<Change> asChanges(List<ChangeData> changeDatas)
public static Map<Change.Id,ChangeData> asMap(List<ChangeData> changes)
public static void ensureChangeLoaded(Iterable<ChangeData> changes)
public static void ensureAllPatchSetsLoaded(Iterable<ChangeData> changes)
public static void ensureCurrentPatchSetLoaded(Iterable<ChangeData> changes)
public static void ensureCurrentApprovalsLoaded(Iterable<ChangeData> changes)
public static void ensureMessagesLoaded(Iterable<ChangeData> changes)
public static void ensureReviewedByLoadedForOpenChanges(Iterable<ChangeData> changes)
public static ChangeData createForTest(Project.NameKey project, Change.Id id, int currentPatchSetId)
Attempting to lazy load data will fail with NPEs. Callers may consider manually setting fields that can be set.
id
- change IDpublic ChangeData setLazyLoad(boolean load)
This is used to enforce that the dashboard is rendered from the index only. If lazyLoad
is on, the ChangeData
object will load from the database ("lazily") when a
field accessor is called.
public AllUsersName getAllUsersNameForIndexing()
public Optional<ChangeData.ChangedLines> changedLines()
public void setChangedLines(int insertions, int deletions)
public void setNoChangedLines()
public Change.Id getId()
public Project.NameKey project()
public Change change()
public void setChange(Change c)
public Change reloadChange()
public LabelTypes getLabelTypes()
public ChangeNotes notes()
public PatchSet currentPatchSet()
public List<PatchSetApproval> currentApprovals()
public void setCurrentApprovals(List<PatchSetApproval> approvals)
public String commitMessage()
public List<org.eclipse.jgit.revwalk.FooterLine> commitFooters()
public org.eclipse.jgit.lib.PersonIdent getAuthor()
public org.eclipse.jgit.lib.PersonIdent getCommitter()
public Collection<PatchSet> patchSets()
public void setPatchSets(Collection<PatchSet> patchSets)
public PatchSet patchSet(PatchSet.Id psId)
public com.google.common.collect.ListMultimap<PatchSet.Id,PatchSetApproval> approvals()
public Optional<PatchSetApproval> getSubmitApproval()
public ReviewerSet reviewers()
public void setReviewers(ReviewerSet reviewers)
public ReviewerSet getReviewers()
public ReviewerByEmailSet reviewersByEmail()
public void setReviewersByEmail(ReviewerByEmailSet reviewersByEmail)
public ReviewerByEmailSet getReviewersByEmail()
public void setPendingReviewers(ReviewerSet pendingReviewers)
public ReviewerSet getPendingReviewers()
public ReviewerSet pendingReviewers()
public void setPendingReviewersByEmail(ReviewerByEmailSet pendingReviewersByEmail)
public ReviewerByEmailSet getPendingReviewersByEmail()
public ReviewerByEmailSet pendingReviewersByEmail()
public List<ReviewerStatusUpdate> reviewerUpdates()
public void setReviewerUpdates(List<ReviewerStatusUpdate> reviewerUpdates)
public List<ReviewerStatusUpdate> getReviewerUpdates()
public Collection<Comment> publishedComments()
public Collection<RobotComment> robotComments()
public Integer unresolvedCommentCount()
public void setUnresolvedCommentCount(Integer count)
public Integer totalCommentCount()
public void setTotalCommentCount(Integer count)
public List<ChangeMessage> messages()
public List<SubmitRecord> submitRecords(SubmitRuleOptions options)
public List<SubmitRecord> getSubmitRecords(SubmitRuleOptions options)
public void setSubmitRecords(SubmitRuleOptions options, List<SubmitRecord> records)
public SubmitTypeRecord submitTypeRecord()
public void setMergeable(Boolean mergeable)
public Boolean isMergeable()
public Set<Account.Id> editsByUser()
public Map<Account.Id,org.eclipse.jgit.lib.Ref> editRefs()
public Set<Account.Id> draftsByUser()
public Map<Account.Id,org.eclipse.jgit.lib.Ref> draftRefs()
public boolean isReviewedBy(Account.Id accountId)
public Set<Account.Id> reviewedBy()
public void setReviewedBy(Set<Account.Id> reviewedBy)
public com.google.common.collect.ImmutableListMultimap<Account.Id,String> stars()
public void setStars(com.google.common.collect.ListMultimap<Account.Id,String> stars)
public com.google.common.collect.ImmutableMap<Account.Id,StarredChangesUtil.StarRef> starRefs()
public Set<String> stars(Account.Id accountId)
public Boolean isPureRevert()
null
if revertOf
is null
; true if the change is a pure revert;
false otherwise.public com.google.common.collect.ImmutableList<byte[]> getRefStates()
public void setRefStates(Iterable<byte[]> refStates)
public com.google.common.collect.ImmutableList<byte[]> getRefStatePatterns()
public void setRefStatePatterns(Iterable<byte[]> refStatePatterns)