So, After a 10+ year break I\'m coming back to Java and trying out stuff with JPA and Java generics. I\'ve created a generics based findAll(other) JPA query tha
findAll(other)
This will work, and if you need where statement you can add it as parameter.
class GenericDAOWithJPA {
.......
public List findAll() { return entityManager.createQuery("Select t from " + persistentClass.getSimpleName() + " t").getResultList(); } }