Class GroupQueryBuilder
- java.lang.Object
-
- com.google.gerrit.index.query.QueryBuilder<InternalGroup,GroupQueryBuilder>
-
- com.google.gerrit.server.query.group.GroupQueryBuilder
-
public class GroupQueryBuilder extends QueryBuilder<InternalGroup,GroupQueryBuilder>
Parses a query string meant to be applied to group objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGroupQueryBuilder.Arguments-
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 Modifier and Type Field Description static StringFIELD_DESCRIPTIONstatic StringFIELD_INNAMEstatic StringFIELD_LIMITstatic StringFIELD_NAMEstatic StringFIELD_OWNERstatic StringFIELD_UUID-
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 protected Predicate<InternalGroup>defaultField(String query)Handle a value present outside of an operator.Predicate<InternalGroup>description(String description)Predicate<InternalGroup>inname(String namePart)Predicate<InternalGroup>is(String value)Predicate<InternalGroup>limit(String query)Predicate<InternalGroup>member(String query)Predicate<InternalGroup>name(String name)Predicate<InternalGroup>owner(String owner)Predicate<InternalGroup>subgroup(String query)Predicate<InternalGroup>uuid(String uuid)-
Methods inherited from class com.google.gerrit.index.query.QueryBuilder
error, error, find, find, parse, parse, setOperatorAliases
-
-
-
-
Field Detail
-
FIELD_UUID
public static final String FIELD_UUID
- See Also:
- Constant Field Values
-
FIELD_DESCRIPTION
public static final String FIELD_DESCRIPTION
- See Also:
- Constant Field Values
-
FIELD_INNAME
public static final String FIELD_INNAME
- See Also:
- Constant Field Values
-
FIELD_NAME
public static final String FIELD_NAME
- See Also:
- Constant Field Values
-
FIELD_OWNER
public static final String FIELD_OWNER
- See Also:
- Constant Field Values
-
FIELD_LIMIT
public static final String FIELD_LIMIT
- See Also:
- Constant Field Values
-
-
Method Detail
-
uuid
public Predicate<InternalGroup> uuid(String uuid)
-
description
public Predicate<InternalGroup> description(String description) throws QueryParseException
- Throws:
QueryParseException
-
inname
public Predicate<InternalGroup> inname(String namePart)
-
name
public Predicate<InternalGroup> name(String name)
-
owner
public Predicate<InternalGroup> owner(String owner) throws QueryParseException
- Throws:
QueryParseException
-
is
public Predicate<InternalGroup> is(String value) throws QueryParseException
- Throws:
QueryParseException
-
defaultField
protected Predicate<InternalGroup> defaultField(String query) throws QueryParseException
Description copied from class:QueryBuilderHandle a value present outside of an operator.This default implementation always throws an "Unsupported query: " message containing the input text. Subclasses may override this method to perform do-what-i-mean guesses based on the input string.
- Overrides:
defaultFieldin classQueryBuilder<InternalGroup,GroupQueryBuilder>- Parameters:
query- the value supplied by itself in the query.- Returns:
- predicate representing this value.
- Throws:
QueryParseException- the parser does not recognize this value.
-
member
public Predicate<InternalGroup> member(String query) throws QueryParseException, org.eclipse.jgit.errors.ConfigInvalidException, IOException
- Throws:
QueryParseExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionIOException
-
subgroup
public Predicate<InternalGroup> subgroup(String query) throws QueryParseException
- Throws:
QueryParseException
-
limit
public Predicate<InternalGroup> limit(String query) throws QueryParseException
- Throws:
QueryParseException
-
-