jdbcTemplate.query("select * from MISDailyCandidateInfo", new RowCallbackHandler() {
@Override
public void processRow(ResultSet rs) throws SQLException {
JdbcTemplate jdbcTemplateMettl = daoFactory.getJDBCTemplateMettl();
String sql = "insert into TempDailyNDLMCandidatesData (email_id, invitation_id, assessment_id, candidate_reg_id, candidate_context_data)"
+ " values (?, ?, ?, ?, ?)";
while (rs.next()) {
String emailID = rs.getString("email_id");
String invitationKey = rs.getString("invitation_key");
int assessmentID = rs.getInt("assessment_id");
int candidateRegistrationID = rs.getInt("candidate_reg_id");
String candidate_context_data = rs.getString("candidate_context_data");
List<Object[]> params = new ArrayList<Object[]>();
params.add(new Object[]{emailID,
invitationKey,
assessmentID,
candidateRegistrationID,
candidate_context_data});
jdbcTemplateMettl.batchUpdate(sql, params);
}
}
});