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); }
public Set<Shift> findAvailableShifts( final CurricularYear curricularYear, final ExecutionSemester executionSemester) { final DegreeCurricularPlan degreeCurricularPlan = getDegreeCurricularPlan(); final Set<Shift> shifts = new HashSet<Shift>(); for (final CurricularCourse curricularCourse : degreeCurricularPlan.getCurricularCoursesSet()) { if (curricularCourse.hasScopeInGivenSemesterAndCurricularYearInDCP( curricularYear, degreeCurricularPlan, executionSemester)) { for (final ExecutionCourse executionCourse : curricularCourse.getAssociatedExecutionCoursesSet()) { if (executionCourse.getExecutionPeriod() == executionSemester) { shifts.addAll(executionCourse.getAssociatedShifts()); } } } } return shifts; }
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); }
public static ExecutionDegree getByDegreeCurricularPlanAndExecutionYear( DegreeCurricularPlan degreeCurricularPlan, ExecutionYear executionYear) { if (degreeCurricularPlan == null || executionYear == null) { return null; } for (ExecutionDegree executionDegree : degreeCurricularPlan.getExecutionDegreesSet()) { if (executionYear == executionDegree.getExecutionYear()) { return executionDegree; } } return null; }
public static ExecutionDegree getByDegreeCurricularPlanAndExecutionYear( DegreeCurricularPlan degreeCurricularPlan, String executionYear) { if (degreeCurricularPlan == null) { return null; } if (executionYear == null) { return null; } for (ExecutionDegree executionDegree : degreeCurricularPlan.getExecutionDegreesSet()) { if (executionYear.equalsIgnoreCase(executionDegree.getExecutionYear().getYear())) { return executionDegree; } } return null; }