## net.dontdrinkandroot.persistence.dao
Interface Dao<T extends Entity<K>,K>

Type Parameters:
  `T` - Type of the entity.
  `K` - Type of the Id.

All Known Implementing Classes:
  AbstractJpaDao

    public interface Dao<T extends Entity<K>,K>

Author:
  Philip W. Sorst

Method Summary
`void` `delete(K id)`
`void` `delete(T entity)`
`T` `find(K id)`
`java.util.List<T>` `findAll()`
`java.util.List<T>` `findAll(AbstractFilter<T>... filter)`
`java.util.List<T>` `findAll(AbstractFilter<T> filter)`
`java.util.List<T>` `findAll(java.util.Collection<AbstractFilter<T>> filters)`
`java.util.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)`

`java.util.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)`

Method Detail

### delete

    void delete(T entity)

### delete

    void delete(K id)

### find

    T find(K id)

### findByAttribute

    <V> T findByAttribute(javax.persistence.metamodel.SingularAttribute<? super T,V> attribute,
                          V value)

### save

    T save(T entity)

### findAll

    java.util.List<T> findAll()

### findAll

    java.util.List<T> findAll(javax.persistence.metamodel.SingularAttribute<? super T,?> attribute,
                              boolean asc)

### findSorted

    java.util.List<T> findSorted(javax.persistence.metamodel.SingularAttribute<? super T,?> attribute,
                                 boolean asc,
                                 int firstResult,
                                 int numResults)

### findAll

    java.util.List<T> findAll(java.util.Collection<AbstractFilter<T>> filters)

### findAll

    java.util.List<T> findAll(AbstractFilter<T> filter)

### findAll

    java.util.List<T> findAll(AbstractFilter<T>... filter)

### load

    T load(K id)

### getCount

    long getCount()

  Get the total number of entities in this Dao.

Copyright © 2013 dontdrinkandroot. All Rights Reserved.