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

Methods
`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)`

### 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

    List<T> findAll()

#### findAll

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

#### findSorted

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

#### findAll

    List<T> findAll(Collection<AbstractFilter<T>> filters)

#### findAll

    List<T> findAll(AbstractFilter<T> filter)

#### findAll

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

#### load

    T load(K id)

#### getCount

    long getCount()

Get the total number of entities in this Dao.