throw new DomainException("error.lessonInstance.already.exist");
}
Space room = lesson.getSala();
HourMinuteSecond beginTime = lesson.getBeginHourMinuteSecond();
HourMinuteSecond endTime = lesson.getEndHourMinuteSecond();
DateTime beginDateTime =
new DateTime(day.getYear(), day.getMonthOfYear(), day.getDayOfMonth(), beginTime.getHour(),
beginTime.getMinuteOfHour(), beginTime.getSecondOfMinute(), 0);
DateTime endDateTime =
new DateTime(day.getYear(), day.getMonthOfYear(), day.getDayOfMonth(), endTime.getHour(),
endTime.getMinuteOfHour(), endTime.getSecondOfMinute(), 0);
setRootDomainObject(Bennu.getInstance());
setBeginDateTime(beginDateTime);
setEndDateTime(endDateTime);
setLesson(lesson);