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.public class IndexedQuery<I,T> extends Predicate<T> implements DataSource<T>, Paginated<T>
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.
Modifier and Type | Field and Description |
---|---|
protected Index<I,T> |
index |
protected DataSource<T> |
source |
Constructor and Description |
---|
IndexedQuery(Index<I,T> index,
Predicate<T> pred,
QueryOptions opts) |
Modifier and Type | Method and Description |
---|---|
Predicate<T> |
copy(java.util.Collection<? extends Predicate<T>> children)
Create a copy of this predicate, with new children.
|
boolean |
equals(java.lang.Object other) |
int |
getCardinality() |
Predicate<T> |
getChild(int i)
Same as
getChildren().get(i) |
int |
getChildCount()
Same as
getChildren().size() |
java.util.List<Predicate<T>> |
getChildren()
Get the children of this predicate, if any.
|
QueryOptions |
getOptions() |
int |
hashCode() |
ResultSet<T> |
read() |
ResultSet<FieldBundle> |
readRaw() |
ResultSet<T> |
restart(int start) |
java.lang.String |
toString() |
and, and, any, asMatchable, estimateCost, getLeafCount, isMatchable, not, or, or
protected DataSource<T> source
public IndexedQuery(Index<I,T> index, Predicate<T> pred, QueryOptions opts) throws QueryParseException
QueryParseException
public int getChildCount()
Predicate
getChildren().size()
getChildCount
in class Predicate<T>
public Predicate<T> getChild(int i)
Predicate
getChildren().get(i)
public java.util.List<Predicate<T>> getChildren()
Predicate
getChildren
in class Predicate<T>
public QueryOptions getOptions()
getOptions
in interface Paginated<T>
public int getCardinality()
getCardinality
in interface DataSource<T>
DataSource.read()
.public ResultSet<T> read()
read
in interface DataSource<T>
public ResultSet<FieldBundle> readRaw()
readRaw
in interface DataSource<T>
public Predicate<T> copy(java.util.Collection<? extends Predicate<T>> children)
Predicate
public java.lang.String toString()
toString
in class java.lang.Object