Class ChangePredicates
java.lang.Object
com.google.gerrit.server.query.change.ChangePredicates
Predicates that match against
ChangeData.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classA default implementation ofChangePredicates.EditByPredicateProvider, based on thChangeField.EDITBY_SPECindex field. -
Method Summary
Modifier and TypeMethodDescriptionstatic Predicate<ChangeData> Returns a predicate that matches changes where the providedAccount.Idis in the attention set.static Predicate<ChangeData> Returns a predicate that matches changes authored by the providedauthor.static Predicate<ChangeData> Returns a predicate that matches the change number with the providedChange.Id.static Predicate<ChangeData> Returns a predicate that matches changes that are a cherry pick of the providedChange.Id.static Predicate<ChangeData> cherryPickOf(PatchSet.Id psId) Returns a predicate that matches changes that are a cherry pick of the providedPatchSet.Id.static Predicate<ChangeData> Returns a predicate that matches changes where the providedcommentappears in any comment on any patch set of the change.static Predicate<ChangeData> commentBy(Account.Id id) Returns a predicate that matches changes that have a comment authored by the providedAccount.Id.static Predicate<ChangeData> commitPrefix(String commitId) Returns a predicate that matches changes where a patch set has the providedcommitIdeither as prefix or as fullObjectId.static Predicate<ChangeData> Returns a predicate that matches changes where the patch set was committed bycommitter.static Predicate<ChangeData> Returns a predicate that matches changes that modified files in the provideddirectory.static Predicate<ChangeData> draftBy(DraftCommentsReader draftCommentsReader, Account.Id id) Returns a predicate that matches changes where the providedAccount.Idhas a pending draft comment.static Predicate<ChangeData> exactAuthor(String exactAuthor) Returns a predicate that matches changes authored by the providedexactAuthor.static Predicate<ChangeData> exactCommitter(String exactCommitter) Returns a predicate that matches changes where the patch set was committed byexactCommitter.static Predicate<ChangeData> exactTopic(String topic) Returns a predicate that matches changes in the providedtopic.static Predicate<ChangeData> file(ChangeQueryBuilder.Arguments args, String file) Returns a predicate that matches changes that modified the providedfile.static Predicate<ChangeData> Returns a predicate that matches changes with the providedfooterin their commit message.static Predicate<ChangeData> fuzzyHashtag(String hashtag) Returns a predicate that matches changes tagged with the providedhashtag.static Predicate<ChangeData> fuzzyTopic(String topic) Returns a predicate that matches changes in the providedtopic.static Predicate<ChangeData> Returns a predicate that matches changes with the providedfootername in their commit message.static Predicate<ChangeData> Returns a predicate that matches changes tagged with the providedhashtag.static Predicate<ChangeData> Returns a predicate that matches changes whose ID starts with the providedid.static Predicate<ChangeData> Returns a predicate that matches the change with the providedChange.Id.static Predicate<ChangeData> static Predicate<ChangeData> isSubmittable(String value) Returns a predicate that matches with changes that are submittable ifvalueis equal to "1", or non-submittable ifvalueis "0".static Predicate<ChangeData> Returns a predicate that matches changes where the providedmessageappears in the commit message.static Predicate<ChangeData> owner(Account.Id id) Returns a predicate that matches changes owned by the providedAccount.Id.static Predicate<ChangeData> Returns a predicate that matches changes that modified the providedpath.static Predicate<ChangeData> prefixHashtag(String hashtag) Returns a predicate that matches changes in the providedhashtag.static Predicate<ChangeData> prefixSubject(String subject) static Predicate<ChangeData> prefixTopic(String topic) Returns a predicate that matches changes in the providedtopic.static Predicate<ChangeData> Returns a predicate that matches changes in the providedProject.NameKey.static Predicate<ChangeData> projectPrefix(String prefix) Returns a predicate that matches changes in a project that has the providedprefixin its name.static Predicate<ChangeData> pureRevert(String value) Returns a predicate that matches with changes that are pure reverts ifvalueis equal to "1", or non-pure reverts ifvalueis "0".static Predicate<ChangeData> Returns a predicate that matches changes targeted at the providedrefName.static Predicate<ChangeData> Returns a predicate that matches changes that are a revert of the providedChange.Id.static Predicate<ChangeData> reviewedBy(Collection<Account.Id> ids) Returns a predicate that matches changes that were reviewed by any of the providedAccount.Id.static Predicate<ChangeData> starBy(StarredChangesReader starredChangesReader, Account.Id id) Returns a predicate that matches changes where the providedAccount.Idhas starred changes withlabel.static Predicate<ChangeData> static Predicate<ChangeData> submissionId(String changeSet) Returns a predicate that matches changes submitted in the providedchangeSet.static Predicate<ChangeData> submitRuleStatus(String value) Returns a predicate that matches with changes having a specific submit rule evaluating to a certain result.static Predicate<ChangeData> trackingId(String trackingId) Returns a predicate that matches changes with the providedtrackingId.static Predicate<ChangeData> Returns a predicate that matches changes that were not yet reviewed.static Predicate<ChangeData> uploader(Account.Id id) Returns a predicate that matches changes where the latest patch set was uploaded by the providedAccount.Id.
-
Method Details
-
attentionSet
Returns a predicate that matches changes where the providedAccount.Idis in the attention set. -
revertOf
Returns a predicate that matches changes that are a revert of the providedChange.Id. -
commentBy
Returns a predicate that matches changes that have a comment authored by the providedAccount.Id. -
draftBy
Returns a predicate that matches changes where the providedAccount.Idhas a pending draft comment.The predicates filter by "legacy_id_str" field.
-
starBy
public static Predicate<ChangeData> starBy(StarredChangesReader starredChangesReader, Account.Id id) Returns a predicate that matches changes where the providedAccount.Idhas starred changes withlabel.The predicates filter by "legacy_id_str" field.
-
reviewedBy
Returns a predicate that matches changes that were reviewed by any of the providedAccount.Id. -
unreviewed
Returns a predicate that matches changes that were not yet reviewed. -
idStr
Returns a predicate that matches the change with the providedChange.Id. -
idStr
-
changeNumber
Returns a predicate that matches the change number with the providedChange.Id. -
owner
Returns a predicate that matches changes owned by the providedAccount.Id. -
uploader
Returns a predicate that matches changes where the latest patch set was uploaded by the providedAccount.Id. -
cherryPickOf
Returns a predicate that matches changes that are a cherry pick of the providedChange.Id. -
cherryPickOf
Returns a predicate that matches changes that are a cherry pick of the providedPatchSet.Id. -
project
Returns a predicate that matches changes in the providedProject.NameKey. -
ref
Returns a predicate that matches changes targeted at the providedrefName. -
exactTopic
Returns a predicate that matches changes in the providedtopic. -
fuzzyTopic
Returns a predicate that matches changes in the providedtopic. -
prefixTopic
Returns a predicate that matches changes in the providedtopic. Used with prefixes -
submissionId
Returns a predicate that matches changes submitted in the providedchangeSet. -
path
Returns a predicate that matches changes that modified the providedpath. -
hashtag
Returns a predicate that matches changes tagged with the providedhashtag. -
fuzzyHashtag
Returns a predicate that matches changes tagged with the providedhashtag. -
prefixHashtag
Returns a predicate that matches changes in the providedhashtag. Used with prefixes -
file
Returns a predicate that matches changes that modified the providedfile. -
directory
Returns a predicate that matches changes that modified files in the provideddirectory. -
trackingId
Returns a predicate that matches changes with the providedtrackingId. -
exactAuthor
Returns a predicate that matches changes authored by the providedexactAuthor. -
author
Returns a predicate that matches changes authored by the providedauthor. -
exactCommitter
Returns a predicate that matches changes where the patch set was committed byexactCommitter. -
committer
Returns a predicate that matches changes where the patch set was committed bycommitter. -
idPrefix
Returns a predicate that matches changes whose ID starts with the providedid. -
projectPrefix
Returns a predicate that matches changes in a project that has the providedprefixin its name. -
commitPrefix
Returns a predicate that matches changes where a patch set has the providedcommitIdeither as prefix or as fullObjectId. -
message
Returns a predicate that matches changes where the providedmessageappears in the commit message. Uses full-text search semantics. -
subject
-
prefixSubject
-
comment
Returns a predicate that matches changes where the providedcommentappears in any comment on any patch set of the change. Uses full-text search semantics. -
submitRuleStatus
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 theSubmitRule. For gerrit core rules, $ruleName should be in the form of 'gerrit~$rule_name'. -
pureRevert
Returns a predicate that matches with changes that are pure reverts ifvalueis equal to "1", or non-pure reverts ifvalueis "0". -
isSubmittable
Returns a predicate that matches with changes that are submittable ifvalueis equal to "1", or non-submittable ifvalueis "0".The computation of this field is based on the evaluation of
SubmitRequirements.
-