Class DayAccrualMethodServiceImpl
java.lang.Object
ch.tocco.nice2.optional.accrualexport.impl.service.DayAccrualMethodServiceImpl
- All Implemented Interfaces:
- AccrualMethodService<Void>
@Component
public class DayAccrualMethodServiceImpl
extends Object
implements AccrualMethodService<Void>
Calculates the accrual amount by count of days after the deadline
 compared to the total number of days
- 
Constructor SummaryConstructorsConstructorDescriptionDayAccrualMethodServiceImpl(Context context, QueryBuilderFactory queryBuilderFactory) 
- 
Method SummaryModifier and TypeMethodDescriptionDeprecated.booleanbooleanDeprecated.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 inAccrualMethodService.check(Voucher, Order, LocalDate, T)andAccrualMethodService.calculate(Voucher, Order, LocalDate, T).
- 
Constructor Details- 
DayAccrualMethodServiceImpl
 
- 
- 
Method Details- 
prepareDataDescription copied from interface:AccrualMethodServiceReceives all vouchers which should be handled in this task run and should return all the data which is needed to do its job inAccrualMethodService.check(Voucher, Order, LocalDate, T)andAccrualMethodService.calculate(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.- Specified by:
- prepareDatain interface- AccrualMethodService<Void>
 
- 
checkpublic boolean check(Voucher voucher, Order order, org.joda.time.LocalDate deadline, Void preparedData) - Specified by:
- checkin interface- AccrualMethodService<Void>
 
- 
calculatepublic BigDecimal calculate(Voucher voucher, Order order, org.joda.time.LocalDate deadline, Void preparedData) - Specified by:
- calculatein interface- AccrualMethodService<Void>
 
- 
checkDeprecated.- Specified by:
- checkin interface- AccrualMethodService<Void>
 
- 
calculateDeprecated.- Specified by:
- calculatein interface- AccrualMethodService<Void>
 
 
-