gt: 				for(int x = 0; x < listOfOtherErrors.length; x++)
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.core.vo;
  
  /**
   * Linked to core.clinical.PatientProblem business object (ID: 1023100001).
   */
  public class PatientProblemListVo extends ims.core.clinical.vo.PatientProblemRefVo implements ims.vo.ImsCloneable, Comparable
  {
  	private static final long serialVersionUID = 1L;
  
  	public PatientProblemListVo()
  	{
  	}
  	public PatientProblemListVo(Integer id, int version)
  	{
  		super(id, version);
  	}
  	public PatientProblemListVo(ims.core.vo.beans.PatientProblemListVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.patientproblem = bean.getPatientProblem();
  		this.status = bean.getStatus() == null ? null : ims.core.vo.lookups.PatientProblemStatus.buildLookup(bean.getStatus());
  		this.primaryforcarespells = ims.core.vo.CSPrimaryProblemVoCollection.buildFromBeanCollection(bean.getPrimaryForCareSpells());
  		this.sysinfo = bean.getSysInfo() == null ? null : bean.getSysInfo().buildSystemInformation();
  		this.authoringinformation = bean.getAuthoringInformation() == null ? null : bean.getAuthoringInformation().buildVo();
  	}
  	public void populate(ims.vo.ValueObjectBeanMap map, ims.core.vo.beans.PatientProblemListVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.patientproblem = bean.getPatientProblem();
  		this.status = bean.getStatus() == null ? null : ims.core.vo.lookups.PatientProblemStatus.buildLookup(bean.getStatus());
  		this.primaryforcarespells = ims.core.vo.CSPrimaryProblemVoCollection.buildFromBeanCollection(bean.getPrimaryForCareSpells());
  		this.sysinfo = bean.getSysInfo() == null ? null : bean.getSysInfo().buildSystemInformation();
  		this.authoringinformation = bean.getAuthoringInformation() == null ? null : bean.getAuthoringInformation().buildVo(map);
  	}
  	public ims.vo.ValueObjectBean getBean()
  	{
  		return this.getBean(new ims.vo.ValueObjectBeanMap());
  	}
  	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
  	{
  		ims.core.vo.beans.PatientProblemListVoBean bean = null;
  		if(map != null)
  			bean = (ims.core.vo.beans.PatientProblemListVoBean)map.getValueObjectBean(this);
  		if (bean == null)
  		{
  			bean = new ims.core.vo.beans.PatientProblemListVoBean();
  			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("PATIENTPROBLEM"))
  			return getPatientProblem();
  		if(fieldName.equals("STATUS"))
  			return getStatus();
  		if(fieldName.equals("PRIMARYFORCARESPELLS"))
  			return getPrimaryForCareSpells();
  		if(fieldName.equals("SYSINFO"))
  			return getSysInfo();
  		if(fieldName.equals("AUTHORINGINFORMATION"))
  			return getAuthoringInformation();
  		return super.getFieldValueByFieldName(fieldName);
  	}
  	public boolean getPatientProblemIsNotNull()
  	{
  		return this.patientproblem != null;
  	}
  	public String getPatientProblem()
  	{
  		return this.patientproblem;
  	}
  	public static int getPatientProblemMaxLength()
  	{
  		return 255;
  	}
  	public void setPatientProblem(String value)
  	{
  		this.isValidated = false;
  		this.patientproblem = value;
  	}
  	public boolean getStatusIsNotNull()
  	{
  		return this.status != null;
  	}
  	public ims.core.vo.lookups.PatientProblemStatus getStatus()
  	{
  		return this.status;
  	}
  	public void setStatus(ims.core.vo.lookups.PatientProblemStatus value)
  	{
  		this.isValidated = false;
  		this.status = value;
  	}
  	public boolean getPrimaryForCareSpellsIsNotNull()
  	{
  		return this.primaryforcarespells != null;
  	}
  	public ims.core.vo.CSPrimaryProblemVoCollection getPrimaryForCareSpells()
  	{
  		return this.primaryforcarespells;
  	}
  	public void setPrimaryForCareSpells(ims.core.vo.CSPrimaryProblemVoCollection value)
  	{
  		this.isValidated = false;
  		this.primaryforcarespells = value;
  	}
  	public boolean getSysInfoIsNotNull()
  	{
  		return this.sysinfo != null;
  	}
  	public ims.vo.SystemInformation getSysInfo()
  	{
  		return this.sysinfo;
  	}
  	public void setSysInfo(ims.vo.SystemInformation value)
  	{
  		this.isValidated = false;
  		this.sysinfo = value;
  	}
  	public boolean getAuthoringInformationIsNotNull()
  	{
  		return this.authoringinformation != null;
  	}
  	public ims.core.vo.AuthoringInformationVo getAuthoringInformation()
  	{
  		return this.authoringinformation;
  	}
  	public void setAuthoringInformation(ims.core.vo.AuthoringInformationVo value)
  	{
  		this.isValidated = false;
  		this.authoringinformation = value;
  	}
  	public boolean isValidated()
  	{
  		if(this.isBusy)
  			return true;
  		this.isBusy = true;
  	
  		if(!this.isValidated)
  		{
  			this.isBusy = false;
  			return false;
  		}
  		if(this.primaryforcarespells != null)
  		{
  			if(!this.primaryforcarespells.isValidated())
  			{
  				this.isBusy = false;
  				return false;
  			}
  		}
  		if(this.authoringinformation != null)
  		{
  			if(!this.authoringinformation.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.patientproblem == null || this.patientproblem.length() == 0)
  			listOfErrors.add("Patient Problem is mandatory");
  		else if(this.patientproblem.length() > 255)
  			listOfErrors.add("The length of the field [patientproblem] in the value object [ims.core.vo.PatientProblemListVo] is too big. It should be less or equal to 255");
  		if(this.primaryforcarespells != null)
  		{
  			String[] listOfOtherErrors = this.primaryforcarespells.validate();
  			if(listOfOtherErrors != null)
  			{
  