setMainRoles(getImportantRoles(person, new ArrayList()));
    public void copyFromDomain(IPerson person) {        super.copyFromDomain(person);        if (person != null) {            setInfoPais(InfoCountry.newInfoFromDomain(person.getPais()));            setNome(person.getNome());            setNumeroDocumentoIdentificacao(person.getNumeroDocumentoIdentificacao());            setTipoDocumentoIdentificacao(person.getIdDocumentType());            setLocalEmissaoDocumentoIdentificacao(person.getLocalEmissaoDocumentoIdentificacao());            setDataEmissaoDocumentoIdentificacao(person.getDataEmissaoDocumentoIdentificacao());            setDataValidadeDocumentoIdentificacao(person.getDataValidadeDocumentoIdentificacao());            setSexo(person.getGender());            setMaritalStatus(person.getMaritalStatus());            setEmail(person.getEmail());            setAvailableEmail(person.getAvailableEmail());            setEnderecoWeb(person.getEnderecoWeb());            setAvailableWebSite(person.getAvailableWebSite());            setTelefone(person.getTelefone());            setTelemovel(person.getTelemovel());            setWorkPhone(person.getWorkPhone());            setProfissao(person.getProfissao());            setMorada(person.getMorada());            setCodigoPostal(person.getCodigoPostal());            setLocalidade(person.getLocalidade());            setFreguesiaMorada(person.getFreguesiaMorada());            setConcelhoMorada(person.getConcelhoMorada());            setDistritoMorada(person.getDistritoMorada());            setConcelhoNaturalidade(person.getConcelhoNaturalidade());            setDistritoNaturalidade(person.getDistritoNaturalidade());            setFreguesiaNaturalidade(person.getFreguesiaNaturalidade());            setLocalidadeCodigoPostal(person.getLocalidadeCodigoPostal());            setNascimento(person.getNascimento());            setNomeMae(person.getNomeMae());            setNomePai(person.getNomePai());            setNumContribuinte(person.getNumContribuinte());            setCodigoFiscal(person.getCodigoFiscal());            setPassword(person.getPassword());            setUsername(person.getUsername());            if (person.getExternalPerson() != null) {                InfoExternalPerson infoExternalPerson = new InfoExternalPerson();                infoExternalPerson.setIdInternal(person.getExternalPerson().getIdInternal());                infoExternalPerson.setInfoPerson(this);                infoExternalPerson.setInfoWorkLocation(InfoWorkLocation.newInfoFromDomain(person                        .getExternalPerson().getWorkLocation()));                setInfoExternalPerson(infoExternalPerson);            }            if (person.getTeacher() != null) {                InfoTeacher infoTeacher = new InfoTeacher();                infoTeacher.setIdInternal(person.getTeacher().getIdInternal());                infoTeacher.setTeacherNumber(person.getTeacher().getTeacherNumber());                infoTeacher.setInfoCategory(InfoCategory.newInfoFromDomain(person.getTeacher()                        .getCategory()));                setInfoTeacher(infoTeacher);            }            if (person.getEmployee() != null) {                InfoEmployee infoEmployee = new InfoEmployee();                infoEmployee.setIdInternal(person.getEmployee().getIdInternal());                infoEmployee.setEmployeeNumber(person.getEmployee().getEmployeeNumber());                if (person.getEmployee().getCurrentContract() != null                        && person.getEmployee().getCurrentContract().getWorkingUnit() != null) {                    infoEmployee.setWorkingUnit(InfoUnit.newInfoFromDomain(person.getEmployee()                            .getCurrentContract().getWorkingUnit()));                }                if (person.getEmployee().getCurrentContract() != null                        && person.getEmployee().getCurrentContract().getMailingUnit() != null) {                    infoEmployee.setMailingUnit(InfoUnit.newInfoFromDomain(person.getEmployee()                            .getCurrentContract().getMailingUnit()));                }                setInfoEmployee(infoEmployee);            }            if (person.getStudentsCount() != 0) {                List<InfoStudentCurricularPlan> infoStudentList = new ArrayList<InfoStudentCurricularPlan>();                for (IStudent student : person.getStudents()) {                    InfoStudent infoStudent = new InfoStudent();                    InfoStudentCurricularPlan infoStudentCurricularPlan = new InfoStudentCurricularPlan();                    InfoDegree infoDegree = new InfoDegree();                    for (IStudentCurricularPlan studentCurricularPlan : student                            .getStudentCurricularPlans()) {                        if ((!studentCurricularPlan.getCurrentState().equals(                                StudentCurricularPlanState.ACTIVE))                                && (!studentCurricularPlan.getCurrentState().equals(                                        StudentCurricularPlanState.SCHOOLPARTCONCLUDED))) {                            continue;                        }                        infoStudentCurricularPlan = InfoStudentCurricularPlan                                .newInfoFromDomain(studentCurricularPlan);                        infoDegree = InfoDegree.newInfoFromDomain(studentCurricularPlan                                .getDegreeCurricularPlan().getDegree());                        infoDegree.setNome(studentCurricularPlan.getDegreeCurricularPlan().getDegree()                                .getNome());                        infoDegree.setSigla(studentCurricularPlan.getDegreeCurricularPlan().getDegree()                                .getSigla());                        infoStudentCurricularPlan.getInfoDegreeCurricularPlan()                                .setInfoDegree(infoDegree);                        infoStudent.setInfoStudentCurricularPlan(infoStudentCurricularPlan);                        infoStudentList.add(infoStudent.getInfoStudentCurricularPlan());                    }                    setInfoStudentCurricularPlanList(infoStudentList);                }            }            setAvailablePhoto(person.getAvailablePhoto());            setInfoPais(InfoCountry.newInfoFromDomain(person.getPais()));        }    }