} }  if (roomOccupationToRemoveId != null) { final IPersistentRoomOccupation persistentRoomOccupation = persistentSupport .getIPersistentRoomOccupation(); IRoomOccupation roomOccupationToRemove = (IRoomOccupation) persistentRoomOccupation .readByOID(RoomOccupation.class, roomOccupationToRemoveId);  if (roomOccupationToRemove.roomOccupationForDateAndTime(periodStart, periodEnd, startTime, endTime, dayOfWeek, frequency, weekOfStart)) { availableInfoRooms.add(InfoRoom.newInfoFromDomain(roomOccupationToRemove.getRoom()));
    public List run(Calendar periodStart, Calendar periodEnd, Calendar startTime, Calendar endTime,            DiaSemana dayOfWeek, Integer roomOccupationToRemoveId, Integer normalCapacity,            Integer frequency, Integer weekOfStart, Boolean withLabs) throws ExcepcaoPersistencia {        final ISuportePersistente persistentSupport = PersistenceSupportFactory                .getDefaultPersistenceSupport();        final ISalaPersistente persistentRoom = persistentSupport.getISalaPersistente();        final List<IRoom> rooms;        if (normalCapacity != null) {            rooms = persistentRoom.readByNormalCapacity(normalCapacity);        } else if (withLabs.booleanValue()) {            rooms = persistentRoom.readAll();        } else {            rooms = persistentRoom.readForRoomReservation();        }        final List<InfoRoom> availableInfoRooms = new ArrayList<InfoRoom>();        for (final IRoom room : rooms) {            if (!isOccupied(room, periodStart, periodEnd, startTime, endTime, dayOfWeek, frequency,                    weekOfStart)) {                availableInfoRooms.add(InfoRoom.newInfoFromDomain(room));            }        }        if (roomOccupationToRemoveId != null) {            final IPersistentRoomOccupation persistentRoomOccupation = persistentSupport                    .getIPersistentRoomOccupation();            IRoomOccupation roomOccupationToRemove = (IRoomOccupation) persistentRoomOccupation                    .readByOID(RoomOccupation.class, roomOccupationToRemoveId);            if (roomOccupationToRemove.roomOccupationForDateAndTime(periodStart, periodEnd,                    startTime, endTime, dayOfWeek, frequency, weekOfStart)) {                availableInfoRooms.add(InfoRoom.newInfoFromDomain(roomOccupationToRemove.getRoom()));            }        }        return availableInfoRooms;    }