class EvidenceAuditReportRepository extends ReportCommonRepository {

    public ReportResults computeVitamResults(String processId, Integer tenantId) {
        ReportResults reportResult = new ReportResults();

        Bson eqProcessId = eq(EvidenceAuditObjectModel.PROCESS_ID, processId);
        Bson eqTenant = eq(EvidenceAuditObjectModel.TENANT, tenantId);

        EvidenceAuditFullStatusCount globalResults =
            new EvidenceAuditFullStatusCount(new EvidenceAuditStatusCount(), new EvidenceAuditStatusCount(),
                new EvidenceAuditStatusCount());

        getNbObjects(match(and(eqProcessId, eqTenant)), globalResults);
        getMetadataTypeStats(globalResults, eqProcessId, eqTenant);

        reportResult.setNbOk(globalResults.getObjectGroupsCount().getNbOK() + globalResults.getUnitsCount().getNbOK() + globalResults.getObjectsCount().getNbOK());
        reportResult.setNbKo(globalResults.getObjectGroupsCount().getNbKO() + globalResults.getUnitsCount().getNbKO() + globalResults.getObjectsCount().getNbKO());
        reportResult.setNbWarning(globalResults.getObjectGroupsCount().getNbWARNING() + globalResults.getUnitsCount().getNbWARNING() + globalResults.getObjectsCount().getNbWARNING());

        reportResult.setTotal(reportResult.getNbKo() + reportResult.getNbOk() + reportResult.getNbWarning());
        return reportResult;
    }

    @VisibleForTesting public  EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess, String collectionName);
    public  EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess);

}