public CalendarResource toEntityModel() {
    CalendarResourceImpl calendarResourceImpl = new CalendarResourceImpl();

    if (uuid == null) {
      calendarResourceImpl.setUuid(StringPool.BLANK);
    } else {
      calendarResourceImpl.setUuid(uuid);
    }

    calendarResourceImpl.setCalendarResourceId(calendarResourceId);
    calendarResourceImpl.setGroupId(groupId);
    calendarResourceImpl.setCompanyId(companyId);
    calendarResourceImpl.setUserId(userId);

    if (userName == null) {
      calendarResourceImpl.setUserName(StringPool.BLANK);
    } else {
      calendarResourceImpl.setUserName(userName);
    }

    if (createDate == Long.MIN_VALUE) {
      calendarResourceImpl.setCreateDate(null);
    } else {
      calendarResourceImpl.setCreateDate(new Date(createDate));
    }

    if (modifiedDate == Long.MIN_VALUE) {
      calendarResourceImpl.setModifiedDate(null);
    } else {
      calendarResourceImpl.setModifiedDate(new Date(modifiedDate));
    }

    calendarResourceImpl.setClassNameId(classNameId);
    calendarResourceImpl.setClassPK(classPK);

    if (classUuid == null) {
      calendarResourceImpl.setClassUuid(StringPool.BLANK);
    } else {
      calendarResourceImpl.setClassUuid(classUuid);
    }

    if (name == null) {
      calendarResourceImpl.setName(StringPool.BLANK);
    } else {
      calendarResourceImpl.setName(name);
    }

    if (description == null) {
      calendarResourceImpl.setDescription(StringPool.BLANK);
    } else {
      calendarResourceImpl.setDescription(description);
    }

    calendarResourceImpl.setActive(active);

    calendarResourceImpl.resetOriginalValues();

    return calendarResourceImpl;
  }
  @Override
  public Object clone() {
    CalendarResourceImpl calendarResourceImpl = new CalendarResourceImpl();

    calendarResourceImpl.setUuid(getUuid());
    calendarResourceImpl.setCalendarResourceId(getCalendarResourceId());
    calendarResourceImpl.setGroupId(getGroupId());
    calendarResourceImpl.setCompanyId(getCompanyId());
    calendarResourceImpl.setUserId(getUserId());
    calendarResourceImpl.setUserName(getUserName());
    calendarResourceImpl.setCreateDate(getCreateDate());
    calendarResourceImpl.setModifiedDate(getModifiedDate());
    calendarResourceImpl.setClassNameId(getClassNameId());
    calendarResourceImpl.setClassPK(getClassPK());
    calendarResourceImpl.setClassUuid(getClassUuid());
    calendarResourceImpl.setName(getName());
    calendarResourceImpl.setDescription(getDescription());
    calendarResourceImpl.setActive(getActive());

    calendarResourceImpl.resetOriginalValues();

    return calendarResourceImpl;
  }