IExecutionPeriod executionPeriod = Cloner.copyInfoExecutionPeriod2IExecutionPeriod(infoTurno .getInfoDisciplinaExecucao().getInfoExecutionPeriod());
final ITurno existingShift = shiftDAO.readByNameAndExecutionCourse(newShift.getNome(), newShift .getDisciplinaExecucao());
    public InfoShift run(InfoShift infoTurno) throws FenixServiceException {        ITurno turno = null;        InfoShift result = null;        try {            ISuportePersistente sp = SuportePersistenteOJB.getInstance();            IPersistentExecutionCourse executionCourseDAO = sp.getIPersistentExecutionCourse();            IExecutionPeriod executionPeriod = Cloner.copyInfoExecutionPeriod2IExecutionPeriod(infoTurno                    .getInfoDisciplinaExecucao().getInfoExecutionPeriod());            IExecutionCourse executionCourse = executionCourseDAO                    .readByExecutionCourseInitialsAndExecutionPeriod(infoTurno                            .getInfoDisciplinaExecucao().getSigla(), executionPeriod);            turno = new Turno(infoTurno.getNome(), infoTurno.getTipo(), infoTurno.getLotacao(),                    executionCourse);            try {                sp.getITurnoPersistente().simpleLockWrite(turno);                // TODO : this is required to write shifts.                //        I'm not sure of the significance, nor do I know if it is to                //        be attributed by SOP users. So for now just set it to 0.                Integer availabilityFinal = new Integer(new Double(Math.ceil(1.10 * turno.getLotacao()                        .doubleValue())).intValue());                turno.setAvailabilityFinal(availabilityFinal);                turno.setAssociatedLessons(new ArrayList());                turno.setAssociatedClasses(new ArrayList());                turno.setAssociatedShiftProfessorship(new ArrayList());            } catch (ExistingPersistentException ex) {                throw new ExistingServiceException(ex);            }            result = (InfoShift) Cloner.get(turno);        } catch (ExcepcaoPersistencia ex) {            ex.printStackTrace();        }        return result;    }