public class IndexedChangeQuery extends IndexedQuery<com.google.gerrit.reviewdb.client.Change.Id,ChangeData> implements ChangeDataSource, 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.
index, source
Constructor and Description |
---|
IndexedChangeQuery(ChangeIndex index,
Predicate<ChangeData> pred,
QueryOptions opts) |
Modifier and Type | Method and Description |
---|---|
static QueryOptions |
createOptions(IndexConfig config,
int start,
int limit,
java.util.Set<java.lang.String> fields) |
int |
getCost() |
boolean |
hasChange() |
boolean |
match(ChangeData cd)
Does this predicate match this object?
|
static 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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCardinality
public IndexedChangeQuery(ChangeIndex index, Predicate<ChangeData> pred, QueryOptions opts) throws com.google.gerrit.server.query.QueryParseException
com.google.gerrit.server.query.QueryParseException
public static QueryOptions oneResult()
public static QueryOptions createOptions(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 DataSource<ChangeData>
read
in class IndexedQuery<com.google.gerrit.reviewdb.client.Change.Id,ChangeData>
com.google.gwtorm.server.OrmException
public boolean match(ChangeData cd) throws com.google.gwtorm.server.OrmException
Matchable
match
in interface Matchable<ChangeData>
com.google.gwtorm.server.OrmException
public int getCost()
getCost
in interface Matchable<ChangeData>
public boolean hasChange()
hasChange
in interface ChangeDataSource