final List shifts = schoolClass.getAssociatedShifts(); final List shiftsToRemove = new ArrayList(shifts.size());  Iterator iter = shifts.iterator(); while (iter.hasNext()){ IShift shift = (IShift) iter.next();  if (shiftOIDs.contains(shift.getIdInternal())){ shiftsToRemove.add(shift);
final List<IShift> shifts = schoolClass.getAssociatedShifts();  for (int i = 0; i < shifts.size(); i++) { final IShift shift = shifts.get(i); if (shiftOIDs.contains(shift.getIdInternal())) { shifts.remove(shift); i--;
    public Boolean run(InfoClass infoClass, List shiftOIDs) throws ExcepcaoPersistencia {        final ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();        final ISchoolClass schoolClass = (ISchoolClass) sp.getITurmaPersistente().readByOID(SchoolClass.class,                infoClass.getIdInternal());        final List shifts = schoolClass.getAssociatedShifts();        final List shiftsToRemove = new ArrayList(shifts.size());                Iterator iter = shifts.iterator();        while (iter.hasNext()){            IShift shift = (IShift) iter.next();                        if (shiftOIDs.contains(shift.getIdInternal())){                shiftsToRemove.add(shift);            }        }        shifts.removeAll(shiftsToRemove);                return new Boolean(true);    }