Class PatchLineComment
- java.lang.Object
-
- com.google.gerrit.reviewdb.client.PatchLineComment
-
public final class PatchLineComment extends Object
A comment left by a user on a specific line of aPatch
.This class represents an inline comment in ReviewDb. It should only be used for writing/reading inline comments to/from ReviewDb. For all other purposes inline comments should be represented by
Comment
.- See Also:
Comment
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PatchLineComment.Key
static class
PatchLineComment.Status
-
Field Summary
Fields Modifier and Type Field Description protected Account.Id
author
Who wrote this comment.protected PatchLineComment.Key
key
protected int
lineNbr
Line number this comment applies to; it should display after the line.protected String
message
The text left by the user.protected String
parentUuid
The parent of this comment, or null if this is the first comment on this lineprotected CommentRange
range
protected Account.Id
realAuthor
Real user that added this comment on behalf of the user recorded inauthor
.protected RevId
revId
The RevId for the commit to which this comment is referring.protected short
side
Which file is this comment; 0 is ancestor, 1 is new version.protected char
status
Current publication state of the comment; seePatchLineComment.Status
.static char
STATUS_DRAFT
static char
STATUS_PUBLISHED
protected String
tag
protected boolean
unresolved
True if this comment requires further action.protected Timestamp
writtenOn
When this comment was drafted.
-
Constructor Summary
Constructors Modifier Constructor Description protected
PatchLineComment()
PatchLineComment(PatchLineComment o)
PatchLineComment(PatchLineComment.Key id, int line, Account.Id a, String parentUuid, Timestamp when)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Comment
asComment(String serverId)
boolean
equals(Object o)
static PatchLineComment
from(Change.Id changeId, PatchLineComment.Status status, Comment c)
Account.Id
getAuthor()
PatchLineComment.Key
getKey()
int
getLine()
String
getMessage()
String
getParentUuid()
PatchSet.Id
getPatchSetId()
CommentRange
getRange()
Account.Id
getRealAuthor()
RevId
getRevId()
short
getSide()
PatchLineComment.Status
getStatus()
String
getTag()
Boolean
getUnresolved()
Timestamp
getWrittenOn()
int
hashCode()
void
setLine(int line)
void
setMessage(String s)
void
setParentUuid(String inReplyTo)
void
setRange(Comment.Range r)
void
setRange(CommentRange r)
void
setRealAuthor(Account.Id id)
void
setRevId(RevId rev)
void
setSide(short s)
void
setStatus(PatchLineComment.Status s)
void
setTag(String tag)
void
setUnresolved(Boolean unresolved)
void
setWrittenOn(Timestamp ts)
String
toString()
-
-
-
Field Detail
-
STATUS_DRAFT
public static final char STATUS_DRAFT
- See Also:
- Constant Field Values
-
STATUS_PUBLISHED
public static final char STATUS_PUBLISHED
- See Also:
- Constant Field Values
-
key
protected PatchLineComment.Key key
-
lineNbr
protected int lineNbr
Line number this comment applies to; it should display after the line.
-
author
protected Account.Id author
Who wrote this comment.
-
writtenOn
protected Timestamp writtenOn
When this comment was drafted.
-
status
protected char status
Current publication state of the comment; seePatchLineComment.Status
.
-
side
protected short side
Which file is this comment; 0 is ancestor, 1 is new version.
-
message
protected String message
The text left by the user.
-
parentUuid
protected String parentUuid
The parent of this comment, or null if this is the first comment on this line
-
range
protected CommentRange range
-
tag
protected String tag
-
realAuthor
protected Account.Id realAuthor
Real user that added this comment on behalf of the user recorded inauthor
.
-
unresolved
protected boolean unresolved
True if this comment requires further action.
-
revId
protected RevId revId
The RevId for the commit to which this comment is referring.Note that this field is not stored in the database. It is just provided for users of this class to avoid a lookup when they don't have easy access to a ReviewDb.
-
-
Constructor Detail
-
PatchLineComment
protected PatchLineComment()
-
PatchLineComment
public PatchLineComment(PatchLineComment.Key id, int line, Account.Id a, String parentUuid, Timestamp when)
-
PatchLineComment
public PatchLineComment(PatchLineComment o)
-
-
Method Detail
-
from
public static PatchLineComment from(Change.Id changeId, PatchLineComment.Status status, Comment c)
-
getKey
public PatchLineComment.Key getKey()
-
getPatchSetId
public PatchSet.Id getPatchSetId()
-
getLine
public int getLine()
-
setLine
public void setLine(int line)
-
getAuthor
public Account.Id getAuthor()
-
getRealAuthor
public Account.Id getRealAuthor()
-
setRealAuthor
public void setRealAuthor(Account.Id id)
-
getWrittenOn
public Timestamp getWrittenOn()
-
getStatus
public PatchLineComment.Status getStatus()
-
setStatus
public void setStatus(PatchLineComment.Status s)
-
getSide
public short getSide()
-
setSide
public void setSide(short s)
-
getMessage
public String getMessage()
-
setMessage
public void setMessage(String s)
-
setWrittenOn
public void setWrittenOn(Timestamp ts)
-
getParentUuid
public String getParentUuid()
-
setParentUuid
public void setParentUuid(String inReplyTo)
-
setRange
public void setRange(Comment.Range r)
-
setRange
public void setRange(CommentRange r)
-
getRange
public CommentRange getRange()
-
setRevId
public void setRevId(RevId rev)
-
getRevId
public RevId getRevId()
-
setTag
public void setTag(String tag)
-
getTag
public String getTag()
-
setUnresolved
public void setUnresolved(Boolean unresolved)
-
getUnresolved
public Boolean getUnresolved()
-
-