code: public void setResourceCalendar(ProjectCalendar calendar)
     {
        set(ResourceField.CALENDAR, calendar);
        if (calendar == null)
        {
           setResourceCalendarUniqueID(null);
        }
        else
        {
           calendar.setResource(this);
           setResourceCalendarUniqueID(calendar.getUniqueID());
        }
     }
docs: This method allows a pre-existing resource calendar to be attached to a
  resource.
  
  @param calendar resource calendar