public SessionTheatreTCISlotLiteVo(ims.scheduling.vo.beans.SessionTheatreTCISlotLiteVoBean bean) {
   this.id = bean.getId();
   this.version = bean.getVersion();
   this.tocomeintime = bean.getToComeInTime() == null ? null : bean.getToComeInTime().buildTime();
   this.appointment =
       bean.getAppointment() == null
           ? null
           : new ims.scheduling.vo.Booking_AppointmentRefVo(
               new Integer(bean.getAppointment().getId()), bean.getAppointment().getVersion());
   this.status =
       bean.getStatus() == null
           ? null
           : ims.scheduling.vo.lookups.Status_Reason.buildLookup(bean.getStatus());
 }
  /**
   * Update the ValueObject with the Domain Object.
   *
   * @param map DomainObjectMap of DomainObjects to already created ValueObjects.
   * @param valueObject to be updated
   * @param domainObject ims.scheduling.domain.objects.Booking_Appointment
   */
  public static ims.RefMan.vo.BookingAppointmentForClinicalNotesVo insert(
      DomainObjectMap map,
      ims.RefMan.vo.BookingAppointmentForClinicalNotesVo valueObject,
      ims.scheduling.domain.objects.Booking_Appointment domainObject) {
    if (null == domainObject) {
      return valueObject;
    }
    if (null == map) {
      map = new DomainObjectMap();
    }

    valueObject.setID_Booking_Appointment(domainObject.getId());
    valueObject.setIsRIE(domainObject.getIsRIE());

    // If this is a recordedInError record, and the domainObject
    // value isIncludeRecord has not been set, then we return null and
    // not the value object
    if (valueObject.getIsRIE() != null
        && valueObject.getIsRIE().booleanValue() == true
        && !domainObject.isIncludeRecord()) return null;

    // If this is not a recordedInError record, and the domainObject
    // value isIncludeRecord has been set, then we return null and
    // not the value object
    if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false)
        && domainObject.isIncludeRecord()) return null;

    // AppointmentDate
    java.util.Date AppointmentDate = domainObject.getAppointmentDate();
    if (null != AppointmentDate) {
      valueObject.setAppointmentDate(new ims.framework.utils.Date(AppointmentDate));
    }
    // ApptStartTime
    String ApptStartTime = domainObject.getApptStartTime();
    if (null != ApptStartTime) {
      valueObject.setApptStartTime(new ims.framework.utils.Time(ApptStartTime));
    }
    // ApptStatus
    ims.domain.lookups.LookupInstance instance3 = domainObject.getApptStatus();
    if (null != instance3) {
      ims.framework.utils.ImagePath img = null;
      ims.framework.utils.Color color = null;
      img = null;
      if (instance3.getImage() != null) {
        img =
            new ims.framework.utils.ImagePath(
                instance3.getImage().getImageId(), instance3.getImage().getImagePath());
      }
      color = instance3.getColor();
      if (color != null) color.getValue();

      ims.scheduling.vo.lookups.Status_Reason voLookup3 =
          new ims.scheduling.vo.lookups.Status_Reason(
              instance3.getId(), instance3.getText(), instance3.isActive(), null, img, color);
      ims.scheduling.vo.lookups.Status_Reason parentVoLookup3 = voLookup3;
      ims.domain.lookups.LookupInstance parent3 = instance3.getParent();
      while (parent3 != null) {
        if (parent3.getImage() != null) {
          img =
              new ims.framework.utils.ImagePath(
                  parent3.getImage().getImageId(), parent3.getImage().getImagePath());
        } else {
          img = null;
        }
        color = parent3.getColor();
        if (color != null) color.getValue();
        parentVoLookup3.setParent(
            new ims.scheduling.vo.lookups.Status_Reason(
                parent3.getId(), parent3.getText(), parent3.isActive(), null, img, color));
        parentVoLookup3 = parentVoLookup3.getParent();
        parent3 = parent3.getParent();
      }
      valueObject.setApptStatus(voLookup3);
    }
    // Session
    valueObject.setSession(
        ims.RefMan.vo.domain.SessionForClinicalNotesVoAssembler.create(
            map, domainObject.getSession()));
    return valueObject;
  }