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;
return (List) CollectionUtils.collect(shifts, new Transformer() { public Object transform(Object arg0) { final ITurno shift = (ITurno) arg0; return InfoShift.newInfoFromDomain(shift); }});
    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;    }