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>,- Paginated<T>
 - Direct Known Subclasses:
- IndexedAccountQuery,- IndexedChangeQuery,- IndexedGroupQuery
 
 public class IndexedQuery<I,T> extends Predicate<T> implements DataSource<T>, Paginated<T> Wrapper combining anIndexPredicatetogether with aDataSourcethat 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 DataSourceto be chosen by the query processor.
- 
- 
Constructor SummaryConstructors Constructor Description IndexedQuery(Index<I,T> index, Predicate<T> pred, QueryOptions opts)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate<T>copy(Collection<? extends Predicate<T>> children)Create a copy of this predicate, with new children.booleanequals(Object other)intgetCardinality()Returns an estimate of the number of results fromDataSource.read().Predicate<T>getChild(int i)Same asgetChildren().get(i)intgetChildCount()Same asgetChildren().size()List<Predicate<T>>getChildren()Get the children of this predicate, if any.QueryOptionsgetOptions()inthashCode()ResultSet<T>read()Returns read from the database and return the results.ResultSet<FieldBundle>readRaw()Returns read from the database and return the raw results.ResultSet<T>restart(int start)StringtoString()- 
Methods inherited from class com.google.gerrit.index.query.Predicateand, and, any, asMatchable, estimateCost, getFlattenedPredicateList, getLeafCount, getPredicateString, isLeaf, isMatchable, not, or, or, supportedForQueries
 
- 
 
- 
- 
- 
Field Detail- 
sourceprotected DataSource<T> source 
 
- 
 - 
Constructor Detail- 
IndexedQuerypublic IndexedQuery(Index<I,T> index, Predicate<T> pred, QueryOptions opts) throws QueryParseException - Throws:
- QueryParseException
 
 
- 
 - 
Method Detail- 
getChildCountpublic int getChildCount() Description copied from class:PredicateSame asgetChildren().size()- Overrides:
- getChildCountin class- Predicate<T>
 
 - 
getChildpublic Predicate<T> getChild(int i) Description copied from class:PredicateSame asgetChildren().get(i)
 - 
getChildrenpublic List<Predicate<T>> getChildren() Description copied from class:PredicateGet the children of this predicate, if any.- Overrides:
- getChildrenin class- Predicate<T>
 
 - 
getOptionspublic QueryOptions getOptions() - Specified by:
- getOptionsin interface- Paginated<I>
 
 - 
getCardinalitypublic int getCardinality() Description copied from interface:DataSourceReturns an estimate of the number of results fromDataSource.read().- Specified by:
- getCardinalityin interface- DataSource<I>
 
 - 
readpublic ResultSet<T> read() Description copied from interface:DataSourceReturns read from the database and return the results.- Specified by:
- readin interface- DataSource<I>
 
 - 
readRawpublic ResultSet<FieldBundle> readRaw() Description copied from interface:DataSourceReturns read from the database and return the raw results.- Specified by:
- readRawin interface- DataSource<I>
 
 - 
copypublic Predicate<T> copy(Collection<? extends Predicate<T>> children) Description copied from class:PredicateCreate a copy of this predicate, with new children.
 
- 
 
-