public class IndexedChangeQuery extends Predicate<ChangeData> implements ChangeDataSource, Paginated
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,
Predicate<ChangeData> pred,
int limit) |
Modifier and Type | Method and Description |
---|---|
Predicate<ChangeData> |
copy(Collection<? extends Predicate<ChangeData>> children)
Create a copy of this predicate, with new children.
|
boolean |
equals(Object other) |
int |
getCardinality() |
Predicate<ChangeData> |
getChild(int i)
Same as
getChildren().get(i) |
int |
getChildCount()
Same as
getChildren().size() |
List<Predicate<ChangeData>> |
getChildren()
Get the children of this predicate, if any.
|
int |
getCost() |
boolean |
hasChange() |
int |
hashCode() |
int |
limit() |
boolean |
match(ChangeData cd)
Does this predicate match this object?
|
com.google.gwtorm.server.ResultSet<ChangeData> |
read() |
com.google.gwtorm.server.ResultSet<ChangeData> |
restart(int start) |
String |
toString() |
public IndexedChangeQuery(ChangeIndex index, Predicate<ChangeData> pred, int limit) throws com.google.gerrit.server.query.QueryParseException
com.google.gerrit.server.query.QueryParseException
public int getChildCount()
Predicate
getChildren().size()
getChildCount
in class Predicate<ChangeData>
public Predicate<ChangeData> getChild(int i)
Predicate
getChildren().get(i)
getChild
in class Predicate<ChangeData>
public List<Predicate<ChangeData>> getChildren()
Predicate
getChildren
in class Predicate<ChangeData>
public int getCardinality()
getCardinality
in interface DataSource<ChangeData>
DataSource.read()
.public boolean hasChange()
hasChange
in interface ChangeDataSource
public com.google.gwtorm.server.ResultSet<ChangeData> read() throws com.google.gwtorm.server.OrmException
read
in interface DataSource<ChangeData>
com.google.gwtorm.server.OrmException
public com.google.gwtorm.server.ResultSet<ChangeData> restart(int start) throws com.google.gwtorm.server.OrmException
public Predicate<ChangeData> copy(Collection<? extends Predicate<ChangeData>> children)
Predicate
copy
in class Predicate<ChangeData>
public boolean match(ChangeData cd) throws com.google.gwtorm.server.OrmException
Predicate
match
in class Predicate<ChangeData>
com.google.gwtorm.server.OrmException
public int getCost()
getCost
in class Predicate<ChangeData>
public int hashCode()
hashCode
in class Predicate<ChangeData>
public boolean equals(Object other)
equals
in class Predicate<ChangeData>