if(date == null && studentCurricularPlan.getMasterDegreeThesis() != null){ MasterDegreeProofVersion proofVersion = studentCurricularPlan.getMasterDegreeThesis().getActiveMasterDegreeProofVersion(); if(proofVersion != null){ date = proofVersion.getProofDate(); } }
    public Date dateOfEndOfScholarship(StudentCurricularPlan studentCurricularPlan)            throws ExcepcaoPersistencia {        Date date = null;        InfoEnrolmentEvaluation infoEnrolmentEvaluation = null;        //		float studentCredits = 0;        //		        //		DegreeCurricularPlan degreeCurricularPlan =        // super.getDegreeCurricularPlan();        List enrolments = studentCurricularPlan.getEnrolments();        Iterator iterator = enrolments.iterator();        while (iterator.hasNext()) {            Enrolment enrolment = (Enrolment) iterator.next();            if (enrolment.getEnrollmentState().equals(EnrollmentState.APROVED)) {                infoEnrolmentEvaluation = new GetEnrolmentGrade().run(enrolment);                if (infoEnrolmentEvaluation.getExamDate() == null) {                    continue;                }                if (date == null) {                    date = new Date(infoEnrolmentEvaluation.getExamDate().getTime());                    continue;                }                if (infoEnrolmentEvaluation.getExamDate().after(date)) {                    date.setTime(infoEnrolmentEvaluation.getExamDate().getTime());                }            }        }        return date;    }