-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1476 from phac-nml/filesystem-cleanup-delete-file…
…-from-sample Delete sequence files from file storage when removed from sample
- Loading branch information
Showing
10 changed files
with
277 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ility/bioinformatics/irida/repositories/sequencefile/SequenceConcatenationRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,34 @@ | ||
package ca.corefacility.bioinformatics.irida.repositories.sequencefile; | ||
|
||
import java.util.Set; | ||
|
||
import org.springframework.data.jpa.repository.Query; | ||
|
||
import ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceConcatenation; | ||
import ca.corefacility.bioinformatics.irida.model.sequenceFile.SequencingObject; | ||
import ca.corefacility.bioinformatics.irida.repositories.IridaJpaRepository; | ||
|
||
/** | ||
* Repository for {@link SequenceConcatenation}s | ||
*/ | ||
public interface SequenceConcatenationRepository extends IridaJpaRepository<SequenceConcatenation, Long> { | ||
|
||
/** | ||
* Get the {@link SequenceConcatenation} for a given {@link SequencingObject} | ||
* | ||
* @param sequencingObject the {@link SequencingObject} | ||
* @return a {@link SequenceConcatenation} | ||
*/ | ||
@Query("select sc from SequenceConcatenation sc where sc.concatenated = ?1") | ||
public SequenceConcatenation findConcatenatedSequencingObject(SequencingObject sequencingObject); | ||
|
||
/** | ||
* Get a set of {@link SequenceConcatenation}s if the given {@link SequencingObject} is a source | ||
* | ||
* @param sequencingObject the {@link SequencingObject} | ||
* @return the set of {@link SequenceConcatenation}s | ||
*/ | ||
@Query("select sc from SequenceConcatenation sc where ?1 IN elements(sc.sources)") | ||
public Set<SequenceConcatenation> findConcatenatedSequencingObjectsBySource(SequencingObject sequencingObject); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...urces/ca/corefacility/bioinformatics/irida/database/changesets/unreleased/all-changes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"> | ||
</databaseChangeLog> | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"> | ||
</databaseChangeLog> |
Oops, something went wrong.