if (meeting.getRecurrence() != null) { if (meeting.getRecurrence() instanceof Recurrence.DailyPattern) { appointmentDto.setRecurrenceType(RecurrenceType.DAILY); } else if (meeting.getRecurrence() instanceof Recurrence.WeeklyPattern) { appointmentDto.setRecurrenceType(RecurrenceType.WEEKLY); } else if (meeting.getRecurrence() instanceof Recurrence.MonthlyPattern) { appointmentDto.setRecurrenceType(RecurrenceType.MONTHLY); } else if (meeting.getRecurrence() instanceof Recurrence.YearlyPattern) { appointmentDto.setRecurrenceType(RecurrenceType.YEARLY); appointmentDto.setRecurrenceCount(meeting.getRecurrence().getNumberOfOccurrences());