public class ChangeData
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ChangeData.AssistedFactory |
static class |
ChangeData.ChangedLines |
static class |
ChangeData.Factory |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ListMultimap<PatchSet.Id,PatchSetApproval> |
approvals() |
static java.util.List<Change> |
asChanges(java.util.List<ChangeData> changeDatas) |
static java.util.Map<Change.Id,ChangeData> |
asMap(java.util.List<ChangeData> changes) |
Change |
change() |
java.util.Optional<ChangeData.ChangedLines> |
changedLines() |
java.util.List<org.eclipse.jgit.revwalk.FooterLine> |
commitFooters() |
java.lang.String |
commitMessage() |
static ChangeData |
createForTest(Project.NameKey project,
Change.Id id,
int currentPatchSetId)
Create an instance for testing only.
|
java.util.List<PatchSetApproval> |
currentApprovals() |
java.util.List<java.lang.String> |
currentFilePaths() |
PatchSet |
currentPatchSet() |
ReviewDb |
db() |
java.util.Map<Account.Id,org.eclipse.jgit.lib.Ref> |
draftRefs() |
java.util.Set<Account.Id> |
draftsByUser() |
java.util.Map<Account.Id,org.eclipse.jgit.lib.Ref> |
editRefs() |
java.util.Set<Account.Id> |
editsByUser() |
static void |
ensureAllPatchSetsLoaded(java.lang.Iterable<ChangeData> changes) |
static void |
ensureChangeLoaded(java.lang.Iterable<ChangeData> changes) |
static void |
ensureCurrentApprovalsLoaded(java.lang.Iterable<ChangeData> changes) |
static void |
ensureCurrentPatchSetLoaded(java.lang.Iterable<ChangeData> changes) |
static void |
ensureMessagesLoaded(java.lang.Iterable<ChangeData> changes) |
static void |
ensureReviewedByLoadedForOpenChanges(java.lang.Iterable<ChangeData> changes) |
AllUsersName |
getAllUsersNameForIndexing() |
org.eclipse.jgit.lib.PersonIdent |
getAuthor() |
org.eclipse.jgit.lib.PersonIdent |
getCommitter() |
Change.Id |
getId() |
LabelTypes |
getLabelTypes() |
protected Comment |
getLatestComment(java.util.Map<java.lang.String,java.util.List<Comment>> forest,
Comment root) |
ReviewerSet |
getPendingReviewers() |
ReviewerByEmailSet |
getPendingReviewersByEmail() |
com.google.common.collect.ImmutableList<byte[]> |
getRefStatePatterns() |
com.google.common.collect.ImmutableList<byte[]> |
getRefStates() |
ReviewerSet |
getReviewers() |
ReviewerByEmailSet |
getReviewersByEmail() |
java.util.List<ReviewerStatusUpdate> |
getReviewerUpdates() |
java.util.Optional<PatchSetApproval> |
getSubmitApproval() |
java.util.List<SubmitRecord> |
getSubmitRecords(SubmitRuleOptions options) |
java.util.Set<java.lang.String> |
hashtags() |
java.lang.Boolean |
isMergeable() |
java.lang.Boolean |
isPureRevert() |
boolean |
isReviewedBy(Account.Id accountId) |
java.util.List<ChangeMessage> |
messages() |
ChangeNotes |
notes() |
PatchSet |
patchSet(PatchSet.Id psId) |
java.util.Collection<PatchSet> |
patchSets() |
ReviewerSet |
pendingReviewers() |
ReviewerByEmailSet |
pendingReviewersByEmail() |
Project.NameKey |
project() |
java.util.Collection<Comment> |
publishedComments() |
Change |
reloadChange() |
java.util.Set<Account.Id> |
reviewedBy() |
ReviewerSet |
reviewers() |
ReviewerByEmailSet |
reviewersByEmail() |
java.util.List<ReviewerStatusUpdate> |
reviewerUpdates() |
java.util.Collection<RobotComment> |
robotComments() |
void |
setChange(Change c) |
void |
setChangedLines(int insertions,
int deletions) |
void |
setCurrentApprovals(java.util.List<PatchSetApproval> approvals) |
void |
setCurrentFilePaths(java.util.List<java.lang.String> filePaths) |
void |
setHashtags(java.util.Set<java.lang.String> hashtags) |
ChangeData |
setLazyLoad(boolean load) |
void |
setMergeable(java.lang.Boolean mergeable) |
void |
setNoChangedLines() |
void |
setPatchSets(java.util.Collection<PatchSet> patchSets) |
void |
setPendingReviewers(ReviewerSet pendingReviewers) |
void |
setPendingReviewersByEmail(ReviewerByEmailSet pendingReviewersByEmail) |
void |
setRefStatePatterns(java.lang.Iterable<byte[]> refStatePatterns) |
void |
setRefStates(java.lang.Iterable<byte[]> refStates) |
void |
setReviewedBy(java.util.Set<Account.Id> reviewedBy) |
void |
setReviewers(ReviewerSet reviewers) |
void |
setReviewersByEmail(ReviewerByEmailSet reviewersByEmail) |
void |
setReviewerUpdates(java.util.List<ReviewerStatusUpdate> reviewerUpdates) |
void |
setStars(com.google.common.collect.ListMultimap<Account.Id,java.lang.String> stars) |
void |
setSubmitRecords(SubmitRuleOptions options,
java.util.List<SubmitRecord> records) |
void |
setUnresolvedCommentCount(java.lang.Integer count) |
com.google.common.collect.ImmutableMap<Account.Id,StarredChangesUtil.StarRef> |
starRefs() |
com.google.common.collect.ImmutableListMultimap<Account.Id,java.lang.String> |
stars() |
java.util.Set<java.lang.String> |
stars(Account.Id accountId) |
java.util.List<SubmitRecord> |
submitRecords(SubmitRuleOptions options) |
SubmitTypeRecord |
submitTypeRecord() |
java.lang.String |
toString() |
com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> |
trackingFooters() |
java.lang.Integer |
unresolvedCommentCount() |
public static java.util.List<Change> asChanges(java.util.List<ChangeData> changeDatas) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static java.util.Map<Change.Id,ChangeData> asMap(java.util.List<ChangeData> changes)
public static void ensureChangeLoaded(java.lang.Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureAllPatchSetsLoaded(java.lang.Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureCurrentPatchSetLoaded(java.lang.Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureCurrentApprovalsLoaded(java.lang.Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureMessagesLoaded(java.lang.Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureReviewedByLoadedForOpenChanges(java.lang.Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
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)
public ReviewDb db()
public AllUsersName getAllUsersNameForIndexing()
public void setCurrentFilePaths(java.util.List<java.lang.String> filePaths) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<java.lang.String> currentFilePaths() throws java.io.IOException, com.google.gwtorm.server.OrmException
java.io.IOException
com.google.gwtorm.server.OrmException
public java.util.Optional<ChangeData.ChangedLines> changedLines() throws com.google.gwtorm.server.OrmException, java.io.IOException
com.google.gwtorm.server.OrmException
java.io.IOException
public void setChangedLines(int insertions, int deletions)
public void setNoChangedLines()
public Change.Id getId()
public Project.NameKey project()
public Change change() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setChange(Change c)
public Change reloadChange() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public LabelTypes getLabelTypes() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public ChangeNotes notes() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public PatchSet currentPatchSet() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<PatchSetApproval> currentApprovals() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setCurrentApprovals(java.util.List<PatchSetApproval> approvals)
public java.lang.String commitMessage() throws java.io.IOException, com.google.gwtorm.server.OrmException
java.io.IOException
com.google.gwtorm.server.OrmException
public java.util.List<org.eclipse.jgit.revwalk.FooterLine> commitFooters() throws java.io.IOException, com.google.gwtorm.server.OrmException
java.io.IOException
com.google.gwtorm.server.OrmException
public com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> trackingFooters() throws java.io.IOException, com.google.gwtorm.server.OrmException
java.io.IOException
com.google.gwtorm.server.OrmException
public org.eclipse.jgit.lib.PersonIdent getAuthor() throws java.io.IOException, com.google.gwtorm.server.OrmException
java.io.IOException
com.google.gwtorm.server.OrmException
public org.eclipse.jgit.lib.PersonIdent getCommitter() throws java.io.IOException, com.google.gwtorm.server.OrmException
java.io.IOException
com.google.gwtorm.server.OrmException
public java.util.Collection<PatchSet> patchSets() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
- an error occurred reading the database.public void setPatchSets(java.util.Collection<PatchSet> patchSets)
public PatchSet patchSet(PatchSet.Id psId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
- an error occurred reading the database.public com.google.common.collect.ListMultimap<PatchSet.Id,PatchSetApproval> approvals() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
- an error occurred reading the database.public java.util.Optional<PatchSetApproval> getSubmitApproval() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
- an error occurred reading the database.public ReviewerSet reviewers() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setReviewers(ReviewerSet reviewers)
public ReviewerSet getReviewers()
public ReviewerByEmailSet reviewersByEmail() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setReviewersByEmail(ReviewerByEmailSet reviewersByEmail)
public ReviewerByEmailSet getReviewersByEmail()
public void setPendingReviewers(ReviewerSet pendingReviewers)
public ReviewerSet getPendingReviewers()
public ReviewerSet pendingReviewers() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setPendingReviewersByEmail(ReviewerByEmailSet pendingReviewersByEmail)
public ReviewerByEmailSet getPendingReviewersByEmail()
public ReviewerByEmailSet pendingReviewersByEmail() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<ReviewerStatusUpdate> reviewerUpdates() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setReviewerUpdates(java.util.List<ReviewerStatusUpdate> reviewerUpdates)
public java.util.List<ReviewerStatusUpdate> getReviewerUpdates()
public java.util.Collection<Comment> publishedComments() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.Collection<RobotComment> robotComments() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.lang.Integer unresolvedCommentCount() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
protected Comment getLatestComment(java.util.Map<java.lang.String,java.util.List<Comment>> forest, Comment root)
public void setUnresolvedCommentCount(java.lang.Integer count)
public java.util.List<ChangeMessage> messages() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<SubmitRecord> submitRecords(SubmitRuleOptions options) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<SubmitRecord> getSubmitRecords(SubmitRuleOptions options)
public void setSubmitRecords(SubmitRuleOptions options, java.util.List<SubmitRecord> records)
public SubmitTypeRecord submitTypeRecord() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setMergeable(java.lang.Boolean mergeable)
public java.lang.Boolean isMergeable() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.Set<Account.Id> editsByUser() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.Map<Account.Id,org.eclipse.jgit.lib.Ref> editRefs() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.Set<Account.Id> draftsByUser() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.Map<Account.Id,org.eclipse.jgit.lib.Ref> draftRefs() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean isReviewedBy(Account.Id accountId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.Set<Account.Id> reviewedBy() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setReviewedBy(java.util.Set<Account.Id> reviewedBy)
public java.util.Set<java.lang.String> hashtags() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setHashtags(java.util.Set<java.lang.String> hashtags)
public com.google.common.collect.ImmutableListMultimap<Account.Id,java.lang.String> stars() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setStars(com.google.common.collect.ListMultimap<Account.Id,java.lang.String> stars)
public com.google.common.collect.ImmutableMap<Account.Id,StarredChangesUtil.StarRef> starRefs() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.Set<java.lang.String> stars(Account.Id accountId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.lang.Boolean isPureRevert() throws com.google.gwtorm.server.OrmException
null
if revertOf
is null
; true if the change is a pure revert;
false otherwise.com.google.gwtorm.server.OrmException
public java.lang.String toString()
toString
in class java.lang.Object
public com.google.common.collect.ImmutableList<byte[]> getRefStates()
public void setRefStates(java.lang.Iterable<byte[]> refStates)
public com.google.common.collect.ImmutableList<byte[]> getRefStatePatterns()
public void setRefStatePatterns(java.lang.Iterable<byte[]> refStatePatterns)