Class OrSource
- java.lang.Object
-
- com.google.gerrit.index.query.Predicate<T>
-
- com.google.gerrit.index.query.OrPredicate<ChangeData>
-
- com.google.gerrit.server.query.change.OrSource
-
- All Implemented Interfaces:
DataSource<ChangeData>
,HasCardinality
,Matchable<ChangeData>
,ChangeDataSource
public class OrSource extends OrPredicate<ChangeData> implements ChangeDataSource
-
-
Constructor Summary
Constructors Constructor Description OrSource(Collection<? extends Predicate<ChangeData>> that)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCardinality()
boolean
hasChange()
ResultSet<ChangeData>
read()
ResultSet<FieldBundle>
readRaw()
-
Methods inherited from class com.google.gerrit.index.query.OrPredicate
copy, equals, getChild, getChildCount, getChildren, getCost, hashCode, isMatchable, match, toString
-
Methods inherited from class com.google.gerrit.index.query.Predicate
and, and, any, asMatchable, estimateCost, getLeafCount, not, or, or
-
-
-
-
Constructor Detail
-
OrSource
public OrSource(Collection<? extends Predicate<ChangeData>> that)
-
-
Method Detail
-
read
public ResultSet<ChangeData> read()
- Specified by:
read
in interfaceDataSource<ChangeData>
- Returns:
- read from the database and return the results.
-
readRaw
public ResultSet<FieldBundle> readRaw()
- Specified by:
readRaw
in interfaceDataSource<ChangeData>
- Returns:
- read from the database and return the raw results.
-
hasChange
public boolean hasChange()
- Specified by:
hasChange
in interfaceChangeDataSource
- Returns:
- true if all returned ChangeData.hasChange() will be true.
-
getCardinality
public int getCardinality()
- Specified by:
getCardinality
in interfaceHasCardinality
- Returns:
- an estimate of the number of results a source can return.
-
-