Class SequencingRunServiceImpl
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl<java.lang.Long,SequencingRun>
-
- ca.corefacility.bioinformatics.irida.service.impl.SequencingRunServiceImpl
-
- All Implemented Interfaces:
CRUDService<java.lang.Long,SequencingRun>,SequencingRunService
@Service public class SequencingRunServiceImpl extends CRUDServiceImpl<java.lang.Long,SequencingRun> implements SequencingRunService
-
-
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 SequencingRunServiceImpl(SequencingRunRepository repository, SequenceFileRepository sequenceFileRepository, SequencingObjectRepository objectRepository, SampleSequencingObjectJoinRepository ssoRepository, SampleRepository sampleRepository, AnalysisSubmissionRepository submissionRepository, UserRepository userRepository, javax.validation.Validator validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSequencingObjectToSequencingRun(SequencingRun run, SequencingObject seqobject)Create a join between aSequencingObjectto aSequencingRunSequencingRuncreate(SequencingRun o)Create a new object in the persistence store.voiddelete(java.lang.Long id)Delete the object with the specified identifier from the database.java.lang.Iterable<SequencingRun>findAll()List all objects ofTypein the database.org.springframework.data.domain.Page<SequencingRun>list(int page, int size, org.springframework.data.domain.Sort sort)List objects ofTypein the database, limited to some specific pageorg.springframework.data.domain.Page<SequencingRun>list(int page, int size, org.springframework.data.domain.Sort.Direction order, java.lang.String... sortProperties)List objects ofTypein the database, limited to some specific page.SequencingRunread(java.lang.Long id)Read the object type by unique identifier.SequencingRunupdate(SequencingRun object)Update an objectSequencingRunupdateFields(java.lang.Long id, java.util.Map<java.lang.String,java.lang.Object> updatedFields)Update properties of the given object by given fields.-
Methods inherited from class ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl
count, exists, findRevisions, findRevisions, list, readMultiple, search, search, 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, exists, findRevisions, findRevisions, list, readMultiple, search, search, updateMultiple
-
-
-
-
Constructor Detail
-
SequencingRunServiceImpl
@Autowired public SequencingRunServiceImpl(SequencingRunRepository repository, SequenceFileRepository sequenceFileRepository, SequencingObjectRepository objectRepository, SampleSequencingObjectJoinRepository ssoRepository, SampleRepository sampleRepository, AnalysisSubmissionRepository submissionRepository, UserRepository userRepository, javax.validation.Validator validator)
-
-
Method Detail
-
read
@Transactional(readOnly=true) @PreAuthorize("hasAnyRole(\'ROLE_SEQUENCER\', \'ROLE_USER\', \'ROLE_TECHNICIAN\')") public SequencingRun read(java.lang.Long id)Read the object type by unique identifier.- Specified by:
readin interfaceCRUDService<java.lang.Long,SequencingRun>- Overrides:
readin classCRUDServiceImpl<java.lang.Long,SequencingRun>- Parameters:
id- The unique identifier for this object.- Returns:
- The object corresponding to the unique identifier.
-
findAll
@PreAuthorize("hasAnyRole(\'ROLE_ADMIN\', \'ROLE_SEQUENCER\', \'ROLE_USER\', \'ROLE_TECHNICIAN\')") @PostFilter("hasPermission(filterObject, \'canReadSequencingRun\')") public java.lang.Iterable<SequencingRun> findAll()List all objects ofTypein the database.- Specified by:
findAllin interfaceCRUDService<java.lang.Long,SequencingRun>- Overrides:
findAllin classCRUDServiceImpl<java.lang.Long,SequencingRun>- Returns:
- All objects of the specified
Typein the database.
-
addSequencingObjectToSequencingRun
@Transactional @PreAuthorize("hasAnyRole(\'ROLE_SEQUENCER\',\'ROLE_ADMIN\')") public void addSequencingObjectToSequencingRun(SequencingRun run, SequencingObject seqobject)Create a join between aSequencingObjectto aSequencingRun- Specified by:
addSequencingObjectToSequencingRunin interfaceSequencingRunService- Parameters:
run- TheSequencingRunseqobject- TheSequencingObject
-
create
@PreAuthorize("hasAnyRole(\'ROLE_SEQUENCER\',\'ROLE_ADMIN\', \'ROLE_USER\')") public SequencingRun create(SequencingRun o)Description copied from class:CRUDServiceImplCreate a new object in the persistence store.- Specified by:
createin interfaceCRUDService<java.lang.Long,SequencingRun>- Overrides:
createin classCRUDServiceImpl<java.lang.Long,SequencingRun>- Parameters:
o- The object to persist.- Returns:
- The object as it was persisted in the database. May modify the identifier of the object when returned.
-
delete
@Transactional @PreAuthorize("hasRole(\'ROLE_ADMIN\')") public void delete(java.lang.Long id)Delete the object with the specified identifier from the database.- Specified by:
deletein interfaceCRUDService<java.lang.Long,SequencingRun>- Overrides:
deletein classCRUDServiceImpl<java.lang.Long,SequencingRun>- Parameters:
id- The identifier of the object to delete.
-
updateFields
@PreAuthorize("hasAnyRole(\'ROLE_SEQUENCER\',\'ROLE_ADMIN\') or hasPermission(#id, \'canUpdateSequencingRun\')") public SequencingRun updateFields(java.lang.Long id, java.util.Map<java.lang.String,java.lang.Object> updatedFields) throws javax.validation.ConstraintViolationException, EntityExistsException, InvalidPropertyExceptionUpdate properties of the given object by given fields. The object must have a valid identifier prior to being passed to this method.- Specified by:
updateFieldsin interfaceCRUDService<java.lang.Long,SequencingRun>- Overrides:
updateFieldsin classCRUDServiceImpl<java.lang.Long,SequencingRun>- Parameters:
id- The identifier of the object to update.updatedFields- the object properties that should be updated.- Returns:
- The object as it was persisted in the database. May modify the identifier of the object when returned.
- Throws:
javax.validation.ConstraintViolationException- If the object being persisted cannot be validated by validation rules associated with the object.EntityExistsException- If the object being persisted violates uniqueness constraints in the database.InvalidPropertyException- If the updated properties map contains a property name that does not exist on the domain model.
-
update
@PreAuthorize("hasAnyRole(\'ROLE_SEQUENCER\',\'ROLE_ADMIN\') or hasPermission(#object, \'canUpdateSequencingRun\')") public SequencingRun update(SequencingRun object)Update an object- Specified by:
updatein interfaceCRUDService<java.lang.Long,SequencingRun>- Overrides:
updatein classCRUDServiceImpl<java.lang.Long,SequencingRun>- Parameters:
object- The object to update- Returns:
- The updated object
-
list
@PreAuthorize("hasAnyRole(\'ROLE_ADMIN\', \'ROLE_SEQUENCER\', \'ROLE_TECHNICIAN\')") public org.springframework.data.domain.Page<SequencingRun> list(int page, int size, org.springframework.data.domain.Sort.Direction order, java.lang.String... sortProperties) throws java.lang.IllegalArgumentExceptionList objects ofTypein the database, limited to some specific page.- Specified by:
listin interfaceCRUDService<java.lang.Long,SequencingRun>- Overrides:
listin classCRUDServiceImpl<java.lang.Long,SequencingRun>- Parameters:
page- the specific page to use.size- the size of the pages used to compute the number of pages.order- the order of the sort.sortProperties- the properties used to sort the collection.- Returns:
- the list of users within the specified range.
- Throws:
java.lang.IllegalArgumentException- If theTypehas no public propertysortProperty.
-
list
@PreAuthorize("hasAnyRole(\'ROLE_ADMIN\', \'ROLE_SEQUENCER\', \'ROLE_TECHNICIAN\')") public org.springframework.data.domain.Page<SequencingRun> list(int page, int size, org.springframework.data.domain.Sort sort) throws java.lang.IllegalArgumentExceptionList objects ofTypein the database, limited to some specific page- Specified by:
listin interfaceCRUDService<java.lang.Long,SequencingRun>- Overrides:
listin classCRUDServiceImpl<java.lang.Long,SequencingRun>- Parameters:
page- the specific page to usesize- the size of the pagessort- ASortobject for ordering the results- Returns:
- a list of objects in the given range
- Throws:
java.lang.IllegalArgumentException
-
-