infoShiftProfessorship = InfoShiftProfessorship.newInfoFromDomain(shiftProfessorship);
infoShiftProfessorship = InfoShiftProfessorshipAndTeacher.newInfoFromDomain(shiftProfessorship);
    public TeacherExecutionCourseProfessorshipShiftsDTO run(InfoTeacher infoTeacher,            InfoExecutionCourse infoExecutionCourse) throws FenixServiceException {        TeacherExecutionCourseProfessorshipShiftsDTO result = new TeacherExecutionCourseProfessorshipShiftsDTO();        List infoShiftPercentageList = new ArrayList();        try {            ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();            IExecutionCourse executionCourse = readExecutionCourse(infoExecutionCourse, sp);            ITeacher teacher = readTeacher(infoTeacher, sp);            result.setInfoExecutionCourse((InfoExecutionCourse) Cloner.get(executionCourse));            result.setInfoTeacher(Cloner.copyITeacher2InfoTeacher(teacher));            ITurnoPersistente shiftDAO = sp.getITurnoPersistente();            List executionCourseShiftsList = null;            executionCourseShiftsList = shiftDAO                    .readByExecutionCourseID(executionCourse.getIdInternal());            Iterator iterator = executionCourseShiftsList.iterator();            while (iterator.hasNext()) {                IShift shift = (IShift) iterator.next();                InfoShiftPercentage infoShiftPercentage = new InfoShiftPercentage();                final InfoShift infoShift = InfoShift.newInfoFromDomain(shift);                infoShiftPercentage.setShift(infoShift);                double availablePercentage = 100;                InfoShiftProfessorship infoShiftProfessorship = null;                Iterator iter = shift.getAssociatedShiftProfessorship().iterator();                while (iter.hasNext()) {                    IShiftProfessorship shiftProfessorship = (IShiftProfessorship) iter.next();                    /**                     * if shift's type is LABORATORIAL the shift professorship                     * percentage can exceed 100%                     */                    if ((shift.getTipo().getTipo().intValue() != TipoAula.LABORATORIAL)                            && (!shiftProfessorship.getProfessorship().getTeacher().equals(teacher))) {                        availablePercentage -= shiftProfessorship.getPercentage().doubleValue();                    }                    infoShiftProfessorship = InfoShiftProfessorship.newInfoFromDomain(shiftProfessorship);                    infoShiftPercentage.addInfoShiftProfessorship(infoShiftProfessorship);                }                List infoLessons = (List) CollectionUtils.collect(shift.getAssociatedLessons(),                        new Transformer() {                            public Object transform(Object input) {                                ILesson lesson = (ILesson) input;                                return Cloner.copyILesson2InfoLesson(lesson);                            }                        });                infoShiftPercentage.setInfoLessons(infoLessons);                infoShiftPercentage.setAvailablePercentage(new Double(availablePercentage));                infoShiftPercentageList.add(infoShiftPercentage);            }        } catch (ExcepcaoPersistencia e) {            e.printStackTrace();            throw new FenixServiceException(e);        }        result.setInfoShiftPercentageList(infoShiftPercentageList);        return result;    }