use of fi.otavanopisto.muikku.plugins.workspace.model.WorkspaceRootFolder in project muikku by otavanopisto.
the class WorkspaceRootFolderDAO method findByWorkspaceEntityId.
public WorkspaceRootFolder findByWorkspaceEntityId(Long workspaceEntityId) {
EntityManager entityManager = getEntityManager();
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<WorkspaceRootFolder> criteria = criteriaBuilder.createQuery(WorkspaceRootFolder.class);
Root<WorkspaceRootFolder> root = criteria.from(WorkspaceRootFolder.class);
criteria.select(root);
criteria.where(criteriaBuilder.equal(root.get(WorkspaceRootFolder_.workspaceEntityId), workspaceEntityId));
return getSingleResult(entityManager.createQuery(criteria));
}
Aggregations