gt: 			String[] listOfOtherErrors = this.tval.validate();
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.clinicaladmin.vo;
  
  /**
   * Linked to Oncology.Configuration.TumourGroupSiteOverallStaging business object (ID: 1074100013).
   */
  public class TumourGroupSiteOverallStagingVo extends ims.clinicaladmin.vo.TumourGroupSiteOverallStagingLiteVo implements ims.vo.ImsCloneable, Comparable
  {
  	private static final long serialVersionUID = 1L;
  
  	public TumourGroupSiteOverallStagingVo()
  	{
  	}
  	public TumourGroupSiteOverallStagingVo(Integer id, int version)
  	{
  		super(id, version);
  	}
  	public TumourGroupSiteOverallStagingVo(ims.clinicaladmin.vo.beans.TumourGroupSiteOverallStagingVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.overallstagedescription = bean.getOverallStageDescription() == null ? null : ims.oncology.vo.lookups.TumourOverallStage.buildLookup(bean.getOverallStageDescription());
  		this.isactive = bean.getIsActive();
  		this.o45 = bean.getO45();
  		this.tgroup = bean.getTGroup() == null ? null : new ims.oncology.configuration.vo.TumourGroupRefVo(new Integer(bean.getTGroup().getId()), bean.getTGroup().getVersion());
  		this.tsite = bean.getTSite() == null ? null : new ims.oncology.configuration.vo.TumourSiteRefVo(new Integer(bean.getTSite().getId()), bean.getTSite().getVersion());
  		this.tval = bean.getTVal() == null ? null : bean.getTVal().buildVo();
  		this.nval = bean.getNVal() == null ? null : bean.getNVal().buildVo();
  		this.mval = bean.getMVal() == null ? null : bean.getMVal().buildVo();
  		this.histval = bean.getHistVal() == null ? null : bean.getHistVal().buildVo();
  		this.serummarkerval = bean.getSerumMarkerVal() == null ? null : bean.getSerumMarkerVal().buildVo();
  		this.diffval = bean.getDiffVal() == null ? null : bean.getDiffVal().buildVo();
  		this.issaved = bean.getIsSaved();
  	}
  	public void populate(ims.vo.ValueObjectBeanMap map, ims.clinicaladmin.vo.beans.TumourGroupSiteOverallStagingVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.overallstagedescription = bean.getOverallStageDescription() == null ? null : ims.oncology.vo.lookups.TumourOverallStage.buildLookup(bean.getOverallStageDescription());
  		this.isactive = bean.getIsActive();
  		this.o45 = bean.getO45();
  		this.tgroup = bean.getTGroup() == null ? null : new ims.oncology.configuration.vo.TumourGroupRefVo(new Integer(bean.getTGroup().getId()), bean.getTGroup().getVersion());
  		this.tsite = bean.getTSite() == null ? null : new ims.oncology.configuration.vo.TumourSiteRefVo(new Integer(bean.getTSite().getId()), bean.getTSite().getVersion());
  		this.tval = bean.getTVal() == null ? null : bean.getTVal().buildVo(map);
  		this.nval = bean.getNVal() == null ? null : bean.getNVal().buildVo(map);
  		this.mval = bean.getMVal() == null ? null : bean.getMVal().buildVo(map);
  		this.histval = bean.getHistVal() == null ? null : bean.getHistVal().buildVo(map);
  		this.serummarkerval = bean.getSerumMarkerVal() == null ? null : bean.getSerumMarkerVal().buildVo(map);
  		this.diffval = bean.getDiffVal() == null ? null : bean.getDiffVal().buildVo(map);
  		this.issaved = bean.getIsSaved();
  	}
  	public ims.vo.ValueObjectBean getBean()
  	{
  		return this.getBean(new ims.vo.ValueObjectBeanMap());
  	}
  	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
  	{
  		ims.clinicaladmin.vo.beans.TumourGroupSiteOverallStagingVoBean bean = null;
  		if(map != null)
  			bean = (ims.clinicaladmin.vo.beans.TumourGroupSiteOverallStagingVoBean)map.getValueObjectBean(this);
  		if (bean == null)
  		{
  			bean = new ims.clinicaladmin.vo.beans.TumourGroupSiteOverallStagingVoBean();
  			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("TGROUP"))
  			return getTGroup();
  		if(fieldName.equals("TSITE"))
  			return getTSite();
  		if(fieldName.equals("TVAL"))
  			return getTVal();
  		if(fieldName.equals("NVAL"))
  			return getNVal();
  		if(fieldName.equals("MVAL"))
  			return getMVal();
  		if(fieldName.equals("HISTVAL"))
  			return getHistVal();
  		if(fieldName.equals("SERUMMARKERVAL"))
  			return getSerumMarkerVal();
  		if(fieldName.equals("DIFFVAL"))
  			return getDiffVal();
  		if(fieldName.equals("ISSAVED"))
  			return getIsSaved();
  		return super.getFieldValueByFieldName(fieldName);
  	}
  	public boolean getTGroupIsNotNull()
  	{
  		return this.tgroup != null;
  	}
  	public ims.oncology.configuration.vo.TumourGroupRefVo getTGroup()
  	{
  		return this.tgroup;
  	}
  	public void setTGroup(ims.oncology.configuration.vo.TumourGroupRefVo value)
  	{
  		this.isValidated = false;
  		this.tgroup = value;
  	}
  	public boolean getTSiteIsNotNull()
  	{
  		return this.tsite != null;
  	}
  	public ims.oncology.configuration.vo.TumourSiteRefVo getTSite()
  	{
  		return this.tsite;
  	}
  	public void setTSite(ims.oncology.configuration.vo.TumourSiteRefVo value)
  	{
  		this.isValidated = false;
  		this.tsite = value;
  	}
  	public boolean getTValIsNotNull()
  	{
  		return this.tval != null;
  	}
  	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getTVal()
  	{
  		return this.tval;
  	}
  	public void setTVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
  	{
  		this.isValidated = false;
  		this.tval = value;
  	}
  	public boolean getNValIsNotNull()
  	{
  		return this.nval != null;
  	}
  	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getNVal()
  	{
  		return this.nval;
  	}
  	public void setNVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
  	{
  		this.isValidated = false;
  		this.nval = value;
  	}
  	public boolean getMValIsNotNull()
  	{
  		return this.mval != null;
  	}
  	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getMVal()
  	{
  		return this.mval;
  	}
  	public void setMVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
  	{
  		this.isValidated = false;
  		this.mval = value;
  	}
  	public boolean getHistValIsNotNull()
  	{
  		return this.histval != null;
  	}
  	public ims.clinicaladmin.vo.TumourGroupHistologyVo getHistVal()
  	{
  		return this.histval;
  	}
  	public void setHistVal(ims.clinicaladmin.vo.TumourGroupHistologyVo value)
  	{
  		this.isValidated = false;
  		this.histval = value;
  	}
  	public boolean getSerumMarkerValIsNotNull()
  	{
  		return this.serummarkerval != null;
  	}
  	public ims.clinicaladmin.vo.TumourSerumMarkersLiteVo getSerumMarkerVal()
  	{
  		return this.serummarkerval;
  	}
  	public void setSerumMarkerVal(ims.clinicaladmin.vo.TumourSerumMarkersLiteVo value)
  	{
  		this.isValidated = false;
  		this.serummarkerval = value;
  	}
  	public boolean getDiffValIsNotNull()
  	{
  		return this.diffval != null;
  	}
  	public ims.clinicaladmin.vo.TumourGroupHistopathologyGradeVo getDiffVal()
  	{
  		return this.diffval;
  	}
  	public void setDiffVal(ims.clinicaladmin.vo.TumourGroupHistopathologyGradeVo value)
  	{
  		this.isValidated = false;
  		this.diffval = value;
  	}
  	public boolean getIsSavedIsNotNull()
  	{
  		return this.issaved != null;
  	}
  	public Boolean getIsSaved()
  	{
  		return this.issaved;
  	}
  	public void setIsSaved(Boolean value)
  	{
  		this.isValidated = false;
  		this.issaved = value;
  	}
  	public String toString()
  	{
  		StringBuffer sb = new StringBuffer();
  		if(this.overallstagedescription != null)
  			sb.append(this.overallstagedescription);
  		return sb.toString();
  	}
  	public boolean isValidated()
  	{
  		if(this.isBusy)
  			return true;
  		this.isBusy = true;
  	
  		if(!this.isValidated)
  		{
  			this.isBusy = false;
  			return false;
  		}
  		if(this.tval != null)
  		{
  			if(!this.tval.isValidated())
  			{
  				this.isBusy = false;
  				return false;
  			}
  		}
  		if(this.nval != null)
  		{
  			if(!this.nval.isValidated())
  			{
  				this.isBusy = false;
  				return false;
  			}
  		}
  		if(this.mval != null)
  		{
  			if(!this.mval.isValidated())
  			{
  				this.isBusy = false;
  				return false;
  			}
  		}
  		if(this.histval != null)
  		{
  			if(!this.histval.isValidated())
  			{
  				this.isBusy = false;
  				return false;
  			}
  		}
  		if(this.serummarkerval != null)
  		{
  			if(!this.serummarkerval.isValidated())
  			{
  				this.isBusy = false;
  				return false;
  			}
  		}
  		if(this.diffval != null)
  		{
  			if(!this.diffval.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.overallstagedescription == null)
  			listOfErrors.add("Overall Staging Value is mandatory");
  		if(this.o45 != null)
  			if(this.o45.length() > 1)
  				listOfErrors.add("The length of the field [o45] in the value object [ims.clinicaladmin.vo.TumourGroupSiteOverallStagingVo] is too big. It should be less or equal to 1");
  		if(this.tval == null)
  			listOfErrors.add("TVal is mandatory");
  		if(this.tval != null)
  		{
  