|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Query<REC>
The Query is used to build a query that can be executed
against a QueryEngine. Querys should be created through
the QueryEngine against which they will be executed.
| Nested Class Summary | |
|---|---|
static class |
Query.SortOrder
Enumerates valid sort orders. |
| Method Summary | ||
|---|---|---|
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) |
|
|
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. |
|
|
orderBy(IdxField<REC,T> field)
Indicate that the result set should be ordered by this field's value in ascending order. |
|
|
orderBy(IdxField<REC,T> field,
Query.SortOrder sortOrder)
Indicate that the result set should be ordered by this field's value. |
|
|
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. |
|
| Method Detail |
|---|
<T> Query<REC> select(IdxField<REC,T> field)
QueryResult.
field - The field from the class on which to select.
Query for invocation chaining.Query<REC> distinct()
Query for invocation chaining.Query<REC> from(QueryRepository<?,REC> repository)
repository - The repository from which to select
Query 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.Query<REC> limit(int high)
high - The upper limit, inclusive.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||