public interface ExtendedFinderSupport<Type,ExtendedFinder 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 |
---|---|
ExtendedFinder |
from(int firstResult)
Tells the
Finder that only a subset of found items will be returned, starting from the given position. |
ExtendedFinder |
max(int maxResults)
Tells the
Finder that only a maximum number of found items will be returned. |
ExtendedFinder |
sort(Finder.SortCriterion criterion)
Tells the
Finder that results will be sorted according to the given criterion, in ascending direction. |
ExtendedFinder |
sort(Finder.SortCriterion criterion,
Finder.SortDirection direction)
Tells the
Finder that results will be sorted according to the given criterion and direction. |
@Nonnull ExtendedFinder from(@Nonnegative int firstResult)
Finder
that only a subset of found items will be returned, starting from the given position.@Nonnull ExtendedFinder max(@Nonnegative int maxResults)
Finder
that only a maximum number of found items will be returned.@Nonnull ExtendedFinder sort(@Nonnull Finder.SortCriterion criterion)
Finder
that results will be sorted according to the given criterion, in ascending direction.@Nonnull ExtendedFinder sort(@Nonnull Finder.SortCriterion criterion, @Nonnull Finder.SortDirection direction)
Finder
that results will be sorted according to the given criterion and direction.Copyright © 2009-2013 Tidalwave s.a.s. (http://tidalwave.it). All Rights Reserved.