public interface GenericDAO<T, ID extends Serializable> {
 
    T findById(ID id, boolean lock);
 
    List<T> findAll();
 
    List<T> findByExample(T exampleInstance);
 
    T makePersistent(T entity);
 
    void makeTransient(T entity);
}
Advertisements