public final class PatchLineComment extends Object
Patch
.
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
.
Comment
Modifier and Type | Class and Description |
---|---|
static class |
PatchLineComment.Key |
static class |
PatchLineComment.Status |
Modifier and Type | Field and 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 line
|
protected CommentRange |
range |
protected Account.Id |
realAuthor
Real user that added this comment on behalf of the user recorded in
author . |
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; see
PatchLineComment.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.
|
Modifier | Constructor and Description |
---|---|
protected |
PatchLineComment() |
|
PatchLineComment(PatchLineComment.Key id,
int line,
Account.Id a,
String parentUuid,
Timestamp when) |
|
PatchLineComment(PatchLineComment o) |
Modifier and Type | Method and 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() |
public static final char STATUS_DRAFT
public static final char STATUS_PUBLISHED
protected PatchLineComment.Key key
protected int lineNbr
protected Account.Id author
protected Timestamp writtenOn
protected char status
PatchLineComment.Status
.protected short side
protected String message
protected String parentUuid
protected CommentRange range
protected String tag
protected Account.Id realAuthor
author
.protected boolean unresolved
protected RevId revId
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.
protected PatchLineComment()
public PatchLineComment(PatchLineComment.Key id, int line, Account.Id a, String parentUuid, Timestamp when)
public PatchLineComment(PatchLineComment o)
public static PatchLineComment from(Change.Id changeId, PatchLineComment.Status status, Comment c)
public PatchLineComment.Key getKey()
public PatchSet.Id getPatchSetId()
public int getLine()
public void setLine(int line)
public Account.Id getAuthor()
public Account.Id getRealAuthor()
public void setRealAuthor(Account.Id id)
public Timestamp getWrittenOn()
public PatchLineComment.Status getStatus()
public void setStatus(PatchLineComment.Status s)
public short getSide()
public void setSide(short s)
public String getMessage()
public void setMessage(String s)
public void setWrittenOn(Timestamp ts)
public String getParentUuid()
public void setParentUuid(String inReplyTo)
public void setRange(Comment.Range r)
public void setRange(CommentRange r)
public CommentRange getRange()
public void setRevId(RevId rev)
public RevId getRevId()
public void setTag(String tag)
public String getTag()
public void setUnresolved(Boolean unresolved)
public Boolean getUnresolved()