use of fi.otavanopisto.muikku.plugins.workspace.model.WorkspaceMaterialReply in project muikku by otavanopisto.
the class WorkspaceMaterialReplyDAO method listByWorkspaceMaterial.
public List<WorkspaceMaterialReply> listByWorkspaceMaterial(WorkspaceMaterial workspaceMaterial) {
EntityManager entityManager = getEntityManager();
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<WorkspaceMaterialReply> criteria = criteriaBuilder.createQuery(WorkspaceMaterialReply.class);
Root<WorkspaceMaterialReply> root = criteria.from(WorkspaceMaterialReply.class);
criteria.select(root);
criteria.where(criteriaBuilder.and(criteriaBuilder.equal(root.get(WorkspaceMaterialReply_.workspaceMaterial), workspaceMaterial)));
return entityManager.createQuery(criteria).getResultList();
}
Aggregations