gt: 		int errorCount = listOfErrors.size();
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.scheduling.vo;
  
  /**
   * Linked to Scheduling.SessionExclusionDate business object (ID: 1090100002).
   */
  public class ExclusionDatesVo extends ims.scheduling.vo.SessionExclusionDateRefVo implements ims.vo.ImsCloneable, Comparable
  {
  	private static final long serialVersionUID = 1L;
  
  	public ExclusionDatesVo()
  	{
  	}
  	public ExclusionDatesVo(Integer id, int version)
  	{
  		super(id, version);
  	}
  	public ExclusionDatesVo(ims.scheduling.vo.beans.ExclusionDatesVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.dates = ims.framework.utils.beans.DateBean.buildDateArray(bean.getDates());
  	}
  	public void populate(ims.vo.ValueObjectBeanMap map, ims.scheduling.vo.beans.ExclusionDatesVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.dates = ims.framework.utils.beans.DateBean.buildDateArray(bean.getDates());
  	}
  	public ims.vo.ValueObjectBean getBean()
  	{
  		return this.getBean(new ims.vo.ValueObjectBeanMap());
  	}
  	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
  	{
  		ims.scheduling.vo.beans.ExclusionDatesVoBean bean = null;
  		if(map != null)
  			bean = (ims.scheduling.vo.beans.ExclusionDatesVoBean)map.getValueObjectBean(this);
  		if (bean == null)
  		{
  			bean = new ims.scheduling.vo.beans.ExclusionDatesVoBean();
  			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("DATES"))
  			return getDates();
  		return super.getFieldValueByFieldName(fieldName);
  	}
  	public boolean getDatesIsNotNull()
  	{
  		return this.dates != null;
  	}
  	public ims.framework.utils.Date[] getDates()
  	{
  		return this.dates;
  	}
  	public void setDates(ims.framework.utils.Date[] value)
  	{
  		this.isValidated = false;
  		this.dates = value;
  	}
  	/**
  	* addBusinessDays : return a date by adding 'days' parameter to 'startDate' ignoring weekends and a 'holidays' date array 
  	*/
  	public static ims.framework.utils.Date addBusinessDays(ims.framework.utils.Date startDate, int days, ims.framework.utils.Date[] holidays, boolean useFullYear)
  	{		
  		int i=0;
  		java.util.Vector v= new java.util.Vector();
  		if(!useFullYear)
  		{
  			if(holidays != null)
  			{
  			  for (int j=0;j<holidays.length;j++)
  			   {
  				v.add(holidays[j]);
  			   }
  			}
  		}
  	
  		ims.framework.utils.Date nextdate =  startDate;        
  		while (i<days)
  		{
  			nextdate =  nextdate.copy().addDay(1);
  			
  			if(useFullYear)
  				i++;
  			else if(!(nextdate.getDayOfWeek().toString().equals("6") || nextdate.getDayOfWeek().toString().equals("7") || v.contains(nextdate)))          
  				i++;
  		}
  		
  		return nextdate;
  	}
  	/**
  	* getKPIDays : return a date array by adding 'days' parameter to 'startDate' ignoring weekends and a 'holidays' date array 
  	*/
  	public static ims.framework.utils.Date[] getKPIDays(ims.framework.utils.Date startDate, int days, ims.framework.utils.Date[] holidays, boolean useFullYear)
  	{		
  		if(startDate == null)
  			return null;
  		
  		if (days == 0)
  			return new ims.framework.utils.Date[]{new ims.framework.utils.Date()};
  		
  		
  		ims.framework.utils.Date[] arrDates = new ims.framework.utils.Date[days];
  		
  		int i=0;
  		
  		java.util.Vector v= new java.util.Vector();
  		//WDEV-12918
  		if(!useFullYear)
  		{
  			if(holidays != null)
  			{
  				for (int j=0;j<holidays.length;j++)
  				{
  					v.add(holidays[j]);
  				}
  			}
  		}
  	
  		ims.framework.utils.Date nextdate =  null;        
  		do 
  		{
  			if (nextdate == null)
  			{
  				nextdate =  startDate.copy().addDay(1);
  			}
  			else
  			{
  				nextdate =  nextdate.copy().addDay(1);
  			}
  	
  			//WDEV-12918
  			if(useFullYear)
  			{
  				arrDates[i] = nextdate;
  				i++;
  			}
  			else if(!(nextdate.getDayOfWeek().toString().equals("6") || nextdate.getDayOfWeek().toString().equals("7") || v.contains(nextdate)))
  			{       
  				arrDates[i] = nextdate;
  				i++;
  			}
  		}
  		while(!(i == days));
  	
  		return arrDates;
  	}
  	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]);
  			}
  		}
  