// loop through N days, populating the data
for (int i = 1; i <= inDaysToCalculate; i++)
{
Date date = DateDayExtractor.getStartOfDay(daysAgoDateStrategy.execute(i));
int weekdaysCount = weekdaysInDateRangeStrategy.getWeekdayCountBetweenDates(date, today);
TempWeekdaysSinceDate record = new TempWeekdaysSinceDate(date.getTime(), weekdaysCount);
log.debug("Calculated " + weekdaysCount + " weekdays between now and " + date);
insertMapper.execute(new PersistenceRequest<TempWeekdaysSinceDate>(record));
}
flushMapper.execute(null);