Interface AnalysisSubmissionRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<AnalysisSubmission,java.lang.Long>
,IridaJpaRepository<AnalysisSubmission,java.lang.Long>
,org.springframework.data.jpa.repository.JpaSpecificationExecutor<AnalysisSubmission>
,org.springframework.data.repository.PagingAndSortingRepository<AnalysisSubmission,java.lang.Long>
,org.springframework.data.repository.Repository<AnalysisSubmission,java.lang.Long>
,org.springframework.data.repository.history.RevisionRepository<AnalysisSubmission,java.lang.Long,java.lang.Integer>
public interface AnalysisSubmissionRepository extends IridaJpaRepository<AnalysisSubmission,java.lang.Long>
A repository for managingAnalysisSubmission
objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
countAnalysesRanByUser(User user)
Get the count ofAnalysisSubmission
s ran by userjava.util.List<GenericStatModel>
countAnalysesRanGrouped(java.util.Date createdDate, java.lang.String groupByFormat)
Get a list ofGenericStatModel
s for analyses ran in past n time period grouped by format provided.java.lang.Long
countAnalysesRanInTimePeriod(java.util.Date createdDate)
Get the count ofAnalysisSubmission
s run in time periodjava.lang.Long
countByAnalysisState(java.util.Collection<AnalysisState> state)
Get the analysis submissions that are currently in the given list of statesjava.util.Set<AnalysisSubmission>
findAnalysisSubmissionsForSequencingObject(SequencingObject object)
Get the Set ofAnalysisSubmission
s which use a givenSequencingObject
java.util.Set<AnalysisSubmission>
findAnalysisSubmissionsForSequencingObjectBySubmitter(SequencingObject object, User user)
AnalysisSubmission
findByAnalysis(Analysis analysis)
Finds theAnalysisSubmission
that caused the passedAnalysis
to be created.java.util.List<AnalysisSubmission>
findByAnalysisState(AnalysisState state)
Loads up a list ofAnalysisSubmission
s with the given state.java.util.List<AnalysisSubmission>
findByAnalysisState(AnalysisState analysisState, AnalysisCleanedState analysisCleanedState)
Loads up a list ofAnalysisSubmission
s with the given states.java.util.List<AnalysisSubmission>
findByAnalysisState(java.util.Collection<AnalysisState> state)
Loads up a list ofAnalysisSubmission
s with the given state.java.util.Set<AnalysisSubmission>
findByReferenceFile(ReferenceFile file)
Get the Set ofAnalysisSubmission
s making use of the givenReferenceFile
.java.util.Set<AnalysisSubmission>
findBySubmitter(User submitter)
Loads up allAnalysisSubmission
s by the submittedUser
.java.util.List<AnalysisSubmission>
findByWorkflowIds(java.util.Collection<java.util.UUID> workflowIds)
Finds allAnalysisSubmission
s corresponding to the given workflow ids.java.util.List<ProjectSampleAnalysisOutputInfo>
getAllAnalysisOutputInfoSharedWithProject(java.lang.Long projectId, java.util.Set<java.util.UUID> workflowIds)
Get allProjectSampleAnalysisOutputInfo
shared with aProject
.java.util.List<ProjectSampleAnalysisOutputInfo>
getAllAutomatedAnalysisOutputInfoForAProject(java.lang.Long projectId, java.util.Set<java.util.UUID> workflowIds)
Get all automatedProjectSampleAnalysisOutputInfo
for aProject
.java.util.List<ProjectSampleAnalysisOutputInfo>
getAllUserAnalysisOutputInfo(java.lang.Long userId)
Get allUser
generated analysis output information.-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, exists, findAll, findAll, findAll, findOne
-
-
-
-
Method Detail
-
findByAnalysisState
@Query("select s from AnalysisSubmission s where s.analysisState = ?1") java.util.List<AnalysisSubmission> findByAnalysisState(AnalysisState state)
Loads up a list ofAnalysisSubmission
s with the given state.- Parameters:
state
- The state of the analyses to search for.- Returns:
- A
List
ofAnalysisSubmission
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 ofAnalysisSubmission
s with the given state.- Parameters:
state
- A collection of states to search for.- Returns:
- A
List
ofAnalysisSubmission
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
-
findByAnalysisState
@Query("select s from AnalysisSubmission s where s.analysisState = ?1 and s.analysisCleanedState = ?2") java.util.List<AnalysisSubmission> findByAnalysisState(AnalysisState analysisState, AnalysisCleanedState analysisCleanedState)
Loads up a list ofAnalysisSubmission
s with the given states.- Parameters:
analysisState
- TheAnalysisState
of the analyses to search for.analysisCleanedState
- TheAnalysisCleanedState
of the analyses to search for.- Returns:
- A
List
ofAnalysisSubmission
objects with the given states.
-
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 allAnalysisSubmission
s corresponding to the given workflow ids.- Parameters:
workflowIds
- The workflow ids to match.- Returns:
- A list of
AnalysisSubmission
s matching one of the workflow ids.
-
findBySubmitter
@Query("select s from AnalysisSubmission s where s.submitter = ?1") java.util.Set<AnalysisSubmission> findBySubmitter(User submitter)
Loads up allAnalysisSubmission
s by the submittedUser
.- Parameters:
submitter
- TheUser
who submitted the analysis.- Returns:
- A
List
ofAnalysisSubmission
s by theUser
.
-
findByAnalysis
@Query("select s from AnalysisSubmission s where s.analysis = ?1") AnalysisSubmission findByAnalysis(Analysis analysis)
Finds theAnalysisSubmission
that caused the passedAnalysis
to be created.- Parameters:
analysis
- the analysis to find the submission for- Returns:
- the submission for the analysis
-
findAnalysisSubmissionsForSequencingObject
@Query("FROM AnalysisSubmission s WHERE ?1 IN elements(s.inputFiles)") java.util.Set<AnalysisSubmission> findAnalysisSubmissionsForSequencingObject(SequencingObject object)
Get the Set ofAnalysisSubmission
s which use a givenSequencingObject
- Parameters:
object
- TheSequencingObject
to get submissions for- Returns:
- Set of
AnalysisSubmission
-
findAnalysisSubmissionsForSequencingObjectBySubmitter
@Query("FROM AnalysisSubmission s WHERE ?1 IN elements(s.inputFiles) AND s.submitter = ?2") java.util.Set<AnalysisSubmission> findAnalysisSubmissionsForSequencingObjectBySubmitter(SequencingObject object, User user)
- Parameters:
object
- TheSequencingObject
to get submissions foruser
- The user to get submissions for- Returns:
- Set of
AnalysisSubmission
-
findByReferenceFile
@Query("FROM AnalysisSubmission s WHERE ?1 = referenceFile") java.util.Set<AnalysisSubmission> findByReferenceFile(ReferenceFile file)
Get the Set ofAnalysisSubmission
s making use of the givenReferenceFile
.- Parameters:
file
- TheReferenceFile
.- Returns:
- A Set of
AnalysisSubmission
s.
-
getAllUserAnalysisOutputInfo
java.util.List<ProjectSampleAnalysisOutputInfo> getAllUserAnalysisOutputInfo(java.lang.Long userId)
Get allUser
generated analysis output information.- Parameters:
userId
-User
id- Returns:
- a list of
ProjectSampleAnalysisOutputInfo
-
getAllAnalysisOutputInfoSharedWithProject
java.util.List<ProjectSampleAnalysisOutputInfo> getAllAnalysisOutputInfoSharedWithProject(java.lang.Long projectId, java.util.Set<java.util.UUID> workflowIds)
Get allProjectSampleAnalysisOutputInfo
shared with aProject
.- Parameters:
projectId
-Project
idworkflowIds
- Workflow UUIDs of workflow pipelines to get output files for- Returns:
- a list of
ProjectSampleAnalysisOutputInfo
-
getAllAutomatedAnalysisOutputInfoForAProject
java.util.List<ProjectSampleAnalysisOutputInfo> getAllAutomatedAnalysisOutputInfoForAProject(java.lang.Long projectId, java.util.Set<java.util.UUID> workflowIds)
Get all automatedProjectSampleAnalysisOutputInfo
for aProject
.- Parameters:
projectId
-Project
idworkflowIds
- Workflow UUIDs of workflow pipelines to get output files for- Returns:
- a list of
ProjectSampleAnalysisOutputInfo
-
countAnalysesRanInTimePeriod
@Query("select count(s.id) from AnalysisSubmission s where s.createdDate >= ?1") java.lang.Long countAnalysesRanInTimePeriod(java.util.Date createdDate)
Get the count ofAnalysisSubmission
s run in time period- Parameters:
createdDate
- The minimum created date for the analysis submission- Returns:
- A count of
AnalysisSubmission
s 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 ofGenericStatModel
s for analyses ran in past n time period grouped by format provided.- Parameters:
createdDate
- The minimum created date for the analysis submissiongroupByFormat
- The format to use for grouping the results.- Returns:
- A list of
GenericStatModel
s
-
countAnalysesRanByUser
@Query("select count(s.id) from AnalysisSubmission s where s.submitter = ?1") int countAnalysesRanByUser(User user)
Get the count ofAnalysisSubmission
s ran by user- Parameters:
user
- The user to get the count of analyses for- Returns:
- count of analyses ran by user
-
-