private ArrayList getUserCalendarInfo(int calendarId, Connection con) {

    ArrayList userCalendarInfoList = null;
    try {

      WSUserCalendar wsCalendarBean = initWSUserCalendarBean();

      userCalendarInfoList = wsCalendarBean.getCalendarInfo(calendarId);
      // jsonArray = JSONArray.fromObject(userCalendarInfoList);

      /*
       * CalendarData calData = null; Iterator itr = userCalendarInfoList.iterator(); while (itr.hasNext()) {
       *
       * calData = (CalendarData) itr.next(); //jsonArray = JSONArray.fromObject(calData); //log.info(jsonArray+"JSON ARRAY"); map.put("loginId",
       * calData.getLoginId()); map.put("savedJobId", String.valueOf(calData.getSaveJobId())); map.put("cdcId", calData.getCdcId()); map.put("eventTitle",
       * calData.getEventTitle()); map.put("eventType", calData.getEventType()); map.put("eventDate", calData.getEventDate()); map.put("eventTime",
       * calData.getEventTime()); map.put("reminderFlag", calData.getReminderFlag()); map.put("frequency", calData.getFrequency()); map.put("periodValue",
       * calData.getPeriodValue()); map.put("notes", calData.getNotes()); map.put("sendMailTo", calData.getSendMailTo()); map.put("recordInsertedDate",
       * calData.getRecordInsertDate());
       *
       *
       *
       *
       *
       *
       * }
       */
    } catch (Exception ex) {
      ex.printStackTrace();
      log("EXCEPTION IN getUserCalendarInfo  " + ex.toString());
    }
    /**/
    // log.info(jsonArray.toString());
    return userCalendarInfoList;
  }
  // deleteUserCalendarEvent
  private boolean deleteUserCalendarEvent(int calendarId, Connection con) {

    boolean deletedFlag = true;

    try {

      WSUserCalendar wsCalendarBean = initWSUserCalendarBean();

      // UPDATE CALENDAR
      deletedFlag = wsCalendarBean.DeletePTCalendarEvent(calendarId);

    } catch (Exception ex) {
      ex.printStackTrace();
      log("Exception in deleteUserCalendarEvent() " + ex.toString());
    }

    return deletedFlag;
  }
  // insertUserCalendarEvent
  private boolean insertUserCalendarEvent(
      String loginId,
      int saveJobId,
      String cdcId,
      String eventTitle,
      String eventType,
      String eventDate,
      String eventTime,
      String reminderFlag,
      String freq,
      String periodVal,
      String sendEmail,
      String notes,
      Connection con) {

    boolean insertFlag = true;

    try {

      WSUserCalendar wsCalendarBean = initWSUserCalendarBean();

      // INSERT INTO CALENDAR
      insertFlag =
          wsCalendarBean.insertPTCalendarEvent(
              loginId,
              saveJobId,
              cdcId,
              eventTitle,
              eventType,
              eventDate,
              eventTime,
              reminderFlag,
              freq,
              periodVal,
              sendEmail,
              notes);

    } catch (Exception ex) {
      ex.printStackTrace();
      log("Exception in insertUserCalendarEvent() " + ex.toString());
    }

    return insertFlag;
  }
  // updateUserCalendarEvent
  private boolean updateUserCalendarEvent(
      int calendarId,
      String eventTitle,
      String eventType,
      String eventDate,
      String eventTime,
      String reminderFlag,
      String freq,
      String periodVal,
      String sendEmail,
      String notes,
      Connection con) {

    boolean updateFlag = true;

    try {

      WSUserCalendar wsCalendarBean = initWSUserCalendarBean();

      // UPDATE CALENDAR
      updateFlag =
          wsCalendarBean.updatePTCalendarEvent(
              calendarId,
              eventTitle,
              eventType,
              eventDate,
              eventTime,
              reminderFlag,
              freq,
              periodVal,
              sendEmail,
              notes);

    } catch (Exception ex) {
      ex.printStackTrace();
      log("Exception in updateUserCalendarEvent() " + ex.toString());
    }

    return updateFlag;
  }