T - domain object on which search will be performedpublic interface Specification<T extends Searchable>
searchable repository.
Specification is defined in DSL with keyword specification
and a predicate.
Server can convert specification to SQL query on the fly or call
database function created at compile time. Other optimization techniques
can be used too.
DSL example:
module Todo {
aggregate Task {
Timestamp createdOn;
specification findBetween
'it => it.createdOn >= after && it.createdOn <= before' {
Date after;
Date before;
}
}