Beispiel #1
0
 /**
  * This method checks the fields available on the UI and if any of those fields are different than
  * the DB version, it returns true.
  *
  * @param dbReportTracking
  * @return
  */
 public boolean hasBeenUpdated(ReportTracking dbReportTracking) {
   boolean retVal = false;
   if (dbReportTracking != null) {
     if (!StringUtils.equalsIgnoreCase(this.getPreparerId(), dbReportTracking.getPreparerId())) {
       retVal = true;
     } else if (!StringUtils.equalsIgnoreCase(
         this.getStatusCode(), dbReportTracking.getStatusCode())) {
       retVal = true;
     } else if (!StringUtils.equalsIgnoreCase(
         this.getComments(), dbReportTracking.getComments())) {
       retVal = true;
     } else if (!dateEquals(this.activityDate, dbReportTracking.activityDate)) {
       retVal = true;
     }
   }
   return retVal;
 }
Beispiel #2
0
 /**
  * This method implements comparable based on the due date;
  *
  * @see java.lang.Comparable#compareTo(java.lang.Object)
  */
 @Override
 public int compareTo(ReportTracking o) {
   return o == null || o.getDueDate() == null || this.getDueDate() == null
       ? 0
       : this.getDueDate().compareTo(o.getDueDate());
 }