use of org.openforis.collect.persistence.jooq.tables.records.OfcSurveyRecord in project collect by openforis.
the class SurveyDao method insert.
public void insert(CollectSurvey survey) throws SurveyImportException {
CollectDSLContext dsl = dsl();
// fetch next id
int surveyId = dsl.nextId(OFC_SURVEY.ID, OFC_SURVEY_ID_SEQ);
InsertQuery<OfcSurveyRecord> insert = dsl.insertQuery(OFC_SURVEY);
addNewSurveyValues(insert, survey, surveyId);
insert.execute();
survey.setId(surveyId);
}
Aggregations