Class ChangePredicates
- java.lang.Object
-
- com.google.gerrit.server.query.change.ChangePredicates
-
public class ChangePredicates extends Object
Predicates that match againstChangeData
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Predicate<ChangeData>
assignee(Account.Id id)
Returns a predicate that matches changes that are assigned to the providedAccount.Id
.static Predicate<ChangeData>
attentionSet(Account.Id id)
Returns a predicate that matches changes where the providedAccount.Id
is in the attention set.static Predicate<ChangeData>
author(String author)
Returns a predicate that matches changes authored by the providedauthor
.static Predicate<ChangeData>
cherryPickOf(Change.Id id)
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>
comment(String comment)
Returns a predicate that matches changes where the providedcomment
appears 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 providedcommitId
either as prefix or as fullObjectId
.static Predicate<ChangeData>
committer(String comitter)
Returns a predicate that matches changes where the patch set was committed bycommitter
.static Predicate<ChangeData>
directory(String directory)
Returns a predicate that matches changes that modified files in the provideddirectory
.static Predicate<ChangeData>
draftBy(Account.Id id)
Returns a predicate that matches changes where the providedAccount.Id
has a pending draft comment.static Predicate<ChangeData>
editBy(Account.Id id)
Returns a predicate that matches changes where the providedAccount.Id
has a pending change edit.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>
footer(String footer)
Returns a predicate that matches changes with the providedfooter
in 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>
hashtag(String hashtag)
Returns a predicate that matches changes tagged with the providedhashtag
.static Predicate<ChangeData>
id(Change.Id id)
Returns a predicate that matches the change with the providedChange.Id
.static Predicate<ChangeData>
idPrefix(String id)
Returns a predicate that matches changes whose ID starts with the providedid
.static Predicate<ChangeData>
idStr(Change.Id id)
Returns a predicate that matches the change with the providedChange.Id
.static Predicate<ChangeData>
message(String message)
Returns a predicate that matches changes where the providedmessage
appears 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>
path(String path)
Returns a predicate that matches changes that modified the providedpath
.static Predicate<ChangeData>
project(Project.NameKey id)
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 providedprefix
in its name.static Predicate<ChangeData>
ref(String refName)
Returns a predicate that matches changes targeted at the providedrefName
.static Predicate<ChangeData>
revertOf(Change.Id revertOf)
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>
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>
unreviewed()
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 Detail
-
attentionSet
public static Predicate<ChangeData> attentionSet(Account.Id id)
Returns a predicate that matches changes where the providedAccount.Id
is in the attention set.
-
assignee
public static Predicate<ChangeData> assignee(Account.Id id)
Returns a predicate that matches changes that are assigned to the providedAccount.Id
.
-
revertOf
public static Predicate<ChangeData> revertOf(Change.Id revertOf)
Returns a predicate that matches changes that are a revert of the providedChange.Id
.
-
commentBy
public static Predicate<ChangeData> commentBy(Account.Id id)
Returns a predicate that matches changes that have a comment authored by the providedAccount.Id
.
-
editBy
public static Predicate<ChangeData> editBy(Account.Id id)
Returns a predicate that matches changes where the providedAccount.Id
has a pending change edit.
-
draftBy
public static Predicate<ChangeData> draftBy(Account.Id id)
Returns a predicate that matches changes where the providedAccount.Id
has a pending draft comment.
-
reviewedBy
public static Predicate<ChangeData> reviewedBy(Collection<Account.Id> ids)
Returns a predicate that matches changes that were reviewed by any of the providedAccount.Id
.
-
unreviewed
public static Predicate<ChangeData> unreviewed()
Returns a predicate that matches changes that were not yet reviewed.
-
id
public static Predicate<ChangeData> id(Change.Id id)
Returns a predicate that matches the change with the providedChange.Id
.
-
idStr
public static Predicate<ChangeData> idStr(Change.Id id)
Returns a predicate that matches the change with the providedChange.Id
.
-
owner
public static Predicate<ChangeData> owner(Account.Id id)
Returns a predicate that matches changes owned by the providedAccount.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 providedAccount.Id
.
-
cherryPickOf
public static Predicate<ChangeData> cherryPickOf(Change.Id id)
Returns a predicate that matches changes that are a cherry pick of the providedChange.Id
.
-
cherryPickOf
public static Predicate<ChangeData> cherryPickOf(PatchSet.Id psId)
Returns a predicate that matches changes that are a cherry pick of the providedPatchSet.Id
.
-
project
public static Predicate<ChangeData> project(Project.NameKey id)
Returns a predicate that matches changes in the providedProject.NameKey
.
-
ref
public static Predicate<ChangeData> ref(String refName)
Returns a predicate that matches changes targeted at the providedrefName
.
-
exactTopic
public static Predicate<ChangeData> exactTopic(String topic)
Returns a predicate that matches changes in the providedtopic
.
-
fuzzyTopic
public static Predicate<ChangeData> fuzzyTopic(String topic)
Returns a predicate that matches changes in the providedtopic
.
-
submissionId
public static Predicate<ChangeData> submissionId(String changeSet)
Returns a predicate that matches changes submitted in the providedchangeSet
.
-
path
public static Predicate<ChangeData> path(String path)
Returns a predicate that matches changes that modified the providedpath
.
-
hashtag
public static Predicate<ChangeData> hashtag(String hashtag)
Returns a predicate that matches changes tagged with the providedhashtag
.
-
fuzzyHashtag
public static Predicate<ChangeData> fuzzyHashtag(String hashtag)
Returns a predicate that matches changes tagged with the providedhashtag
.
-
file
public static Predicate<ChangeData> file(ChangeQueryBuilder.Arguments args, String file)
Returns a predicate that matches changes that modified the providedfile
.
-
footer
public static Predicate<ChangeData> footer(String footer)
Returns a predicate that matches changes with the providedfooter
in their commit message.
-
directory
public static Predicate<ChangeData> directory(String directory)
Returns a predicate that matches changes that modified files in the provideddirectory
.
-
trackingId
public static Predicate<ChangeData> trackingId(String trackingId)
Returns a predicate that matches changes with the providedtrackingId
.
-
exactAuthor
public static Predicate<ChangeData> exactAuthor(String exactAuthor)
Returns a predicate that matches changes authored by the providedexactAuthor
.
-
author
public static Predicate<ChangeData> author(String author)
Returns a predicate that matches changes authored by the providedauthor
.
-
exactCommitter
public static Predicate<ChangeData> exactCommitter(String exactCommitter)
Returns a predicate that matches changes where the patch set was committed byexactCommitter
.
-
committer
public static Predicate<ChangeData> committer(String comitter)
Returns a predicate that matches changes where the patch set was committed bycommitter
.
-
idPrefix
public static Predicate<ChangeData> idPrefix(String id)
Returns a predicate that matches changes whose ID starts with the providedid
.
-
projectPrefix
public static Predicate<ChangeData> projectPrefix(String prefix)
Returns a predicate that matches changes in a project that has the providedprefix
in its name.
-
commitPrefix
public static Predicate<ChangeData> commitPrefix(String commitId)
Returns a predicate that matches changes where a patch set has the providedcommitId
either as prefix or as fullObjectId
.
-
message
public static Predicate<ChangeData> message(String message)
Returns a predicate that matches changes where the providedmessage
appears in the commit message. Uses full-text search semantics.
-
comment
public static Predicate<ChangeData> comment(String comment)
Returns a predicate that matches changes where the providedcomment
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 theSubmitRule
. For gerrit core rules, $ruleName should be in the form of 'gerrit~$rule_name'.
-
-