Search in sources :

Example 6 with TestResult

use of org.asqatasun.webapp.presentation.data.TestResult in project Asqatasun by Asqatasun.

the class TestResultFactory method getTestResultListFromCriterion.

/**
     *
     * @param webresource
     * @param crit
     * @return the test result list without user filter (used for the export
     * function)
     */
public Map<Theme, List<TestResult>> getTestResultListFromCriterion(WebResource webresource, Criterion crit) {
    // Map that associates a list of results with a theme
    List<TestResult> testResultList = new LinkedList();
    List<ProcessResult> netResultList = (List<ProcessResult>) processResultDataService.getProcessResultListByWebResourceAndCriterion(webresource, crit);
    netResultList.addAll(addNotTestedProcessResult(testDataService.findAllByCriterion(crit), crit.getTheme().getCode(), netResultList));
    sortCollection(netResultList);
    for (ProcessResult processResult : netResultList) {
        if (processResult instanceof DefiniteResult) {
            TestResult testResult = getTestResult(processResult, true, false);
            testResultList.add(testResult);
        }
    }
    Map<Theme, List<TestResult>> testResultMap = new HashMap();
    testResultMap.put(crit.getTheme(), testResultList);
    return testResultMap;
}
Also used : Theme(org.asqatasun.entity.reference.Theme) TestResult(org.asqatasun.webapp.presentation.data.TestResult)

Aggregations

TestResult (org.asqatasun.webapp.presentation.data.TestResult)6 Theme (org.asqatasun.entity.reference.Theme)3 ColumnBuilderException (ar.com.fdvs.dj.domain.builders.ColumnBuilderException)1 JRException (net.sf.jasperreports.engine.JRException)1 Scope (org.asqatasun.entity.reference.Scope)1 Page (org.asqatasun.entity.subject.Page)1 AuditStatistics (org.asqatasun.webapp.presentation.data.AuditStatistics)1 TestResultImpl (org.asqatasun.webapp.presentation.data.TestResultImpl)1