Package com.google.gerrit.entities
Class Comment
- java.lang.Object
-
- com.google.gerrit.entities.Comment
-
- Direct Known Subclasses:
RobotComment
public class Comment extends Object
This class represents inline comments in NoteDb. This means it determines the JSON format for inline comments in the revision notes that NoteDb uses to persist inline comments.Changing fields in this class changes the storage format of inline comments in NoteDb and may require a corresponding data migration (adding new optional fields is generally okay).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Comment.Identity
static class
Comment.Key
static class
Comment.Range
The Range class defines continuous range of character.static class
Comment.Status
-
Field Summary
Fields Modifier and Type Field Description Comment.Identity
author
Comment.Key
key
int
lineNbr
The line number (1-based) to which the comment refers, or 0 for a file comment.String
message
String
parentUuid
Comment.Range
range
protected Comment.Identity
realAuthor
String
serverId
short
side
String
tag
boolean
unresolved
Timestamp
writtenOn
-
Constructor Summary
Constructors Constructor Description Comment(Comment c)
Comment(Comment.Key key, Account.Id author, Timestamp writtenOn, short side, String message, String serverId, boolean unresolved)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
org.eclipse.jgit.lib.ObjectId
getCommitId()
Comment.Identity
getRealAuthor()
int
hashCode()
void
setCommitId(org.eclipse.jgit.lib.AnyObjectId commitId)
void
setLineNbrAndRange(Integer lineNbr, Comment.Range range)
void
setRange(CommentRange range)
void
setRealAuthor(Account.Id id)
String
toString()
protected com.google.common.base.MoreObjects.ToStringHelper
toStringHelper()
-
-
-
Field Detail
-
key
public Comment.Key key
-
lineNbr
public int lineNbr
The line number (1-based) to which the comment refers, or 0 for a file comment.
-
author
public Comment.Identity author
-
realAuthor
protected Comment.Identity realAuthor
-
writtenOn
public Timestamp writtenOn
-
side
public short side
-
message
public String message
-
parentUuid
public String parentUuid
-
range
public Comment.Range range
-
tag
public String tag
-
serverId
public String serverId
-
unresolved
public boolean unresolved
-
-
Constructor Detail
-
Comment
public Comment(Comment c)
-
Comment
public Comment(Comment.Key key, Account.Id author, Timestamp writtenOn, short side, String message, String serverId, boolean unresolved)
-
-
Method Detail
-
setLineNbrAndRange
public void setLineNbrAndRange(Integer lineNbr, Comment.Range range)
-
setRange
public void setRange(CommentRange range)
-
getCommitId
public org.eclipse.jgit.lib.ObjectId getCommitId()
-
setCommitId
public void setCommitId(org.eclipse.jgit.lib.AnyObjectId commitId)
-
setRealAuthor
public void setRealAuthor(Account.Id id)
-
getRealAuthor
public Comment.Identity getRealAuthor()
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()
-
-