| [news.eclipse.rt.eclipselink] Re: DAO implementation: static?singleton?or instances? |
Hi Tim,
BR, Enrico
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()
}