Beispiel #1
0
  public static List<Professorship> readByDegreeCurricularPlansAndExecutionYearAndBasic(
      List<DegreeCurricularPlan> degreeCurricularPlans,
      ExecutionYear executionYear,
      Boolean basic) {

    Set<Professorship> professorships = new HashSet<Professorship>();
    for (DegreeCurricularPlan degreeCurricularPlan : degreeCurricularPlans) {
      for (CurricularCourse curricularCourse : degreeCurricularPlan.getCurricularCourses()) {
        if (curricularCourse.getBasic() == null || curricularCourse.getBasic().equals(basic)) {
          if (executionYear != null) {
            for (ExecutionCourse executionCourse :
                curricularCourse.getExecutionCoursesByExecutionYear(executionYear)) {
              professorships.addAll(executionCourse.getProfessorships());
            }
          } else {
            for (ExecutionCourse executionCourse :
                curricularCourse.getAssociatedExecutionCourses()) {
              professorships.addAll(executionCourse.getProfessorships());
            }
          }
        }
      }
    }
    return new ArrayList<Professorship>(professorships);
  }
Beispiel #2
0
  public static List<Professorship> readByDegreeCurricularPlanAndExecutionPeriod(
      DegreeCurricularPlan degreeCurricularPlan, ExecutionSemester executionSemester) {

    Set<Professorship> professorships = new HashSet<Professorship>();
    for (CurricularCourse curricularCourse : degreeCurricularPlan.getCurricularCourses()) {
      for (ExecutionCourse executionCourse :
          curricularCourse.getExecutionCoursesByExecutionPeriod(executionSemester)) {
        professorships.addAll(executionCourse.getProfessorships());
      }
    }
    return new ArrayList<Professorship>(professorships);
  }