Search in sources :

Example 1 with OfcSurveyRecord

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);
}
Also used : OfcSurveyRecord(org.openforis.collect.persistence.jooq.tables.records.OfcSurveyRecord) CollectDSLContext(org.openforis.collect.persistence.jooq.CollectDSLContext)

Aggregations

CollectDSLContext (org.openforis.collect.persistence.jooq.CollectDSLContext)1 OfcSurveyRecord (org.openforis.collect.persistence.jooq.tables.records.OfcSurveyRecord)1