public class ChangeData
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ChangeData.ChangedLines |
static interface |
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() |
ChangeControl |
changeControl() |
ChangeControl |
changeControl(CurrentUser user) |
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) |
java.util.List<java.lang.String> |
filePaths(PatchSet ps) |
org.eclipse.jgit.lib.PersonIdent |
getAuthor() |
org.eclipse.jgit.lib.PersonIdent |
getCommitter() |
Change.Id |
getId() |
com.google.common.collect.ImmutableList<byte[]> |
getRefStatePatterns() |
com.google.common.collect.ImmutableList<byte[]> |
getRefStates() |
ReviewerSet |
getReviewers() |
java.util.List<ReviewerStatusUpdate> |
getReviewerUpdates() |
java.util.Optional<PatchSetApproval> |
getSubmitApproval() |
java.util.List<SubmitRecord> |
getSubmitRecords(SubmitRuleOptions options) |
boolean |
hasChangeControl() |
java.util.Set<java.lang.String> |
hashtags() |
java.lang.Boolean |
isMergeable() |
java.util.List<ChangeMessage> |
messages() |
ChangeNotes |
notes() |
PatchSet |
patchSet(PatchSet.Id psId) |
java.util.Collection<PatchSet> |
patchSets() |
Project.NameKey |
project() |
java.util.Collection<Comment> |
publishedComments() |
Change |
reloadChange() |
java.util.Set<Account.Id> |
reviewedBy() |
ReviewerSet |
reviewers() |
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 |
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 |
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() |
java.lang.Integer |
unresolvedCommentCount() |
java.util.Collection<PatchSet> |
visiblePatchSets() |
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 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 com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<java.lang.String> filePaths(PatchSet ps) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.Optional<ChangeData.ChangedLines> changedLines() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setChangedLines(int insertions, int deletions)
public void setNoChangedLines()
public Change.Id getId()
public Project.NameKey project() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean hasChangeControl()
public ChangeControl changeControl() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public ChangeControl changeControl(CurrentUser user) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
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 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 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 java.util.Collection<PatchSet> visiblePatchSets() 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 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
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 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.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)