gt: 		for(int x = 0; x < lookupCollection.size(); x++)
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.RefMan.forms.onexaminationcomponent;
  
  public abstract class BaseLogic extends Handlers implements IComponent
  {
  	public final Class getDomainInterface() throws ClassNotFoundException
  	{
  		return ims.RefMan.domain.OnExaminationComponent.class;
  	}
  	public final void setContext(ims.framework.UIComponentEngine engine, GenForm form, ims.RefMan.domain.OnExaminationComponent domain)
  	{
  		setContext(engine, form);
  		this.domain = domain;
  	}
  	public void setMode(ims.framework.enumerations.FormMode mode)
  	{
  		form.setMode(mode);
  	}
  	public ims.framework.enumerations.FormMode getMode()
  	{
  		return form.getMode();
  	}
  	protected final void oncmbTLTOnwardReferralValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTOnwardReferral().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.RefMan.vo.lookups.OnwardReferralReason existingInstance = (ims.RefMan.vo.lookups.OnwardReferralReason)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindcmbTLTOnwardReferralLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.RefMan.vo.lookups.OnwardReferralReason)
  		{
  			ims.RefMan.vo.lookups.OnwardReferralReason instance = (ims.RefMan.vo.lookups.OnwardReferralReason)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindcmbTLTOnwardReferralLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.RefMan.vo.lookups.OnwardReferralReason existingInstance = (ims.RefMan.vo.lookups.OnwardReferralReason)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTOnwardReferral().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
  		}
  	}
  	protected final void bindcmbTLTOnwardReferralLookup()
  	{
  		this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTOnwardReferral().clear();
  		ims.RefMan.vo.lookups.OnwardReferralReasonCollection lookupCollection = ims.RefMan.vo.lookups.LookupHelper.getOnwardReferralReason(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTOnwardReferral().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
  		}
  	}
  	protected final void setcmbTLTOnwardReferralLookupValue(int id)
  	{
  		ims.RefMan.vo.lookups.OnwardReferralReason instance = ims.RefMan.vo.lookups.LookupHelper.getOnwardReferralReasonInstance(this.domain.getLookupService(), id);
  		if(instance != null)
  			this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTOnwardReferral().setValue(instance);
  	}
  	protected final void defaultcmbTLTOnwardReferralLookupValue()
  	{
  		this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTOnwardReferral().setValue((ims.RefMan.vo.lookups.OnwardReferralReason)domain.getLookupService().getDefaultInstance(ims.RefMan.vo.lookups.OnwardReferralReason.class, engine.getFormName().getID(), ims.RefMan.vo.lookups.OnwardReferralReason.TYPE_ID));
  	}
  	protected final void oncmbOtherValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbOther().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.RefMan.vo.lookups.DischargeOtherType existingInstance = (ims.RefMan.vo.lookups.DischargeOtherType)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindcmbOtherLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.RefMan.vo.lookups.DischargeOtherType)
  		{
  			ims.RefMan.vo.lookups.DischargeOtherType instance = (ims.RefMan.vo.lookups.DischargeOtherType)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindcmbOtherLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.RefMan.vo.lookups.DischargeOtherType existingInstance = (ims.RefMan.vo.lookups.DischargeOtherType)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbOther().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
  		}
  	}
  	protected final void bindcmbOtherLookup()
  	{
  		this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbOther().clear();
  		ims.RefMan.vo.lookups.DischargeOtherTypeCollection lookupCollection = ims.RefMan.vo.lookups.LookupHelper.getDischargeOtherType(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbOther().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
  		}
  	}
  	protected final void setcmbOtherLookupValue(int id)
  	{
  		ims.RefMan.vo.lookups.DischargeOtherType instance = ims.RefMan.vo.lookups.LookupHelper.getDischargeOtherTypeInstance(this.domain.getLookupService(), id);
  		if(instance != null)
  			this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbOther().setValue(instance);
  	}
  	protected final void defaultcmbOtherLookupValue()
  	{
  		this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbOther().setValue((ims.RefMan.vo.lookups.DischargeOtherType)domain.getLookupService().getDefaultInstance(ims.RefMan.vo.lookups.DischargeOtherType.class, engine.getFormName().getID(), ims.RefMan.vo.lookups.DischargeOtherType.TYPE_ID));
  	}
  	protected final void oncmbTLTDischTypeValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTDischType().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.RefMan.vo.lookups.DischargeType existingInstance = (ims.RefMan.vo.lookups.DischargeType)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindcmbTLTDischTypeLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.RefMan.vo.lookups.DischargeType)
  		{
  			ims.RefMan.vo.lookups.DischargeType instance = (ims.RefMan.vo.lookups.DischargeType)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindcmbTLTDischTypeLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.RefMan.vo.lookups.DischargeType existingInstance = (ims.RefMan.vo.lookups.DischargeType)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTDischType().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
  		}
  	}
  	protected final void bindcmbTLTDischTypeLookup()
  	{
  		this.form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTDischType().clear();
  		ims.RefMan.vo.lookups.DischargeTypeCollection lookupCollection = ims.RefMan.vo.lookups.LookupHelper.getDischargeType(this.domain.getLookupService());
  