&& (unit.getType().equals(PartyTypeEnum.DEGREE) || unit.getType().equals( PartyTypeEnum.MASTER_DEGREE))) {
&& (unit.getType().equals(PartyTypeEnum.DEGREE) || unit.getType().equals(PartyTypeEnum.MASTER_DEGREE) || unit.getType().equals( PartyTypeEnum.INTEGRATED_MASTER_DEGREE))) {
    private void setDegree(Integer degreeID, Unit unit) throws ExcepcaoPersistencia {        Degree degree = null;        if (degreeID != null                && unit.getType() != null                && (unit.getType().equals(PartyTypeEnum.DEGREE) || unit.getType().equals(                        PartyTypeEnum.MASTER_DEGREE))) {            degree = rootDomainObject.readDegreeByOID(degreeID);            if ((degree.getTipoCurso().equals(DegreeType.DEGREE) && unit.getType().equals(                    PartyTypeEnum.DEGREE))                    || (degree.getTipoCurso().equals(DegreeType.MASTER_DEGREE) && unit.getType().equals(                            PartyTypeEnum.MASTER_DEGREE))) {                unit.setDegree(degree);            } else if (unit.getDegree() != null) {                unit.removeDegree();            }        } else if (((degreeID != null && unit.getType() != null) || degreeID == null)                && unit.getDegree() != null) {            unit.removeDegree();        }    }