ProcessResultDAOImpl extends AbstractJPADAO<ProcessResult, Long> implements ProcessResultDAO { @Override public Collection<ProcessResult> retrieveGrossResultFromAudit(Audit audit) { Query query = entityManager.createQuery("SELECT pr FROM " + getEntityClass().getName() + " pr " + " LEFT JOIN FETCH pr.subject" + " LEFT JOIN FETCH pr.test" + " WHERE " + " pr.grossResultAudit = :audit"); query.setParameter("audit", audit); return query.getResultList(); } 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 testRetrieveGrossResultFromAudit(){ Audit audit = auditDAO.read(Long.valueOf(1)); Collection<ProcessResult> processResultList = processResultDAO.retrieveGrossResultFromAudit(audit); assertEquals(10, processResultList.size()); assertEquals(Long.valueOf(1), ((ProcessResult)processResultList.iterator().next()).getSubject().getId()); audit = auditDAO.read(Long.valueOf(2)); processResultList = processResultDAO.retrieveGrossResultFromAudit(audit); assertEquals(2, processResultList.size()); assertEquals(Long.valueOf(2), ((ProcessResult)processResultList.iterator().next()).getSubject().getId()); }