person.addPersonRoles(Role.getRoleByRoleType(RoleType.STUDENT));
    public InfoCandidateRegistration run(Integer candidateID, Integer branchID, Integer studentNumber,            IUserView userView) throws FenixServiceException, ExcepcaoPersistencia {        MasterDegreeCandidate masterDegreeCandidate = rootDomainObject                .readMasterDegreeCandidateByOID(candidateID);        Person person = masterDegreeCandidate.getPerson();        Registration registration = person.getStudentByType(DegreeType.MASTER_DEGREE);        checkCandidateSituation(masterDegreeCandidate.getActiveCandidateSituation());        // remove master degree candidate role        person.removeRoleByType(RoleType.MASTER_DEGREE_CANDIDATE);        // check if old student number is free        checkOldStudentNumber(studentNumber, person);        // create new student        if (registration == null) {		registration = createNewRegistration(person, studentNumber);        }                if(person.getStudent() == null){            new Student(person, registration.getNumber());        }        person.getStudent().getRegistrations().add(registration);        person.addPersonRoles(Role.getRoleByRoleType(RoleType.STUDENT));        checkDuplicateStudentCurricularPlan(masterDegreeCandidate, registration);	StudentCurricularPlan studentCurricularPlan = createNewStudentCurricularPlan(registration,		branchID, masterDegreeCandidate);        createEnrolments(userView, masterDegreeCandidate, studentCurricularPlan);        updateCandidateSituation(masterDegreeCandidate);        copyQualifications(masterDegreeCandidate, person);        createGratuitySituation(masterDegreeCandidate, studentCurricularPlan);        return createNewInfoCandidateRegistration(masterDegreeCandidate, studentCurricularPlan);    }