public static List<ExecutionDegree> getAllByExecutionYearAndDegreeType( ExecutionYear executionYear, DegreeType... typeOfCourse) { if (executionYear == null || typeOfCourse == null) { return Collections.emptyList(); } final List<ExecutionDegree> result = new ArrayList<ExecutionDegree>(); for (final ExecutionDegree executionDegree : executionYear.getExecutionDegreesSet()) { boolean match = false; for (DegreeType type : typeOfCourse) { match |= type.equals(executionDegree.getDegreeType()); } if (!match) { continue; } result.add(executionDegree); } Collections.sort(result, COMPARATOR_BY_DEGREE_CURRICULAR_PLAN_ID_INTERNAL_DESC); return result; }
@Override protected boolean matches(final ExecutionDegree executionDegree) { final DegreeType degreeType = executionDegree.getDegreeType(); return degreeType.isSpecializationCycle(); // DFA specialization; }