gt: 		if (retVal == 0)
context: //#############################################################################
  //#                                                                           #
  //#  Copyright (C) <2014>  <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/>.    #
  //#                                                                           #
  //#############################################################################
  //#EOH
  // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5007.25751)
  // Copyright (C) 1995-2014 IMS MAXIMS. All rights reserved.
  // WARNING: DO NOT MODIFY the content of this file
  
  package ims.generalmedical.vo;
  
  /**
   * Linked to medical.NeuroReflexesAnalTests business object (ID: 1023100020).
   */
  public class NeuroReflexAnalTestsVo extends ims.medical.vo.NeuroReflexesAnalTestsRefVo implements ims.vo.ImsCloneable, Comparable
  {
  	private static final long serialVersionUID = 1L;
  
  	public NeuroReflexAnalTestsVo()
  	{
  	}
  	public NeuroReflexAnalTestsVo(Integer id, int version)
  	{
  		super(id, version);
  	}
  	public NeuroReflexAnalTestsVo(ims.generalmedical.vo.beans.NeuroReflexAnalTestsVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.analtest = bean.getAnalTest() == null ? null : ims.spinalinjuries.vo.lookups.NeuroExmAnalTest.buildLookup(bean.getAnalTest());
  		this.analtestfinding = bean.getAnalTestfinding() == null ? null : ims.spinalinjuries.vo.lookups.NeuroExmAnalTest.buildLookup(bean.getAnalTestfinding());
  	}
  	public void populate(ims.vo.ValueObjectBeanMap map, ims.generalmedical.vo.beans.NeuroReflexAnalTestsVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.analtest = bean.getAnalTest() == null ? null : ims.spinalinjuries.vo.lookups.NeuroExmAnalTest.buildLookup(bean.getAnalTest());
  		this.analtestfinding = bean.getAnalTestfinding() == null ? null : ims.spinalinjuries.vo.lookups.NeuroExmAnalTest.buildLookup(bean.getAnalTestfinding());
  	}
  	public ims.vo.ValueObjectBean getBean()
  	{
  		return this.getBean(new ims.vo.ValueObjectBeanMap());
  	}
  	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
  	{
  		ims.generalmedical.vo.beans.NeuroReflexAnalTestsVoBean bean = null;
  		if(map != null)
  			bean = (ims.generalmedical.vo.beans.NeuroReflexAnalTestsVoBean)map.getValueObjectBean(this);
  		if (bean == null)
  		{
  			bean = new ims.generalmedical.vo.beans.NeuroReflexAnalTestsVoBean();
  			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("ANALTEST"))
  			return getAnalTest();
  		if(fieldName.equals("ANALTESTFINDING"))
  			return getAnalTestfinding();
  		return super.getFieldValueByFieldName(fieldName);
  	}
  	public boolean getAnalTestIsNotNull()
  	{
  		return this.analtest != null;
  	}
  	public ims.spinalinjuries.vo.lookups.NeuroExmAnalTest getAnalTest()
  	{
  		return this.analtest;
  	}
  	public void setAnalTest(ims.spinalinjuries.vo.lookups.NeuroExmAnalTest value)
  	{
  		this.isValidated = false;
  		this.analtest = value;
  	}
  	public boolean getAnalTestfindingIsNotNull()
  	{
  		return this.analtestfinding != null;
  	}
  	public ims.spinalinjuries.vo.lookups.NeuroExmAnalTest getAnalTestfinding()
  	{
  		return this.analtestfinding;
  	}
  	public void setAnalTestfinding(ims.spinalinjuries.vo.lookups.NeuroExmAnalTest value)
  	{
  		this.isValidated = false;
  		this.analtestfinding = value;
  	}
  	public boolean isValidated()
  	{
  		if(this.isBusy)
  			return true;
  		this.isBusy = true;
  	
  		if(!this.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.analtest == null)
  			listOfErrors.add("analTest is mandatory");
  		if(this.analtestfinding == null)
  			listOfErrors.add("analTestfinding is mandatory");
  		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;
  	
  		NeuroReflexAnalTestsVo clone = new NeuroReflexAnalTestsVo(this.id, this.version);
  		
  		if(this.analtest == null)
  			clone.analtest = null;
  		else
  			clone.analtest = (ims.spinalinjuries.vo.lookups.NeuroExmAnalTest)this.analtest.clone();
  		if(this.analtestfinding == null)
  			clone.analtestfinding = null;
  		else
  			clone.analtestfinding = (ims.spinalinjuries.vo.lookups.NeuroExmAnalTest)this.analtestfinding.clone();
  		clone.isValidated = this.isValidated;
  		
  		this.isBusy = false;
  		return clone;
  	}
  	public int compareTo(Object obj)
  	{
  		return compareTo(obj, true);
  	}
  	public int compareTo(Object obj, boolean caseInsensitive)
  	{
  		if (obj == null)
  		{
  			return -1;
  		}
  		if(caseInsensitive); // this is to avoid eclipse warning only.
  		if (!(NeuroReflexAnalTestsVo.class.isAssignableFrom(obj.getClass())))
  		{
  			throw new ClassCastException("A NeuroReflexAnalTestsVo object cannot be compared an Object of type " + obj.getClass().getName());
  		}
  		NeuroReflexAnalTestsVo compareObj = (NeuroReflexAnalTestsVo)obj;
  		int retVal = 0;
  