final RoomOccupation roomOccupation = new RoomOccupation(oldRoom, cStart, cEnd, diaSemana, 1); new Lesson(diaSemana, cStart, cEnd, shift.getTipo(), oldRoom, roomOccupation, shift, Integer.valueOf(0), Integer.valueOf(1));
final RoomOccupation roomOccupation = new RoomOccupation(oldRoom, cStart, cEnd, diaSemana, 1); final ExecutionPeriod executionPeriod = shift.getDisciplinaExecucao().getExecutionPeriod(); final OccupationPeriod occupationPeriod = OccupationPeriod.readFor(executionPeriod.getBeginDateYearMonthDay(), executionPeriod.getEndDateYearMonthDay().minusDays(32)); roomOccupation.setPeriod(occupationPeriod); final Lesson lesson = new Lesson(diaSemana, cStart, cEnd, shift.getTipo(), oldRoom, roomOccupation, shift, Integer.valueOf(0), Integer.valueOf(1)); lesson.setExecutionPeriod(executionPeriod);
    private static void createLesson(final Shift shift, int durationInMinutes) {	final HourMinuteSecond start = roomManager.getNextHourMinuteSecond();	final HourMinuteSecond end = start.plusMinutes(durationInMinutes);	final Calendar cStart = toCalendar(start);	final Calendar cEnd = toCalendar(end);	final DiaSemana diaSemana = new DiaSemana(roomManager.getNextWeekDay());	final OldRoom oldRoom = roomManager.getNextOldRoom();	final RoomOccupation roomOccupation = new RoomOccupation(oldRoom, cStart, cEnd, diaSemana, 1); 	new Lesson(diaSemana, cStart, cEnd, shift.getTipo(), oldRoom, roomOccupation, shift, Integer.valueOf(0), Integer.valueOf(1));    }