Class ChangeIsVisibleToPredicate
- java.lang.Object
-
- com.google.gerrit.index.query.Predicate<T>
-
- com.google.gerrit.index.query.OperatorPredicate<T>
-
- com.google.gerrit.index.query.IsVisibleToPredicate<ChangeData>
-
- com.google.gerrit.server.query.change.ChangeIsVisibleToPredicate
-
- All Implemented Interfaces:
Matchable<ChangeData>
public class ChangeIsVisibleToPredicate extends IsVisibleToPredicate<ChangeData>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ChangeIsVisibleToPredicate.Factory
-
Field Summary
Fields Modifier and Type Field Description protected ChangeNotes.Factory
notesFactory
protected PermissionBackend
permissionBackend
protected ProjectCache
projectCache
protected CurrentUser
user
-
Fields inherited from class com.google.gerrit.index.query.OperatorPredicate
name, value
-
-
Constructor Summary
Constructors Constructor Description ChangeIsVisibleToPredicate(ChangeNotes.Factory notesFactory, PermissionBackend permissionBackend, ProjectCache projectCache, com.google.inject.Provider<AnonymousUser> anonymousUserProvider, CurrentUser user)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCost()
boolean
match(ChangeData cd)
Does this predicate match this object?-
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
-
notesFactory
protected final ChangeNotes.Factory notesFactory
-
user
protected final CurrentUser user
-
permissionBackend
protected final PermissionBackend permissionBackend
-
projectCache
protected final ProjectCache projectCache
-
-
Constructor Detail
-
ChangeIsVisibleToPredicate
@Inject public ChangeIsVisibleToPredicate(ChangeNotes.Factory notesFactory, PermissionBackend permissionBackend, ProjectCache projectCache, com.google.inject.Provider<AnonymousUser> anonymousUserProvider, CurrentUser user)
-
-
Method Detail
-
match
public boolean match(ChangeData cd)
Description copied from interface:Matchable
Does this predicate match this object?
-
getCost
public int getCost()
- Returns:
- a cost estimate to run this predicate, higher figures cost more.
-
-