Package com.google.gerrit.entities
Class PatchSetApproval
java.lang.Object
com.google.gerrit.entities.PatchSetApproval
An approval (or negative approval) on a patch set.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
Globally unique identifier. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PatchSetApproval.Builder
builder()
abstract boolean
copied()
copyWithPatchSet
(PatchSet.Id psId) Makes a copy ofPatchSetApproval
that applies topsId
.abstract Instant
granted()
boolean
abstract PatchSetApproval.Key
key()
static PatchSetApproval.Key
key
(PatchSet.Id patchSetId, Account.Id accountId, LabelId labelId) label()
labelId()
abstract boolean
abstract Account.Id
Real user that made this approval on behalf of the user recorded inPatchSetApproval.Key.accountId()
.tag()
abstract PatchSetApproval.Builder
abstract Optional
<PatchSetApproval.UUID> uuid()
static PatchSetApproval.UUID
abstract short
value()
Value assigned by the user.
-
Constructor Details
-
PatchSetApproval
public PatchSetApproval()
-
-
Method Details
-
key
public static PatchSetApproval.Key key(PatchSet.Id patchSetId, Account.Id accountId, LabelId labelId) -
uuid
-
builder
-
key
-
uuid
-
value
public abstract short value()Value assigned by the user.The precise meaning of "value" is up to each category.
In general:
- < 0: The approval is rejected/revoked.
- = 0: No indication either way is provided.
- > 0: The approval is approved/positive.
-
granted
-
tag
-
realAccountId
Real user that made this approval on behalf of the user recorded inPatchSetApproval.Key.accountId()
. -
postSubmit
public abstract boolean postSubmit() -
copied
public abstract boolean copied() -
toBuilder
-
copyWithPatchSet
Makes a copy ofPatchSetApproval
that applies topsId
.The returned
PatchSetApproval
has the samePatchSetApproval.UUID
as the originalPatchSetApproval
, which is generated when it is originally granted.This is needed since we want to keep the link between the original
PatchSetApproval
and thecopied()
one.- Parameters:
psId
-PatchSet.Id
ofPatchSet
that the copy should be applied to.- Returns:
copied()
PatchSetApproval
that applies topsId
.
-
patchSetId
-
accountId
-
labelId
-
label
-
isLegacySubmit
public boolean isLegacySubmit()
-