Class EqualsLabelPredicate
- java.lang.Object
-
- com.google.gerrit.index.query.Predicate<T>
-
- com.google.gerrit.index.query.OperatorPredicate<I>
-
- com.google.gerrit.index.query.IndexPredicate<ChangeData>
-
- com.google.gerrit.server.query.change.ChangeIndexPredicate
-
- com.google.gerrit.server.query.change.EqualsLabelPredicate
-
- All Implemented Interfaces:
Matchable<ChangeData>
public class EqualsLabelPredicate extends ChangeIndexPredicate
-
-
Field Summary
Fields Modifier and Type Field Description protected Account.Idaccountprotected intexpValprotected AccountGroup.UUIDgroupprotected Stringlabelprotected PermissionBackendpermissionBackendprotected ProjectCacheprojectCacheprotected IdentifiedUser.GenericFactoryuserFactory-
Fields inherited from class com.google.gerrit.index.query.OperatorPredicate
name, value
-
-
Constructor Summary
Constructors Constructor Description EqualsLabelPredicate(LabelPredicate.Args args, String label, int expVal, Account.Id account)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCost()booleanmatch(ChangeData object)Does this predicate match this object?protected booleanmatch(ChangeData cd, short value, Account.Id approver)protected static LabelTypetype(LabelTypes types, String toFind)-
Methods inherited from class com.google.gerrit.server.query.change.ChangeIndexPredicate
none
-
Methods inherited from class com.google.gerrit.index.query.IndexPredicate
getField, getType
-
Methods inherited from class com.google.gerrit.index.query.OperatorPredicate
copy, equals, getOperator, getValue, hashCode, toString
-
Methods inherited from class com.google.gerrit.index.query.Predicate
and, and, any, asMatchable, estimateCost, getChild, getChildCount, getChildren, getLeafCount, isMatchable, not, or, or
-
-
-
-
Field Detail
-
projectCache
protected final ProjectCache projectCache
-
permissionBackend
protected final PermissionBackend permissionBackend
-
userFactory
protected final IdentifiedUser.GenericFactory userFactory
-
label
protected final String label
-
expVal
protected final int expVal
-
account
protected final Account.Id account
-
group
protected final AccountGroup.UUID group
-
-
Constructor Detail
-
EqualsLabelPredicate
public EqualsLabelPredicate(LabelPredicate.Args args, String label, int expVal, Account.Id account)
-
-
Method Detail
-
match
public boolean match(ChangeData object)
Description copied from interface:MatchableDoes this predicate match this object?
-
type
protected static LabelType type(LabelTypes types, String toFind)
-
match
protected boolean match(ChangeData cd, short value, Account.Id approver)
-
getCost
public int getCost()
- Returns:
- a cost estimate to run this predicate, higher figures cost more.
-
-