teacherDfpStudentsDTO.setInfoTeacher(infoTeacher2); teacherDfpStudentsDTO.setInfoExecutionPeriod(infoExecutionPeriod); teacherDfpStudentsDTO.setInfoTeacherDegreeFinalProjectStudentList(infoteacherDFPStudentList); } catch (ExcepcaoPersistencia e) { throw new FenixServiceException("Problems on database!"); }
teacherDfpStudentsDTO.setInfoTeacher(infoTeacher2); teacherDfpStudentsDTO.setInfoExecutionPeriod(infoExecutionPeriod); teacherDfpStudentsDTO.setInfoTeacherDegreeFinalProjectStudentList(infoteacherDFPStudentList);
    public TeacherDegreeFinalProjectStudentsDTO run(InfoTeacher infoTeacher, Integer executionPeriodId)            throws FenixServiceException {        TeacherDegreeFinalProjectStudentsDTO teacherDfpStudentsDTO = new TeacherDegreeFinalProjectStudentsDTO();        try {            ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();            IPersistentTeacher teacherDAO = sp.getIPersistentTeacher();            IPersistentExecutionPeriod executionPeriodDAO = sp.getIPersistentExecutionPeriod();            IExecutionPeriod executionPeriod = getExecutionPeriod(executionPeriodId, executionPeriodDAO);            InfoExecutionPeriod infoExecutionPeriod = InfoExecutionPeriod.newInfoFromDomain(executionPeriod);            ITeacher teacher = (ITeacher) teacherDAO.readByOID(Teacher.class, infoTeacher                    .getIdInternal());            InfoTeacher infoTeacher2 = Cloner.copyITeacher2InfoTeacher(teacher);            IPersistentTeacherDegreeFinalProjectStudent teacherDfpStudentDAO = sp                    .getIPersistentTeacherDegreeFinalProjectStudent();            List teacherDFPStudentList = teacherDfpStudentDAO.readByTeacherAndExecutionPeriod(                    teacher.getIdInternal(),                    executionPeriod.getIdInternal());            List infoteacherDFPStudentList = (List) CollectionUtils.collect(teacherDFPStudentList,                    new Transformer() {                        public Object transform(Object input) {                            ITeacherDegreeFinalProjectStudent teacherDegreeFinalProjectStudent = (ITeacherDegreeFinalProjectStudent) input;                            InfoTeacherDegreeFinalProjectStudent infoTeacherDegreeFinalProjectStudent = Cloner                                    .copyITeacherDegreeFinalProjectStudent2InfoTeacherDegreeFinalProjectStudent(teacherDegreeFinalProjectStudent);                            return infoTeacherDegreeFinalProjectStudent;                        }                    });            teacherDfpStudentsDTO.setInfoTeacher(infoTeacher2);            teacherDfpStudentsDTO.setInfoExecutionPeriod(infoExecutionPeriod);            teacherDfpStudentsDTO.setInfoTeacherDegreeFinalProjectStudentList(infoteacherDFPStudentList);        } catch (ExcepcaoPersistencia e) {            throw new FenixServiceException("Problems on database!");        }        return teacherDfpStudentsDTO;    }