示例#1
0
  public boolean isLaterToPreviousItemDate(TaskQualityFormItem item) {
    Integer previousPosition = item.getPosition() - 1;
    if ((previousPosition >= 0) && (previousPosition < taskQualityFormItems.size())) {
      Date previousDate = taskQualityFormItems.get(previousPosition).getDate();
      return (previousDate != null)
          && (item.getDate() != null)
          && ((previousDate.before(item.getDate())) || (previousDate.equals(item.getDate())));
    }

    return true;
  }
示例#2
0
  public boolean isCorrectConsecutiveDate(TaskQualityFormItem item) {
    if (item.getPassed()) {
      return (isPassedPreviousItem(item)) && (isLaterToPreviousItemDate(item));
    }

    return item.getDate() == null;
  }