batchUpdate.declareParameter(new SqlParameter("rank", Types.INTEGER));
batchUpdate.declareParameter(new SqlParameter("contextartist1_name", Types.VARCHAR));
batchUpdate.declareParameter(new SqlParameter("contextartist2_name", Types.VARCHAR));
for (int i = 0; i < artists.size(); i++) {
RecommendedArtist rec = artists.get(i);
batchUpdate.update(new Object[]{user.getLastFmUsername(), rec.getArtist().getName(),
i, name(rec.getContextArtist1()), name(rec.getContextArtist2())});
}
batchUpdate.flush();
}