Class IsWatchedByPredicate
- java.lang.Object
-
- com.google.gerrit.index.query.Predicate<T>
-
- com.google.gerrit.index.query.AndPredicate<ChangeData>
-
- com.google.gerrit.server.query.change.IsWatchedByPredicate
-
- All Implemented Interfaces:
Matchable<ChangeData>
,Comparator<Predicate<ChangeData>>
public class IsWatchedByPredicate extends AndPredicate<ChangeData>
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUser
user
-
Constructor Summary
Constructors Constructor Description IsWatchedByPredicate(ChangeQueryBuilder.Arguments args, boolean checkIsVisible)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static String
describe(CurrentUser user)
protected static List<Predicate<ChangeData>>
filters(ChangeQueryBuilder.Arguments args, boolean checkIsVisible)
int
getCost()
protected static Collection<ProjectWatches.ProjectWatchKey>
getWatches(ChangeQueryBuilder.Arguments args)
String
toString()
-
Methods inherited from class com.google.gerrit.index.query.AndPredicate
compare, copy, equals, getChild, getChildCount, getChildren, hashCode, isMatchable, match
-
Methods inherited from class com.google.gerrit.index.query.Predicate
and, and, any, asMatchable, estimateCost, getLeafCount, not, or, or
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
user
protected final CurrentUser user
-
-
Constructor Detail
-
IsWatchedByPredicate
public IsWatchedByPredicate(ChangeQueryBuilder.Arguments args, boolean checkIsVisible) throws QueryParseException
- Throws:
QueryParseException
-
-
Method Detail
-
describe
protected static String describe(CurrentUser user)
-
filters
protected static List<Predicate<ChangeData>> filters(ChangeQueryBuilder.Arguments args, boolean checkIsVisible) throws QueryParseException
- Throws:
QueryParseException
-
getWatches
protected static Collection<ProjectWatches.ProjectWatchKey> getWatches(ChangeQueryBuilder.Arguments args) throws QueryParseException
- Throws:
QueryParseException
-
getCost
public int getCost()
- Specified by:
getCost
in interfaceMatchable<ChangeData>
- Overrides:
getCost
in classAndPredicate<ChangeData>
- Returns:
- a cost estimate to run this predicate, higher figures cost more.
-
toString
public String toString()
- Overrides:
toString
in classAndPredicate<ChangeData>
-
-