public static ims.therapies.treatment.domain.objects.Mobilisations extractMobilisations(
      ims.domain.ILightweightDomainFactory domainFactory,
      ims.therapies.vo.MobilisationsShortVo valueObject,
      HashMap domMap) {
    if (null == valueObject) {
      return null;
    }
    Integer id = valueObject.getID_Mobilisations();
    ims.therapies.treatment.domain.objects.Mobilisations domainObject = null;
    if (null == id) {
      if (domMap.get(valueObject) != null) {
        return (ims.therapies.treatment.domain.objects.Mobilisations) domMap.get(valueObject);
      }
      // ims.therapies.vo.MobilisationsShortVo ID_Mobilisations field is unknown
      domainObject = new ims.therapies.treatment.domain.objects.Mobilisations();
      domMap.put(valueObject, domainObject);
    } else {
      String key = (valueObject.getClass().getName() + "__" + valueObject.getID_Mobilisations());
      if (domMap.get(key) != null) {
        return (ims.therapies.treatment.domain.objects.Mobilisations) domMap.get(key);
      }
      domainObject =
          (ims.therapies.treatment.domain.objects.Mobilisations)
              domainFactory.getDomainObject(
                  ims.therapies.treatment.domain.objects.Mobilisations.class, id);

      // TODO: Not sure how this should be handled. Effectively it must be a staleobject exception,
      // but maybe should be handled as that further up.
      if (domainObject == null) return null;

      domMap.put(key, domainObject);
    }
    domainObject.setVersion(valueObject.getVersion_Mobilisations());

    // SaveAsRefVO - treated as a refVo in extract methods
    ims.core.admin.domain.objects.ClinicalContact value1 = null;
    if (null != valueObject.getClinicalContact()) {
      if (valueObject.getClinicalContact().getBoId() == null) {
        if (domMap.get(valueObject.getClinicalContact()) != null) {
          value1 =
              (ims.core.admin.domain.objects.ClinicalContact)
                  domMap.get(valueObject.getClinicalContact());
        }
      } else {
        value1 =
            (ims.core.admin.domain.objects.ClinicalContact)
                domainFactory.getDomainObject(
                    ims.core.admin.domain.objects.ClinicalContact.class,
                    valueObject.getClinicalContact().getBoId());
      }
    }
    domainObject.setClinicalContact(value1);
    domainObject.setAuthoringCP(
        ims.core.vo.domain.HcpAssembler.extractHcp(
            domainFactory, valueObject.getAuthoringCP(), domMap));
    ims.framework.utils.DateTime dateTime3 = valueObject.getAuthoringDateTime();
    java.util.Date value3 = null;
    if (dateTime3 != null) {
      value3 = dateTime3.getJavaDate();
    }
    domainObject.setAuthoringDateTime(value3);

    return domainObject;
  }