public int compareTo(Object obj, boolean caseInsensitive) { if (obj == null) { return -1; } if (caseInsensitive) ; // this is to avoid eclipse warning only. if (!(PainAssessment.class.isAssignableFrom(obj.getClass()))) { throw new ClassCastException( "A PainAssessment object cannot be compared an Object of type " + obj.getClass().getName()); } PainAssessment compareObj = (PainAssessment) obj; int retVal = 0; if (retVal == 0) { if (this.getDateTimeInitiated() == null && compareObj.getDateTimeInitiated() != null) return -1; if (this.getDateTimeInitiated() != null && compareObj.getDateTimeInitiated() == null) return 1; if (this.getDateTimeInitiated() != null && compareObj.getDateTimeInitiated() != null) retVal = this.getDateTimeInitiated().compareTo(compareObj.getDateTimeInitiated()); } return retVal; }
public Object clone() { if (this.isBusy) return this; this.isBusy = true; PainAssessment clone = new PainAssessment(this.id, this.version); if (this.hcpinitiated == null) clone.hcpinitiated = null; else clone.hcpinitiated = (ims.core.vo.HcpLiteVo) this.hcpinitiated.clone(); if (this.datetimeinitiated == null) clone.datetimeinitiated = null; else clone.datetimeinitiated = (ims.framework.utils.DateTime) this.datetimeinitiated.clone(); clone.clinicalcontact = this.clinicalcontact; clone.carecontext = this.carecontext; if (this.sitedetails == null) clone.sitedetails = null; else clone.sitedetails = (ims.nursing.vo.PainAssessmentFindingsCollection) this.sitedetails.clone(); if (this.assessmentdatetime == null) clone.assessmentdatetime = null; else clone.assessmentdatetime = (ims.framework.utils.DateTime) this.assessmentdatetime.clone(); if (this.imageversion == null) clone.imageversion = null; else clone.imageversion = (ims.core.vo.DrawingImageVersionVo) this.imageversion.clone(); clone.isValidated = this.isValidated; this.isBusy = false; return clone; }