use of org.jooq.Record in project collect by openforis.
the class RecordDao method load.
public CollectRecord load(CollectSurvey survey, int id, Step step, boolean toBeUpdated) {
SelectQuery query = selectRecordQuery(id, false, step, null);
Record r = query.fetchOne();
return r == null ? null : fromQueryResult(survey, r, toBeUpdated);
}
use of org.jooq.Record in project collect by openforis.
the class RecordDao method loadBinaryData.
public byte[] loadBinaryData(CollectSurvey survey, int id, Step step) {
SelectQuery query = selectRecordQuery(id, false, step, null);
Record r = query.fetchOne();
return r == null ? null : r.getValue(OFC_RECORD_DATA.DATA);
}
use of org.jooq.Record in project collect by openforis.
the class RecordDao method load.
public CollectRecord load(CollectSurvey survey, int id, int workflowSequenceNumber, boolean toBeUpdated) {
SelectQuery query = selectRecordQuery(id, false, null, workflowSequenceNumber);
Record r = query.fetchOne();
return r == null ? null : fromQueryResult(survey, r, toBeUpdated);
}
use of org.jooq.Record in project collect by openforis.
the class RecordDao method loadSummaries.
public List<CollectRecordSummary> loadSummaries(RecordFilter filter, List<RecordSummarySortField> sortFields) {
CollectSurvey survey = filter.getSurvey();
SelectQuery<Record> q = createSelectSummariesQuery(filter, sortFields);
Result<Record> result = q.fetch();
return fromSummaryQueryResult(result, survey);
}
use of org.jooq.Record in project collect by openforis.
the class SamplingDesignDao method loadItem.
public SamplingDesignItem loadItem(int surveyId, String... parentKeys) {
SamplingDesignDSLContext dsl = dsl();
SelectQuery<Record> q = dsl.selectQuery();
q.addFrom(OFC_SAMPLING_DESIGN);
q.addConditions(OFC_SAMPLING_DESIGN.SURVEY_ID.equal(surveyId));
addParentKeysConditions(q, parentKeys);
int nextLevelIndex = parentKeys == null ? 0 : parentKeys.length;
addLevelKeyNullConditions(q, nextLevelIndex);
Record r = q.fetchAny();
return dsl.fromRecord(r);
}
Aggregations