I know from sample code how to write one query function like findAll():
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
return getEntityManager().createQuery(cq).getResultList();
But can i ask how to write query based on the where condition like name should bigger than 18, and i also confuse that how to write query based on left join right join or inner join?
Note that all the query return List result, my current way to do that is get result, and manipulate the List( like eliminate the element in the List, or combine two list)