for (Integer currentYear : yearToMonthToValueTable.rowKeySet()) {
Map<Integer, Double> monthToValue = yearToMonthToValueTable
.row(currentYear);
for (Integer currentMonth : monthToValue.keySet()) {
Double value = monthToValue.get(currentMonth);
HistoricalStockValue historicalStockValue = new HistoricalStockValue();
historicalStockValue.setCollectionDate(new Date());
historicalStockValue.setMonth(currentMonth);
historicalStockValue.setYear(currentYear);
historicalStockValue.setSymbol(symbol);
historicalStockValue.setNumericalValue(Math
.round(value * 100.0));
historicalStockValues.add(historicalStockValue);
}
}
return historicalStockValues;