Interface AnalysisSubmissionRepository

    • Method Detail

      • findByAnalysisState

        @Query("select s from AnalysisSubmission s where s.analysisState = ?1")
        java.util.List<AnalysisSubmission> findByAnalysisState​(AnalysisState state)
        Loads up a list of AnalysisSubmissions with the given state.
        Parameters:
        state - The state of the analyses to search for.
        Returns:
        A List of AnalysisSubmission objects with the given state.
      • findByAnalysisState

        @Query("select s from AnalysisSubmission s where s.analysisState in ?1")
        java.util.List<AnalysisSubmission> findByAnalysisState​(java.util.Collection<AnalysisState> state)
        Loads up a list of AnalysisSubmissions with the given state.
        Parameters:
        state - A collection of states to search for.
        Returns:
        A List of AnalysisSubmission objects with the given state.
      • countByAnalysisState

        @Query("select count(s.id) from AnalysisSubmission s where s.analysisState in ?1")
        java.lang.Long countByAnalysisState​(java.util.Collection<AnalysisState> state)
        Get the analysis submissions that are currently in the given list of states
        Parameters:
        state - the list of states to get analyses fro
        Returns:
        the number of analyses with that state
      • findByWorkflowIds

        @Query("select s from AnalysisSubmission s where s.workflowId in ?1")
        java.util.List<AnalysisSubmission> findByWorkflowIds​(java.util.Collection<java.util.UUID> workflowIds)
        Finds all AnalysisSubmissions corresponding to the given workflow ids.
        Parameters:
        workflowIds - The workflow ids to match.
        Returns:
        A list of AnalysisSubmissions matching one of the workflow ids.
      • findByAnalysis

        @Query("select s from AnalysisSubmission s where s.analysis = ?1")
        AnalysisSubmission findByAnalysis​(Analysis analysis)
        Finds the AnalysisSubmission that caused the passed Analysis to be created.
        Parameters:
        analysis - the analysis to find the submission for
        Returns:
        the submission for the analysis
      • countAnalysesRanInTimePeriod

        @Query("select count(s.id) from AnalysisSubmission s where s.createdDate >= ?1")
        java.lang.Long countAnalysesRanInTimePeriod​(java.util.Date createdDate)
        Get the count of AnalysisSubmissions run in time period
        Parameters:
        createdDate - The minimum created date for the analysis submission
        Returns:
        A count of AnalysisSubmissions run in time period.
      • countAnalysesRanGrouped

        @Query("select new ca.corefacility.bioinformatics.irida.ria.web.admin.dto.statistics.GenericStatModel(function(\'date_format\', s.createdDate, ?2), count(s.id))from AnalysisSubmission s where s.createdDate >= ?1 group by function(\'date_format\', s.createdDate, ?2) order by function(\'date_format\', s.createdDate, ?2) asc")
        java.util.List<GenericStatModel> countAnalysesRanGrouped​(java.util.Date createdDate,
                                                                 java.lang.String groupByFormat)
        Get a list of GenericStatModels for analyses ran in past n time period grouped by format provided.
        Parameters:
        createdDate - The minimum created date for the analysis submission
        groupByFormat - The format to use for grouping the results.
        Returns:
        A list of GenericStatModels
      • countAnalysesRanByUser

        @Query("select count(s.id) from AnalysisSubmission s where s.submitter = ?1")
        int countAnalysesRanByUser​(User user)
        Get the count of AnalysisSubmissions ran by user
        Parameters:
        user - The user to get the count of analyses for
        Returns:
        count of analyses ran by user