Class ChangePredicates

java.lang.Object
com.google.gerrit.server.query.change.ChangePredicates

public class ChangePredicates extends Object
Predicates that match against ChangeData.
  • Method Details

    • attentionSet

      public static Predicate<ChangeData> attentionSet(Account.Id id)
      Returns a predicate that matches changes where the provided Account.Id is in the attention set.
    • revertOf

      public static Predicate<ChangeData> revertOf(Change.Id revertOf)
      Returns a predicate that matches changes that are a revert of the provided Change.Id.
    • commentBy

      public static Predicate<ChangeData> commentBy(Account.Id id)
      Returns a predicate that matches changes that have a comment authored by the provided Account.Id.
    • draftBy

      public static Predicate<ChangeData> draftBy(DraftCommentsReader draftCommentsReader, Account.Id id)
      Returns a predicate that matches changes where the provided Account.Id has a pending draft comment.
    • starBy

      public static Predicate<ChangeData> starBy(StarredChangesReader starredChangesReader, Account.Id id)
      Returns a predicate that matches changes where the provided Account.Id has starred changes with label.
    • reviewedBy

      public static Predicate<ChangeData> reviewedBy(Collection<Account.Id> ids)
      Returns a predicate that matches changes that were reviewed by any of the provided Account.Id.
    • unreviewed

      public static Predicate<ChangeData> unreviewed()
      Returns a predicate that matches changes that were not yet reviewed.
    • idStr

      public static Predicate<ChangeData> idStr(Change.Id id)
      Returns a predicate that matches the change with the provided Change.Id.
    • idStr

      public static Predicate<ChangeData> idStr(String id)
    • owner

      public static Predicate<ChangeData> owner(Account.Id id)
      Returns a predicate that matches changes owned by the provided Account.Id.
    • uploader

      public static Predicate<ChangeData> uploader(Account.Id id)
      Returns a predicate that matches changes where the latest patch set was uploaded by the provided Account.Id.
    • cherryPickOf

      public static Predicate<ChangeData> cherryPickOf(Change.Id id)
      Returns a predicate that matches changes that are a cherry pick of the provided Change.Id.
    • cherryPickOf

      public static Predicate<ChangeData> cherryPickOf(PatchSet.Id psId)
      Returns a predicate that matches changes that are a cherry pick of the provided PatchSet.Id.
    • project

      public static Predicate<ChangeData> project(Project.NameKey id)
      Returns a predicate that matches changes in the provided Project.NameKey.
    • ref

      public static Predicate<ChangeData> ref(String refName)
      Returns a predicate that matches changes targeted at the provided refName.
    • exactTopic

      public static Predicate<ChangeData> exactTopic(String topic)
      Returns a predicate that matches changes in the provided topic.
    • fuzzyTopic

      public static Predicate<ChangeData> fuzzyTopic(String topic)
      Returns a predicate that matches changes in the provided topic.
    • prefixTopic

      public static Predicate<ChangeData> prefixTopic(String topic)
      Returns a predicate that matches changes in the provided topic. Used with prefixes
    • submissionId

      public static Predicate<ChangeData> submissionId(String changeSet)
      Returns a predicate that matches changes submitted in the provided changeSet.
    • path

      public static Predicate<ChangeData> path(String path)
      Returns a predicate that matches changes that modified the provided path.
    • hashtag

      public static Predicate<ChangeData> hashtag(String hashtag)
      Returns a predicate that matches changes tagged with the provided hashtag.
    • fuzzyHashtag

      public static Predicate<ChangeData> fuzzyHashtag(String hashtag)
      Returns a predicate that matches changes tagged with the provided hashtag.
    • prefixHashtag

      public static Predicate<ChangeData> prefixHashtag(String hashtag)
      Returns a predicate that matches changes in the provided hashtag. Used with prefixes
    • file

      public static Predicate<ChangeData> file(ChangeQueryBuilder.Arguments args, String file)
      Returns a predicate that matches changes that modified the provided file.
    • footer

      public static Predicate<ChangeData> footer(String footer)
      Returns a predicate that matches changes with the provided footer in their commit message.
    • hasFooter

      public static Predicate<ChangeData> hasFooter(String footerName)
      Returns a predicate that matches changes with the provided footer name in their commit message.
    • directory

      public static Predicate<ChangeData> directory(String directory)
      Returns a predicate that matches changes that modified files in the provided directory.
    • trackingId

      public static Predicate<ChangeData> trackingId(String trackingId)
      Returns a predicate that matches changes with the provided trackingId.
    • exactAuthor

      public static Predicate<ChangeData> exactAuthor(String exactAuthor)
      Returns a predicate that matches changes authored by the provided exactAuthor.
    • author

      public static Predicate<ChangeData> author(String author)
      Returns a predicate that matches changes authored by the provided author.
    • exactCommitter

      public static Predicate<ChangeData> exactCommitter(String exactCommitter)
      Returns a predicate that matches changes where the patch set was committed by exactCommitter.
    • committer

      public static Predicate<ChangeData> committer(String comitter)
      Returns a predicate that matches changes where the patch set was committed by committer.
    • idPrefix

      public static Predicate<ChangeData> idPrefix(String id)
      Returns a predicate that matches changes whose ID starts with the provided id.
    • projectPrefix

      public static Predicate<ChangeData> projectPrefix(String prefix)
      Returns a predicate that matches changes in a project that has the provided prefix in its name.
    • commitPrefix

      public static Predicate<ChangeData> commitPrefix(String commitId)
      Returns a predicate that matches changes where a patch set has the provided commitId either as prefix or as full ObjectId.
    • message

      public static Predicate<ChangeData> message(String message)
      Returns a predicate that matches changes where the provided message appears in the commit message. Uses full-text search semantics.
    • subject

      public static Predicate<ChangeData> subject(String subject)
    • prefixSubject

      public static Predicate<ChangeData> prefixSubject(String subject)
    • comment

      public static Predicate<ChangeData> comment(String comment)
      Returns a predicate that matches changes where the provided comment appears in any comment on any patch set of the change. Uses full-text search semantics.
    • submitRuleStatus

      public static Predicate<ChangeData> submitRuleStatus(String value)
      Returns a predicate that matches with changes having a specific submit rule evaluating to a certain result. Value should be in the form of "$ruleName=$status" with $ruleName equals to '$plugin_name~$rule_name' and $rule_name equals to the name of the class that implements the SubmitRule. For gerrit core rules, $ruleName should be in the form of 'gerrit~$rule_name'.
    • pureRevert

      public static Predicate<ChangeData> pureRevert(String value)
      Returns a predicate that matches with changes that are pure reverts if value is equal to "1", or non-pure reverts if value is "0".
    • isSubmittable

      public static Predicate<ChangeData> isSubmittable(String value)
      Returns a predicate that matches with changes that are submittable if value is equal to "1", or non-submittable if value is "0".

      The computation of this field is based on the evaluation of SubmitRequirements.