public int compareTo(Object obj, boolean caseInsensitive) { if (obj == null) { return -1; } if (caseInsensitive) ; // this is to avoid eclipse warning only. if (!(PathologyResultListShortVo.class.isAssignableFrom(obj.getClass()))) { throw new ClassCastException( "A PathologyResultListShortVo object cannot be compared an Object of type " + obj.getClass().getName()); } PathologyResultListShortVo compareObj = (PathologyResultListShortVo) obj; int retVal = 0; if (retVal == 0) { if (this.getDisplayDateTime() == null && compareObj.getDisplayDateTime() != null) return -1; if (this.getDisplayDateTime() != null && compareObj.getDisplayDateTime() == null) return 1; if (this.getDisplayDateTime() != null && compareObj.getDisplayDateTime() != null) retVal = this.getDisplayDateTime().compareTo(compareObj.getDisplayDateTime()); } return retVal; }
public Object clone() { if (this.isBusy) return this; this.isBusy = true; PathologyResultListShortVo clone = new PathologyResultListShortVo(this.id, this.version); if (this.investigation == null) clone.investigation = null; else clone.investigation = (ims.ocrr.vo.NewResultInvestigationVo) this.investigation.clone(); if (this.orderdetails == null) clone.orderdetails = null; else clone.orderdetails = (ims.ocrr.vo.OcsOrderShortVo) this.orderdetails.clone(); if (this.resultdemographics == null) clone.resultdemographics = null; else clone.resultdemographics = (ims.ocrr.vo.ResultDemographicsVo) this.resultdemographics.clone(); if (this.displaydatetime == null) clone.displaydatetime = null; else clone.displaydatetime = (ims.framework.utils.DateTime) this.displaydatetime.clone(); if (this.resultstatus == null) clone.resultstatus = null; else clone.resultstatus = (ims.ocrr.vo.lookups.ResultStatus) this.resultstatus.clone(); if (this.displayflag == null) clone.displayflag = null; else clone.displayflag = (ims.ocrr.vo.lookups.OcsDisplayFlag) this.displayflag.clone(); if (this.ordinvcurrentstatus == null) clone.ordinvcurrentstatus = null; else clone.ordinvcurrentstatus = (ims.ocrr.vo.OrderedInvestigationStatusVo) this.ordinvcurrentstatus.clone(); if (this.specimen == null) clone.specimen = null; else clone.specimen = (ims.ocrr.vo.PathologySpecimenLiteVoCollection) this.specimen.clone(); if (this.repdatetime == null) clone.repdatetime = null; else clone.repdatetime = (ims.framework.utils.DateTime) this.repdatetime.clone(); clone.displaytimesupplied = this.displaytimesupplied; clone.resultspecimentype = this.resultspecimentype; if (this.resultdetails == null) clone.resultdetails = null; else clone.resultdetails = (ims.ocrr.vo.ResultDetailsForPathologyResultListShortVo) this.resultdetails.clone(); clone.placerordnum = this.placerordnum; if (this.allocatedhcpforreview == null) clone.allocatedhcpforreview = null; else clone.allocatedhcpforreview = (ims.core.vo.HcpLiteVo) this.allocatedhcpforreview.clone(); if (this.daterequested == null) clone.daterequested = null; else clone.daterequested = (ims.framework.utils.Date) this.daterequested.clone(); clone.isValidated = this.isValidated; this.isBusy = false; return clone; }