コード例 #1
0
  @Atomic
  public static void run(final String studentCurricularPlanId)
      throws DomainException, NonExistingServiceException {
    final StudentCurricularPlan studentCurricularPlan =
        FenixFramework.getDomainObject(studentCurricularPlanId);

    if (studentCurricularPlan != null) {

      for (Enrolment enrolment : studentCurricularPlan.getEnrolmentsSet()) {
        for (EnrolmentEvaluation evaluation : enrolment.getEvaluationsSet()) {
          evaluation.setEnrolmentEvaluationState(EnrolmentEvaluationState.TEMPORARY_OBJ);
        }
      }

      studentCurricularPlan.delete();
    } else {
      throw new NonExistingServiceException();
    }
  }
コード例 #2
0
 private void load(final CurriculumModule curriculumModule) {
   if (curriculumModule != null) {
     curriculumModule.getCreationDateDateTime();
     final DegreeModule degreeModule = curriculumModule.getDegreeModule();
     if (degreeModule != null) {
       degreeModule.getName();
     }
     if (curriculumModule.isCurriculumLine()) {
       final CurriculumLine curriculumLine = (CurriculumLine) curriculumModule;
       if (curriculumLine.isEnrolment()) {
         final Enrolment enrolment = (Enrolment) curriculumLine;
         for (final EnrolmentEvaluation enrolmentEvaluation : enrolment.getEvaluationsSet()) {
           enrolmentEvaluation.getGrade();
         }
       }
     } else {
       final CurriculumGroup curriculumGroup = (CurriculumGroup) curriculumModule;
       for (final CurriculumModule child : curriculumGroup.getCurriculumModulesSet()) {
         load(child);
       }
     }
   }
 }