public class PatchLineCommentsUtil
extends java.lang.Object
These methods either query for and update PatchLineComments in the NoteDb or ReviewDb, depending on the state of the NotesMigration.
| Constructor and Description |
|---|
PatchLineCommentsUtil(GitRepositoryManager repoManager,
AllUsersNameProvider allUsersProvider,
DraftCommentNotes.Factory draftFactory,
NotesMigration migration) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> |
byPatchSet(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.PatchSet.Id psId) |
void |
deleteComments(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeUpdate update,
java.lang.Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments) |
java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> |
draftByAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
com.google.gerrit.reviewdb.client.Account.Id author) |
java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> |
draftByChange(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes) |
java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> |
draftByChangeAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.Account.Id author) |
java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> |
draftByChangeFileAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
java.lang.String file,
com.google.gerrit.reviewdb.client.Account.Id author) |
java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> |
draftByPatchSetAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
com.google.gerrit.reviewdb.client.PatchSet.Id psId,
com.google.gerrit.reviewdb.client.Account.Id author,
ChangeNotes notes) |
com.google.common.base.Optional<com.google.gerrit.reviewdb.client.PatchLineComment> |
get(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.PatchLineComment.Key key) |
void |
insertComments(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeUpdate update,
java.lang.Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments) |
java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> |
publishedByChange(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes) |
java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> |
publishedByChangeFile(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.Change.Id changeId,
java.lang.String file) |
java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> |
publishedByPatchSet(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.PatchSet.Id psId) |
static void |
setCommentRevId(com.google.gerrit.reviewdb.client.PatchLineComment c,
PatchListCache cache,
com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet ps) |
void |
updateComments(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeUpdate update,
java.lang.Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments) |
void |
upsertComments(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeUpdate update,
java.lang.Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments) |
@Inject public PatchLineCommentsUtil(GitRepositoryManager repoManager, AllUsersNameProvider allUsersProvider, DraftCommentNotes.Factory draftFactory, NotesMigration migration)
public com.google.common.base.Optional<com.google.gerrit.reviewdb.client.PatchLineComment> get(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.PatchLineComment.Key key)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> publishedByChange(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> draftByChange(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> byPatchSet(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.PatchSet.Id psId)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> publishedByChangeFile(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.Change.Id changeId,
java.lang.String file)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> publishedByPatchSet(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.PatchSet.Id psId)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> draftByPatchSetAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
com.google.gerrit.reviewdb.client.PatchSet.Id psId,
com.google.gerrit.reviewdb.client.Account.Id author,
ChangeNotes notes)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> draftByChangeFileAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
java.lang.String file,
com.google.gerrit.reviewdb.client.Account.Id author)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> draftByChangeAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.Account.Id author)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> draftByAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
com.google.gerrit.reviewdb.client.Account.Id author)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic void insertComments(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeUpdate update,
java.lang.Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic void upsertComments(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeUpdate update,
java.lang.Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic void updateComments(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeUpdate update,
java.lang.Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic void deleteComments(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeUpdate update,
java.lang.Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmExceptionpublic static void setCommentRevId(com.google.gerrit.reviewdb.client.PatchLineComment c,
PatchListCache cache,
com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet ps)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException