posted 9 years ago
Hello - I have requirement to execute and insert around 2000 records. Hence I choose to execute through jdbctemplate batch template.
Problem: This is to insert insurance plans for my customer. As a requirement I have many Insurances and it has many plans. So getBatchSize() returns number of insurance available and while setting the values i will get Insurance plan object and insert the data. However, with this line getInsuranceList().get(i).getInsPlan(), I get only one plan.
Please advice, If i have to put all this method in a loop to run available insurances so that i can return the size of the plans available. Is this the correct approach to loop the method.