;
    public InfoClassEnrollmentDetails run(InfoStudent infoStudent, Integer klassId)            throws FenixServiceException {        InfoClassEnrollmentDetails enrollmentDetails = null;        try {            ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();            IPersistentStudent studentDAO = sp.getIPersistentStudent();            ITurmaPersistente classDAO = sp.getITurmaPersistente();            IPersistentExecutionPeriod executionPeriodDAO = sp.getIPersistentExecutionPeriod();            ITurnoPersistente shiftDAO = sp.getITurnoPersistente();            // Current Execution Period            IExecutionPeriod executionPeriod = executionPeriodDAO.readActualExecutionPeriod();            // Student            IStudent student = readStudent(infoStudent, studentDAO);            // Classes            List classList = classDAO.readClassesThatContainsStudentAttendsOnExecutionPeriod(student                    .getIdInternal(), executionPeriod.getIdInternal());            // Class selected            ISchoolClass klass = null;            if (klassId != null) {                klass = (ISchoolClass) classDAO.readByOID(SchoolClass.class, klassId);            }            // Shifts correspond to student attends            List shiftAttendList = shiftDAO.readShiftsThatContainsStudentAttendsOnExecutionPeriod(                    student.getIdInternal(), executionPeriod.getIdInternal());            // Shifts enrolment            List<IShift> shifts = student.getShifts();            List studentShifts = new ArrayList();            for (IShift shift : shifts) {                if (shift.getDisciplinaExecucao().getExecutionPeriod().getIdInternal().equals(                        executionPeriod.getIdInternal()))                    ;                studentShifts.add(shift);            }                        List infoShifts = collectInfoShifts(studentShifts);            List infoClassList = new ArrayList();            Map classExecutionCourseShiftEnrollmentDetailsMap = createMapAndPopulateInfoClassList(                    classList, shiftAttendList, infoClassList, klass);            enrollmentDetails = new InfoClassEnrollmentDetails();            enrollmentDetails.setInfoStudent(copyIStudent2InfoStudent(student));            enrollmentDetails.setInfoShiftEnrolledList(infoShifts);            enrollmentDetails.setInfoClassList(infoClassList);            enrollmentDetails                    .setClassExecutionCourseShiftEnrollmentDetailsMap(classExecutionCourseShiftEnrollmentDetailsMap);        } catch (ExcepcaoPersistencia e) {            throw new FenixServiceException("Problems on database!", e);        }        return enrollmentDetails;    }