public interface Repository<T,W extends Specification<T>>
| Modifier and Type | Method and Description |
|---|---|
void |
add(T element)
Add an element
|
long |
count(W specification)
Count elements that matches a given specification
|
List<T> |
find(W specification,
Integer maxResult,
Integer offset,
Sort... sorts)
Get elements that matches a given specification
|
List<T> |
find(W specification,
Integer maxResult,
Sort... sorts)
Get elements that matches a given specification
|
List<T> |
find(W specification,
Sort... sorts)
Get elements that matches a given specification
|
T |
first(W specification,
Sort... sorts)
Get the first element that matches a given specification
|
void |
remove(T element)
Removes element
|
void |
update(T element)
Updates element
|
void add(T element)
element - to be addedvoid remove(T element)
element - element to be removedvoid update(T element)
element - new elementList<T> find(W specification, Sort... sorts)
specification - a query specificationsorts - specify one or more attributes that should be used to sort the resultList<T> find(W specification, Integer maxResult, Sort... sorts)
specification - a query specificationmaxResult - an upper limit to the number of elements returned in the resultsorts - specify one or more attributes that should be used to sort the resultList<T> find(W specification, Integer maxResult, Integer offset, Sort... sorts)
specification - a query specificationmaxResult - an upper limit to the number of elements returned in the resultoffset - the position of the first result to retrieve.sorts - specify one or more attributes that should be used to sort the resultlong count(W specification)
specification - a query specificationT first(W specification, Sort... sorts)
specification - a query specificationsorts - specify one or more attributes that should be used to sort the resultCopyright © 2019. All rights reserved.