lesson.setRoomOccupation(roomOccupation);
lesson.setRoomOccupation(newRoomOccupation);
    private IRoomOccupation createRoomOccupation(final IRoomOccupation roomOccupation,            final ILesson lesson) throws ExcepcaoPersistencia {        final IRoomOccupation newRoomOccupation = new RoomOccupation();        newRoomOccupation.setDayOfWeek(roomOccupation.getDayOfWeek());        newRoomOccupation.setEndTime(roomOccupation.getEndTime());        newRoomOccupation.setFrequency(roomOccupation.getFrequency());        newRoomOccupation.setLesson(lesson);        lesson.setRoomOccupation(roomOccupation);        final IPeriod period = getPeriod(lesson);        newRoomOccupation.setPeriod(period);        period.getRoomOccupations().add(roomOccupation);        final IRoom room = roomOccupation.getRoom();        newRoomOccupation.setRoom(room);        room.getRoomOccupations().add(roomOccupation);        newRoomOccupation.setStartTime(roomOccupation.getStartTime());        newRoomOccupation.setWeekOfQuinzenalStart(roomOccupation.getWeekOfQuinzenalStart());        newRoomOccupation.setWrittenEvaluation(null);        roomOccupationCounter++;        persist(newRoomOccupation);        return newRoomOccupation;    }