public Project getProject(Integer projectId) throws ObjectNotFoundException { Project project = projectDAO.findById(projectId); if (project == null) { throw new ObjectNotFoundException("Project not found for id " + projectId); } return project; }
@Transactional @Auditable(actionType = AuditActionType.DELETE) public void deleteProject(Integer projectId) throws ParentChildConstraintException { Project project; project = projectDAO.findById(projectId); deleteEmptyAssignments(project); LOGGER.debug("Deleting project " + project); projectDAO.delete(project); }