Class SubmitRequirementChangeQueryBuilder
- java.lang.Object
-
- com.google.gerrit.index.query.QueryBuilder<ChangeData,ChangeQueryBuilder>
-
- com.google.gerrit.server.query.change.ChangeQueryBuilder
-
- com.google.gerrit.server.query.change.SubmitRequirementChangeQueryBuilder
-
public class SubmitRequirementChangeQueryBuilder extends ChangeQueryBuilder
A query builder for submit requirement expressions that includes allChangeQueryBuilderoperators, in addition to extra operators contributed by this class.Operators defined in this class cannot be used in change queries.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gerrit.server.query.change.ChangeQueryBuilder
ChangeQueryBuilder.Arguments, ChangeQueryBuilder.ChangeHasOperandFactory, ChangeQueryBuilder.ChangeIsOperandFactory, ChangeQueryBuilder.ChangeOperandFactory, ChangeQueryBuilder.ChangeOperatorFactory
-
Nested classes/interfaces inherited from class com.google.gerrit.index.query.QueryBuilder
QueryBuilder.Definition<T,Q extends QueryBuilder<T,Q>>, QueryBuilder.Operator, QueryBuilder.OperatorFactory<T,Q extends QueryBuilder<T,Q>>
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.server.query.change.ChangeQueryBuilder
ARG_COUNT, ARG_ID_GROUP, ARG_ID_NAME, ARG_ID_NON_UPLOADER, ARG_ID_OWNER, ARG_ID_USER, FIELD_ADDED, FIELD_AGE, FIELD_ASSIGNEE, FIELD_ATTENTION_SET_FULL, FIELD_ATTENTION_SET_USERS, FIELD_ATTENTION_SET_USERS_COUNT, FIELD_AUTHOR, FIELD_CHANGE, FIELD_CHANGE_ID, FIELD_CHERRY_PICK_OF_CHANGE, FIELD_CHERRY_PICK_OF_PATCHSET, FIELD_CHERRYPICK, FIELD_COMMENT, FIELD_COMMENTBY, FIELD_COMMIT, FIELD_COMMITTER, FIELD_CONFLICTS, FIELD_DELETED, FIELD_DELTA, FIELD_DESTINATION, FIELD_DIRECTORY, FIELD_DRAFTBY, FIELD_EDITBY, FIELD_EXACTAUTHOR, FIELD_EXACTCOMMIT, FIELD_EXACTCOMMITTER, FIELD_EXTENSION, FIELD_FILE, FIELD_FILEPART, FIELD_FOOTER, FIELD_FOOTER_NAME, FIELD_GROUP, FIELD_HASHTAG, FIELD_IS_SUBMITTABLE, FIELD_LABEL, FIELD_LIMIT, FIELD_MERGE, FIELD_MERGEABLE, FIELD_MERGED_ON, FIELD_MESSAGE, FIELD_MESSAGE_EXACT, FIELD_ONLY_EXTENSIONS, FIELD_OWNER, FIELD_OWNERIN, FIELD_PARENTOF, FIELD_PARENTPROJECT, FIELD_PENDING_REVIEWER, FIELD_PENDING_REVIEWER_BY_EMAIL, FIELD_PRIVATE, FIELD_PROJECT, FIELD_PROJECTS, FIELD_PURE_REVERT, FIELD_REF, FIELD_REVERTOF, FIELD_REVIEWEDBY, FIELD_REVIEWERIN, FIELD_STAR, FIELD_STARBY, FIELD_STARTED, FIELD_STATUS, FIELD_SUBMISSIONID, FIELD_TR, FIELD_UNRESOLVED_COMMENT_COUNT, FIELD_UPLOADER, FIELD_UPLOADERIN, FIELD_VISIBLETO, FIELD_WATCHEDBY, FIELD_WIP, hasOperandAliases, NON_UPLOADER_ACCOUNT_ID, OPERATOR_AFTER, OPERATOR_BEFORE, OPERATOR_MERGED_AFTER, OPERATOR_MERGED_BEFORE, OWNER_ACCOUNT_ID
-
Fields inherited from class com.google.gerrit.index.query.QueryBuilder
builderDef, opAliases
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate<ChangeData>authoremail(String who)protected voidcheckFieldAvailable(FieldDef<ChangeData,?> field, String operator)Predicate<ChangeData>distinctvoters(String value)Predicate<ChangeData>file(String value)A SR operator that can match with file path and content pattern.Predicate<ChangeData>is(String value)-
Methods inherited from class com.google.gerrit.server.query.change.ChangeQueryBuilder
added, after, age, assignee, asUser, attention, author, before, branch, bug, cc, change, cherryPickOf, comment, commentby, commit, committer, conflicts, defaultField, deleted, delta, destination, dir, directory, ext, extension, f, footer, from, getDestinationList, has, hasfooter, hashtag, inhashtag, intopic, isVisible, label, limit, loadDestinationList, mergedAfter, mergedBefore, message, o, onlyextensions, onlyexts, owner, ownerin, p, parentof, parentproject, parentrepo, parentrepository, path, prefixhashtag, prefixtopic, project, projects, query, r, ref, repo, repos, repositories, repository, revertof, reviewedby, reviewer, reviewerByState, reviewerin, rule, since, size, status, statusOpen, submissionId, topic, tr, unresolved, until, uploader, uploaderin, visibleto, visibleto
-
Methods inherited from class com.google.gerrit.index.query.QueryBuilder
error, error, find, find, parse, parse, setOperatorAliases
-
-
-
-
Method Detail
-
checkFieldAvailable
protected void checkFieldAvailable(FieldDef<ChangeData,?> field, String operator)
- Overrides:
checkFieldAvailablein classChangeQueryBuilder
-
is
public Predicate<ChangeData> is(String value) throws QueryParseException
- Overrides:
isin classChangeQueryBuilder- Throws:
QueryParseException
-
authoremail
public Predicate<ChangeData> authoremail(String who) throws QueryParseException
- Throws:
QueryParseException
-
distinctvoters
public Predicate<ChangeData> distinctvoters(String value) throws QueryParseException
- Throws:
QueryParseException
-
file
public Predicate<ChangeData> file(String value) throws QueryParseException
A SR operator that can match with file path and content pattern. The value should be of the form:file:"'$filePattern',withDiffContaining='$contentPattern'"
The operator matches with changes that have their latest PS vs. base diff containing a file path matching the
filePatternwith an edit (added, deleted, modified) matching thecontentPattern.filePatternandcontentPatterncan start with "^" to use regular expression matching.If the specified value does not match this form, we fall back to the operator's implementation in
ChangeQueryBuilder.- Overrides:
filein classChangeQueryBuilder- Parameters:
value- the value of thefilequery operator- Throws:
QueryParseException- thrown if parsing the value fails (may be thrown by subclasses)
-
-