if (!rs.next()) {
final Collection<LoanProductData> restrictedProducts = this.loanProductReadPlatformService
.retrieveRestrictedProductsForMix(this.productId);
final Collection<LoanProductData> allowedProducts = this.loanProductReadPlatformService
.retrieveAllowedProductsForMix(this.productId);
final ProductMixData productMixData = ProductMixData.withRestrictedOptions(restrictedProducts, allowedProducts);
extractedData.put(this.productId, productMixData);
return extractedData;
}
/* move the cursor to starting of resultset */
rs.beforeFirst();
while (rs.next()) {
final Long productId = rs.getLong("productId");
final String name = rs.getString("name");
final Collection<LoanProductData> restrictedProducts = this.loanProductReadPlatformService
.retrieveRestrictedProductsForMix(productId);
final Collection<LoanProductData> allowedProducts = this.loanProductReadPlatformService
.retrieveAllowedProductsForMix(productId);
final ProductMixData productMixData = ProductMixData.withDetails(productId, name, restrictedProducts, allowedProducts);
extractedData.put(productId, productMixData);
}
return extractedData;
}