public interface Query<REC>
Query
is used to build a query that can be executed
against a QueryEngine
. Query
s should be created through
the QueryEngine
against which they will be executed.Modifier and Type | Interface and Description |
---|---|
static class |
Query.SortOrder
Enumerates valid sort orders.
|
Modifier and Type | Method and Description |
---|---|
<T> Query<REC> |
as(String name)
Indicates that the last selected column should be displayed with the given column name.
|
Query<REC> |
distinct()
Indicate that only DISTINCT results should be returned.
|
Query<REC> |
from(QueryRepository<?,REC> repository)
Indicates the repository from which to select.
|
Query<REC> |
from(String repositoryName)
Indicates the name of the repository from which to select. repositoryName
may be either the name of the
QueryRepository as returned by
QueryRepository.getName() or by an alias with which it was registered
when added to the QueryEngine.addRepository(QueryRepository, String) |
<T> Query<REC> |
groupBy(IdxField<REC,T> field)
Adds an
IdxField to the group-by clause of the query. |
Query<REC> |
having(Predicate<REC> predicate)
Indicates the predicate to apply against the aggregated result set.
|
Query<REC> |
limit(int high)
Restrict the number of rows to be less than or equal to high.
|
Query<REC> |
limit(int low,
int high)
Restrict the number of rows to be strictly greater than low and less than or equal to high.
|
<T> Query<REC> |
orderBy(IdxField<REC,T> field)
Indicate that the result set should be ordered by this field's value
in ascending order.
|
<T> Query<REC> |
orderBy(IdxField<REC,T> field,
Query.SortOrder sortOrder)
Indicate that the result set should be ordered by this field's value.
|
<T> Query<REC> |
select(IdxField<REC,T> field)
Indicates that a particular field should be selected in the the
QueryResult . |
Query<REC> |
where(Predicate<REC> predicate)
Indicates the predicate to apply against the result set.
|
<T> Query<REC> select(IdxField<REC,T> field)
QueryResult
.field
- The field from the class on which to select.Query
for invocation chaining.<T> Query<REC> as(String name)
name
- The name to use for the last selected columnQuery
for invocation chaining.Query<REC> distinct()
Query
for invocation chaining.Query<REC> from(QueryRepository<?,REC> repository)
repository
- The repository from which to selectQuery
for invocation chaining.Query<REC> from(String repositoryName)
QueryRepository
as returned by
QueryRepository.getName()
or by an alias with which it was registered
when added to the QueryEngine.addRepository(QueryRepository, String)
repositoryName
- The name or alias of a repository from which to select.Query
for invocation chaining.Query<REC> where(Predicate<REC> predicate)
predicate
- Set the predicate used to select.Query
for invocation chaining.<T> Query<REC> orderBy(IdxField<REC,T> field, Query.SortOrder sortOrder)
field
- The field by which to order results.sortOrder
- The order by which to sort results.Query
for invocation chaining.<T> Query<REC> orderBy(IdxField<REC,T> field)
field
- The field by which to order results.Query
for invocation chaining.<T> Query<REC> groupBy(IdxField<REC,T> field)
IdxField
to the group-by clause of the query.field
- The field by which to group.Query
for invocation chaining.Query<REC> having(Predicate<REC> predicate)
predicate
- Set the predicate used to select.Query
for invocation chaining.Query<REC> limit(int low, int high)
low
- the lower limit, inclusive.high
- the upper limit, inclusive.Copyright © 2019 Neeve Research, LLC. All Rights Reserved.