gt: 			clone.date = (ims.framework.utils.Date)this.date.clone();
context: //#############################################################################
  //#                                                                           #
  //#  Copyright (C) <2015>  <IMS MAXIMS>                                       #
  //#                                                                           #
  //#  This program is free software: you can redistribute it and/or modify     #
  //#  it under the terms of the GNU Affero General Public License as           #
  //#  published by the Free Software Foundation, either version 3 of the       #
  //#  License, or (at your option) any later version.                          # 
  //#                                                                           #
  //#  This program is distributed in the hope that it will be useful,          #
  //#  but WITHOUT ANY WARRANTY; without even the implied warranty of           #
  //#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
  //#  GNU Affero General Public License for more details.                      #
  //#                                                                           #
  //#  You should have received a copy of the GNU Affero General Public License #
  //#  along with this program.  If not, see <http://www.gnu.org/licenses/>.    #
  //#                                                                           #
  //#  IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of    #
  //#  this program.  Users of this software do so entirely at their own risk.  #
  //#  IMS MAXIMS only ensures the Clinical Safety of unaltered run-time        #
  //#  software that it builds, deploys and maintains.                          #
  //#                                                                           #
  //#############################################################################
  //#EOH
  // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814)
  // Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved.
  // WARNING: DO NOT MODIFY the content of this file
  
  package ims.coe.vo;
  
  /**
   * Linked to clinical.Actions business object (ID: 1017100001).
   */
  public class DischargeActions extends ims.clinical.vo.ActionsRefVo implements ims.vo.ImsCloneable, Comparable
  {
  	private static final long serialVersionUID = 1L;
  
  	public DischargeActions()
  	{
  	}
  	public DischargeActions(Integer id, int version)
  	{
  		super(id, version);
  	}
  	public DischargeActions(ims.coe.vo.beans.DischargeActionsBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.actionlist = bean.getActionList() == null ? null : ims.coe.vo.lookups.DischargeActions.buildLookup(bean.getActionList());
  		this.status = bean.getStatus();
  		this.date = bean.getDate() == null ? null : bean.getDate().buildDate();
  		this.hcp = bean.getHCP() == null ? null : bean.getHCP().buildVo();
  		this.details = bean.getDetails();
  	}
  	public void populate(ims.vo.ValueObjectBeanMap map, ims.coe.vo.beans.DischargeActionsBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.actionlist = bean.getActionList() == null ? null : ims.coe.vo.lookups.DischargeActions.buildLookup(bean.getActionList());
  		this.status = bean.getStatus();
  		this.date = bean.getDate() == null ? null : bean.getDate().buildDate();
  		this.hcp = bean.getHCP() == null ? null : bean.getHCP().buildVo(map);
  		this.details = bean.getDetails();
  	}
  	public ims.vo.ValueObjectBean getBean()
  	{
  		return this.getBean(new ims.vo.ValueObjectBeanMap());
  	}
  	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
  	{
  		ims.coe.vo.beans.DischargeActionsBean bean = null;
  		if(map != null)
  			bean = (ims.coe.vo.beans.DischargeActionsBean)map.getValueObjectBean(this);
  		if (bean == null)
  		{
  			bean = new ims.coe.vo.beans.DischargeActionsBean();
  			map.addValueObjectBean(this, bean);
  			bean.populate(map, this);
  		}
  		return bean;
  	}
  	public Object getFieldValueByFieldName(String fieldName)
  	{
  		if(fieldName == null)
  			throw new ims.framework.exceptions.CodingRuntimeException("Invalid field name");
  		fieldName = fieldName.toUpperCase();
  		if(fieldName.equals("ACTIONLIST"))
  			return getActionList();
  		if(fieldName.equals("STATUS"))
  			return getStatus();
  		if(fieldName.equals("DATE"))
  			return getDate();
  		if(fieldName.equals("HCP"))
  			return getHCP();
  		if(fieldName.equals("DETAILS"))
  			return getDetails();
  		return super.getFieldValueByFieldName(fieldName);
  	}
  	public boolean getActionListIsNotNull()
  	{
  		return this.actionlist != null;
  	}
  	public ims.coe.vo.lookups.DischargeActions getActionList()
  	{
  		return this.actionlist;
  	}
  	public void setActionList(ims.coe.vo.lookups.DischargeActions value)
  	{
  		this.isValidated = false;
  		this.actionlist = value;
  	}
  	public boolean getStatusIsNotNull()
  	{
  		return this.status != null;
  	}
  	public Boolean getStatus()
  	{
  		return this.status;
  	}
  	public void setStatus(Boolean value)
  	{
  		this.isValidated = false;
  		this.status = value;
  	}
  	public boolean getDateIsNotNull()
  	{
  		return this.date != null;
  	}
  	public ims.framework.utils.Date getDate()
  	{
  		return this.date;
  	}
  	public void setDate(ims.framework.utils.Date value)
  	{
  		this.isValidated = false;
  		this.date = value;
  	}
  	public boolean getHCPIsNotNull()
  	{
  		return this.hcp != null;
  	}
  	public ims.core.vo.HcpLiteVo getHCP()
  	{
  		return this.hcp;
  	}
  	public void setHCP(ims.core.vo.HcpLiteVo value)
  	{
  		this.isValidated = false;
  		this.hcp = value;
  	}
  	public boolean getDetailsIsNotNull()
  	{
  		return this.details != null;
  	}
  	public String getDetails()
  	{
  		return this.details;
  	}
  	public static int getDetailsMaxLength()
  	{
  		return 1000;
  	}
  	public void setDetails(String value)
  	{
  		this.isValidated = false;
  		this.details = value;
  	}
  	public boolean isValidated()
  	{
  		if(this.isBusy)
  			return true;
  		this.isBusy = true;
  	
  		if(!this.isValidated)
  		{
  			this.isBusy = false;
  			return false;
  		}
  		if(this.hcp != null)
  		{
  			if(!this.hcp.isValidated())
  			{
  				this.isBusy = false;
  				return false;
  			}
  		}
  		this.isBusy = false;
  		return true;
  	}
  	public String[] validate()
  	{
  		return validate(null);
  	}
  	public String[] validate(String[] existingErrors)
  	{
  		if(this.isBusy)
  			return null;
  		this.isBusy = true;
  	
  		java.util.ArrayList<String> listOfErrors = new java.util.ArrayList<String>();
  		if(existingErrors != null)
  		{
  			for(int x = 0; x < existingErrors.length; x++)
  			{
  				listOfErrors.add(existingErrors[x]);
  			}
  		}
  		if(this.hcp != null)
  		{
  			String[] listOfOtherErrors = this.hcp.validate();
  			if(listOfOtherErrors != null)
  			{
  				for(int x = 0; x < listOfOtherErrors.length; x++)
  				{
  					listOfErrors.add(listOfOtherErrors[x]);
  				}
  			}
  		}
  		if(this.details != null)
  			if(this.details.length() > 1000)
  				listOfErrors.add("The length of the field [details] in the value object [ims.coe.vo.DischargeActions] is too big. It should be less or equal to 1000");
  		int errorCount = listOfErrors.size();
  		if(errorCount == 0)
  		{
  			this.isBusy = false;
  			this.isValidated = true;
  			return null;
  		}
  		String[] result = new String[errorCount];
  		for(int x = 0; x < errorCount; x++)
  			result[x] = (String)listOfErrors.get(x);
  		this.isBusy = false;
  		this.isValidated = false;
  		return result;
  	}
  	public void clearIDAndVersion()
  	{
  		this.id = null;
  		this.version = 0;
  	}
  	public Object clone()
  	{
  		if(this.isBusy)
  			return this;
  		this.isBusy = true;
  	
  		DischargeActions clone = new DischargeActions(this.id, this.version);
  		
  		if(this.actionlist == null)
  			clone.actionlist = null;
  		else
  			clone.actionlist = (ims.coe.vo.lookups.DischargeActions)this.actionlist.clone();
  		clone.status = this.status;
  		if(this.date == null)
  			clone.date = null;
  		else
  