try { ISuportePersistente sp = SuportePersistenteOJB.getInstance(); IExecutionCourse executionCourse = Cloner.copyInfoExecutionCourse2ExecutionCourse(iDE); List dshifts = sp.getITurnoPersistente().readByExecutionCourseAndType(executionCourse, type.getTipo());
final IExecutionCourse executionCourse = (IExecutionCourse) persistentExecutionCourse.readByOID(ExecutionCourse.class, infoExecutionCourse.getIdInternal()); final List shifts = persistentShift.readByExecutionCourseAndType(executionCourse, tipoAula.getTipo());
    public List run(InfoExecutionCourse iDE, TipoAula type) {        List shifts = new ArrayList();        try {            ISuportePersistente sp = SuportePersistenteOJB.getInstance();            IExecutionCourse executionCourse = Cloner.copyInfoExecutionCourse2ExecutionCourse(iDE);            List dshifts = sp.getITurnoPersistente().readByExecutionCourseAndType(executionCourse,                    type.getTipo());            if (dshifts != null)                for (int i = 0; i < dshifts.size(); i++) {                    ITurno dshift = (ITurno) dshifts.get(i);                    InfoShift shift = (InfoShift) Cloner.get(dshift);                    shifts.add(shift);                }        } catch (ExcepcaoPersistencia e) {            e.printStackTrace();        }        return shifts;    }