Class GenomeAssemblyServiceImpl
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl<java.lang.Long,GenomeAssembly>
-
- ca.corefacility.bioinformatics.irida.service.impl.GenomeAssemblyServiceImpl
-
- All Implemented Interfaces:
CRUDService<java.lang.Long,GenomeAssembly>
,GenomeAssemblyService
@Service public class GenomeAssemblyServiceImpl extends CRUDServiceImpl<java.lang.Long,GenomeAssembly> implements GenomeAssemblyService
Service implementation for storing and retrievingGenomeAssembly
-
-
Field Summary
-
Fields inherited from class ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl
CREATED_DATE_SORT_PROPERTY, repository, validator, valueType
-
-
Constructor Summary
Constructors Constructor Description GenomeAssemblyServiceImpl(GenomeAssemblyRepository repository, SampleGenomeAssemblyJoinRepository sampleGenomeAssemblyJoinRepository, javax.validation.Validator validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SampleGenomeAssemblyJoin
createAssemblyInSample(Sample sample, GenomeAssembly assembly)
Create a newGenomeAssembly
in the givenSample
java.util.Collection<SampleGenomeAssemblyJoin>
getAssembliesForSample(Sample sample)
Get allGenomeAssembly
for the givenSample
GenomeAssembly
getGenomeAssemblyForSample(Sample sample, java.lang.Long genomeAssemblyId)
Gets the genome assembly for a sample.void
removeGenomeAssemblyFromSample(Sample sample, java.lang.Long genomeAssemblyId)
Deletes the given genome assembly from the given sample.-
Methods inherited from class ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl
count, create, delete, exists, findAll, findRevisions, findRevisions, list, list, list, read, readMultiple, search, search, update, updateFields, updateMultiple
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.corefacility.bioinformatics.irida.service.CRUDService
count, create, delete, exists, findAll, findRevisions, findRevisions, list, list, list, read, readMultiple, search, search, update, updateFields, updateMultiple
-
-
-
-
Constructor Detail
-
GenomeAssemblyServiceImpl
@Autowired public GenomeAssemblyServiceImpl(GenomeAssemblyRepository repository, SampleGenomeAssemblyJoinRepository sampleGenomeAssemblyJoinRepository, javax.validation.Validator validator)
-
-
Method Detail
-
createAssemblyInSample
@Transactional @PreAuthorize("hasPermission(#sample, \'canUpdateSample\')") public SampleGenomeAssemblyJoin createAssemblyInSample(Sample sample, GenomeAssembly assembly)
Create a newGenomeAssembly
in the givenSample
- Specified by:
createAssemblyInSample
in interfaceGenomeAssemblyService
- Parameters:
sample
- the sample to add a new assemblyassembly
- the assembly to create- Returns:
- a new
SampleGenomeAssemblyJoin
-
getAssembliesForSample
@PreAuthorize("hasPermission(#sample, \'canReadSample\')") public java.util.Collection<SampleGenomeAssemblyJoin> getAssembliesForSample(Sample sample)
Get allGenomeAssembly
for the givenSample
- Specified by:
getAssembliesForSample
in interfaceGenomeAssemblyService
- Parameters:
sample
- the sample to get assemblies for- Returns:
- a collection of
SampleGenomeAssemblyJoin
-
getGenomeAssemblyForSample
@PreAuthorize("hasPermission(#sample, \'canReadSample\')") public GenomeAssembly getGenomeAssemblyForSample(Sample sample, java.lang.Long genomeAssemblyId)
Gets the genome assembly for a sample.- Specified by:
getGenomeAssemblyForSample
in interfaceGenomeAssemblyService
- Parameters:
sample
- The sample.genomeAssemblyId
- The id of the genome assembly.- Returns:
- The
GenomeAssembly
with the given information.
-
removeGenomeAssemblyFromSample
@Transactional @PreAuthorize("hasPermission(#sample, \'canUpdateSample\')") public void removeGenomeAssemblyFromSample(Sample sample, java.lang.Long genomeAssemblyId)
Deletes the given genome assembly from the given sample.- Specified by:
removeGenomeAssemblyFromSample
in interfaceGenomeAssemblyService
- Parameters:
sample
- The sample.genomeAssemblyId
- The genome assembly.
-
-