Search in sources :

Example 1 with SurveySummary

use of org.openforis.collect.model.SurveySummary in project collect by openforis.

the class SurveyDao method loadSurveySummaryByName.

public SurveySummary loadSurveySummaryByName(String name, boolean temporary) {
    Record record = dsl().select().from(OFC_SURVEY).where(OFC_SURVEY.NAME.equal(name).and(OFC_SURVEY.TEMPORARY.equal(temporary))).fetchOne();
    SurveySummary result = processSurveySummaryRow(record);
    return result;
}
Also used : SurveySummary(org.openforis.collect.model.SurveySummary) Record(org.jooq.Record) OfcSurveyRecord(org.openforis.collect.persistence.jooq.tables.records.OfcSurveyRecord)

Example 2 with SurveySummary

use of org.openforis.collect.model.SurveySummary in project collect by openforis.

the class SurveyDao method loadSurveySummary.

public SurveySummary loadSurveySummary(int id) {
    Record record = dsl().select().from(OFC_SURVEY).where(OFC_SURVEY.ID.equal(id)).fetchOne();
    SurveySummary result = processSurveySummaryRow(record);
    return result;
}
Also used : SurveySummary(org.openforis.collect.model.SurveySummary) Record(org.jooq.Record) OfcSurveyRecord(org.openforis.collect.persistence.jooq.tables.records.OfcSurveyRecord)

Example 3 with SurveySummary

use of org.openforis.collect.model.SurveySummary in project collect by openforis.

the class SurveyDao method loadSurveySummaryByUri.

public SurveySummary loadSurveySummaryByUri(String uri, boolean temporary) {
    Record record = dsl().select().from(OFC_SURVEY).where(OFC_SURVEY.URI.equal(uri).and(OFC_SURVEY.TEMPORARY.equal(temporary))).fetchOne();
    SurveySummary result = processSurveySummaryRow(record);
    return result;
}
Also used : SurveySummary(org.openforis.collect.model.SurveySummary) Record(org.jooq.Record) OfcSurveyRecord(org.openforis.collect.persistence.jooq.tables.records.OfcSurveyRecord)

Example 4 with SurveySummary

use of org.openforis.collect.model.SurveySummary in project collect by openforis.

the class ModelService method getSurveySummaries.

public List<SurveySummary> getSurveySummaries() {
    String lang = getActiveLanguageCode();
    User loggedUser = sessionManager.getLoggedUser();
    List<SurveySummary> summaries = surveyManager.getSurveySummaries(lang, loggedUser);
    return summaries;
}
Also used : User(org.openforis.collect.model.User) SurveySummary(org.openforis.collect.model.SurveySummary)

Example 5 with SurveySummary

use of org.openforis.collect.model.SurveySummary in project collect by openforis.

the class SurveyWorkDao method loadSurveySummaryByName.

@Transactional
public SurveySummary loadSurveySummaryByName(String name) {
    Record record = dsl().select().from(OFC_SURVEY_WORK).where(OFC_SURVEY_WORK.NAME.equal(name)).fetchOne();
    SurveySummary result = processSurveySummaryRow(record);
    return result;
}
Also used : SurveySummary(org.openforis.collect.model.SurveySummary) Record(org.jooq.Record) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

SurveySummary (org.openforis.collect.model.SurveySummary)34 CollectSurvey (org.openforis.collect.model.CollectSurvey)10 Record (org.jooq.Record)8 Transactional (org.springframework.transaction.annotation.Transactional)8 ArrayList (java.util.ArrayList)5 OfcSurveyRecord (org.openforis.collect.persistence.jooq.tables.records.OfcSurveyRecord)4 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)4 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)4 HttpServletResponse (javax.servlet.http.HttpServletResponse)2 UserGroup (org.openforis.collect.model.UserGroup)2 SurveyImportException (org.openforis.collect.persistence.SurveyImportException)2 Response (org.openforis.commons.web.Response)2 File (java.io.File)1 IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 BeanComparator (org.apache.commons.beanutils.BeanComparator)1 Test (org.junit.Test)1 CollectIntegrationTest (org.openforis.collect.CollectIntegrationTest)1