@Override
  public boolean isSatisfiedBy(Payment payment) {
    ISpecification spec;

    spec = new BetweenTime(from, till).and(new SameProduct(payment.getProduct()));

    logger.entry(payment);
    return logger.exit(paymentDAO.sum(paymentDAO.filter(spec)).compareTo(bound) >= 0);
  }
Exemplo n.º 2
0
  @Override
  public boolean isSatisfiedBy(Payment payment) {
    OffsetDateTime offsetPaymentDate;
    offsetPaymentDate = OffsetDateTime.ofInstant(payment.getDate(), ZoneOffset.UTC);

    logger.entry(payment);
    logger.entry(offsetPaymentDate);

    return logger.exit(offsetPaymentDate.toLocalTime().compareTo(value) <= 0);
  }