private static void loadingExceptionsWithTheirTypes( BaseCalendar baseCalendar) { Set<CalendarException> exceptions = baseCalendar.getExceptions(); for (CalendarException each : exceptions) { each.getType().getName(); } }
private void forceLoadCalendar(BaseCalendar baseCalendar) { for (CalendarData calendarData : baseCalendar.getCalendarDataVersions()) { calendarData.getHoursPerDay().size(); if (calendarData.getParent() != null) { forceLoadCalendar(calendarData.getParent()); } } baseCalendar.getExceptions().size(); }
@Override public Set<IntegrationEntity> getChildren() { Set<IntegrationEntity> children = new HashSet<IntegrationEntity>(); if (baseCalendar != null) { children.addAll(baseCalendar.getExceptions()); children.addAll(baseCalendar.getCalendarDataVersions()); children.addAll(baseCalendar.getCalendarAvailabilities()); } return children; }
/** * Don't pose as transient anymore calendar and all data hanging from * calendar (data versions, availabilities and exceptions) * * @param calendar */ private void dontPoseAsTransientObjectAnymore(BaseCalendar calendar) { calendar.dontPoseAsTransientObjectAnymore(); for (CalendarData each: calendar.getCalendarDataVersions()) { each.dontPoseAsTransientObjectAnymore(); } for (CalendarAvailability each : calendar.getCalendarAvailabilities()) { each.dontPoseAsTransientObjectAnymore(); } for (CalendarException each : calendar.getExceptions()) { each.dontPoseAsTransientObjectAnymore(); } }