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) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static Map<Change.Id,ChangeData> asMap(List<ChangeData> changes)
public static void ensureChangeLoaded(Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureAllPatchSetsLoaded(Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureCurrentPatchSetLoaded(Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureCurrentApprovalsLoaded(Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureMessagesLoaded(Iterable<ChangeData> changes) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void ensureReviewedByLoadedForOpenChanges(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(List<String> filePaths) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public List<String> currentFilePaths() throws IOException, com.google.gwtorm.server.OrmException
IOException
com.google.gwtorm.server.OrmException
public Optional<ChangeData.ChangedLines> changedLines() throws com.google.gwtorm.server.OrmException, IOException
com.google.gwtorm.server.OrmException
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 List<PatchSetApproval> currentApprovals() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setCurrentApprovals(List<PatchSetApproval> approvals)
public String commitMessage() throws IOException, com.google.gwtorm.server.OrmException
IOException
com.google.gwtorm.server.OrmException
public List<org.eclipse.jgit.revwalk.FooterLine> commitFooters() throws IOException, com.google.gwtorm.server.OrmException
IOException
com.google.gwtorm.server.OrmException
public com.google.common.collect.ListMultimap<String,String> trackingFooters() throws IOException, com.google.gwtorm.server.OrmException
IOException
com.google.gwtorm.server.OrmException
public org.eclipse.jgit.lib.PersonIdent getAuthor() throws IOException, com.google.gwtorm.server.OrmException
IOException
com.google.gwtorm.server.OrmException
public org.eclipse.jgit.lib.PersonIdent getCommitter() throws IOException, com.google.gwtorm.server.OrmException
IOException
com.google.gwtorm.server.OrmException
public Collection<PatchSet> patchSets() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
- an error occurred reading the database.public void setPatchSets(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 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 List<ReviewerStatusUpdate> reviewerUpdates() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setReviewerUpdates(List<ReviewerStatusUpdate> reviewerUpdates)
public List<ReviewerStatusUpdate> getReviewerUpdates()
public Collection<Comment> publishedComments() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public Collection<RobotComment> robotComments() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public Integer unresolvedCommentCount() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setUnresolvedCommentCount(Integer count)
public List<ChangeMessage> messages() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public List<SubmitRecord> submitRecords(SubmitRuleOptions options) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public List<SubmitRecord> getSubmitRecords(SubmitRuleOptions options)
public void setSubmitRecords(SubmitRuleOptions options, List<SubmitRecord> records)
public SubmitTypeRecord submitTypeRecord() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setMergeable(Boolean mergeable)
public Boolean isMergeable() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public Set<Account.Id> editsByUser() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public Map<Account.Id,org.eclipse.jgit.lib.Ref> editRefs() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public Set<Account.Id> draftsByUser() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public 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 Set<Account.Id> reviewedBy() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setReviewedBy(Set<Account.Id> reviewedBy)
public Set<String> hashtags() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public com.google.common.collect.ImmutableListMultimap<Account.Id,String> stars() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setStars(com.google.common.collect.ListMultimap<Account.Id,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 Set<String> stars(Account.Id accountId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public 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 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)