Long categoryId, Long remind, Room room, Long language_id,
Boolean isPasswordProtected, String password,
Boolean isConnectedEvent, String jNameTimeZone) {
try {
Appointment ap = new Appointment();
ap.setAppointmentName(appointmentName);
ap.setAppointmentLocation(appointmentLocation);
log.debug("addAppointment appointmentstart :1: "
+ CalendarPatterns
.getDateWithTimeByMiliSecondsWithZone(appointmentstart));
log.debug("addAppointment appointmentend :1: "
+ CalendarPatterns
.getDateWithTimeByMiliSecondsWithZone(appointmentend));
ap.setAppointmentStarttime(appointmentstart);
ap.setAppointmentEndtime(appointmentend);
ap.setAppointmentDescription(appointmentDescription);
ap.setRemind(appointmentReminderTypDaoImpl
.getAppointmentReminderTypById(remind));
ap.setStarttime(new Date());
ap.setIsReminderEmailSend(false);
ap.setDeleted(false);
ap.setIsDaily(isDaily);
ap.setIsWeekly(isWeekly);
ap.setIsMonthly(isMonthly);
ap.setIsYearly(isYearly);
ap.setLanguage_id(language_id);
ap.setIsPasswordProtected(isPasswordProtected);
ap.setPassword(password);
ap.setUserId(usersDao.get(userId));
ap.setAppointmentCategory(appointmentCategoryDaoImpl
.getAppointmentCategoryById(categoryId));
ap.setRoom(room);
ap.setIsConnectedEvent(isConnectedEvent);
ap = em.merge(ap);
return ap.getAppointmentId();
} catch (Exception ex2) {
log.error("[addAppointment]: ", ex2);
}
return null;
}