Beispiel #1
0
 public void updateStatusCode() {
   switch (this.statusCd) {
     case NEW:
       if (this.statusCd == STATUS_CD.NEW
           && !firstReceiptDate.isAfter(SystemDao.getCrc())
           && !storeOpenDate.isAfter(SystemDao.getCrc())) {
         this.statusCd = STATUS_CD.LEARNING;
       }
       break;
     case LEARNING:
       // provided there have been no non-demand events or events that lasted most of the week and
       // the PL has been on
       // range the entire time, the PL is moved to status_cd = ACTIVE after the 3rd full week.
       if (!hasBeenOffRange && learningWeekCounter > 3) {
         statusCd = STATUS_CD.ACTIVE;
       }
       break;
     case INACTIVE:
       // item only goes inactive during integration, when PL drops from the file
   }
 }
 /**
  * Checks if this range is entirely after the specified time.
  *
  * <p>The comparison is based on the time-line position of the time within a day.
  *
  * @param other the other time to compare to, not null
  * @return true if this range is entirely after the specified time
  * @throws NullPointerException if {@code other} is null
  */
 public boolean isAfter(LocalDate other) {
   return startDate.isAfter(other);
 }