I - type of the persistent object and transport object id. This type
should be immutable. It is critical this type implements equals()
and hashCode() correctly.P - type of model persistent objectT - type of the transport objectF - type of the associated filterS - type of the associated sort specification typepublic interface BaseDao<I extends Serializable,P extends Storable<I>,T extends Transportable<? super T,I>,F,S>
| Modifier and Type | Method and Description |
|---|---|
long |
count(F filter,
DataStoreContext context)
Gets the number of persist objects based on a filter criteria.
|
List<P> |
find(F filter,
SortSpecification<S> sortSpec,
DataStoreContext context)
Get the set of persist objects based on the given filter criteria.
|
Page<P> |
find(F filter,
SortSpecification<S> sortSpec,
PageRequest pageRequest,
DataStoreContext context)
Get the set of persist objects based on the given filter criteria.
|
List<P> |
findAll(SortSpecification<S> sortSpec,
DataStoreContext context)
Gets all the persistent objects.
|
P |
get(Id<T,I> id,
DataStoreContext context)
Get the persistent object with the given id.
|
P get(Id<T,I> id, DataStoreContext context)
id - persistent object's idcontext - data store contextList<P> find(F filter, SortSpecification<S> sortSpec, DataStoreContext context)
filter - Filter criteriasortSpec - sort specificationcontext - data store contextPage<P> find(F filter, SortSpecification<S> sortSpec, PageRequest pageRequest, DataStoreContext context) throws IndexOutOfBoundsException
filter - Filter criteriasortSpec - sort specificationpageRequest - the page of data desiredcontext - data store contextIndexOutOfBoundsException - if page request is for a page outside
the maximum or minimum pages for the requestList<P> findAll(SortSpecification<S> sortSpec, DataStoreContext context)
sortSpec - sort specificationcontext - data store contextlong count(F filter, DataStoreContext context)
filter - Filter criteriacontext - data store contextCopyright © 2014. All Rights Reserved.