private List<Project> fetchProjects(UserCriteria userCriteria) {
    List<Project> projects;
    if (userCriteria.isOnlyActiveProjects()) {
      LOGGER.debug("Fetching only active projects");

      projects = projectDAO.findAllActive();
    } else {
      LOGGER.debug("Fetching all projects");

      projects = projectDAO.findAll();
    }
    return projects;
  }
示例#2
0
 @Override
 public List<Project> getActiveProjects() {
   return projectDAO.findAllActive();
 }