public class ChangeData extends 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<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchSetApproval> |
approvals() |
static List<com.google.gerrit.reviewdb.client.Change> |
asChanges(List<ChangeData> changeDatas) |
static Map<com.google.gerrit.reviewdb.client.Change.Id,ChangeData> |
asMap(List<ChangeData> changes) |
void |
cacheFromSource(ChangeDataSource s) |
com.google.gerrit.reviewdb.client.Change |
change() |
ChangeControl |
changeControl() |
ChangeData.ChangedLines |
changedLines() |
List<org.eclipse.jgit.revwalk.FooterLine> |
commitFooters() |
String |
commitMessage() |
static ChangeData |
createForTest(com.google.gerrit.reviewdb.client.Change.Id id,
int currentPatchSetId)
Create an instance for testing only.
|
List<com.google.gerrit.reviewdb.client.PatchSetApproval> |
currentApprovals() |
List<String> |
currentFilePaths() |
com.google.gerrit.reviewdb.client.PatchSet |
currentPatchSet() |
com.google.gerrit.reviewdb.server.ReviewDb |
db() |
Set<com.google.gerrit.reviewdb.client.Account.Id> |
editsByUser() |
static void |
ensureAllPatchSetsLoaded(Iterable<ChangeData> changes) |
static void |
ensureChangeLoaded(Iterable<ChangeData> changes) |
static void |
ensureCurrentApprovalsLoaded(Iterable<ChangeData> changes) |
static void |
ensureCurrentPatchSetLoaded(Iterable<ChangeData> changes) |
static void |
ensureMessagesLoaded(Iterable<ChangeData> changes) |
static void |
ensureReviewedByLoadedForOpenChanges(Iterable<ChangeData> changes) |
List<String> |
filePaths(com.google.gerrit.reviewdb.client.PatchSet ps) |
org.eclipse.jgit.lib.PersonIdent |
getAuthor() |
org.eclipse.jgit.lib.PersonIdent |
getCommitter() |
com.google.gerrit.reviewdb.client.Change.Id |
getId() |
List<com.google.gerrit.common.data.SubmitRecord> |
getSubmitRecords() |
boolean |
hasChangeControl() |
boolean |
isFromSource(ChangeDataSource s) |
Boolean |
isMergeable() |
List<com.google.gerrit.reviewdb.client.ChangeMessage> |
messages() |
ChangeNotes |
notes() |
com.google.gerrit.reviewdb.client.PatchSet |
patchSet(com.google.gerrit.reviewdb.client.PatchSet.Id psId) |
Collection<com.google.gerrit.reviewdb.client.PatchSet> |
patchSets() |
Collection<com.google.gerrit.reviewdb.client.PatchLineComment> |
publishedComments() |
com.google.gerrit.reviewdb.client.Change |
reloadChange() |
Set<com.google.gerrit.reviewdb.client.Account.Id> |
reviewedBy() |
com.google.common.collect.SetMultimap<ReviewerState,com.google.gerrit.reviewdb.client.Account.Id> |
reviewers() |
void |
setChange(com.google.gerrit.reviewdb.client.Change c) |
void |
setChangedLines(int insertions,
int deletions) |
void |
setCurrentApprovals(List<com.google.gerrit.reviewdb.client.PatchSetApproval> approvals) |
void |
setCurrentFilePaths(List<String> filePaths) |
void |
setMergeable(Boolean mergeable) |
void |
setPatchSets(Collection<com.google.gerrit.reviewdb.client.PatchSet> patchSets) |
void |
setReviewedBy(Set<com.google.gerrit.reviewdb.client.Account.Id> reviewedBy) |
void |
setSubmitRecords(List<com.google.gerrit.common.data.SubmitRecord> records) |
String |
toString() |
Collection<com.google.gerrit.reviewdb.client.PatchSet> |
visiblePatchSets() |
public static List<com.google.gerrit.reviewdb.client.Change> asChanges(List<ChangeData> changeDatas) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static Map<com.google.gerrit.reviewdb.client.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(com.google.gerrit.reviewdb.client.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 com.google.gerrit.reviewdb.server.ReviewDb db()
public boolean isFromSource(ChangeDataSource s)
public void cacheFromSource(ChangeDataSource s)
public void setCurrentFilePaths(List<String> filePaths) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public List<String> currentFilePaths() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public List<String> filePaths(com.google.gerrit.reviewdb.client.PatchSet ps) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public ChangeData.ChangedLines changedLines() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setChangedLines(int insertions, int deletions)
public com.google.gerrit.reviewdb.client.Change.Id getId()
public boolean hasChangeControl()
public ChangeControl changeControl() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public com.google.gerrit.reviewdb.client.Change change() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setChange(com.google.gerrit.reviewdb.client.Change c)
public com.google.gerrit.reviewdb.client.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 com.google.gerrit.reviewdb.client.PatchSet currentPatchSet() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public List<com.google.gerrit.reviewdb.client.PatchSetApproval> currentApprovals() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setCurrentApprovals(List<com.google.gerrit.reviewdb.client.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 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<com.google.gerrit.reviewdb.client.PatchSet> patchSets() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
- an error occurred reading the database.public Collection<com.google.gerrit.reviewdb.client.PatchSet> visiblePatchSets() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
- an error occurred reading the database.public void setPatchSets(Collection<com.google.gerrit.reviewdb.client.PatchSet> patchSets)
public com.google.gerrit.reviewdb.client.PatchSet patchSet(com.google.gerrit.reviewdb.client.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<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchSetApproval> approvals() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
- an error occurred reading the database.public com.google.common.collect.SetMultimap<ReviewerState,com.google.gerrit.reviewdb.client.Account.Id> reviewers() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public Collection<com.google.gerrit.reviewdb.client.PatchLineComment> publishedComments() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public List<com.google.gerrit.reviewdb.client.ChangeMessage> messages() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setSubmitRecords(List<com.google.gerrit.common.data.SubmitRecord> records)
public List<com.google.gerrit.common.data.SubmitRecord> getSubmitRecords()
public void setMergeable(Boolean mergeable)
public Boolean isMergeable() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public Set<com.google.gerrit.reviewdb.client.Account.Id> editsByUser() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public Set<com.google.gerrit.reviewdb.client.Account.Id> reviewedBy() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setReviewedBy(Set<com.google.gerrit.reviewdb.client.Account.Id> reviewedBy)