public class PatchLineCommentsUtil extends 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 |
---|---|
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,
Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments) |
List<com.google.gerrit.reviewdb.client.PatchLineComment> |
draftByAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
com.google.gerrit.reviewdb.client.Account.Id author)
Deprecated.
|
List<com.google.gerrit.reviewdb.client.PatchLineComment> |
draftByChange(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes) |
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) |
List<com.google.gerrit.reviewdb.client.PatchLineComment> |
draftByChangeFileAuthor(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes,
String file,
com.google.gerrit.reviewdb.client.Account.Id author) |
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) |
Collection<org.eclipse.jgit.lib.Ref> |
getDraftRefs(com.google.gerrit.reviewdb.client.Change.Id changeId) |
List<com.google.gerrit.reviewdb.client.PatchLineComment> |
publishedByChange(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeNotes notes) |
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,
String file) |
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,
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.OrmException
public 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.OrmException
public 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.OrmException
public 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.OrmException
public 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, String file) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public 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.OrmException
public 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.OrmException
public List<com.google.gerrit.reviewdb.client.PatchLineComment> draftByChangeFileAuthor(com.google.gerrit.reviewdb.server.ReviewDb db, ChangeNotes notes, String file, com.google.gerrit.reviewdb.client.Account.Id author) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public 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 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.OrmException
public void putComments(com.google.gerrit.reviewdb.server.ReviewDb db, ChangeUpdate update, Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void deleteComments(com.google.gerrit.reviewdb.server.ReviewDb db, ChangeUpdate update, Iterable<com.google.gerrit.reviewdb.client.PatchLineComment> comments) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void deleteAllDraftsFromAllUsers(com.google.gerrit.reviewdb.client.Change.Id changeId) throws IOException
IOException
public 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.OrmException
public 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