public interface TypedDao<E extends Entity<K>,K> extends GenericDao
Entity class.| Modifier and Type | Method and Description |
|---|---|
void |
delete(E entity)
Deletes the given Entity.
|
void |
delete(K id)
Deletes the entity with the given id.
|
E |
find(K id)
Finds the entity with the given id.
|
List<E> |
findAll()
Finds all entities.
|
List<E> |
findAll(Collection<PredicateBuilder<E>> predicateBuilders)
Finds all entities that match all predicates generated by the given
PredicateBuilder s. |
List<E> |
findAll(PredicateBuilder<E>... predicateBuilders)
Finds all entities that match all predicates generated by the given
PredicateBuilder s. |
List<E> |
findAll(PredicateBuilder<E> predicateBuilder)
Finds all entities that match all predicates generated by the given
PredicateBuilder s. |
List<E> |
findAll(javax.persistence.metamodel.SingularAttribute<? super E,?> attribute,
boolean asc)
Finds all entities ordered by the given attribute and the given sort order.
|
List<E> |
findAll(javax.persistence.metamodel.SingularAttribute<? super E,?> attribute,
boolean asc,
int firstResult,
int numResults)
Finds all entities ordered by the given attribute and the given sort order with the result set limit to the given
size.
|
long |
getCount()
Get the total number of entities in this Dao.
|
E |
load(K id)
Loads the entity with the given id or throws an Exception if it was not found.
|
void delete(E entity)
void delete(K id)
long getCount()
List<E> findAll(javax.persistence.metamodel.SingularAttribute<? super E,?> attribute, boolean asc)
asc - True to sort in ascending order, false to sort in descending order.List<E> findAll(javax.persistence.metamodel.SingularAttribute<? super E,?> attribute, boolean asc, int firstResult, int numResults)
asc - True to sort in ascending order, false to sort in descending order.firstResult - Position of the first result to retrieve.maxResults - The maximum number of results to retrieve.List<E> findAll(Collection<PredicateBuilder<E>> predicateBuilders)
PredicateBuilder s.List<E> findAll(PredicateBuilder<E> predicateBuilder)
PredicateBuilder s.List<E> findAll(PredicateBuilder<E>... predicateBuilders)
PredicateBuilder s.Copyright © 2014 dontdrinkandroot. All rights reserved.