/*
 * Tanaguru - Automated webpage assessment
 * Copyright (C) 2008-2011  Open-S Company
 *
 * This file is part of Tanaguru.
 *
 * Tanaguru is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact us by mail: open-s AT open-s DOT com
 */
package org.opens.tanaguru.entity.dao.statistics;

import java.math.BigDecimal;
import java.util.Collection;
import org.opens.tanaguru.entity.audit.TestSolution;
import org.opens.tanaguru.entity.parameterization.Parameter;
import org.opens.tanaguru.entity.statistics.WebResourceStatistics;
import org.opens.tanaguru.entity.subject.WebResource;
import org.opens.tanaguru.sdk.entity.dao.GenericDAO;

/**
 *
 * @author jkowalczyk
 */
public interface WebResourceStatisticsDAO extends GenericDAO<WebResourceStatistics, Long>{

    /**
     *
     * @return
     */
    Class<? extends WebResource> getWebResourceEntityClass();

    /**
     * 
     * @param webresourceId
     * @param testSolution
     * @return
     */
    Long findResultCountByResultType(
            Long webresourceId,
            TestSolution testSolution);

    /**
     * 
     * @param webresourceId
     * @param paramSet
     * @param testSolution
     * @return 
     */
    public BigDecimal findWeightedResultCountByResultType(
            Long webresourceId,
            Collection<Parameter> paramSet,
            TestSolution testSolution);
    
    /**
     * 
     * @param webresourceId
     * @param testSolution
     * @return
     */
    Long findNumberOfOccurrencesByWebResourceAndResultType(
            Long webresourceId,
            TestSolution testSolution);

    /**
     * 
     * @param webresourceId
     * @return
     */
    Integer findHttpStatusCodeByWebResource(Long webresourceId);

    /**
     *
     * @param webResource
     * @return
     */
    WebResourceStatistics findWebResourceStatisticsByWebResource(WebResource webResource);

}
@@ -1755,32 +1755,60 @@
 am testSolution%0A
+     * @param isManualAudit%0A
      * @return %0A
@@ -1807,16 +1807,16 @@
 return %0A
-
      */%0A
@@ -1987,16 +1987,52 @@
 Solution
+, %0A            boolean isManualAudit
 );%0A    %0A
@@ -2094,32 +2094,60 @@
 am testSolution%0A
+     * @param isManualAudit%0A
      * @return%0A 
@@ -2237,32 +2237,32 @@
  webresourceId,%0A
-
             Test
@@ -2274,32 +2274,67 @@
 ion testSolution
+,%0A            boolean isManualAudit
 );%0A%0A    /**%0A    

calcul des stat: mise à jour du DAO