[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: DAO implementation: static?singleton?or instances?

I use a single DAO for all my CRUD, then I don't have to implement the DAO each time.

It has methods that are templated like this:


public <T extends AbstractEntity> List<T> selectAll(Class<T> clazz) {
return (List<T>) JpaHelper.getEntityManager(entityManager).createQuery(null,clazz).getResultList()
}