public interface ExtendedFinderSupport<TYPE,EXTENDED_FINDER extends Finder<TYPE>> extends Finder<TYPE>
Finder
s, it provides automatic covariant return types. MAke your
extended Finder
interface to extend from this. For instance, a custom Date
finder can be declared as:
public class DateFinder extends ExtendedFinderSupport{ public DateFinder before (Date date); public DateFinder after (Date date); }
Finder.FilterSortCriterion<TYPE>, Finder.SortCriterion, Finder.SortDirection
Modifier and Type | Method and Description |
---|---|
EXTENDED_FINDER |
from(int firstResult)
Tells the
Finder that only a subset of found items will be returned, starting from the given position. |
EXTENDED_FINDER |
max(int maxResults)
Tells the
Finder that only a maximum number of found items will be returned. |
EXTENDED_FINDER |
sort(Finder.SortCriterion criterion)
Tells the
Finder that results will be sorted according to the given criterion, in ascending direction. |
EXTENDED_FINDER |
sort(Finder.SortCriterion criterion,
Finder.SortDirection direction)
Tells the
Finder that results will be sorted according to the given criterion and direction. |
EXTENDED_FINDER |
withContext(Object context)
Tells the
Finder that results should be created with the given context. |
@Nonnull EXTENDED_FINDER from(@Nonnegative int firstResult)
Finder
that only a subset of found items will be returned, starting from the given position.@Nonnull EXTENDED_FINDER max(@Nonnegative int maxResults)
Finder
that only a maximum number of found items will be returned.@Nonnull EXTENDED_FINDER withContext(@Nonnull Object context)
Finder
that results should be created with the given context. This method can be called
multiple times; contexts are accumulated.withContext
in interface Finder<TYPE>
context
- the contextFinder
@Nonnull EXTENDED_FINDER sort(@Nonnull Finder.SortCriterion criterion)
Finder
that results will be sorted according to the given criterion, in ascending direction.@Nonnull EXTENDED_FINDER sort(@Nonnull Finder.SortCriterion criterion, @Nonnull Finder.SortDirection direction)
Finder
that results will be sorted according to the given criterion and direction.Copyright © 2009–2016 Tidalwave s.a.s. (http://tidalwave.it). All rights reserved.