Class PatchSet


  • public abstract class PatchSet
    extends Object
    A single revision of a Change.
    • Constructor Detail

      • PatchSet

        public PatchSet()
    • 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 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 return ObjectId.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.