コード例 #1
0
ファイル: ExecutionDegree.java プロジェクト: afesteves/fenix
  public static List<ExecutionDegree> getAllByExecutionYearAndDegreeType(
      String year, DegreeType... typeOfCourse) {

    if (year == null || typeOfCourse == null) {
      return Collections.emptyList();
    }

    final ExecutionYear executionYear = ExecutionYear.readExecutionYearByName(year);
    return getAllByExecutionYearAndDegreeType(executionYear, typeOfCourse);
  }
コード例 #2
0
ファイル: ExecutionDegree.java プロジェクト: afesteves/fenix
  public static List<ExecutionDegree> getAllByDegreeAndExecutionYear(Degree degree, String year) {
    List<ExecutionDegree> result = new ArrayList<ExecutionDegree>();

    if (degree == null || year == null) {
      return result;
    }

    ExecutionYear executionYear = ExecutionYear.readExecutionYearByName(year);
    if (executionYear == null) {
      return result;
    }

    for (ExecutionDegree executionDegree : executionYear.getExecutionDegreesSet()) {
      if (degree.equals(executionDegree.getDegreeCurricularPlan().getDegree())) {
        result.add(executionDegree);
      }
    }

    return result;
  }