/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/nursing/vo/SkinAssessmentFindings.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.vo;

/**
 * Linked to nursing.assessment tools.Skin Assessment Findings business object (ID: 1016100005).
 */
public class SkinAssessmentFindings extends ims.nursing.assessmenttools.vo.SkinAssessmentFindingsRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public SkinAssessmentFindings()
	{
	}
	public SkinAssessmentFindings(Integer id, int version)
	{
		super(id, version);
	}
	public SkinAssessmentFindings(ims.nursing.vo.beans.SkinAssessmentFindingsBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.woundtype = bean.getWoundType() == null ? null : ims.nursing.vo.lookups.SkinWoundType.buildLookup(bean.getWoundType());
		this.siteimage = bean.getSiteImage();
		this.sitename = bean.getSiteName();
		this.sitedetails = bean.getSiteDetails();
		this.howlongisitpresent = bean.getHowLongIsItPresent();
		this.pressuresoregrade = bean.getPressureSoreGrade() == null ? null : ims.nursing.vo.lookups.SkinPressureSoreGrade.buildLookup(bean.getPressureSoreGrade());
		this.length = bean.getLength();
		this.width = bean.getWidth();
		this.depth = bean.getDepth();
		this.woundbed = bean.getWoundBed() == null ? null : ims.nursing.vo.lookups.SkinWoundBed.buildLookup(bean.getWoundBed());
		this.surroundingskin = bean.getSurroundingSkin() == null ? null : ims.nursing.vo.lookups.SkinSurroundingSkin.buildLookup(bean.getSurroundingSkin());
		this.exudateamount = bean.getExudateAmount() == null ? null : ims.nursing.vo.lookups.SkinExudateAmount.buildLookup(bean.getExudateAmount());
		this.exudatetype = bean.getExudateType() == null ? null : ims.nursing.vo.lookups.SkinExudateType.buildLookup(bean.getExudateType());
		this.odour = bean.getOdour() == null ? null : ims.nursing.vo.lookups.SkinOdour.buildLookup(bean.getOdour());
		this.pain = bean.getPain() == null ? null : ims.nursing.vo.lookups.SkinPain.buildLookup(bean.getPain());
		this.infectionsuspected = bean.getInfectionSuspected();
		this.swabtaken = bean.getSwabTaken();
		this.woundtraced = bean.getWoundTraced();
		this.cleansedwith = bean.getCleansedWith() == null ? null : ims.nursing.vo.lookups.SkinCleansedWith.buildLookup(bean.getCleansedWith());
		this.primarydressing = bean.getPrimaryDressing() == null ? null : ims.nursing.vo.lookups.SkinPrimaryDressing.buildLookup(bean.getPrimaryDressing());
		this.secondarydressing = bean.getSecondaryDressing() == null ? null : ims.nursing.vo.lookups.SkinSecondaryDressing.buildLookup(bean.getSecondaryDressing());
		this.frequencyofchange = bean.getFrequencyOfChange() == null ? null : ims.nursing.vo.lookups.SkinFrequencyOfChange.buildLookup(bean.getFrequencyOfChange());
		this.comment = bean.getComment();
		this.isdiscontinuedassess = bean.getIsDiscontinuedAssess();
		this.iscontinuedassessment = bean.getIsContinuedAssessment();
		this.skinassessmentreview = ims.nursing.vo.SkinAssessmentReviewCollection.buildFromBeanCollection(bean.getSkinAssessmentReview());
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.nursing.vo.beans.SkinAssessmentFindingsBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.woundtype = bean.getWoundType() == null ? null : ims.nursing.vo.lookups.SkinWoundType.buildLookup(bean.getWoundType());
		this.siteimage = bean.getSiteImage();
		this.sitename = bean.getSiteName();
		this.sitedetails = bean.getSiteDetails();
		this.howlongisitpresent = bean.getHowLongIsItPresent();
		this.pressuresoregrade = bean.getPressureSoreGrade() == null ? null : ims.nursing.vo.lookups.SkinPressureSoreGrade.buildLookup(bean.getPressureSoreGrade());
		this.length = bean.getLength();
		this.width = bean.getWidth();
		this.depth = bean.getDepth();
		this.woundbed = bean.getWoundBed() == null ? null : ims.nursing.vo.lookups.SkinWoundBed.buildLookup(bean.getWoundBed());
		this.surroundingskin = bean.getSurroundingSkin() == null ? null : ims.nursing.vo.lookups.SkinSurroundingSkin.buildLookup(bean.getSurroundingSkin());
		this.exudateamount = bean.getExudateAmount() == null ? null : ims.nursing.vo.lookups.SkinExudateAmount.buildLookup(bean.getExudateAmount());
		this.exudatetype = bean.getExudateType() == null ? null : ims.nursing.vo.lookups.SkinExudateType.buildLookup(bean.getExudateType());
		this.odour = bean.getOdour() == null ? null : ims.nursing.vo.lookups.SkinOdour.buildLookup(bean.getOdour());
		this.pain = bean.getPain() == null ? null : ims.nursing.vo.lookups.SkinPain.buildLookup(bean.getPain());
		this.infectionsuspected = bean.getInfectionSuspected();
		this.swabtaken = bean.getSwabTaken();
		this.woundtraced = bean.getWoundTraced();
		this.cleansedwith = bean.getCleansedWith() == null ? null : ims.nursing.vo.lookups.SkinCleansedWith.buildLookup(bean.getCleansedWith());
		this.primarydressing = bean.getPrimaryDressing() == null ? null : ims.nursing.vo.lookups.SkinPrimaryDressing.buildLookup(bean.getPrimaryDressing());
		this.secondarydressing = bean.getSecondaryDressing() == null ? null : ims.nursing.vo.lookups.SkinSecondaryDressing.buildLookup(bean.getSecondaryDressing());
		this.frequencyofchange = bean.getFrequencyOfChange() == null ? null : ims.nursing.vo.lookups.SkinFrequencyOfChange.buildLookup(bean.getFrequencyOfChange());
		this.comment = bean.getComment();
		this.isdiscontinuedassess = bean.getIsDiscontinuedAssess();
		this.iscontinuedassessment = bean.getIsContinuedAssessment();
		this.skinassessmentreview = ims.nursing.vo.SkinAssessmentReviewCollection.buildFromBeanCollection(bean.getSkinAssessmentReview());
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.nursing.vo.beans.SkinAssessmentFindingsBean bean = null;
		if(map != null)
			bean = (ims.nursing.vo.beans.SkinAssessmentFindingsBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.nursing.vo.beans.SkinAssessmentFindingsBean();
			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("WOUNDTYPE"))
			return getWoundType();
		if(fieldName.equals("SITEIMAGE"))
			return getSiteImage();
		if(fieldName.equals("SITENAME"))
			return getSiteName();
		if(fieldName.equals("SITEDETAILS"))
			return getSiteDetails();
		if(fieldName.equals("HOWLONGISITPRESENT"))
			return getHowLongIsItPresent();
		if(fieldName.equals("PRESSURESOREGRADE"))
			return getPressureSoreGrade();
		if(fieldName.equals("LENGTH"))
			return getLength();
		if(fieldName.equals("WIDTH"))
			return getWidth();
		if(fieldName.equals("DEPTH"))
			return getDepth();
		if(fieldName.equals("WOUNDBED"))
			return getWoundBed();
		if(fieldName.equals("SURROUNDINGSKIN"))
			return getSurroundingSkin();
		if(fieldName.equals("EXUDATEAMOUNT"))
			return getExudateAmount();
		if(fieldName.equals("EXUDATETYPE"))
			return getExudateType();
		if(fieldName.equals("ODOUR"))
			return getOdour();
		if(fieldName.equals("PAIN"))
			return getPain();
		if(fieldName.equals("INFECTIONSUSPECTED"))
			return getInfectionSuspected();
		if(fieldName.equals("SWABTAKEN"))
			return getSwabTaken();
		if(fieldName.equals("WOUNDTRACED"))
			return getWoundTraced();
		if(fieldName.equals("CLEANSEDWITH"))
			return getCleansedWith();
		if(fieldName.equals("PRIMARYDRESSING"))
			return getPrimaryDressing();
		if(fieldName.equals("SECONDARYDRESSING"))
			return getSecondaryDressing();
		if(fieldName.equals("FREQUENCYOFCHANGE"))
			return getFrequencyOfChange();
		if(fieldName.equals("COMMENT"))
			return getComment();
		if(fieldName.equals("ISDISCONTINUEDASSESS"))
			return getIsDiscontinuedAssess();
		if(fieldName.equals("ISCONTINUEDASSESSMENT"))
			return getIsContinuedAssessment();
		if(fieldName.equals("SKINASSESSMENTREVIEW"))
			return getSkinAssessmentReview();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getWoundTypeIsNotNull()
	{
		return this.woundtype != null;
	}
	public ims.nursing.vo.lookups.SkinWoundType getWoundType()
	{
		return this.woundtype;
	}
	public void setWoundType(ims.nursing.vo.lookups.SkinWoundType value)
	{
		this.isValidated = false;
		this.woundtype = value;
	}
	public boolean getSiteImageIsNotNull()
	{
		return this.siteimage != null;
	}
	public String getSiteImage()
	{
		return this.siteimage;
	}
	public static int getSiteImageMaxLength()
	{
		return 4000;
	}
	public void setSiteImage(String value)
	{
		this.isValidated = false;
		this.siteimage = value;
	}
	public boolean getSiteNameIsNotNull()
	{
		return this.sitename != null;
	}
	public String getSiteName()
	{
		return this.sitename;
	}
	public static int getSiteNameMaxLength()
	{
		return 255;
	}
	public void setSiteName(String value)
	{
		this.isValidated = false;
		this.sitename = value;
	}
	public boolean getSiteDetailsIsNotNull()
	{
		return this.sitedetails != null;
	}
	public String getSiteDetails()
	{
		return this.sitedetails;
	}
	public static int getSiteDetailsMaxLength()
	{
		return 255;
	}
	public void setSiteDetails(String value)
	{
		this.isValidated = false;
		this.sitedetails = value;
	}
	public boolean getHowLongIsItPresentIsNotNull()
	{
		return this.howlongisitpresent != null;
	}
	public String getHowLongIsItPresent()
	{
		return this.howlongisitpresent;
	}
	public static int getHowLongIsItPresentMaxLength()
	{
		return 255;
	}
	public void setHowLongIsItPresent(String value)
	{
		this.isValidated = false;
		this.howlongisitpresent = value;
	}
	public boolean getPressureSoreGradeIsNotNull()
	{
		return this.pressuresoregrade != null;
	}
	public ims.nursing.vo.lookups.SkinPressureSoreGrade getPressureSoreGrade()
	{
		return this.pressuresoregrade;
	}
	public void setPressureSoreGrade(ims.nursing.vo.lookups.SkinPressureSoreGrade value)
	{
		this.isValidated = false;
		this.pressuresoregrade = value;
	}
	public boolean getLengthIsNotNull()
	{
		return this.length != null;
	}
	public Float getLength()
	{
		return this.length;
	}
	public void setLength(Float value)
	{
		this.isValidated = false;
		this.length = value;
	}
	public boolean getWidthIsNotNull()
	{
		return this.width != null;
	}
	public Float getWidth()
	{
		return this.width;
	}
	public void setWidth(Float value)
	{
		this.isValidated = false;
		this.width = value;
	}
	public boolean getDepthIsNotNull()
	{
		return this.depth != null;
	}
	public Float getDepth()
	{
		return this.depth;
	}
	public void setDepth(Float value)
	{
		this.isValidated = false;
		this.depth = value;
	}
	public boolean getWoundBedIsNotNull()
	{
		return this.woundbed != null;
	}
	public ims.nursing.vo.lookups.SkinWoundBed getWoundBed()
	{
		return this.woundbed;
	}
	public void setWoundBed(ims.nursing.vo.lookups.SkinWoundBed value)
	{
		this.isValidated = false;
		this.woundbed = value;
	}
	public boolean getSurroundingSkinIsNotNull()
	{
		return this.surroundingskin != null;
	}
	public ims.nursing.vo.lookups.SkinSurroundingSkin getSurroundingSkin()
	{
		return this.surroundingskin;
	}
	public void setSurroundingSkin(ims.nursing.vo.lookups.SkinSurroundingSkin value)
	{
		this.isValidated = false;
		this.surroundingskin = value;
	}
	public boolean getExudateAmountIsNotNull()
	{
		return this.exudateamount != null;
	}
	public ims.nursing.vo.lookups.SkinExudateAmount getExudateAmount()
	{
		return this.exudateamount;
	}
	public void setExudateAmount(ims.nursing.vo.lookups.SkinExudateAmount value)
	{
		this.isValidated = false;
		this.exudateamount = value;
	}
	public boolean getExudateTypeIsNotNull()
	{
		return this.exudatetype != null;
	}
	public ims.nursing.vo.lookups.SkinExudateType getExudateType()
	{
		return this.exudatetype;
	}
	public void setExudateType(ims.nursing.vo.lookups.SkinExudateType value)
	{
		this.isValidated = false;
		this.exudatetype = value;
	}
	public boolean getOdourIsNotNull()
	{
		return this.odour != null;
	}
	public ims.nursing.vo.lookups.SkinOdour getOdour()
	{
		return this.odour;
	}
	public void setOdour(ims.nursing.vo.lookups.SkinOdour value)
	{
		this.isValidated = false;
		this.odour = value;
	}
	public boolean getPainIsNotNull()
	{
		return this.pain != null;
	}
	public ims.nursing.vo.lookups.SkinPain getPain()
	{
		return this.pain;
	}
	public void setPain(ims.nursing.vo.lookups.SkinPain value)
	{
		this.isValidated = false;
		this.pain = value;
	}
	public boolean getInfectionSuspectedIsNotNull()
	{
		return this.infectionsuspected != null;
	}
	public Boolean getInfectionSuspected()
	{
		return this.infectionsuspected;
	}
	public void setInfectionSuspected(Boolean value)
	{
		this.isValidated = false;
		this.infectionsuspected = value;
	}
	public boolean getSwabTakenIsNotNull()
	{
		return this.swabtaken != null;
	}
	public Boolean getSwabTaken()
	{
		return this.swabtaken;
	}
	public void setSwabTaken(Boolean value)
	{
		this.isValidated = false;
		this.swabtaken = value;
	}
	public boolean getWoundTracedIsNotNull()
	{
		return this.woundtraced != null;
	}
	public Boolean getWoundTraced()
	{
		return this.woundtraced;
	}
	public void setWoundTraced(Boolean value)
	{
		this.isValidated = false;
		this.woundtraced = value;
	}
	public boolean getCleansedWithIsNotNull()
	{
		return this.cleansedwith != null;
	}
	public ims.nursing.vo.lookups.SkinCleansedWith getCleansedWith()
	{
		return this.cleansedwith;
	}
	public void setCleansedWith(ims.nursing.vo.lookups.SkinCleansedWith value)
	{
		this.isValidated = false;
		this.cleansedwith = value;
	}
	public boolean getPrimaryDressingIsNotNull()
	{
		return this.primarydressing != null;
	}
	public ims.nursing.vo.lookups.SkinPrimaryDressing getPrimaryDressing()
	{
		return this.primarydressing;
	}
	public void setPrimaryDressing(ims.nursing.vo.lookups.SkinPrimaryDressing value)
	{
		this.isValidated = false;
		this.primarydressing = value;
	}
	public boolean getSecondaryDressingIsNotNull()
	{
		return this.secondarydressing != null;
	}
	public ims.nursing.vo.lookups.SkinSecondaryDressing getSecondaryDressing()
	{
		return this.secondarydressing;
	}
	public void setSecondaryDressing(ims.nursing.vo.lookups.SkinSecondaryDressing value)
	{
		this.isValidated = false;
		this.secondarydressing = value;
	}
	public boolean getFrequencyOfChangeIsNotNull()
	{
		return this.frequencyofchange != null;
	}
	public ims.nursing.vo.lookups.SkinFrequencyOfChange getFrequencyOfChange()
	{
		return this.frequencyofchange;
	}
	public void setFrequencyOfChange(ims.nursing.vo.lookups.SkinFrequencyOfChange value)
	{
		this.isValidated = false;
		this.frequencyofchange = value;
	}
	public boolean getCommentIsNotNull()
	{
		return this.comment != null;
	}
	public String getComment()
	{
		return this.comment;
	}
	public static int getCommentMaxLength()
	{
		return 255;
	}
	public void setComment(String value)
	{
		this.isValidated = false;
		this.comment = value;
	}
	public boolean getIsDiscontinuedAssessIsNotNull()
	{
		return this.isdiscontinuedassess != null;
	}
	public Boolean getIsDiscontinuedAssess()
	{
		return this.isdiscontinuedassess;
	}
	public void setIsDiscontinuedAssess(Boolean value)
	{
		this.isValidated = false;
		this.isdiscontinuedassess = value;
	}
	public boolean getIsContinuedAssessmentIsNotNull()
	{
		return this.iscontinuedassessment != null;
	}
	public Boolean getIsContinuedAssessment()
	{
		return this.iscontinuedassessment;
	}
	public void setIsContinuedAssessment(Boolean value)
	{
		this.isValidated = false;
		this.iscontinuedassessment = value;
	}
	public boolean getSkinAssessmentReviewIsNotNull()
	{
		return this.skinassessmentreview != null;
	}
	public ims.nursing.vo.SkinAssessmentReviewCollection getSkinAssessmentReview()
	{
		return this.skinassessmentreview;
	}
	public void setSkinAssessmentReview(ims.nursing.vo.SkinAssessmentReviewCollection value)
	{
		this.isValidated = false;
		this.skinassessmentreview = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.skinassessmentreview != null)
		{
			if(!this.skinassessmentreview.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.sitename != null)
			if(this.sitename.length() > 255)
				listOfErrors.add("The length of the field [sitename] in the value object [ims.nursing.vo.SkinAssessmentFindings] is too big. It should be less or equal to 255");
		if(this.sitedetails != null)
			if(this.sitedetails.length() > 255)
				listOfErrors.add("The length of the field [sitedetails] in the value object [ims.nursing.vo.SkinAssessmentFindings] is too big. It should be less or equal to 255");
		if(this.howlongisitpresent != null)
			if(this.howlongisitpresent.length() > 255)
				listOfErrors.add("The length of the field [howlongisitpresent] in the value object [ims.nursing.vo.SkinAssessmentFindings] is too big. It should be less or equal to 255");
		if(this.comment != null)
			if(this.comment.length() > 255)
				listOfErrors.add("The length of the field [comment] in the value object [ims.nursing.vo.SkinAssessmentFindings] is too big. It should be less or equal to 255");
		if(this.skinassessmentreview != null)
		{
			String[] listOfOtherErrors = this.skinassessmentreview.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		int errorCount = listOfErrors.size();
		if(errorCount == 0)
		{
			this.isBusy = false;
			this.isValidated = true;
			return null;
		}
		String[] result = new String[errorCount];
		for(int x = 0; x < errorCount; x++)
			result[x] = (String)listOfErrors.get(x);
		this.isBusy = false;
		this.isValidated = false;
		return result;
	}
	public void clearIDAndVersion()
	{
		this.id = null;
		this.version = 0;
	}
	public Object clone()
	{
		if(this.isBusy)
			return this;
		this.isBusy = true;
	
		SkinAssessmentFindings clone = new SkinAssessmentFindings(this.id, this.version);
		
		if(this.woundtype == null)
			clone.woundtype = null;
		else
			clone.woundtype = (ims.nursing.vo.lookups.SkinWoundType)this.woundtype.clone();
		clone.siteimage = this.siteimage;
		clone.sitename = this.sitename;
		clone.sitedetails = this.sitedetails;
		clone.howlongisitpresent = this.howlongisitpresent;
		if(this.pressuresoregrade == null)
			clone.pressuresoregrade = null;
		else
			clone.pressuresoregrade = (ims.nursing.vo.lookups.SkinPressureSoreGrade)this.pressuresoregrade.clone();
		clone.length = this.length;
		clone.width = this.width;
		clone.depth = this.depth;
		if(this.woundbed == null)
			clone.woundbed = null;
		else
			clone.woundbed = (ims.nursing.vo.lookups.SkinWoundBed)this.woundbed.clone();
		if(this.surroundingskin == null)
			clone.surroundingskin = null;
		else
			clone.surroundingskin = (ims.nursing.vo.lookups.SkinSurroundingSkin)this.surroundingskin.clone();
		if(this.exudateamount == null)
			clone.exudateamount = null;
		else
			clone.exudateamount = (ims.nursing.vo.lookups.SkinExudateAmount)this.exudateamount.clone();
		if(this.exudatetype == null)
			clone.exudatetype = null;
		else
			clone.exudatetype = (ims.nursing.vo.lookups.SkinExudateType)this.exudatetype.clone();
		if(this.odour == null)
			clone.odour = null;
		else
			clone.odour = (ims.nursing.vo.lookups.SkinOdour)this.odour.clone();
		if(this.pain == null)
			clone.pain = null;
		else
			clone.pain = (ims.nursing.vo.lookups.SkinPain)this.pain.clone();
		clone.infectionsuspected = this.infectionsuspected;
		clone.swabtaken = this.swabtaken;
		clone.woundtraced = this.woundtraced;
		if(this.cleansedwith == null)
			clone.cleansedwith = null;
		else
			clone.cleansedwith = (ims.nursing.vo.lookups.SkinCleansedWith)this.cleansedwith.clone();
		if(this.primarydressing == null)
			clone.primarydressing = null;
		else
			clone.primarydressing = (ims.nursing.vo.lookups.SkinPrimaryDressing)this.primarydressing.clone();
		if(this.secondarydressing == null)
			clone.secondarydressing = null;
		else
			clone.secondarydressing = (ims.nursing.vo.lookups.SkinSecondaryDressing)this.secondarydressing.clone();
		if(this.frequencyofchange == null)
			clone.frequencyofchange = null;
		else
			clone.frequencyofchange = (ims.nursing.vo.lookups.SkinFrequencyOfChange)this.frequencyofchange.clone();
		clone.comment = this.comment;
		clone.isdiscontinuedassess = this.isdiscontinuedassess;
		clone.iscontinuedassessment = this.iscontinuedassessment;
		if(this.skinassessmentreview == null)
			clone.skinassessmentreview = null;
		else
			clone.skinassessmentreview = (ims.nursing.vo.SkinAssessmentReviewCollection)this.skinassessmentreview.clone();
		clone.isValidated = this.isValidated;
		
		this.isBusy = false;
		return clone;
	}
	public int compareTo(Object obj)
	{
		return compareTo(obj, true);
	}
	public int compareTo(Object obj, boolean caseInsensitive)
	{
		if (obj == null)
		{
			return -1;
		}
		if(caseInsensitive); // this is to avoid eclipse warning only.
		if (!(SkinAssessmentFindings.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A SkinAssessmentFindings object cannot be compared an Object of type " + obj.getClass().getName());
		}
		SkinAssessmentFindings compareObj = (SkinAssessmentFindings)obj;
		int retVal = 0;
		if (retVal == 0)
		{
			if(this.getWoundType() == null && compareObj.getWoundType() != null)
				return -1;
			if(this.getWoundType() != null && compareObj.getWoundType() == null)
				return 1;
			if(this.getWoundType() != null && compareObj.getWoundType() != null)
				retVal = this.getWoundType().compareTo(compareObj.getWoundType());
		}
		return retVal;
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.woundtype != null)
			count++;
		if(this.siteimage != null)
			count++;
		if(this.sitename != null)
			count++;
		if(this.sitedetails != null)
			count++;
		if(this.howlongisitpresent != null)
			count++;
		if(this.pressuresoregrade != null)
			count++;
		if(this.length != null)
			count++;
		if(this.width != null)
			count++;
		if(this.depth != null)
			count++;
		if(this.woundbed != null)
			count++;
		if(this.surroundingskin != null)
			count++;
		if(this.exudateamount != null)
			count++;
		if(this.exudatetype != null)
			count++;
		if(this.odour != null)
			count++;
		if(this.pain != null)
			count++;
		if(this.infectionsuspected != null)
			count++;
		if(this.swabtaken != null)
			count++;
		if(this.woundtraced != null)
			count++;
		if(this.cleansedwith != null)
			count++;
		if(this.primarydressing != null)
			count++;
		if(this.secondarydressing != null)
			count++;
		if(this.frequencyofchange != null)
			count++;
		if(this.comment != null)
			count++;
		if(this.isdiscontinuedassess != null)
			count++;
		if(this.iscontinuedassessment != null)
			count++;
		if(this.skinassessmentreview != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 26;
	}
	protected ims.nursing.vo.lookups.SkinWoundType woundtype;
	protected String siteimage;
	protected String sitename;
	protected String sitedetails;
	protected String howlongisitpresent;
	protected ims.nursing.vo.lookups.SkinPressureSoreGrade pressuresoregrade;
	protected Float length;
	protected Float width;
	protected Float depth;
	protected ims.nursing.vo.lookups.SkinWoundBed woundbed;
	protected ims.nursing.vo.lookups.SkinSurroundingSkin surroundingskin;
	protected ims.nursing.vo.lookups.SkinExudateAmount exudateamount;
	protected ims.nursing.vo.lookups.SkinExudateType exudatetype;
	protected ims.nursing.vo.lookups.SkinOdour odour;
	protected ims.nursing.vo.lookups.SkinPain pain;
	protected Boolean infectionsuspected;
	protected Boolean swabtaken;
	protected Boolean woundtraced;
	protected ims.nursing.vo.lookups.SkinCleansedWith cleansedwith;
	protected ims.nursing.vo.lookups.SkinPrimaryDressing primarydressing;
	protected ims.nursing.vo.lookups.SkinSecondaryDressing secondarydressing;
	protected ims.nursing.vo.lookups.SkinFrequencyOfChange frequencyofchange;
	protected String comment;
	protected Boolean isdiscontinuedassess;
	protected Boolean iscontinuedassessment;
	protected ims.nursing.vo.SkinAssessmentReviewCollection skinassessmentreview;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
