/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/Nursing/src/ims/nursing/forms/skinreviewdialog/BaseLogic.java
//#############################################################################
//#                                                                           #
//#  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.nursing.forms.skinreviewdialog;

public abstract class BaseLogic extends Handlers
{
	public final Class getDomainInterface() throws ClassNotFoundException
	{
		return ims.domain.DomainInterface.class;
	}
	public final void setContext(ims.framework.UIEngine engine, GenForm form, ims.domain.DomainInterface domain)
	{
		setContext(engine, form);
		this.domain = domain;
	}
	protected final void oncmbPainValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbPain().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinPain existingInstance = (ims.nursing.vo.lookups.SkinPain)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbPainLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinPain)
		{
			ims.nursing.vo.lookups.SkinPain instance = (ims.nursing.vo.lookups.SkinPain)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbPainLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinPain existingInstance = (ims.nursing.vo.lookups.SkinPain)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbPain().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbPainLookup()
	{
		this.form.cmbPain().clear();
		ims.nursing.vo.lookups.SkinPainCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinPain(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbPain().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbPainLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinPain instance = ims.nursing.vo.lookups.LookupHelper.getSkinPainInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbPain().setValue(instance);
	}
	protected final void defaultcmbPainLookupValue()
	{
		this.form.cmbPain().setValue((ims.nursing.vo.lookups.SkinPain)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinPain.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinPain.TYPE_ID));
	}
	protected final void oncmbWoundBedValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbWoundBed().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinWoundBed existingInstance = (ims.nursing.vo.lookups.SkinWoundBed)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbWoundBedLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinWoundBed)
		{
			ims.nursing.vo.lookups.SkinWoundBed instance = (ims.nursing.vo.lookups.SkinWoundBed)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbWoundBedLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinWoundBed existingInstance = (ims.nursing.vo.lookups.SkinWoundBed)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbWoundBed().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbWoundBedLookup()
	{
		this.form.cmbWoundBed().clear();
		ims.nursing.vo.lookups.SkinWoundBedCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinWoundBed(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbWoundBed().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbWoundBedLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinWoundBed instance = ims.nursing.vo.lookups.LookupHelper.getSkinWoundBedInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbWoundBed().setValue(instance);
	}
	protected final void defaultcmbWoundBedLookupValue()
	{
		this.form.cmbWoundBed().setValue((ims.nursing.vo.lookups.SkinWoundBed)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinWoundBed.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinWoundBed.TYPE_ID));
	}
	protected final void oncmbSurroundingSkinValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbSurroundingSkin().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinSurroundingSkin existingInstance = (ims.nursing.vo.lookups.SkinSurroundingSkin)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbSurroundingSkinLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinSurroundingSkin)
		{
			ims.nursing.vo.lookups.SkinSurroundingSkin instance = (ims.nursing.vo.lookups.SkinSurroundingSkin)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbSurroundingSkinLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinSurroundingSkin existingInstance = (ims.nursing.vo.lookups.SkinSurroundingSkin)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbSurroundingSkin().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbSurroundingSkinLookup()
	{
		this.form.cmbSurroundingSkin().clear();
		ims.nursing.vo.lookups.SkinSurroundingSkinCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinSurroundingSkin(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbSurroundingSkin().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbSurroundingSkinLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinSurroundingSkin instance = ims.nursing.vo.lookups.LookupHelper.getSkinSurroundingSkinInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbSurroundingSkin().setValue(instance);
	}
	protected final void defaultcmbSurroundingSkinLookupValue()
	{
		this.form.cmbSurroundingSkin().setValue((ims.nursing.vo.lookups.SkinSurroundingSkin)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinSurroundingSkin.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinSurroundingSkin.TYPE_ID));
	}
	protected final void oncmbExudateAmountValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbExudateAmount().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinExudateAmount existingInstance = (ims.nursing.vo.lookups.SkinExudateAmount)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbExudateAmountLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinExudateAmount)
		{
			ims.nursing.vo.lookups.SkinExudateAmount instance = (ims.nursing.vo.lookups.SkinExudateAmount)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbExudateAmountLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinExudateAmount existingInstance = (ims.nursing.vo.lookups.SkinExudateAmount)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbExudateAmount().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbExudateAmountLookup()
	{
		this.form.cmbExudateAmount().clear();
		ims.nursing.vo.lookups.SkinExudateAmountCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinExudateAmount(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbExudateAmount().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbExudateAmountLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinExudateAmount instance = ims.nursing.vo.lookups.LookupHelper.getSkinExudateAmountInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbExudateAmount().setValue(instance);
	}
	protected final void defaultcmbExudateAmountLookupValue()
	{
		this.form.cmbExudateAmount().setValue((ims.nursing.vo.lookups.SkinExudateAmount)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinExudateAmount.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinExudateAmount.TYPE_ID));
	}
	protected final void oncmbExudateTypeValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbExudateType().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinExudateType existingInstance = (ims.nursing.vo.lookups.SkinExudateType)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbExudateTypeLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinExudateType)
		{
			ims.nursing.vo.lookups.SkinExudateType instance = (ims.nursing.vo.lookups.SkinExudateType)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbExudateTypeLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinExudateType existingInstance = (ims.nursing.vo.lookups.SkinExudateType)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbExudateType().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbExudateTypeLookup()
	{
		this.form.cmbExudateType().clear();
		ims.nursing.vo.lookups.SkinExudateTypeCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinExudateType(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbExudateType().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbExudateTypeLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinExudateType instance = ims.nursing.vo.lookups.LookupHelper.getSkinExudateTypeInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbExudateType().setValue(instance);
	}
	protected final void defaultcmbExudateTypeLookupValue()
	{
		this.form.cmbExudateType().setValue((ims.nursing.vo.lookups.SkinExudateType)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinExudateType.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinExudateType.TYPE_ID));
	}
	protected final void oncmbOdourValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbOdour().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinOdour existingInstance = (ims.nursing.vo.lookups.SkinOdour)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbOdourLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinOdour)
		{
			ims.nursing.vo.lookups.SkinOdour instance = (ims.nursing.vo.lookups.SkinOdour)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbOdourLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinOdour existingInstance = (ims.nursing.vo.lookups.SkinOdour)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbOdour().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbOdourLookup()
	{
		this.form.cmbOdour().clear();
		ims.nursing.vo.lookups.SkinOdourCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinOdour(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbOdour().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbOdourLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinOdour instance = ims.nursing.vo.lookups.LookupHelper.getSkinOdourInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbOdour().setValue(instance);
	}
	protected final void defaultcmbOdourLookupValue()
	{
		this.form.cmbOdour().setValue((ims.nursing.vo.lookups.SkinOdour)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinOdour.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinOdour.TYPE_ID));
	}
	protected final void oncmbPressureGradeValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbPressureGrade().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinPressureSoreGrade existingInstance = (ims.nursing.vo.lookups.SkinPressureSoreGrade)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbPressureGradeLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinPressureSoreGrade)
		{
			ims.nursing.vo.lookups.SkinPressureSoreGrade instance = (ims.nursing.vo.lookups.SkinPressureSoreGrade)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbPressureGradeLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinPressureSoreGrade existingInstance = (ims.nursing.vo.lookups.SkinPressureSoreGrade)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbPressureGrade().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbPressureGradeLookup()
	{
		this.form.cmbPressureGrade().clear();
		ims.nursing.vo.lookups.SkinPressureSoreGradeCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinPressureSoreGrade(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbPressureGrade().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbPressureGradeLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinPressureSoreGrade instance = ims.nursing.vo.lookups.LookupHelper.getSkinPressureSoreGradeInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbPressureGrade().setValue(instance);
	}
	protected final void defaultcmbPressureGradeLookupValue()
	{
		this.form.cmbPressureGrade().setValue((ims.nursing.vo.lookups.SkinPressureSoreGrade)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinPressureSoreGrade.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinPressureSoreGrade.TYPE_ID));
	}
	protected final void oncmbCleansedWithValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbCleansedWith().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinCleansedWith existingInstance = (ims.nursing.vo.lookups.SkinCleansedWith)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbCleansedWithLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinCleansedWith)
		{
			ims.nursing.vo.lookups.SkinCleansedWith instance = (ims.nursing.vo.lookups.SkinCleansedWith)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbCleansedWithLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinCleansedWith existingInstance = (ims.nursing.vo.lookups.SkinCleansedWith)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbCleansedWith().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbCleansedWithLookup()
	{
		this.form.cmbCleansedWith().clear();
		ims.nursing.vo.lookups.SkinCleansedWithCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinCleansedWith(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbCleansedWith().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbCleansedWithLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinCleansedWith instance = ims.nursing.vo.lookups.LookupHelper.getSkinCleansedWithInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbCleansedWith().setValue(instance);
	}
	protected final void defaultcmbCleansedWithLookupValue()
	{
		this.form.cmbCleansedWith().setValue((ims.nursing.vo.lookups.SkinCleansedWith)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinCleansedWith.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinCleansedWith.TYPE_ID));
	}
	protected final void oncmbFrequencyValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbFrequency().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinFrequencyOfChange existingInstance = (ims.nursing.vo.lookups.SkinFrequencyOfChange)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbFrequencyLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinFrequencyOfChange)
		{
			ims.nursing.vo.lookups.SkinFrequencyOfChange instance = (ims.nursing.vo.lookups.SkinFrequencyOfChange)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbFrequencyLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinFrequencyOfChange existingInstance = (ims.nursing.vo.lookups.SkinFrequencyOfChange)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbFrequency().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbFrequencyLookup()
	{
		this.form.cmbFrequency().clear();
		ims.nursing.vo.lookups.SkinFrequencyOfChangeCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinFrequencyOfChange(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbFrequency().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbFrequencyLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinFrequencyOfChange instance = ims.nursing.vo.lookups.LookupHelper.getSkinFrequencyOfChangeInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbFrequency().setValue(instance);
	}
	protected final void defaultcmbFrequencyLookupValue()
	{
		this.form.cmbFrequency().setValue((ims.nursing.vo.lookups.SkinFrequencyOfChange)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinFrequencyOfChange.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinFrequencyOfChange.TYPE_ID));
	}
	protected final void oncmbSecondaryValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbSecondary().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinSecondaryDressing existingInstance = (ims.nursing.vo.lookups.SkinSecondaryDressing)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbSecondaryLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinSecondaryDressing)
		{
			ims.nursing.vo.lookups.SkinSecondaryDressing instance = (ims.nursing.vo.lookups.SkinSecondaryDressing)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbSecondaryLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinSecondaryDressing existingInstance = (ims.nursing.vo.lookups.SkinSecondaryDressing)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbSecondary().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbSecondaryLookup()
	{
		this.form.cmbSecondary().clear();
		ims.nursing.vo.lookups.SkinSecondaryDressingCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinSecondaryDressing(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbSecondary().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbSecondaryLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinSecondaryDressing instance = ims.nursing.vo.lookups.LookupHelper.getSkinSecondaryDressingInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbSecondary().setValue(instance);
	}
	protected final void defaultcmbSecondaryLookupValue()
	{
		this.form.cmbSecondary().setValue((ims.nursing.vo.lookups.SkinSecondaryDressing)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinSecondaryDressing.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinSecondaryDressing.TYPE_ID));
	}
	protected final void oncmbPrimaryValueSet(Object value)
	{
		java.util.ArrayList listOfValues = this.form.cmbPrimary().getValues();

		if(value == null)
		{
			if(listOfValues != null && listOfValues.size() > 0)
			{
				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinPrimaryDressing existingInstance = (ims.nursing.vo.lookups.SkinPrimaryDressing)listOfValues.get(x);
					if(!existingInstance.isActive())
					{
						bindcmbPrimaryLookup();
						return;
					}
				}
			}
		}
		else if(value instanceof ims.nursing.vo.lookups.SkinPrimaryDressing)
		{
			ims.nursing.vo.lookups.SkinPrimaryDressing instance = (ims.nursing.vo.lookups.SkinPrimaryDressing)value;

			if(listOfValues != null)
			{
				if(listOfValues.size() == 0)
					bindcmbPrimaryLookup();

				for(int x = 0; x < listOfValues.size(); x++)
				{
					ims.nursing.vo.lookups.SkinPrimaryDressing existingInstance = (ims.nursing.vo.lookups.SkinPrimaryDressing)listOfValues.get(x);
					if(existingInstance.equals(instance))
						return;
				}
			}

			this.form.cmbPrimary().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
		}
	}
	protected final void bindcmbPrimaryLookup()
	{
		this.form.cmbPrimary().clear();
		ims.nursing.vo.lookups.SkinPrimaryDressingCollection lookupCollection = ims.nursing.vo.lookups.LookupHelper.getSkinPrimaryDressing(this.domain.getLookupService());
		for(int x = 0; x < lookupCollection.size(); x++)
		{
			this.form.cmbPrimary().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
	}
	protected final void setcmbPrimaryLookupValue(int id)
	{
		ims.nursing.vo.lookups.SkinPrimaryDressing instance = ims.nursing.vo.lookups.LookupHelper.getSkinPrimaryDressingInstance(this.domain.getLookupService(), id);
		if(instance != null)
			this.form.cmbPrimary().setValue(instance);
	}
	protected final void defaultcmbPrimaryLookupValue()
	{
		this.form.cmbPrimary().setValue((ims.nursing.vo.lookups.SkinPrimaryDressing)domain.getLookupService().getDefaultInstance(ims.nursing.vo.lookups.SkinPrimaryDressing.class, engine.getFormName().getID(), ims.nursing.vo.lookups.SkinPrimaryDressing.TYPE_ID));
	}
	public final void free()
	{
		super.free();
		domain = null;
	}
	
	protected ims.domain.DomainInterface domain;
}
