T - Type of the entity.K - Type of the Id.public interface Dao<T extends Entity<K>,K>
| Modifier and Type | Method and Description |
|---|---|
void |
delete(K id) |
void |
delete(T entity) |
T |
find(K id) |
List<T> |
findAll() |
List<T> |
findAll(AbstractFilter<T>... filter) |
List<T> |
findAll(AbstractFilter<T> filter) |
List<T> |
findAll(Collection<AbstractFilter<T>> filters) |
List<T> |
findAll(javax.persistence.metamodel.SingularAttribute<? super T,?> attribute,
boolean asc) |
<V> T |
findByAttribute(javax.persistence.metamodel.SingularAttribute<? super T,V> attribute,
V value) |
List<T> |
findSorted(javax.persistence.metamodel.SingularAttribute<? super T,?> attribute,
boolean asc,
int firstResult,
int numResults) |
long |
getCount()
Get the total number of entities in this Dao.
|
T |
load(K id) |
T |
save(T entity) |
void delete(T entity)
void delete(K id)
<V> T findByAttribute(javax.persistence.metamodel.SingularAttribute<? super T,V> attribute, V value)
List<T> findAll(javax.persistence.metamodel.SingularAttribute<? super T,?> attribute, boolean asc)
List<T> findSorted(javax.persistence.metamodel.SingularAttribute<? super T,?> attribute, boolean asc, int firstResult, int numResults)
List<T> findAll(Collection<AbstractFilter<T>> filters)
List<T> findAll(AbstractFilter<T> filter)
List<T> findAll(AbstractFilter<T>... filter)
long getCount()
Copyright © 2012. All Rights Reserved.