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.boolean
int
Returns an estimate of the number of results a source can return.getChild
(int i) Same asgetChildren().get(i)
int
Same asgetChildren().size()
Get the children of this predicate, if any.int
hashCode()
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:Predicate
Same asgetChildren().size()
- Overrides:
getChildCount
in classPredicate<T>
-
getChild
Description copied from class:Predicate
Same asgetChildren().get(i)
-
getChildren
Description copied from class:Predicate
Get the children of this predicate, if any.- Overrides:
getChildren
in classPredicate<T>
-
getOptions
- Specified by:
getOptions
in interfacePaginated<I>
-
getCardinality
public int getCardinality()Description copied from interface:HasCardinality
Returns an estimate of the number of results a source can return.- Specified by:
getCardinality
in interfaceHasCardinality
-
read
Description copied from interface:DataSource
Returns read from the index and return the results.- Specified by:
read
in interfaceDataSource<I>
-
readRaw
Description copied from interface:DataSource
Returns read from the index and return the raw results.- Specified by:
readRaw
in interfaceDataSource<I>
-
restart
-
restart
-
restart
-
copy
Description copied from class:Predicate
Create a copy of this predicate, with new children. -
hashCode
public int hashCode() -
equals
-
toString
-