use of com.khartec.waltz.schema.tables.records.SurveyQuestionDropdownEntryRecord in project waltz by khartec.
the class SurveyQuestionDropdownEntryDao method saveEntries.
public void saveEntries(long questionId, List<SurveyQuestionDropdownEntry> entries) {
checkNotNull(entries, "entries cannot be null");
dsl.transaction(config -> {
DSLContext tx = DSL.using(config);
tx.delete(SURVEY_QUESTION_DROPDOWN_ENTRY).where(SURVEY_QUESTION_DROPDOWN_ENTRY.QUESTION_ID.eq(questionId)).execute();
List<SurveyQuestionDropdownEntryRecord> records = entries.stream().map(TO_RECORD_MAPPER).collect(toList());
tx.batchInsert(records).execute();
});
}
Aggregations