Class PatchSet
- java.lang.Object
-
- com.google.gerrit.entities.PatchSet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PatchSet.Builder
static class
PatchSet.Id
-
Constructor Summary
Constructors Constructor Description PatchSet()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PatchSet.Builder
builder()
abstract org.eclipse.jgit.lib.ObjectId
commitId()
Commit ID of the patch set, also known as the revision.abstract Instant
createdOn()
When this patch set was first introduced onto the change.abstract Optional<String>
description()
Optional user-supplied description for this patch set.abstract com.google.common.collect.ImmutableList<String>
groups()
Opaque group identifier, usually assigned during creation.abstract PatchSet.Id
id()
ID of the patch set.static PatchSet.Id
id(Change.Id changeId, int id)
static boolean
isChangeRef(String name)
Is the reference name a change reference?static boolean
isRef(String name)
Deprecated.use isChangeRef instead.static String
joinGroups(List<String> groups)
int
number()
Patch set number.abstract Optional<String>
pushCertificate()
Certificate sent with a push that created this patch set.String
refName()
Name of the corresponding patch set ref.static com.google.common.collect.ImmutableList<String>
splitGroups(String joinedGroups)
abstract Account.Id
uploader()
Account that uploaded the patch set.
-
-
-
Method Detail
-
isChangeRef
public static boolean isChangeRef(String name)
Is the reference name a change reference?
-
isRef
@Deprecated @InlineMe(replacement="PatchSet.isChangeRef(name)", imports="com.google.gerrit.entities.PatchSet") public static boolean isRef(String name)
Deprecated.use isChangeRef instead.Is the reference name a change reference?
-
splitGroups
public static com.google.common.collect.ImmutableList<String> splitGroups(String joinedGroups)
-
id
public static PatchSet.Id id(Change.Id changeId, int id)
-
builder
public static PatchSet.Builder builder()
-
id
public abstract PatchSet.Id id()
ID of the patch set.
-
commitId
public abstract org.eclipse.jgit.lib.ObjectId commitId()
Commit ID of the patch set, also known as the revision.If this is a deserialized instance that was originally serialized by an older version of Gerrit, and the old data erroneously did not include a
commitId
, then this method will returnObjectId.zeroId()
.
-
uploader
public abstract Account.Id uploader()
Account that uploaded the patch set.If this is a deserialized instance that was originally serialized by an older version of Gerrit, and the old data erroneously did not include an
uploader
, then this method will return an account ID of 0.
-
createdOn
public abstract Instant createdOn()
When this patch set was first introduced onto the change.If this is a deserialized instance that was originally serialized by an older version of Gerrit, and the old data erroneously did not include a
createdOn
, then this method will return a timestamp of 0.
-
groups
public abstract com.google.common.collect.ImmutableList<String> groups()
Opaque group identifier, usually assigned during creation.This field is actually a comma-separated list of values, as in rare cases involving merge commits a patch set may belong to multiple groups.
Changes on the same branch having patch sets with intersecting groups are considered related, as in the "Related Changes" tab.
-
pushCertificate
public abstract Optional<String> pushCertificate()
Certificate sent with a push that created this patch set.
-
description
public abstract Optional<String> description()
Optional user-supplied description for this patch set.When this field is an empty
Optional
, the description was never set on the patch set. When this field is present but an empty string, the description was set and later cleared.
-
number
public int number()
Patch set number.
-
refName
public String refName()
Name of the corresponding patch set ref.
-
-