|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface QueryBuilder<T>
QueryBuilders are used to create Query
instances.
Iteratively add where() clauses to the query, and then use
newQuery(org.qi4j.api.unitofwork.UnitOfWork)
to instantiate the Query.
QueryBuilders are immutable, so when adding new where-clauses you get new instances. This
DDD tip: Query objects are not executed immediately, so they
should be constructed in the domain model and handed over to
the UI, which can then further constrain it before actual
execution.
Method Summary | |
---|---|
Query<T> |
newQuery(Iterable<T> iterable)
Create a new query with the declared where-clauses that will be evaluated against the iterable entries. |
Query<T> |
newQuery(UnitOfWork unitOfWork)
Create a new query with the declared where-clauses. |
QueryBuilder<T> |
where(BooleanExpression expressions)
Add a where-clause to the Query. |
Method Detail |
---|
QueryBuilder<T> where(BooleanExpression expressions)
QueryExpressions
to create the expression.
expressions
- the where clause
Query<T> newQuery(UnitOfWork unitOfWork)
unitOfWork
- the UoW in which the query is to be executed
Query<T> newQuery(Iterable<T> iterable)
iterable
- collection of objects (composites?)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |