public int compareTo(Object obj, boolean caseInsensitive) {
   if (obj == null) {
     return -1;
   }
   if (caseInsensitive) ; // this is to avoid eclipse warning only.
   if (!(ClinicalNotesPullingSearchCriteriaVo.class.isAssignableFrom(obj.getClass()))) {
     throw new ClassCastException(
         "A ClinicalNotesPullingSearchCriteriaVo object cannot be compared an Object of type "
             + obj.getClass().getName());
   }
   ClinicalNotesPullingSearchCriteriaVo compareObj = (ClinicalNotesPullingSearchCriteriaVo) obj;
   int retVal = 0;
   if (retVal == 0) {
     if (this.getHospital() == null && compareObj.getHospital() != null) return -1;
     if (this.getHospital() != null && compareObj.getHospital() == null) return 1;
     if (this.getHospital() != null && compareObj.getHospital() != null)
       retVal = this.getHospital().compareTo(compareObj.getHospital());
   }
   if (retVal == 0) {
     if (this.getDate() == null && compareObj.getDate() != null) return -1;
     if (this.getDate() != null && compareObj.getDate() == null) return 1;
     if (this.getDate() != null && compareObj.getDate() != null)
       retVal = this.getDate().compareTo(compareObj.getDate());
   }
   if (retVal == 0) {
     if (this.getClinic() == null && compareObj.getClinic() != null) return -1;
     if (this.getClinic() != null && compareObj.getClinic() == null) return 1;
     if (this.getClinic() != null && compareObj.getClinic() != null)
       retVal = this.getClinic().compareTo(compareObj.getClinic());
   }
   return retVal;
 }
 public boolean equals(Object obj) {
   if (obj == null) return false;
   if (!(obj instanceof ClinicalNotesPullingSearchCriteriaVo)) return false;
   ClinicalNotesPullingSearchCriteriaVo compareObj = (ClinicalNotesPullingSearchCriteriaVo) obj;
   if (this.getHospital() == null && compareObj.getHospital() != null) return false;
   if (this.getHospital() != null && compareObj.getHospital() == null) return false;
   if (this.getHospital() != null && compareObj.getHospital() != null)
     if (!this.getHospital().equals(compareObj.getHospital())) return false;
   if (this.getDate() == null && compareObj.getDate() != null) return false;
   if (this.getDate() != null && compareObj.getDate() == null) return false;
   if (this.getDate() != null && compareObj.getDate() != null)
     if (!this.getDate().equals(compareObj.getDate())) return false;
   if (this.getClinic() == null && compareObj.getClinic() != null) return false;
   if (this.getClinic() != null && compareObj.getClinic() == null) return false;
   if (this.getClinic() != null && compareObj.getClinic() != null)
     return this.getClinic().equals(compareObj.getClinic());
   return super.equals(obj);
 }
  public Object clone() {
    if (this.isBusy) return this;
    this.isBusy = true;

    ClinicalNotesPullingSearchCriteriaVo clone = new ClinicalNotesPullingSearchCriteriaVo();

    clone.hospital = this.hospital;
    if (this.date == null) clone.date = null;
    else clone.date = (ims.framework.utils.Date) this.date.clone();
    clone.clinic = this.clinic;
    clone.isValidated = this.isValidated;

    this.isBusy = false;
    return clone;
  }