Example #1
0
  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;
  }
Example #2
0
  @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);
  }