@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(); } }