Interface AccrualMethodService<T>
- All Known Implementing Classes:
DayAccrualMethodServiceImpl
,ReservationAccrualMethodServiceImpl
public interface AccrualMethodService<T>
Calculates the accrual amount of a given service if the check is successful
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.boolean
boolean
Deprecated.Has been replaced withcheck(Voucher, Order, LocalDate, T)
to be able to do the stuff with the prepared data of multiple entities at once (more efficient)prepareData
(List<Voucher> vouchers) Receives all vouchers which should be handled in this task run and should return all the data which is needed to do its job incheck(Voucher, Order, LocalDate, T)
andcalculate(Voucher, Order, LocalDate, T)
.
-
Method Details
-
prepareData
Receives all vouchers which should be handled in this task run and should return all the data which is needed to do its job incheck(Voucher, Order, LocalDate, T)
andcalculate(Voucher, Order, LocalDate, T)
. This method here should load the needed data as efficient as possible (few queries and only necessary paths). The other methods (`check` and `calculate`) shouldn't have to make any database queries at all. -
check
-
calculate
BigDecimal calculate(Voucher voucher, Order order, org.joda.time.LocalDate deadline, T preparedData) -
check
Deprecated.Has been replaced withcheck(Voucher, Order, LocalDate, T)
to be able to do the stuff with the prepared data of multiple entities at once (more efficient) -
calculate
Deprecated.Has been replaced withcalculate(Voucher, Order, LocalDate, T)
to be able to do the stuff with the prepared data of multiple entities at once (more efficient)
-
calculate(Voucher, Order, LocalDate, T)
to be able to do the stuff with the prepared data of multiple entities at once (more efficient)