public class IndexedChangeQuery extends com.google.gerrit.index.IndexedQuery<Change.Id,ChangeData> implements ChangeDataSource, com.google.gerrit.index.query.Matchable<ChangeData>
IndexPredicate
together with a ChangeDataSource
that returns
matching results from the index.
Appropriate to return as the rootmost predicate that can be processed using the secondary
index; such predicates must also implement ChangeDataSource
to be chosen by the query
processor.
Constructor and Description |
---|
IndexedChangeQuery(ChangeIndex index,
com.google.gerrit.index.query.Predicate<ChangeData> pred,
com.google.gerrit.index.QueryOptions opts) |
Modifier and Type | Method and Description |
---|---|
static com.google.gerrit.index.QueryOptions |
createOptions(com.google.gerrit.index.IndexConfig config,
int start,
int limit,
java.util.Set<java.lang.String> fields) |
int |
getCost() |
boolean |
hasChange() |
boolean |
match(ChangeData cd) |
static com.google.gerrit.index.QueryOptions |
oneResult() |
com.google.gwtorm.server.ResultSet<ChangeData> |
read() |
copy, equals, getCardinality, getChild, getChildCount, getChildren, getOptions, hashCode, restart, toString
and, and, any, asMatchable, estimateCost, isMatchable, not, or, or
public IndexedChangeQuery(ChangeIndex index, com.google.gerrit.index.query.Predicate<ChangeData> pred, com.google.gerrit.index.QueryOptions opts) throws QueryParseException
QueryParseException
public static com.google.gerrit.index.QueryOptions oneResult()
public static com.google.gerrit.index.QueryOptions createOptions(com.google.gerrit.index.IndexConfig config, int start, int limit, java.util.Set<java.lang.String> fields)
public com.google.gwtorm.server.ResultSet<ChangeData> read() throws com.google.gwtorm.server.OrmException
read
in interface com.google.gerrit.index.query.DataSource<ChangeData>
read
in class com.google.gerrit.index.IndexedQuery<Change.Id,ChangeData>
com.google.gwtorm.server.OrmException
public boolean match(ChangeData cd) throws com.google.gwtorm.server.OrmException
match
in interface com.google.gerrit.index.query.Matchable<ChangeData>
com.google.gwtorm.server.OrmException
public int getCost()
getCost
in interface com.google.gerrit.index.query.Matchable<ChangeData>
public boolean hasChange()
hasChange
in interface ChangeDataSource