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.
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.collect.Ordering<com.google.gerrit.extensions.common.CommentInfo> |
COMMENT_INFO_ORDER |
static com.google.common.collect.Ordering<com.google.gerrit.reviewdb.client.PatchLineComment> |
PLC_ORDER |
| 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 |
deleteAllDraftsFromAllUsers(com.google.gerrit.reviewdb.client.Change.Id changeId) |
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)
Deprecated.
|
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) |
static com.google.gerrit.reviewdb.client.PatchSet.Id |
getCommentPsId(com.google.gerrit.reviewdb.client.PatchLineComment plc) |
java.util.Collection<org.eclipse.jgit.lib.Ref> |
getDraftRefs(com.google.gerrit.reviewdb.client.Change.Id changeId) |
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) |
void |
putComments(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeUpdate update,
java.lang.Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments) |
static com.google.gerrit.reviewdb.client.RevId |
setCommentRevId(com.google.gerrit.reviewdb.client.PatchLineComment c,
PatchListCache cache,
com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet ps) |
public static final com.google.common.collect.Ordering<com.google.gerrit.reviewdb.client.PatchLineComment> PLC_ORDER
public static final com.google.common.collect.Ordering<com.google.gerrit.extensions.common.CommentInfo> COMMENT_INFO_ORDER
public static com.google.gerrit.reviewdb.client.PatchSet.Id getCommentPsId(com.google.gerrit.reviewdb.client.PatchLineComment plc)
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.OrmException@Deprecated
public 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 putComments(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 void deleteAllDraftsFromAllUsers(com.google.gerrit.reviewdb.client.Change.Id changeId)
throws java.io.IOException
java.io.IOExceptionpublic static com.google.gerrit.reviewdb.client.RevId 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.OrmExceptionpublic java.util.Collection<org.eclipse.jgit.lib.Ref> getDraftRefs(com.google.gerrit.reviewdb.client.Change.Id changeId)
throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException