return (studentCredits >= degreeCurricularPlan.getNeededCredits().doubleValue());
if(degreeCurricularPlan.getNeededCredits() != null){ return (studentCredits >= degreeCurricularPlan.getNeededCredits().doubleValue()); } return true;
    public boolean checkEndOfScholarship(StudentCurricularPlan studentCurricularPlan)            throws ExcepcaoPersistencia {        double studentCredits = 0;        DegreeCurricularPlan degreeCurricularPlan = super.getDegreeCurricularPlan();        List enrolments = studentCurricularPlan.getEnrolments();        Iterator iterator = enrolments.iterator();        if (studentCurricularPlan.getGivenCredits() != null) {            studentCredits += studentCurricularPlan.getGivenCredits().doubleValue();        }        while (iterator.hasNext()) {            Enrolment enrolment = (Enrolment) iterator.next();            if ((enrolment.getEnrollmentState().equals(EnrollmentState.APROVED))                    && (!(enrolment instanceof EnrolmentInExtraCurricularCourse))) {                studentCredits += enrolment.getCurricularCourse().getCredits().doubleValue();            }        }        return (studentCredits >= degreeCurricularPlan.getNeededCredits().doubleValue());    }