InterestIncentiveMapper incentiveMapper = new InterestIncentiveMapper();
@Override
public DepositAccountInterestRateChartSlabData extractData(ResultSet rs) throws SQLException, DataAccessException {
DepositAccountInterestRateChartSlabData chartSlabData = null;
Long interestRateChartSlabId = null;
int ircIndex = 0;// Interest rate chart index
int ircdIndex = 0;// Interest rate chart Slabs index
rs.previous();
while (rs.next()) {
Long tempIrcdId = rs.getLong("ircdId");
if (interestRateChartSlabId == null || interestRateChartSlabId.equals(tempIrcdId)) {
if (chartSlabData == null) {
interestRateChartSlabId = tempIrcdId;
chartSlabData = chartSlabsMapper.mapRow(rs, ircIndex++);
}
final DepositAccountInterestIncentiveData incentiveData = incentiveMapper.mapRow(rs, ircdIndex++);
if (incentiveData != null) {
chartSlabData.addIncentives(incentiveData);
}
} else {
rs.previous();
break;
}