ProcessResultDAOImpl extends AbstractJPADAO<ProcessResult, Long> implements ProcessResultDAO { @Override public Collection<ProcessResult> getResultByScopeList(WebResource webresource, Scope scope) { Query query = entityManager.createQuery("SELECT pr FROM " + getDefitiniteResultClass().getName() + " pr " + " WHERE " + "pr.subject = :webresource AND " + "pr.test.scope = :scope"); query.setParameter("webresource", webresource); query.setParameter("scope", scope); Set setItems = new LinkedHashSet(query.getResultList()); return setItems; } ProcessResultDAOImpl(); @Override int getResultByThemeCount(WebResource webresource, TestSolution testSolution, Theme theme); @Override Collection<ProcessResult> getResultByScopeList(WebResource webresource, Scope scope); @Override Long retrieveNumberOfGrossResultFromAudit(Audit audit); @Override Long retrieveNumberOfNetResultFromAudit(Audit audit); @Override Collection<ProcessResult> retrieveGrossResultFromAudit(Audit audit); @Override Collection<ProcessResult> retrieveNetResultFromAudit(Audit audit); @Override Collection<ProcessResult> retrieveNetResultFromAuditAndWebResource(Audit audit, WebResource webResource); @Override Collection<ProcessResult> retrieveGrossResultFromAuditAndTest(Audit audit, Test test); @Override void deleteIndefiniteResultFromAudit(Audit audit); @Override Collection<ProcessResult> retrieveIndefiniteResultFromAudit(Audit audit); @Override List<DefiniteResult> getHistoryChanges(ProcessResult processResultImpl); @Override Collection<ProcessResult> retrieveProcessResultListByWebResourceAndScope(
            WebResource webResource, 
            Scope scope); @Override Collection<ProcessResult> retrieveProcessResultListByWebResourceAndCriterion(
            WebResource webResource, 
            Criterion criterion); @Override Collection<ProcessResult> retrieveProcessResultListByWebResourceAndScope(
            WebResource webResource, 
            Scope scope, 
            String theme, 
            Collection<String> testSolutions); @Override Collection<ProcessResult> retrieveProcessResultListByWebResourceAndTest(WebResource webResource, Test test); @Override boolean hasAuditSiteScopeResult(WebResource webResource, Scope scope);  }
@Test public void testGetResultByScopeList() { Scope scope1 = scopeDAO.read(Long.valueOf(1)); Scope scope2 = scopeDAO.read(Long.valueOf(2)); WebResource wa = webresourceDAO.read(Long.valueOf(1)); assertEquals(1, processResultDAO.getResultByScopeList(wa, scope2).size()); assertEquals(5, processResultDAO.getResultByScopeList(wa, scope1).size()); }