@Test public void testRetrieveNumberOfGrossResultFromAudit(){ Audit audit = auditDAO.read(Long.valueOf(1)); assertEquals(Long.valueOf(10), processResultDAO.retrieveNumberOfGrossResultFromAudit(audit)); audit = auditDAO.read(Long.valueOf(2)); assertEquals(Long.valueOf(2), processResultDAO.retrieveNumberOfGrossResultFromAudit(audit)); }
@Override public Long retrieveNumberOfGrossResultFromAudit(Audit audit) { Query query = entityManager.createQuery("SELECT count(pr.id) FROM " + getEntityClass().getName() + " pr " + " WHERE " + " pr.grossResultAudit = :audit"); query.setParameter("audit", audit); return (Long) query.getSingleResult(); }
ProcessResultDAOImpl extends AbstractJPADAO<ProcessResult, Long> implements ProcessResultDAO { @Override public Long retrieveNumberOfGrossResultFromAudit(Audit audit) { Query query = entityManager.createQuery("SELECT count(pr.id) FROM " + getEntityClass().getName() + " pr " + " WHERE " + " pr.grossResultAudit = :audit"); query.setParameter("audit", audit); return (Long) query.getSingleResult(); } }
ProcessResultDAOImpl extends AbstractJPADAO<ProcessResult, Long> implements ProcessResultDAO { @Override public Long retrieveNumberOfGrossResultFromAudit(Audit audit) { Query query = entityManager.createQuery("SELECT count(pr.id) FROM " + getEntityClass().getName() + " pr " + " WHERE " + " pr.grossResultAudit = :audit"); query.setParameter("audit", audit); return (Long) query.getSingleResult(); } ProcessResultDAOImpl(); }
ProcessResultDAOImpl extends AbstractJPADAO<ProcessResult, Long> implements ProcessResultDAO { @Override public Long retrieveNumberOfGrossResultFromAudit(Audit audit) { Query query = entityManager.createQuery("SELECT count(pr.id) FROM " + getEntityClass().getName() + " pr " + " WHERE " + " pr.grossResultAudit = :audit"); query.setParameter("audit", audit); return (Long) query.getSingleResult(); } 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); }
ProcessResultDAOImpl extends AbstractJPADAO<ProcessResult, Long> implements ProcessResultDAO { @Override public Long retrieveNumberOfGrossResultFromAudit(Audit audit) { Query query = entityManager.createQuery("SELECT count(pr.id) FROM " + getEntityClass().getName() + " pr " + " WHERE " + " pr.grossResultAudit = :audit"); query.setParameter("audit", audit); return (Long) query.getSingleResult(); } 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);  }