Package com.google.gerrit.index.query
Class IndexedQuery<I,T>
java.lang.Object
com.google.gerrit.index.query.Predicate<T>
com.google.gerrit.index.query.IndexedQuery<I,T>
- Type Parameters:
I- The type of the IDs by which the entities are stored in the index.T- The type of the entities that are stored in the index.
- All Implemented Interfaces:
DataSource<T>,HasCardinality,Paginated<T>
- Direct Known Subclasses:
IndexedAccountQuery,IndexedChangeQuery,IndexedGroupQuery
Wrapper combining an
IndexPredicate together with a DataSource 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 DataSource to be chosen by the query
processor.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gerrit.index.query.Predicate
Predicate.Any<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy(Collection<? extends Predicate<T>> children) Create a copy of this predicate, with new children.booleanintReturns an estimate of the number of results a source can return.getChild(int i) Same asgetChildren().get(i)intSame asgetChildren().size()Get the children of this predicate, if any.inthashCode()read()Returns read from the index and return the results.readRaw()Returns read from the index and return the raw results.restart(int start) restart(int start, int pageSize) toString()Methods inherited from class com.google.gerrit.index.query.Predicate
and, and, any, asMatchable, estimateCost, getFlattenedPredicateList, getLeafCount, getPredicateString, isLeaf, isMatchable, not, or, or, supportedForQueries
-
Field Details
-
index
-
source
-
-
Constructor Details
-
IndexedQuery
public IndexedQuery(Index<I, T> index, Predicate<T> pred, QueryOptions opts) throws QueryParseException- Throws:
QueryParseException
-
-
Method Details
-
getChildCount
public int getChildCount()Description copied from class:PredicateSame asgetChildren().size()- Overrides:
getChildCountin classPredicate<T>
-
getChild
Description copied from class:PredicateSame asgetChildren().get(i) -
getChildren
Description copied from class:PredicateGet the children of this predicate, if any.- Overrides:
getChildrenin classPredicate<T>
-
getOptions
- Specified by:
getOptionsin interfacePaginated<I>
-
getCardinality
public int getCardinality()Description copied from interface:HasCardinalityReturns an estimate of the number of results a source can return.- Specified by:
getCardinalityin interfaceHasCardinality
-
read
Description copied from interface:DataSourceReturns read from the index and return the results.- Specified by:
readin interfaceDataSource<I>
-
readRaw
Description copied from interface:DataSourceReturns read from the index and return the raw results.- Specified by:
readRawin interfaceDataSource<I>
-
restart
-
restart
-
restart
-
copy
Description copied from class:PredicateCreate a copy of this predicate, with new children. -
hashCode
public int hashCode() -
equals
-
toString
-